2010-10-27 06:45:03 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-10-04 05:25:41 -05:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-10-27 21:46:16 -05:00
|
|
|
#ifndef INCLUDED_CUI_SOURCE_INC_AUTOCDLG_HXX
|
|
|
|
#define INCLUDED_CUI_SOURCE_INC_AUTOCDLG_HXX
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
#include <sfx2/tabdlg.hxx>
|
2013-07-16 03:12:42 -05:00
|
|
|
#include <svtools/langtab.hxx>
|
|
|
|
#include <svtools/simptabl.hxx>
|
|
|
|
#include <svtools/svtabbx.hxx>
|
|
|
|
#include <svtools/treelistentry.hxx>
|
2009-10-30 18:36:06 -05:00
|
|
|
#include <svx/checklbx.hxx>
|
2013-07-16 03:12:42 -05:00
|
|
|
#include <svx/langbox.hxx>
|
|
|
|
#include <vcl/button.hxx>
|
2009-10-30 18:36:06 -05:00
|
|
|
#include <vcl/fixed.hxx>
|
|
|
|
#include <vcl/field.hxx>
|
2013-04-26 12:41:07 -05:00
|
|
|
#include <vcl/group.hxx>
|
|
|
|
#include <vcl/lstbox.hxx>
|
2013-07-16 03:12:42 -05:00
|
|
|
#include <vcl/metric.hxx>
|
2013-04-26 12:41:07 -05:00
|
|
|
|
2009-10-30 18:36:06 -05:00
|
|
|
class CharClass;
|
|
|
|
class CollatorWrapper;
|
|
|
|
class SmartTagMgr;
|
|
|
|
|
2012-07-25 05:07:33 -05:00
|
|
|
namespace editeng { class SortedAutoCompleteStrings; }
|
|
|
|
|
2009-10-30 18:36:06 -05:00
|
|
|
// class OfaAutoCorrDlg --------------------------------------------------
|
|
|
|
|
|
|
|
class OfaAutoCorrDlg : public SfxTabDialog
|
|
|
|
{
|
2013-04-17 10:57:31 -05:00
|
|
|
VclContainer* m_pLanguageBox;
|
|
|
|
SvxLanguageBox* m_pLanguageLB;
|
|
|
|
|
|
|
|
sal_uInt16 m_nReplacePageId;
|
|
|
|
sal_uInt16 m_nExceptionsPageId;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
DECL_LINK(SelectLanguageHdl, ListBox*);
|
|
|
|
public:
|
|
|
|
|
2013-04-17 10:57:31 -05:00
|
|
|
OfaAutoCorrDlg(Window* pParent, const SfxItemSet *pSet);
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2013-04-17 10:57:31 -05:00
|
|
|
void EnableLanguage(bool bEnable);
|
2009-10-30 18:36:06 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// class OfaACorrCheckListBox ------------------------------------------
|
|
|
|
|
2013-07-16 03:12:42 -05:00
|
|
|
class OfaACorrCheckListBox : public SvSimpleTable
|
2009-10-30 18:36:06 -05:00
|
|
|
{
|
2013-07-16 03:12:42 -05:00
|
|
|
using SvSimpleTable::SetTabs;
|
2009-10-30 18:36:06 -05:00
|
|
|
using SvTreeListBox::GetCheckButtonState;
|
|
|
|
using SvTreeListBox::SetCheckButtonState;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void SetTabs();
|
|
|
|
virtual void HBarClick();
|
|
|
|
virtual void KeyInput( const KeyEvent& rKEvt );
|
|
|
|
|
|
|
|
public:
|
2013-07-16 03:12:42 -05:00
|
|
|
OfaACorrCheckListBox(SvSimpleTableContainer& rParent, WinBits nBits = WB_BORDER)
|
|
|
|
: SvSimpleTable(rParent, nBits)
|
2011-07-14 08:23:22 -05:00
|
|
|
{
|
|
|
|
}
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2011-01-14 05:41:27 -06:00
|
|
|
inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); }
|
|
|
|
inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); }
|
|
|
|
inline sal_uLong GetSelectEntryPos() { return GetModel()->GetAbsPos(FirstSelected()); }
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2011-01-14 05:41:27 -06:00
|
|
|
sal_Bool IsChecked(sal_uLong nPos, sal_uInt16 nCol = 0);
|
|
|
|
void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked);
|
2012-10-18 09:28:20 -05:00
|
|
|
SvButtonState GetCheckButtonState( SvTreeListEntry*, sal_uInt16 nCol ) const;
|
|
|
|
void SetCheckButtonState( SvTreeListEntry*, sal_uInt16 nCol, SvButtonState );
|
2009-10-30 18:36:06 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// class OfaAutocorrOptionsPage ------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
class OfaAutocorrOptionsPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
|
|
|
|
private:
|
2013-08-04 05:14:07 -05:00
|
|
|
SvxCheckListBox *m_pCheckLB;
|
|
|
|
|
|
|
|
OUString m_sInput;
|
|
|
|
OUString m_sDoubleCaps;
|
|
|
|
OUString m_sStartCap;
|
|
|
|
OUString m_sBoldUnderline;
|
|
|
|
OUString m_sURL;
|
|
|
|
OUString m_sNoDblSpaces;
|
|
|
|
OUString m_sDash;
|
|
|
|
OUString m_sNonBrkSpace;
|
|
|
|
OUString m_sFirst;
|
|
|
|
OUString m_sAccidentalCaps;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
public:
|
2013-08-04 05:14:07 -05:00
|
|
|
OfaAutocorrOptionsPage(Window* pParent, const SfxItemSet& rSet);
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
static SfxTabPage* Create( Window* pParent,
|
|
|
|
const SfxItemSet& rAttrSet);
|
|
|
|
|
2011-01-14 05:41:27 -06:00
|
|
|
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
|
2009-10-30 18:36:06 -05:00
|
|
|
virtual void Reset( const SfxItemSet& rSet );
|
|
|
|
virtual void ActivatePage( const SfxItemSet& );
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// class OfaSwAutoFmtOptionsPage ----------------------------------------------------
|
|
|
|
|
|
|
|
class OfaSwAutoFmtOptionsPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
|
2013-07-29 07:05:05 -05:00
|
|
|
OfaACorrCheckListBox* m_pCheckLB;
|
|
|
|
PushButton* m_pEditPB;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2013-09-26 01:30:52 -05:00
|
|
|
OUString sDeleteEmptyPara;
|
|
|
|
OUString sUseReplaceTbl;
|
|
|
|
OUString sCptlSttWord;
|
|
|
|
OUString sCptlSttSent;
|
|
|
|
OUString sUserStyle;
|
|
|
|
OUString sBullet;
|
|
|
|
OUString sByInputBullet;
|
|
|
|
OUString sBoldUnder;
|
|
|
|
OUString sNoDblSpaces;
|
|
|
|
OUString sCorrectCapsLock;
|
|
|
|
OUString sDetectURL;
|
|
|
|
OUString sDash;
|
|
|
|
OUString sNonBrkSpace;
|
|
|
|
OUString sOrdinal;
|
|
|
|
OUString sRightMargin;
|
|
|
|
OUString sNum;
|
|
|
|
OUString sBorder;
|
|
|
|
OUString sTable;
|
|
|
|
OUString sReplaceTemplates;
|
|
|
|
OUString sDelSpaceAtSttEnd;
|
|
|
|
OUString sDelSpaceBetweenLines;
|
|
|
|
|
|
|
|
OUString sMargin;
|
|
|
|
OUString sBulletChar;
|
|
|
|
OUString sByInputBulletChar;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
Font aBulletFont;
|
|
|
|
Font aByInputBulletFont;
|
2011-01-14 05:41:27 -06:00
|
|
|
sal_uInt16 nPercent;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
SvLBoxButtonData* pCheckButtonData;
|
|
|
|
|
|
|
|
DECL_LINK(SelectHdl, OfaACorrCheckListBox*);
|
2012-03-01 11:00:32 -06:00
|
|
|
DECL_LINK(EditHdl, void *);
|
2013-09-26 01:30:52 -05:00
|
|
|
SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol);
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
OfaSwAutoFmtOptionsPage( Window* pParent,
|
|
|
|
const SfxItemSet& rSet );
|
|
|
|
~OfaSwAutoFmtOptionsPage();
|
|
|
|
|
|
|
|
public:
|
|
|
|
static SfxTabPage* Create( Window* pParent,
|
|
|
|
const SfxItemSet& rAttrSet);
|
2011-01-14 05:41:27 -06:00
|
|
|
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
|
2009-10-30 18:36:06 -05:00
|
|
|
virtual void Reset( const SfxItemSet& rSet );
|
|
|
|
virtual void ActivatePage( const SfxItemSet& );
|
|
|
|
};
|
|
|
|
|
|
|
|
// class AutoCorrEdit ----------------------------------------------------
|
|
|
|
|
|
|
|
class AutoCorrEdit : public Edit
|
|
|
|
{
|
|
|
|
Link aActionLink;
|
2011-01-14 05:41:27 -06:00
|
|
|
sal_Bool bSpaces;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
public:
|
|
|
|
AutoCorrEdit(Window* pParent, const ResId& rResId) :
|
2011-01-14 05:41:27 -06:00
|
|
|
Edit(pParent, rResId), bSpaces(sal_False){}
|
2013-04-17 11:19:06 -05:00
|
|
|
AutoCorrEdit(Window* pParent) :
|
|
|
|
Edit(pParent), bSpaces(sal_False){}
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
void SetActionHdl( const Link& rLink )
|
|
|
|
{ aActionLink = rLink;}
|
|
|
|
|
2011-01-14 05:41:27 -06:00
|
|
|
void SetSpaces(sal_Bool bSet)
|
2009-10-30 18:36:06 -05:00
|
|
|
{bSpaces = bSet;}
|
|
|
|
|
|
|
|
virtual void KeyInput( const KeyEvent& rKEvent );
|
|
|
|
};
|
|
|
|
|
|
|
|
// class OfaAutocorrReplacePage ------------------------------------------
|
|
|
|
|
2012-03-02 05:48:25 -06:00
|
|
|
|
|
|
|
struct DoubleString
|
|
|
|
{
|
2013-09-26 01:30:52 -05:00
|
|
|
OUString sShort;
|
|
|
|
OUString sLong;
|
2012-07-25 07:43:39 -05:00
|
|
|
void* pUserData; ///< CheckBox -> form. Text Bool -> selection text
|
2012-03-02 05:48:25 -06:00
|
|
|
};
|
2012-09-23 14:49:45 -05:00
|
|
|
|
2012-03-02 05:48:25 -06:00
|
|
|
typedef std::vector<DoubleString> DoubleStringArray;
|
|
|
|
typedef std::map<LanguageType, DoubleStringArray> DoubleStringTable;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2012-09-23 14:49:45 -05:00
|
|
|
struct StringChangeList
|
|
|
|
{
|
|
|
|
DoubleStringArray aNewEntries;
|
|
|
|
DoubleStringArray aDeletedEntries;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::map<LanguageType, StringChangeList> StringChangeTable;
|
|
|
|
|
2009-10-30 18:36:06 -05:00
|
|
|
class OfaAutocorrReplacePage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
|
|
|
private:
|
2012-03-02 05:48:25 -06:00
|
|
|
|
2012-09-23 14:49:45 -05:00
|
|
|
StringChangeTable aChangesTable;
|
|
|
|
|
2013-04-17 11:19:06 -05:00
|
|
|
CheckBox* m_pTextOnlyCB;
|
|
|
|
AutoCorrEdit* m_pShortED;
|
|
|
|
AutoCorrEdit* m_pReplaceED;
|
|
|
|
SvTabListBox* m_pReplaceTLB;
|
|
|
|
PushButton* m_pNewReplacePB;
|
|
|
|
PushButton* m_pDeleteReplacePB;
|
|
|
|
|
|
|
|
OUString sModify;
|
|
|
|
OUString sNew;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2013-04-07 05:06:47 -05:00
|
|
|
std::set<OUString> aFormatText;
|
2009-10-30 18:36:06 -05:00
|
|
|
DoubleStringTable aDoubleStringTable;
|
|
|
|
CollatorWrapper* pCompareClass;
|
|
|
|
CharClass* pCharClass;
|
|
|
|
LanguageType eLang;
|
|
|
|
|
2012-09-23 14:49:45 -05:00
|
|
|
sal_Bool bHasSelectionText;
|
|
|
|
sal_Bool bFirstSelect:1;
|
|
|
|
sal_Bool bReplaceEditChanged:1;
|
|
|
|
sal_Bool bSWriter:1;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
DECL_LINK(SelectHdl, SvTabListBox*);
|
|
|
|
DECL_LINK(NewDelHdl, PushButton*);
|
|
|
|
DECL_LINK(ModifyHdl, Edit*);
|
|
|
|
|
2012-09-23 14:49:45 -05:00
|
|
|
void RefillReplaceBox( sal_Bool bFromReset,
|
|
|
|
LanguageType eOldLanguage,
|
|
|
|
LanguageType eNewLanguage);
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
public:
|
|
|
|
OfaAutocorrReplacePage( Window* pParent, const SfxItemSet& rSet );
|
|
|
|
~OfaAutocorrReplacePage();
|
|
|
|
|
2012-09-23 14:49:45 -05:00
|
|
|
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2012-09-23 14:49:45 -05:00
|
|
|
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
|
2009-10-30 18:36:06 -05:00
|
|
|
virtual void Reset( const SfxItemSet& rSet );
|
|
|
|
virtual void ActivatePage( const SfxItemSet& );
|
|
|
|
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
|
2013-04-18 03:46:12 -05:00
|
|
|
virtual void Resize();
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2012-09-23 14:49:45 -05:00
|
|
|
void SetLanguage(LanguageType eSet);
|
2013-09-26 01:30:52 -05:00
|
|
|
void DeleteEntry(OUString sShort, OUString sLong);
|
|
|
|
void NewEntry(OUString sShort, OUString sLong, bool bKeepSourceFormatting);
|
2009-10-30 18:36:06 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// class OfaAutocorrExceptPage ---------------------------------------------
|
|
|
|
|
2012-03-02 05:48:25 -06:00
|
|
|
struct StringsArrays
|
|
|
|
{
|
2013-04-07 05:06:47 -05:00
|
|
|
std::vector<OUString> aAbbrevStrings;
|
|
|
|
std::vector<OUString> aDoubleCapsStrings;
|
2012-03-02 05:48:25 -06:00
|
|
|
|
|
|
|
StringsArrays() { }
|
|
|
|
};
|
|
|
|
typedef std::map<LanguageType, StringsArrays> StringsTable;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
class OfaAutocorrExceptPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
|
|
|
private:
|
2013-04-18 08:35:53 -05:00
|
|
|
AutoCorrEdit* m_pAbbrevED;
|
|
|
|
ListBox* m_pAbbrevLB;
|
|
|
|
PushButton* m_pNewAbbrevPB;
|
|
|
|
PushButton* m_pDelAbbrevPB;
|
|
|
|
CheckBox* m_pAutoAbbrevCB;
|
|
|
|
|
|
|
|
AutoCorrEdit* m_pDoubleCapsED;
|
|
|
|
ListBox* m_pDoubleCapsLB;
|
|
|
|
PushButton* m_pNewDoublePB;
|
|
|
|
PushButton* m_pDelDoublePB;
|
|
|
|
CheckBox* m_pAutoCapsCB;
|
|
|
|
|
|
|
|
StringsTable aStringsTable;
|
|
|
|
CollatorWrapper* pCompareClass;
|
|
|
|
LanguageType eLang;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
DECL_LINK(NewDelHdl, PushButton*);
|
|
|
|
DECL_LINK(SelectHdl, ListBox*);
|
|
|
|
DECL_LINK(ModifyHdl, Edit*);
|
2012-07-25 07:43:39 -05:00
|
|
|
/// Box filled with new language
|
|
|
|
void RefillReplaceBoxes(sal_Bool bFromReset,
|
2009-10-30 18:36:06 -05:00
|
|
|
LanguageType eOldLanguage,
|
|
|
|
LanguageType eNewLanguage);
|
|
|
|
public:
|
|
|
|
OfaAutocorrExceptPage( Window* pParent, const SfxItemSet& rSet );
|
|
|
|
~OfaAutocorrExceptPage();
|
|
|
|
|
|
|
|
static SfxTabPage* Create( Window* pParent,
|
|
|
|
const SfxItemSet& rAttrSet);
|
|
|
|
|
2011-01-14 05:41:27 -06:00
|
|
|
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
|
2009-10-30 18:36:06 -05:00
|
|
|
virtual void Reset( const SfxItemSet& rSet );
|
|
|
|
virtual void ActivatePage( const SfxItemSet& );
|
|
|
|
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
|
|
|
|
void SetLanguage(LanguageType eSet);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// class OfaQuoteTabPage -------------------------------------------------
|
|
|
|
|
|
|
|
class OfaQuoteTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
|
|
|
|
private:
|
2012-07-25 07:43:39 -05:00
|
|
|
/// For anything but writer
|
2013-08-03 11:20:22 -05:00
|
|
|
SvxCheckListBox* m_pCheckLB;
|
2010-01-12 07:54:42 -06:00
|
|
|
|
2012-07-25 07:43:39 -05:00
|
|
|
/// Just for writer
|
2013-08-03 11:20:22 -05:00
|
|
|
OfaACorrCheckListBox* m_pSwCheckLB;
|
2010-01-12 07:54:42 -06:00
|
|
|
|
2013-09-26 01:30:52 -05:00
|
|
|
OUString sNonBrkSpace;
|
|
|
|
OUString sOrdinal;
|
2010-01-12 07:54:42 -06:00
|
|
|
|
|
|
|
SvLBoxButtonData* pCheckButtonData;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2013-08-03 11:20:22 -05:00
|
|
|
CheckBox* m_pSingleTypoCB;
|
|
|
|
PushButton* m_pSglStartQuotePB;
|
|
|
|
FixedText* m_pSglStartExFT;
|
|
|
|
PushButton* m_pSglEndQuotePB;
|
|
|
|
FixedText* m_pSglEndExFT;
|
|
|
|
PushButton* m_pSglStandardPB;
|
|
|
|
|
|
|
|
CheckBox* m_pDoubleTypoCB;
|
|
|
|
PushButton* m_pDblStartQuotePB;
|
|
|
|
FixedText* m_pDblStartExFT;
|
|
|
|
PushButton* m_pDblEndQuotePB;
|
|
|
|
FixedText* m_pDblEndExFT;
|
|
|
|
PushButton* m_pDblStandardPB;
|
|
|
|
|
|
|
|
OUString m_sStartQuoteDlg;
|
|
|
|
OUString m_sEndQuoteDlg;
|
|
|
|
|
|
|
|
OUString m_sStandard;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
sal_UCS4 cSglStartQuote;
|
|
|
|
sal_UCS4 cSglEndQuote;
|
|
|
|
|
|
|
|
sal_UCS4 cStartQuote;
|
|
|
|
sal_UCS4 cEndQuote;
|
|
|
|
|
|
|
|
DECL_LINK( QuoteHdl, PushButton* );
|
|
|
|
DECL_LINK( StdQuoteHdl, PushButton* );
|
|
|
|
|
2013-09-26 01:30:52 -05:00
|
|
|
OUString ChangeStringExt_Impl( sal_UCS4 );
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2013-09-26 01:30:52 -05:00
|
|
|
SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol);
|
2010-01-12 07:54:42 -06:00
|
|
|
|
2009-10-30 18:36:06 -05:00
|
|
|
OfaQuoteTabPage( Window* pParent, const SfxItemSet& rSet );
|
|
|
|
public:
|
|
|
|
~OfaQuoteTabPage();
|
|
|
|
|
|
|
|
static SfxTabPage* Create( Window* pParent,
|
|
|
|
const SfxItemSet& rAttrSet);
|
|
|
|
|
2011-01-14 05:41:27 -06:00
|
|
|
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
|
2009-10-30 18:36:06 -05:00
|
|
|
virtual void Reset( const SfxItemSet& rSet );
|
|
|
|
virtual void ActivatePage( const SfxItemSet& );
|
|
|
|
};
|
|
|
|
|
|
|
|
// class OfaAutoCompleteTabPage ---------------------------------------------
|
|
|
|
|
|
|
|
class OfaAutoCompleteTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
|
|
|
|
class AutoCompleteMultiListBox : public MultiListBox
|
|
|
|
{
|
|
|
|
OfaAutoCompleteTabPage& rPage;
|
|
|
|
public:
|
|
|
|
AutoCompleteMultiListBox( OfaAutoCompleteTabPage& rPg,
|
|
|
|
const ResId& rResId )
|
|
|
|
: MultiListBox( &rPg, rResId ), rPage( rPg ) {}
|
|
|
|
|
|
|
|
virtual long PreNotify( NotifyEvent& rNEvt );
|
|
|
|
};
|
|
|
|
|
2012-07-25 07:43:39 -05:00
|
|
|
CheckBox aCBActiv; ///<Enable word completion
|
|
|
|
CheckBox aCBAppendSpace;///<Append space
|
|
|
|
CheckBox aCBAsTip; ///<Show as tip
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2012-07-25 07:43:39 -05:00
|
|
|
CheckBox aCBCollect;///<Collect words
|
|
|
|
CheckBox aCBRemoveList;///<...save the list for later use...
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
FixedText aFTExpandKey;
|
|
|
|
ListBox aDCBExpandKey;
|
|
|
|
FixedText aFTMinWordlen;
|
|
|
|
NumericField aNFMinWordlen;
|
|
|
|
FixedText aFTMaxEntries;
|
|
|
|
NumericField aNFMaxEntries;
|
|
|
|
AutoCompleteMultiListBox aLBEntries;
|
|
|
|
PushButton aPBEntries;
|
2012-07-25 05:07:33 -05:00
|
|
|
editeng::SortedAutoCompleteStrings* m_pAutoCompleteList;
|
2011-01-14 05:41:27 -06:00
|
|
|
sal_uInt16 nAutoCmpltListCnt;
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
DECL_LINK( CheckHdl, CheckBox* );
|
|
|
|
|
|
|
|
OfaAutoCompleteTabPage( Window* pParent,
|
|
|
|
const SfxItemSet& rSet );
|
|
|
|
public:
|
|
|
|
virtual ~OfaAutoCompleteTabPage();
|
|
|
|
|
|
|
|
static SfxTabPage* Create( Window* pParent,
|
|
|
|
const SfxItemSet& rAttrSet);
|
|
|
|
|
2011-01-14 05:41:27 -06:00
|
|
|
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
|
2009-10-30 18:36:06 -05:00
|
|
|
virtual void Reset( const SfxItemSet& rSet );
|
|
|
|
virtual void ActivatePage( const SfxItemSet& );
|
|
|
|
|
|
|
|
void CopyToClipboard() const;
|
2012-03-01 11:00:32 -06:00
|
|
|
DECL_LINK(DeleteHdl, void *);
|
2009-10-30 18:36:06 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// class OfaSmartTagOptionsTabPage ---------------------------------------------
|
|
|
|
|
|
|
|
/** Smart tag options tab page
|
|
|
|
|
|
|
|
This tab page is used to enable/disable smart tag types
|
|
|
|
*/
|
|
|
|
class OfaSmartTagOptionsTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
// controls
|
|
|
|
CheckBox m_aMainCB;
|
|
|
|
SvxCheckListBox m_aSmartTagTypesLB;
|
|
|
|
PushButton m_aPropertiesPB;
|
|
|
|
FixedText m_aTitleFT;
|
|
|
|
|
2012-07-25 07:43:39 -05:00
|
|
|
/// construction via Create()
|
2009-10-30 18:36:06 -05:00
|
|
|
OfaSmartTagOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
|
|
|
|
|
|
|
|
/** Inserts items into m_aSmartTagTypesLB
|
|
|
|
|
|
|
|
Reads out the smart tag types supported by the SmartTagMgr and
|
|
|
|
inserts the associated strings into the list box.
|
|
|
|
*/
|
|
|
|
void FillListBox( const SmartTagMgr& rSmartTagMgr );
|
|
|
|
|
|
|
|
/** Clears the m_aSmartTagTypesLB
|
|
|
|
*/
|
|
|
|
void ClearListBox();
|
|
|
|
|
|
|
|
/** Handler for the check box
|
|
|
|
|
|
|
|
Enables/disables all controls in the tab page (except from the
|
|
|
|
check box.
|
|
|
|
*/
|
2012-03-01 11:00:32 -06:00
|
|
|
DECL_LINK(CheckHdl, void *);
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
/** Handler for the push button
|
|
|
|
|
|
|
|
Calls the displayPropertyPage function of the smart tag recognizer
|
|
|
|
associated with the currently selected smart tag type.
|
|
|
|
*/
|
2012-03-01 11:00:32 -06:00
|
|
|
DECL_LINK(ClickHdl, void *);
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
/** Handler for the list box
|
|
|
|
|
|
|
|
Enables/disables the properties push button if selection in the
|
|
|
|
smart tag types list box changes.
|
|
|
|
*/
|
2012-03-01 11:00:32 -06:00
|
|
|
DECL_LINK(SelectHdl, void *);
|
2009-10-30 18:36:06 -05:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual ~OfaSmartTagOptionsTabPage();
|
|
|
|
|
|
|
|
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
|
|
|
|
|
2011-01-14 05:41:27 -06:00
|
|
|
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
|
2009-10-30 18:36:06 -05:00
|
|
|
virtual void Reset( const SfxItemSet& rSet );
|
|
|
|
virtual void ActivatePage( const SfxItemSet& );
|
|
|
|
};
|
|
|
|
|
2013-04-26 12:41:07 -05:00
|
|
|
#endif
|
2009-10-30 18:36:06 -05:00
|
|
|
|
2010-10-27 06:45:03 -05:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|