bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / gloshdl.hxx
blob84e876ac4b4db7731849732563fb635955ec5e99
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 .
19 #ifndef _GLOSHDL_HXX
20 #define _GLOSHDL_HXX
22 #include <tools/string.hxx>
23 #include "swdllapi.h"
25 class SwWrtShell;
26 class SwTextBlocks;
27 class SvxMacro;
28 class SwGlossaries;
29 class SfxViewFrame;
31 // CLASS -----------------------------------------------------------------
32 class SW_DLLPUBLIC SwGlossaryHdl
35 SwGlossaries& rStatGlossaries;
36 String aCurGrp;
37 SfxViewFrame* pViewFrame;
38 SwWrtShell* pWrtShell;
39 SwTextBlocks* pCurGrp;
41 SW_DLLPRIVATE void _SetMacros(const String &rName,
42 const SvxMacro *pStart,
43 const SvxMacro *pEnd);
45 SW_DLLPRIVATE sal_Bool Expand( const String& rShortName,
46 SwGlossaries* pGlossaries,
47 SwTextBlocks *pGlossary );
49 public:
50 sal_Bool ConvertToNew(SwTextBlocks& rOld);
51 void GlossaryDlg();
53 sal_uInt16 GetGroupCnt() const;
54 String GetGroupName( sal_uInt16, String* pTitle = 0 );
55 sal_Bool NewGroup(String & rGroupName, const String& rTitle);
56 sal_Bool DelGroup(const String &);
57 sal_Bool RenameGroup(const String & rOld, String& rNew, const String& rNewTitle);
58 void SetCurGroup(const String &aGrp, sal_Bool bApi = sal_False, sal_Bool bAlwaysCreateNew = sal_False);
60 const String &GetCurGroup() const { return aCurGrp; }
62 sal_uInt16 GetGlossaryCnt();
63 String GetGlossaryName(sal_uInt16);
64 String GetGlossaryShortName(const String &rName);
65 String GetGlossaryShortName(sal_uInt16);
67 sal_Bool Rename( const String& rOldShortName, const String& rNewShortName,
68 const String& rNewName);
69 sal_Bool CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
70 const String& rDestGroupName, const String& rLongName, sal_Bool bMove );
71 sal_Bool HasShortName(const String &rShortName) const;
72 // when NewGlossary is called from Basic then the previously set group should
73 // be newly created if applicable.
74 sal_Bool NewGlossary(const String &rName, const String &rShortName,
75 sal_Bool bApiCall = sal_False, sal_Bool bNoAttr = sal_False );
76 sal_Bool DelGlossary(const String&);
77 sal_Bool CopyToClipboard(SwWrtShell& rSh, const String& rShortName);
79 sal_Bool ExpandGlossary();
80 bool InsertGlossary(const String &rName);
82 void SetMacros(const String& rName,
83 const SvxMacro* pStart,
84 const SvxMacro* pEnd,
85 SwTextBlocks *pGlossary = 0 );
86 void GetMacros(const String& rShortName,
87 SvxMacro& rStart,
88 SvxMacro& rEnd,
89 SwTextBlocks* pGlossary = 0 );
91 sal_Bool IsReadOnly( const String* = 0 ) const;
92 sal_Bool IsOld() const;
94 sal_Bool FindGroupName(String & rGroup); // find group without path index
96 sal_Bool ImportGlossaries( const String& rName );
98 SwGlossaryHdl(SfxViewFrame* pViewFrame, SwWrtShell *);
99 ~SwGlossaryHdl();
102 #endif // _GLOSHDL_HXX
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */