fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / autodoc / source / display / toolkit / hf_linachain.cxx
blob315b17b326a8fb3ca3189c275cd58a8396dda386
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #include <precomp.h>
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 )
30 : HtmlMaker( o_rOut
31 >> *new Html::Paragraph
32 << new Html::ClassAttr("namechain") )
36 HF_LinkedNameChain::~HF_LinkedNameChain()
40 void
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);
47 void
48 HF_LinkedNameChain::Produce_CompleteChain_forModule( const output::Position & i_curPosition,
49 F_LinkMaker i_linkMaker ) const
51 if (i_curPosition.Depth() == 0)
52 return;
53 produce_Level(*i_curPosition.RelatedNode().Parent(), i_curPosition, i_linkMaker);
58 namespace
61 StreamStr aLinkBuf(200);
65 void
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(),
73 i_startPosition,
74 i_linkMaker );
77 aLinkBuf.reset();
79 String
80 sFileName = (*i_linkMaker)(i_levelNode.Name());
81 output::Position
82 aLevelPos(i_levelNode, sFileName);
84 i_startPosition.Get_LinkTo(aLinkBuf, aLevelPos);
86 if ( i_levelNode.Depth() > 0 )
88 CurOut()
89 >> *new Html::Link(aLinkBuf.c_str())
90 << new Html::ClassAttr("namechain")
91 << i_levelNode.Name();
92 CurOut() << " :: ";
94 else
96 CurOut()
97 >> *new Html::Link(aLinkBuf.c_str())
98 << new Html::ClassAttr("namechain")
99 << "::";
100 CurOut() << " ";
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */