bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / gloslst.hxx
blob9bc2c353a1594aebc42a359f89dbf03547c88c73
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 _GLOSLST_HXX
21 #define _GLOSLST_HXX
24 #include <tools/datetime.hxx>
25 #include <tools/string.hxx>
26 #include <vcl/timer.hxx>
28 class SwGlossaries;
29 class vector;
31 struct AutoTextGroup
33 sal_uInt16 nCount;
34 String sName;
35 String sTitle;
36 String sLongNames; // by 0x0A separated long names
37 String sShortNames; // by 0x0A separated short names
38 DateTime aDateModified;
40 AutoTextGroup() : aDateModified( DateTime::EMPTY ) {}
44 typedef std::vector<AutoTextGroup*> AutoTextGroups;
46 class SwGlossaryList : public AutoTimer
48 AutoTextGroups aGroupArr;
49 String sPath;
50 sal_Bool bFilled;
52 AutoTextGroup* FindGroup(const String& rGroupName);
53 void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss);
55 public:
56 SwGlossaryList();
57 ~SwGlossaryList();
59 bool HasLongName(const String& rBegin, std::vector<String> *pLongNames);
60 sal_Bool GetShortName(const String& rLongName,
61 String& rShortName, String& rGroupName );
63 sal_uInt16 GetGroupCount();
64 String GetGroupName(sal_uInt16 nPos, bool bNoPath = true, String* pTitle = 0);
65 sal_uInt16 GetBlockCount(sal_uInt16 nGroup);
66 String GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName);
68 void Update();
70 virtual void Timeout();
72 void ClearGroups();
75 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */