1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <toolkit/hf_linachain.hxx>
24 // NOT FULLY DEFINED SERVICES
25 #include <toolkit/out_position.hxx>
29 HF_LinkedNameChain::HF_LinkedNameChain( Xml::Element
& o_rOut
)
31 >> *new Html::Paragraph
32 << new Html::ClassAttr("namechain") )
36 HF_LinkedNameChain::~HF_LinkedNameChain()
41 HF_LinkedNameChain::Produce_CompleteChain( const output::Position
& i_curPosition
,
42 F_LinkMaker i_linkMaker
) const
44 produce_Level(i_curPosition
.RelatedNode(), i_curPosition
, i_linkMaker
);
48 HF_LinkedNameChain::Produce_CompleteChain_forModule( const output::Position
& i_curPosition
,
49 F_LinkMaker i_linkMaker
) const
51 if (i_curPosition
.Depth() == 0)
53 produce_Level(*i_curPosition
.RelatedNode().Parent(), i_curPosition
, i_linkMaker
);
61 StreamStr
aLinkBuf(200);
66 HF_LinkedNameChain::produce_Level( output::Node
& i_levelNode
,
67 const output::Position
& i_startPosition
,
68 F_LinkMaker i_linkMaker
) const
70 if ( i_levelNode
.Depth() > 0 )
72 produce_Level( *i_levelNode
.Parent(),
80 sFileName
= (*i_linkMaker
)(i_levelNode
.Name());
82 aLevelPos(i_levelNode
, sFileName
);
84 i_startPosition
.Get_LinkTo(aLinkBuf
, aLevelPos
);
86 if ( i_levelNode
.Depth() > 0 )
89 >> *new Html::Link(aLinkBuf
.c_str())
90 << new Html::ClassAttr("namechain")
91 << i_levelNode
.Name();
97 >> *new Html::Link(aLinkBuf
.c_str())
98 << new Html::ClassAttr("namechain")
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */