This file is indexed.

/usr/include/podofo/doc/PdfOutlines.h is in libpodofo-dev 0.9.0-1.2+b2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
/***************************************************************************
 *   Copyright (C) 2006 by Dominik Seichter                                *
 *   domseichter@web.de                                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU Library General Public     *
 *   License along with this program; if not, write to the                 *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef _PDF_OUTLINE_H_
#define _PDF_OUTLINE_H_

#include "podofo/base/PdfDefines.h"
#include "PdfElement.h"

namespace PoDoFo {

class PdfDestination;
class PdfAction;
class PdfObject;
class PdfOutlineItem;
class PdfString;
class PdfVecObjects;

/**
 * The title of an outline item can be displayed
 * in different formating styles since PDF 1.4.
 */
enum EPdfOutlineFormat {
    ePdfOutlineFormat_Default    = 0x00,   /**< Default format */
    ePdfOutlineFormat_Italic     = 0x01,   /**< Italic */
    ePdfOutlineFormat_Bold       = 0x02,   /**< Bold */
    ePdfOutlineFormat_BoldItalic = 0x03,   /**< Bold Italic */

    ePdfOutlineFormat_Unknown    = 0xFF
};

/**
 * A PDF outline item has an title and a destination.
 * It is an element in the documents outline which shows
 * its hierarchical structure.
 *
 * \see PdfDocument
 * \see PdfOutlines
 * \see PdfDestination
 */
class PODOFO_DOC_API PdfOutlineItem : public PdfElement {
 public:
    virtual ~PdfOutlineItem();

    /** Create a PdfOutlineItem that is a child of this item
     *  \param sTitle title of this item
     *  \param rDest destination of this item
     */
    PdfOutlineItem* CreateChild( const PdfString & sTitle, const PdfDestination & rDest );

    /** Create a PdfOutlineItem that is on the same level and follows the current item.
     *  \param sTitle title of this item
     *  \param rDest destination of this item
     */
    PdfOutlineItem* CreateNext ( const PdfString & sTitle, const PdfDestination & rDest );

    /** Create a PdfOutlineItem that is on the same level and follows the current item.
     *  \param sTitle title of this item
     *  \param rAction action of this item
     */
    PdfOutlineItem* CreateNext ( const PdfString & sTitle, const PdfAction & rAction );

	/** Inserts an existing PdfOutlineItem as a child
     *  of this outline item.
     *
     *  \param pItem an existing outline item
     */
    void InsertChild( PdfOutlineItem* pItem );

    /** 
     * \returns the previous item or NULL if this is the first on the current level
     */
    inline PdfOutlineItem* Prev() const;

    /** 
     * \returns the next item or NULL if this is the last on the current level
     */
    inline PdfOutlineItem* Next() const;

    /** 
     * \returns the first outline item that is a child of this item
     */
    inline PdfOutlineItem* First() const;

    /** 
     * \returns the last outline item that is a child of this item
     */
    inline PdfOutlineItem* Last() const;

    /**
     * \returns the parent item of this item or NULL if it is
     *          the top level outlines dictionary
     */
    inline PdfOutlineItem* GetParentOutline() const;

    /** Deletes this outline item and all its children from 
     *  the outline hierarchy and removes all objects from
     *  the list of PdfObjects
     *  All pointers to this item will be invalid after this function
     *  call.
     */
    void Erase();

    /** Set the destination of this outline.
     *  \param rDest the destination
     */
    void SetDestination( const PdfDestination & rDest );

    /** Get the destination of this outline.
     *  \param pDoc a PdfDocument owning this annotation.
     *         This is required to resolve names and pages.
     *  \returns the destination, if there is one, or NULL
     */
    PdfDestination* GetDestination( PdfDocument* pDoc );

    /** Set the action of this outline.
     *  \param rAction the action
     */
    void SetAction( const PdfAction & rAction );

    /** Get the action of this outline.
     *  \returns the action, if there is one, or NULL
     */
    PdfAction* GetAction( void );

    /** Set the title of this outline item
     *  \param sTitle the title to use
     */
    void SetTitle( const PdfString & sTitle );

    /** Get the title of this item
     *  \returns the title as PdfString
     */
    const PdfString & GetTitle() const;

    /** Set the text format of the title.
     *  Supported since PDF 1.4.
     *
     *  \param eFormat the formatting options 
     *                 for the title
     */
    void SetTextFormat( EPdfOutlineFormat eFormat );

    /** Get the text format of the title
     *  \returns the text format of the title
     */
    EPdfOutlineFormat GetTextFormat() const;

    /** Set the color of the title of this item.
     *  This property is supported since PDF 1.4.
     *  \param r red color component
     *  \param g green color component
     *  \param b blue color component
     */
    void SetTextColor( double r, double g, double b );

    /** Get the color of the title of this item.
     *  Supported since PDF 1.4.
     *  \returns the red color component
     *
     *  \see SetTextColor
     */
    double GetTextColorRed() const;

    /** Get the color of the title of this item.
     *  Supported since PDF 1.4.
     *  \returns the red color component
     *
     *  \see SetTextColor
     */
    double GetTextColorBlue() const;

    /** Get the color of the title of this item.
     *  Supported since PDF 1.4.
     *  \returns the red color component
     *
     *  \see SetTextColor
     */
    double GetTextColorGreen() const;

 private:
    void SetPrevious( PdfOutlineItem* pItem );
    void SetNext    ( PdfOutlineItem* pItem );
    void SetLast    ( PdfOutlineItem* pItem );
    void SetFirst   ( PdfOutlineItem* pItem );

 protected:
    /** Create a new PdfOutlineItem dictionary
     *  \param pParent parent vector of objects
     */
    PdfOutlineItem( PdfVecObjects* pParent );

    /** Create a new PdfOutlineItem from scratch
     *  \param sTitle title of this item
     *  \param rDest destination of this item
     *  \param pParentOutline parent of this outline item 
     *                        in the outline item hierarchie
     *  \param pParent parent vector of objects which is required
     *                 to create new objects
     */
    PdfOutlineItem( const PdfString & sTitle, const PdfDestination & rDest, 
                    PdfOutlineItem* pParentOutline, PdfVecObjects* pParent );

    /** Create a new PdfOutlineItem from scratch
     *  \param sTitle title of this item
     *  \param rAction action of this item
     *  \param pParentOutline parent of this outline item 
     *                        in the outline item hierarchie
     *  \param pParent parent vector of objects which is required
     *                 to create new objects
     */
    PdfOutlineItem( const PdfString & sTitle, const PdfAction & rAction, 
                    PdfOutlineItem* pParentOutline, PdfVecObjects* pParent );

	/** Create a PdfOutlineItem from an existing PdfObject
     *  \param pObject an existing outline item
     *  \param pParentOutline parent of this outline item 
     *                        in the outline item hierarchie
     *  \param pPrevious previous item of this item
     */
    PdfOutlineItem( PdfObject* pObject, PdfOutlineItem* pParentOutline, PdfOutlineItem* pPrevious );

 private:
    PdfOutlineItem*    m_pParentOutline;

    PdfOutlineItem*    m_pPrev;
    PdfOutlineItem*    m_pNext;

    PdfOutlineItem*    m_pFirst;
    PdfOutlineItem*    m_pLast;

    PdfDestination*    m_pDestination;
    PdfAction*		   m_pAction;
};

// -----------------------------------------------------
// 
// -----------------------------------------------------
inline PdfOutlineItem* PdfOutlineItem::GetParentOutline() const
{
    return m_pParentOutline;
}

// -----------------------------------------------------
// 
// -----------------------------------------------------
inline PdfOutlineItem* PdfOutlineItem::First() const
{
    return m_pFirst;
}

// -----------------------------------------------------
// 
// -----------------------------------------------------
inline PdfOutlineItem* PdfOutlineItem::Last() const
{
    return m_pLast;
}

// -----------------------------------------------------
// 
// -----------------------------------------------------
inline PdfOutlineItem* PdfOutlineItem::Prev() const
{
    return m_pPrev;
}

// -----------------------------------------------------
// 
// -----------------------------------------------------
inline PdfOutlineItem* PdfOutlineItem::Next() const
{
    return m_pNext;
}


/** The main PDF outlines dictionary.
 *  
 *  Do not create it by yourself but 
 *  use PdfDocument::GetOutlines() instead.
 *
 *  \see PdfDocument
 */
class PODOFO_DOC_API PdfOutlines : public PdfOutlineItem {
 public:
   
    /** Create a new PDF outlines dictionary
     *  \param pParent parent vector of objects
     */
    PdfOutlines( PdfVecObjects* pParent );

    /** Create a PDF outlines object from an existing dictionary
     *  \param pObject an existing outlines dictionary
     */
    PdfOutlines( PdfObject* pObject );

    virtual ~PdfOutlines() { }

    /** Create the root node of the 
     *  outline item tree.
     *
     *  \param sTitle the title of the root node
     */
    PdfOutlineItem* CreateRoot( const PdfString & sTitle );
};

};

#endif // _PDF_OUTLINE_H_