xref: /trunk/main/cui/source/inc/autocdlg.hxx (revision a9075099)
1*c4eee24dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c4eee24dSAndrew Rist  * distributed with this work for additional information
6*c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9*c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c4eee24dSAndrew Rist  *
11*c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c4eee24dSAndrew Rist  *
13*c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15*c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18*c4eee24dSAndrew Rist  * under the License.
19*c4eee24dSAndrew Rist  *
20*c4eee24dSAndrew Rist  *************************************************************/
21*c4eee24dSAndrew Rist 
22*c4eee24dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _OFA_AUTOCDLG_HXX
24cdf0e10cSrcweir #define _OFA_AUTOCDLG_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <svtools/langtab.hxx>
27cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
28cdf0e10cSrcweir #include <tools/table.hxx>
29cdf0e10cSrcweir #include <svx/checklbx.hxx>
30cdf0e10cSrcweir #include <vcl/fixed.hxx>
31cdf0e10cSrcweir #include <vcl/field.hxx>
32cdf0e10cSrcweir #include <vcl/metric.hxx>
33cdf0e10cSrcweir #include <svx/langbox.hxx>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir class SvxAutoCorrect;
36cdf0e10cSrcweir class CharClass;
37cdf0e10cSrcweir class CollatorWrapper;
38cdf0e10cSrcweir class SmartTagMgr;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir // class OfaAutoCorrDlg --------------------------------------------------
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class OfaAutoCorrDlg : public SfxTabDialog
43cdf0e10cSrcweir {
44cdf0e10cSrcweir 	FixedText		aLanguageFT;
45cdf0e10cSrcweir 	SvxLanguageBox	aLanguageLB;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir 	DECL_LINK(SelectLanguageHdl, ListBox*);
48cdf0e10cSrcweir public:
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 	OfaAutoCorrDlg(Window* pParent, const SfxItemSet *pSet );
51cdf0e10cSrcweir 
EnableLanguage(sal_Bool bEnable)52cdf0e10cSrcweir 	void	EnableLanguage(sal_Bool bEnable)
53cdf0e10cSrcweir 			{	aLanguageFT.Enable(bEnable);
54cdf0e10cSrcweir 				aLanguageLB.Enable(bEnable);}
55cdf0e10cSrcweir 
56cdf0e10cSrcweir };
57cdf0e10cSrcweir 
58cdf0e10cSrcweir #ifdef _OFA_AUTOCDLG_CXX
59cdf0e10cSrcweir #include <vcl/group.hxx>
60cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
61cdf0e10cSrcweir #include <vcl/button.hxx>
62cdf0e10cSrcweir #endif
63cdf0e10cSrcweir #include <vcl/lstbox.hxx>
64cdf0e10cSrcweir #include <svtools/svtabbx.hxx>
65cdf0e10cSrcweir #include <svx/simptabl.hxx>
66cdf0e10cSrcweir 
67cdf0e10cSrcweir class SvStringsISortDtor;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir // class OfaACorrCheckListBox ------------------------------------------
70cdf0e10cSrcweir 
71cdf0e10cSrcweir class OfaACorrCheckListBox : public SvxSimpleTable
72cdf0e10cSrcweir {
73cdf0e10cSrcweir 	using SvxSimpleTable::SetTabs;
74cdf0e10cSrcweir 	using SvTreeListBox::GetCheckButtonState;
75cdf0e10cSrcweir 	using SvTreeListBox::SetCheckButtonState;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	protected:
78cdf0e10cSrcweir 		virtual void	SetTabs();
79cdf0e10cSrcweir 		virtual void	HBarClick();
80cdf0e10cSrcweir         virtual void    KeyInput( const KeyEvent& rKEvt );
81cdf0e10cSrcweir 
82cdf0e10cSrcweir 	public:
OfaACorrCheckListBox(Window * pParent,const ResId & rResId)83cdf0e10cSrcweir 		OfaACorrCheckListBox(Window* pParent, const ResId& rResId ) :
84cdf0e10cSrcweir 			SvxSimpleTable( pParent, rResId ){}
85cdf0e10cSrcweir 
GetUserData(sal_uLong nPos)86cdf0e10cSrcweir 		inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); }
SetUserData(sal_uLong nPos,void * pData)87cdf0e10cSrcweir 		inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); }
GetSelectEntryPos()88cdf0e10cSrcweir 		inline sal_uLong GetSelectEntryPos() { return GetModel()->GetAbsPos(FirstSelected()); }
89cdf0e10cSrcweir 
90cdf0e10cSrcweir 		sal_Bool			IsChecked(sal_uLong nPos, sal_uInt16 nCol = 0);
91cdf0e10cSrcweir 		void			CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked);
92cdf0e10cSrcweir 		SvButtonState	GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const;
93cdf0e10cSrcweir 		void			SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState );
94cdf0e10cSrcweir };
95cdf0e10cSrcweir 
96cdf0e10cSrcweir // class OfaAutocorrOptionsPage ------------------------------------------
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 
99cdf0e10cSrcweir class OfaAutocorrOptionsPage : public SfxTabPage
100cdf0e10cSrcweir {
101cdf0e10cSrcweir 	using TabPage::ActivatePage;
102cdf0e10cSrcweir 
103cdf0e10cSrcweir private:
104cdf0e10cSrcweir 	SvxCheckListBox	aCheckLB;
105cdf0e10cSrcweir 
106cdf0e10cSrcweir 	String		sInput;
107cdf0e10cSrcweir 	String		sDoubleCaps;
108cdf0e10cSrcweir 	String		sStartCap;
109cdf0e10cSrcweir 	String		sBoldUnderline;
110cdf0e10cSrcweir 	String		sURL;
111cdf0e10cSrcweir 	String		sNoDblSpaces;
112cdf0e10cSrcweir 	String		sDash;
113cdf0e10cSrcweir     String      sNonBrkSpace;
114cdf0e10cSrcweir 	String		sFirst;
115cdf0e10cSrcweir 
116cdf0e10cSrcweir public:
117cdf0e10cSrcweir 						OfaAutocorrOptionsPage( Window* pParent, const SfxItemSet& rSet );
118cdf0e10cSrcweir 						~OfaAutocorrOptionsPage();
119cdf0e10cSrcweir 
120cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
121cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
122cdf0e10cSrcweir 
123cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
124cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
125cdf0e10cSrcweir 	virtual void		ActivatePage( const SfxItemSet& );
126cdf0e10cSrcweir 
127cdf0e10cSrcweir };
128cdf0e10cSrcweir 
129cdf0e10cSrcweir // class OfaSwAutoFmtOptionsPage ----------------------------------------------------
130cdf0e10cSrcweir 
131cdf0e10cSrcweir class OfaSwAutoFmtOptionsPage : public SfxTabPage
132cdf0e10cSrcweir {
133cdf0e10cSrcweir 	using TabPage::ActivatePage;
134cdf0e10cSrcweir 
135cdf0e10cSrcweir 	OfaACorrCheckListBox	aCheckLB;
136cdf0e10cSrcweir 	PushButton		aEditPB;
137cdf0e10cSrcweir 	FixedText		aHeader1Expl;
138cdf0e10cSrcweir 	FixedText		aHeader2Expl;
139cdf0e10cSrcweir 
140cdf0e10cSrcweir 	String			sHeader1;
141cdf0e10cSrcweir 	String			sHeader2;
142cdf0e10cSrcweir 
143cdf0e10cSrcweir 	String			sDeleteEmptyPara;
144cdf0e10cSrcweir 	String			sUseReplaceTbl;
145cdf0e10cSrcweir 	String			sCptlSttWord;
146cdf0e10cSrcweir 	String			sCptlSttSent;
147cdf0e10cSrcweir 	String			sUserStyle;
148cdf0e10cSrcweir 	String			sBullet;
149cdf0e10cSrcweir 	String			sByInputBullet;
150cdf0e10cSrcweir 	String			sBoldUnder;
151cdf0e10cSrcweir 	String			sNoDblSpaces;
152cdf0e10cSrcweir 	String			sDetectURL;
153cdf0e10cSrcweir 	String          sDash;
154cdf0e10cSrcweir     String          sNonBrkSpace;
155cdf0e10cSrcweir 	String			sOrdinal;
156cdf0e10cSrcweir 	String			sRightMargin;
157cdf0e10cSrcweir 	String			sNum;
158cdf0e10cSrcweir 	String			sBorder;
159cdf0e10cSrcweir 	String			sTable;
160cdf0e10cSrcweir 	String			sReplaceTemplates;
161cdf0e10cSrcweir 	String			sDelSpaceAtSttEnd;
162cdf0e10cSrcweir 	String			sDelSpaceBetweenLines;
163cdf0e10cSrcweir 
164cdf0e10cSrcweir 	String			sMargin;
165cdf0e10cSrcweir 	String			sBulletChar;
166cdf0e10cSrcweir 	String			sByInputBulletChar;
167cdf0e10cSrcweir 
168cdf0e10cSrcweir 	Font			aBulletFont;
169cdf0e10cSrcweir 	Font 			aByInputBulletFont;
170cdf0e10cSrcweir 	sal_uInt16			nPercent;
171cdf0e10cSrcweir 
172cdf0e10cSrcweir 	SvLBoxButtonData*	pCheckButtonData;
173cdf0e10cSrcweir 
174cdf0e10cSrcweir 		DECL_LINK(SelectHdl, OfaACorrCheckListBox*);
175cdf0e10cSrcweir 		DECL_LINK(EditHdl, PushButton*);
176cdf0e10cSrcweir 		SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol);
177cdf0e10cSrcweir 
178cdf0e10cSrcweir 
179cdf0e10cSrcweir 		OfaSwAutoFmtOptionsPage( Window* pParent,
180cdf0e10cSrcweir 							const SfxItemSet& rSet );
181cdf0e10cSrcweir 		~OfaSwAutoFmtOptionsPage();
182cdf0e10cSrcweir 
183cdf0e10cSrcweir 	public:
184cdf0e10cSrcweir 		static SfxTabPage*  Create( Window* pParent,
185cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
186cdf0e10cSrcweir 		virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
187cdf0e10cSrcweir 		virtual void        Reset( const SfxItemSet& rSet );
188cdf0e10cSrcweir 		virtual void		ActivatePage( const SfxItemSet& );
189cdf0e10cSrcweir };
190cdf0e10cSrcweir 
191cdf0e10cSrcweir // class AutoCorrEdit ----------------------------------------------------
192cdf0e10cSrcweir 
193cdf0e10cSrcweir class AutoCorrEdit : public Edit
194cdf0e10cSrcweir {
195cdf0e10cSrcweir 	Link 	aActionLink;
196cdf0e10cSrcweir 	sal_Bool 	bSpaces;
197cdf0e10cSrcweir 
198cdf0e10cSrcweir 	public:
AutoCorrEdit(Window * pParent,const ResId & rResId)199cdf0e10cSrcweir 					AutoCorrEdit(Window* pParent, const ResId& rResId) :
200cdf0e10cSrcweir 						Edit(pParent, rResId), bSpaces(sal_False){}
201cdf0e10cSrcweir 
SetActionHdl(const Link & rLink)202cdf0e10cSrcweir 	void 			SetActionHdl( const Link& rLink )
203cdf0e10cSrcweir 								{ aActionLink = rLink;}
204cdf0e10cSrcweir 
SetSpaces(sal_Bool bSet)205cdf0e10cSrcweir 	void 			SetSpaces(sal_Bool bSet)
206cdf0e10cSrcweir 								{bSpaces = bSet;}
207cdf0e10cSrcweir 
208cdf0e10cSrcweir 	virtual void	KeyInput( const KeyEvent& rKEvent );
209cdf0e10cSrcweir };
210cdf0e10cSrcweir 
211cdf0e10cSrcweir // class OfaAutocorrReplacePage ------------------------------------------
212cdf0e10cSrcweir 
213cdf0e10cSrcweir class DoubleStringArray;
214cdf0e10cSrcweir typedef DoubleStringArray* DoubleStringArrayPtr;
215cdf0e10cSrcweir DECLARE_TABLE(DoubleStringTable, DoubleStringArrayPtr)
216cdf0e10cSrcweir 
217cdf0e10cSrcweir class OfaAutocorrReplacePage : public SfxTabPage
218cdf0e10cSrcweir {
219cdf0e10cSrcweir 		using TabPage::ActivatePage;
220cdf0e10cSrcweir 		using TabPage::DeactivatePage;
221cdf0e10cSrcweir 
222cdf0e10cSrcweir private:
223cdf0e10cSrcweir 		CheckBox		aTextOnlyCB;
224cdf0e10cSrcweir 		FixedText       aShortFT;
225cdf0e10cSrcweir 		AutoCorrEdit 	aShortED;
226cdf0e10cSrcweir 		FixedText       aReplaceFT;
227cdf0e10cSrcweir 		AutoCorrEdit 	aReplaceED;
228cdf0e10cSrcweir 		SvTabListBox 	aReplaceTLB;
229cdf0e10cSrcweir 		PushButton 		aNewReplacePB;
230cdf0e10cSrcweir 		PushButton 		aDeleteReplacePB;
231cdf0e10cSrcweir 
232cdf0e10cSrcweir 		String			sModify;
233cdf0e10cSrcweir 		String			sNew;
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 		SvStringsISortDtor* 	pFormatText;
236cdf0e10cSrcweir 		DoubleStringTable		aDoubleStringTable;
237cdf0e10cSrcweir 		CollatorWrapper* 		pCompareClass;
238cdf0e10cSrcweir         CharClass*              pCharClass;
239cdf0e10cSrcweir 		LanguageType 			eLang;
240cdf0e10cSrcweir 
241cdf0e10cSrcweir 		sal_Bool			bHasSelectionText;
242cdf0e10cSrcweir 		sal_Bool			bFirstSelect:1;
243cdf0e10cSrcweir 		sal_Bool			bReplaceEditChanged:1;
244cdf0e10cSrcweir 		sal_Bool			bSWriter:1;
245cdf0e10cSrcweir 
246cdf0e10cSrcweir 		DECL_LINK(SelectHdl, SvTabListBox*);
247cdf0e10cSrcweir 		DECL_LINK(NewDelHdl, PushButton*);
248cdf0e10cSrcweir 		DECL_LINK(ModifyHdl, Edit*);
249cdf0e10cSrcweir 
250cdf0e10cSrcweir 		void 			RefillReplaceBox(sal_Bool bFromReset, //Box mit neuer Sprache fuellen
251cdf0e10cSrcweir 										LanguageType eOldLanguage,
252cdf0e10cSrcweir 										LanguageType eNewLanguage);
253cdf0e10cSrcweir 
254cdf0e10cSrcweir public:
255cdf0e10cSrcweir 						OfaAutocorrReplacePage( Window* pParent, const SfxItemSet& rSet );
256cdf0e10cSrcweir 						~OfaAutocorrReplacePage();
257cdf0e10cSrcweir 
258cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
259cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
260cdf0e10cSrcweir 
261cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
262cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
263cdf0e10cSrcweir 	virtual void		ActivatePage( const SfxItemSet& );
264cdf0e10cSrcweir 	virtual int			DeactivatePage( SfxItemSet* pSet = 0 );
265cdf0e10cSrcweir 
266cdf0e10cSrcweir 	void				SetLanguage(LanguageType eSet);
267cdf0e10cSrcweir };
268cdf0e10cSrcweir 
269cdf0e10cSrcweir // class OfaAutocorrExceptPage ---------------------------------------------
270cdf0e10cSrcweir 
271cdf0e10cSrcweir struct StringsArrays;
272cdf0e10cSrcweir typedef StringsArrays* StringsArraysPtr;
273cdf0e10cSrcweir DECLARE_TABLE(StringsTable, StringsArraysPtr)
274cdf0e10cSrcweir 
275cdf0e10cSrcweir class OfaAutocorrExceptPage : public SfxTabPage
276cdf0e10cSrcweir {
277cdf0e10cSrcweir 	using TabPage::ActivatePage;
278cdf0e10cSrcweir 	using TabPage::DeactivatePage;
279cdf0e10cSrcweir 
280cdf0e10cSrcweir private:
281cdf0e10cSrcweir 		FixedLine		aAbbrevFL;
282cdf0e10cSrcweir 		AutoCorrEdit	aAbbrevED;
283cdf0e10cSrcweir 		ListBox			aAbbrevLB;
284cdf0e10cSrcweir 		PushButton		aNewAbbrevPB;
285cdf0e10cSrcweir 		PushButton		aDelAbbrevPB;
286cdf0e10cSrcweir 		CheckBox        aAutoAbbrevCB;
287cdf0e10cSrcweir 
288cdf0e10cSrcweir 		FixedLine		aDoubleCapsFL;
289cdf0e10cSrcweir 		AutoCorrEdit	aDoubleCapsED;
290cdf0e10cSrcweir 		ListBox			aDoubleCapsLB;
291cdf0e10cSrcweir 		PushButton		aNewDoublePB;
292cdf0e10cSrcweir 		PushButton		aDelDoublePB;
293cdf0e10cSrcweir 		CheckBox        aAutoCapsCB;
294cdf0e10cSrcweir 
295cdf0e10cSrcweir 		StringsTable	aStringsTable;
296cdf0e10cSrcweir 		CollatorWrapper* pCompareClass;
297cdf0e10cSrcweir 		LanguageType 	eLang;
298cdf0e10cSrcweir 
299cdf0e10cSrcweir 	DECL_LINK(NewDelHdl, PushButton*);
300cdf0e10cSrcweir 	DECL_LINK(SelectHdl, ListBox*);
301cdf0e10cSrcweir 	DECL_LINK(ModifyHdl, Edit*);
302cdf0e10cSrcweir 
303cdf0e10cSrcweir 	void 			RefillReplaceBoxes(sal_Bool bFromReset, //Box mit neuer Sprache fuellen
304cdf0e10cSrcweir 										LanguageType eOldLanguage,
305cdf0e10cSrcweir 										LanguageType eNewLanguage);
306cdf0e10cSrcweir public:
307cdf0e10cSrcweir 						OfaAutocorrExceptPage( Window* pParent, const SfxItemSet& rSet );
308cdf0e10cSrcweir 						~OfaAutocorrExceptPage();
309cdf0e10cSrcweir 
310cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
311cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
312cdf0e10cSrcweir 
313cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
314cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
315cdf0e10cSrcweir 	virtual void		ActivatePage( const SfxItemSet& );
316cdf0e10cSrcweir 	virtual int			DeactivatePage( SfxItemSet* pSet = 0 );
317cdf0e10cSrcweir 	void				SetLanguage(LanguageType eSet);
318cdf0e10cSrcweir 
319cdf0e10cSrcweir };
320cdf0e10cSrcweir 
321cdf0e10cSrcweir // class OfaQuoteTabPage -------------------------------------------------
322cdf0e10cSrcweir 
323cdf0e10cSrcweir class OfaQuoteTabPage : public SfxTabPage
324cdf0e10cSrcweir {
325cdf0e10cSrcweir 	using TabPage::ActivatePage;
326cdf0e10cSrcweir 
327cdf0e10cSrcweir private:
328cdf0e10cSrcweir     // For anything but writer
329cdf0e10cSrcweir 	SvxCheckListBox	aCheckLB;
330cdf0e10cSrcweir 
331cdf0e10cSrcweir     // Just for writer
332cdf0e10cSrcweir 	OfaACorrCheckListBox	aSwCheckLB;
333cdf0e10cSrcweir     String			sHeader1;
334cdf0e10cSrcweir 	String			sHeader2;
335cdf0e10cSrcweir 
336cdf0e10cSrcweir     String          sNonBrkSpace;
337cdf0e10cSrcweir     String          sOrdinal;
338cdf0e10cSrcweir 
339cdf0e10cSrcweir     SvLBoxButtonData*	pCheckButtonData;
340cdf0e10cSrcweir 
341cdf0e10cSrcweir 	FixedLine	aSingleFL;
342cdf0e10cSrcweir 	CheckBox    aSingleTypoCB;
343cdf0e10cSrcweir 	FixedText	aSglStartQuoteFT;
344cdf0e10cSrcweir 	PushButton  aSglStartQuotePB;
345cdf0e10cSrcweir 	FixedText	aSglStartExFT;
346cdf0e10cSrcweir 	FixedText	aSglEndQuoteFT;
347cdf0e10cSrcweir 	PushButton	aSglEndQuotePB;
348cdf0e10cSrcweir 	FixedText	aSglEndExFT;
349cdf0e10cSrcweir 	PushButton	aSglStandardPB;
350cdf0e10cSrcweir 
351cdf0e10cSrcweir 	FixedLine	aDoubleFL;
352cdf0e10cSrcweir 	CheckBox    aTypoCB;
353cdf0e10cSrcweir 	FixedText	aStartQuoteFT;
354cdf0e10cSrcweir 	PushButton  aStartQuotePB;
355cdf0e10cSrcweir 	FixedText	aDblStartExFT;
356cdf0e10cSrcweir 	FixedText	aEndQuoteFT;
357cdf0e10cSrcweir 	PushButton	aEndQuotePB;
358cdf0e10cSrcweir 	FixedText	aDblEndExFT;
359cdf0e10cSrcweir 	PushButton	aDblStandardPB;
360cdf0e10cSrcweir 
361cdf0e10cSrcweir 	String		sStartQuoteDlg;
362cdf0e10cSrcweir 	String		sEndQuoteDlg;
363cdf0e10cSrcweir 
364cdf0e10cSrcweir 	String 		sStandard;
365cdf0e10cSrcweir 
366cdf0e10cSrcweir 
367cdf0e10cSrcweir 	sal_UCS4	cSglStartQuote;
368cdf0e10cSrcweir 	sal_UCS4	cSglEndQuote;
369cdf0e10cSrcweir 
370cdf0e10cSrcweir 	sal_UCS4	cStartQuote;
371cdf0e10cSrcweir 	sal_UCS4	cEndQuote;
372cdf0e10cSrcweir 
373cdf0e10cSrcweir 	DECL_LINK( QuoteHdl, PushButton* );
374cdf0e10cSrcweir 	DECL_LINK( StdQuoteHdl, PushButton* );
375cdf0e10cSrcweir 
376cdf0e10cSrcweir 	String 				ChangeStringExt_Impl( sal_UCS4 );
377cdf0e10cSrcweir 
378cdf0e10cSrcweir     SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol);
379cdf0e10cSrcweir 
380cdf0e10cSrcweir 						OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet );
381cdf0e10cSrcweir public:
382cdf0e10cSrcweir 						~OfaQuoteTabPage();
383cdf0e10cSrcweir 
384cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
385cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
386cdf0e10cSrcweir 
387cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
388cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
389cdf0e10cSrcweir 	virtual void		ActivatePage( const SfxItemSet& );
390cdf0e10cSrcweir };
391cdf0e10cSrcweir 
392cdf0e10cSrcweir // class OfaAutoCompleteTabPage ---------------------------------------------
393cdf0e10cSrcweir 
394cdf0e10cSrcweir class OfaAutoCompleteTabPage : public SfxTabPage
395cdf0e10cSrcweir {
396cdf0e10cSrcweir 	using TabPage::ActivatePage;
397cdf0e10cSrcweir 
398cdf0e10cSrcweir 	class AutoCompleteMultiListBox : public MultiListBox
399cdf0e10cSrcweir 	{
400cdf0e10cSrcweir 		OfaAutoCompleteTabPage& rPage;
401cdf0e10cSrcweir 	public:
AutoCompleteMultiListBox(OfaAutoCompleteTabPage & rPg,const ResId & rResId)402cdf0e10cSrcweir 		AutoCompleteMultiListBox( OfaAutoCompleteTabPage& rPg,
403cdf0e10cSrcweir 									const ResId& rResId )
404cdf0e10cSrcweir 			: MultiListBox( &rPg, rResId ), rPage( rPg ) {}
405cdf0e10cSrcweir 
406cdf0e10cSrcweir 		virtual long PreNotify( NotifyEvent& rNEvt );
407cdf0e10cSrcweir 	};
408cdf0e10cSrcweir 
409cdf0e10cSrcweir     CheckBox        aCBActiv; //Enable word completion
410cdf0e10cSrcweir     CheckBox        aCBAppendSpace;//Append space
411cdf0e10cSrcweir     CheckBox        aCBAsTip; //Show as tip
412cdf0e10cSrcweir 
413cdf0e10cSrcweir     CheckBox        aCBCollect;//Collect words
414cdf0e10cSrcweir     CheckBox        aCBRemoveList;//...save the list for later use...
415cdf0e10cSrcweir     //--removed--CheckBox        aCBEndless;//
416cdf0e10cSrcweir 
417cdf0e10cSrcweir     FixedText       aFTExpandKey;
418cdf0e10cSrcweir 	ListBox 		aDCBExpandKey;
419cdf0e10cSrcweir     FixedText       aFTMinWordlen;
420cdf0e10cSrcweir     NumericField    aNFMinWordlen;
421cdf0e10cSrcweir     FixedText       aFTMaxEntries;
422cdf0e10cSrcweir     NumericField    aNFMaxEntries;
423cdf0e10cSrcweir     AutoCompleteMultiListBox    aLBEntries;
424cdf0e10cSrcweir 	PushButton					aPBEntries;
425cdf0e10cSrcweir 	SvStringsISortDtor* 		pAutoCmpltList;
426cdf0e10cSrcweir 	sal_uInt16 						nAutoCmpltListCnt;
427cdf0e10cSrcweir 
428cdf0e10cSrcweir 	DECL_LINK( CheckHdl, CheckBox* );
429cdf0e10cSrcweir 
430cdf0e10cSrcweir 						OfaAutoCompleteTabPage( Window* pParent,
431cdf0e10cSrcweir 												const SfxItemSet& rSet );
432cdf0e10cSrcweir public:
433cdf0e10cSrcweir 						virtual ~OfaAutoCompleteTabPage();
434cdf0e10cSrcweir 
435cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent,
436cdf0e10cSrcweir 								const SfxItemSet& rAttrSet);
437cdf0e10cSrcweir 
438cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
439cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
440cdf0e10cSrcweir 	virtual void		ActivatePage( const SfxItemSet& );
441cdf0e10cSrcweir 
442cdf0e10cSrcweir 	void CopyToClipboard() const;
443cdf0e10cSrcweir 	DECL_LINK( DeleteHdl, PushButton* );
444cdf0e10cSrcweir };
445cdf0e10cSrcweir 
446cdf0e10cSrcweir // class OfaSmartTagOptionsTabPage ---------------------------------------------
447cdf0e10cSrcweir 
448cdf0e10cSrcweir /** Smart tag options tab page
449cdf0e10cSrcweir 
450cdf0e10cSrcweir     This tab page is used to enable/disable smart tag types
451cdf0e10cSrcweir */
452cdf0e10cSrcweir class OfaSmartTagOptionsTabPage : public SfxTabPage
453cdf0e10cSrcweir {
454cdf0e10cSrcweir 	using TabPage::ActivatePage;
455cdf0e10cSrcweir 
456cdf0e10cSrcweir private:
457cdf0e10cSrcweir 
458cdf0e10cSrcweir 	// controls
459cdf0e10cSrcweir     CheckBox				m_aMainCB;
460cdf0e10cSrcweir 	SvxCheckListBox			m_aSmartTagTypesLB;
461cdf0e10cSrcweir 	PushButton				m_aPropertiesPB;
462cdf0e10cSrcweir 	FixedText				m_aTitleFT;
463cdf0e10cSrcweir 
464cdf0e10cSrcweir     // construction via Create()
465cdf0e10cSrcweir     OfaSmartTagOptionsTabPage( Window* pParent,	const SfxItemSet& rSet );
466cdf0e10cSrcweir 
467cdf0e10cSrcweir     /** Inserts items into m_aSmartTagTypesLB
468cdf0e10cSrcweir 
469cdf0e10cSrcweir         Reads out the smart tag types supported by the SmartTagMgr and
470cdf0e10cSrcweir         inserts the associated strings into the list box.
471cdf0e10cSrcweir     */
472cdf0e10cSrcweir     void FillListBox( const SmartTagMgr& rSmartTagMgr );
473cdf0e10cSrcweir 
474cdf0e10cSrcweir     /** Clears the m_aSmartTagTypesLB
475cdf0e10cSrcweir     */
476cdf0e10cSrcweir     void ClearListBox();
477cdf0e10cSrcweir 
478cdf0e10cSrcweir     /** Handler for the check box
479cdf0e10cSrcweir 
480cdf0e10cSrcweir         Enables/disables all controls in the tab page (except from the
481cdf0e10cSrcweir         check box.
482cdf0e10cSrcweir     */
483cdf0e10cSrcweir 	DECL_LINK( CheckHdl, CheckBox* );
484cdf0e10cSrcweir 
485cdf0e10cSrcweir     /** Handler for the push button
486cdf0e10cSrcweir 
487cdf0e10cSrcweir         Calls the displayPropertyPage function of the smart tag recognizer
488cdf0e10cSrcweir         associated with the currently selected smart tag type.
489cdf0e10cSrcweir     */
490cdf0e10cSrcweir 	DECL_LINK( ClickHdl, PushButton* );
491cdf0e10cSrcweir 
492cdf0e10cSrcweir     /** Handler for the list box
493cdf0e10cSrcweir 
494cdf0e10cSrcweir         Enables/disables the properties push button if selection in the
495cdf0e10cSrcweir         smart tag types list box changes.
496cdf0e10cSrcweir     */
497cdf0e10cSrcweir     DECL_LINK( SelectHdl, SvxCheckListBox* );
498cdf0e10cSrcweir 
499cdf0e10cSrcweir public:
500cdf0e10cSrcweir 
501cdf0e10cSrcweir 	virtual ~OfaSmartTagOptionsTabPage();
502cdf0e10cSrcweir 
503cdf0e10cSrcweir 	static SfxTabPage*	Create( Window* pParent, const SfxItemSet& rAttrSet);
504cdf0e10cSrcweir 
505cdf0e10cSrcweir 	virtual	sal_Bool 		FillItemSet( SfxItemSet& rSet );
506cdf0e10cSrcweir 	virtual	void 		Reset( const SfxItemSet& rSet );
507cdf0e10cSrcweir 	virtual void		ActivatePage( const SfxItemSet& );
508cdf0e10cSrcweir };
509cdf0e10cSrcweir 
510cdf0e10cSrcweir #endif // _OFA_AUTOCDLG_CXX
511cdf0e10cSrcweir 
512cdf0e10cSrcweir #endif //
513cdf0e10cSrcweir 
514