fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / autodoc / source / display / idl / hi_linkhelper.hxx
blob7432a88ba5f0bdab239b5021320828b724032f07
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 #ifndef ADC_DISPLAY_HI_LINKHELPER_HXX
21 #define ADC_DISPLAY_HI_LINKHELPER_HXX
23 #include "hi_ary.hxx"
24 #include "hi_env.hxx"
25 #include <toolkit/out_position.hxx>
26 #include <toolkit/out_tree.hxx>
29 class LinkHelper
31 public:
32 typedef ary::idl::CodeEntity CE;
33 typedef output::Position OutPosition;
35 LinkHelper(
36 HtmlEnvironment_Idl &
37 io_rEnv )
38 : rEnv(io_rEnv) {}
40 OutPosition PositionOf_CurModule() const
41 { return OutPosition( rEnv.CurPosition(),
42 output::ModuleFileName()); }
44 OutPosition PositionOf_CurXRefs(
45 const String & i_ceName) const;
46 OutPosition PositionOf_Index() const
47 { OutPosition ret1 = rEnv.OutputTree().IndexRoot();
48 return OutPosition( ret1, String(output::IndexFile_A()) ); }
51 const ary::idl::Module *
52 Search_CurModule() const;
53 const ary::idl::Module *
54 Search_Module(
55 output::Node & i_node ) const;
57 const CE * Search_CeFromType(
58 ary::idl::Type_id i_type ) const;
60 void Get_Link2Position(
61 StreamStr & o_link,
62 OutPosition & i_pos ) const
63 { rEnv.CurPosition().Get_LinkTo(o_link, i_pos); }
65 void Get_Link2Member(
66 StreamStr & o_link,
67 OutPosition & i_ownerPos,
68 const String & i_memberName ) const
69 { Get_Link2Position(o_link, i_ownerPos);
70 o_link << "#" << i_memberName; }
71 const String & XrefsSuffix() const;
73 private:
74 HtmlEnvironment_Idl & rEnv;
77 inline const ary::idl::CodeEntity *
78 LinkHelper::Search_CeFromType( ary::idl::Type_id i_type ) const
80 ary::idl::Ce_id nCe = rEnv.Data().CeFromType(i_type);
81 if (nCe.IsValid())
82 return &rEnv.Data().Find_Ce(nCe);
83 return 0;
86 String nameChainLinker( const char * i_levelName );
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */