diff options
Diffstat (limited to 'cui/source/inc')
-rw-r--r-- | cui/source/inc/cuires.hrc | 4 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 5 | ||||
-rw-r--r-- | cui/source/inc/hyphen.hxx | 122 | ||||
-rw-r--r-- | cui/source/inc/thesdlg.hxx | 124 |
4 files changed, 253 insertions, 2 deletions
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index c054d66c4645..7b3530384611 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -218,6 +218,10 @@ #define RID_SVX_WND_COMMON_LINGU ( RID_SVX_START + 0 ) #define RID_SVX_GRFFILTER_DLG_EMBOSS_TAB (RID_SVX_START + 337) #define RID_SVXDLG_SEARCHATTR (RID_SVX_START + 22) +#define RID_SVXDLG_HYPHENATE (RID_SVX_START + 30) +#define RID_SVXDLG_THESAURUS (RID_SVX_START + 31) +#define RID_SVXDLG_THES_LANGUAGE (RID_SVX_START + 38) +#define RID_SVXSTR_HMERR_CHECKINSTALL (RID_SVX_START + 94) // hyperlink dialog #define RID_SVXDLG_NEWHYPERLINK (RID_SVX_START + 227) diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index ad0f7ad12a89..74cb35e2b460 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -347,7 +347,7 @@ #define HID_PAGE_TEXTATTR (HID_CUI_START + 308) #define HID_TEXTATTR_CTL_POSITION (HID_CUI_START + 309) #define HID_TRANS_POSITION_SIZE (HID_CUI_START + 310) -// free +#define HID_HYPHENATE (HID_CUI_START + 311) #define HID_SVXPAGE_CHAR_NAME (HID_CUI_START + 312) #define HID_SVXPAGE_CHAR_EFFECTS (HID_CUI_START + 313) #define HID_SVXPAGE_CHAR_POSITION (HID_CUI_START + 314) @@ -373,6 +373,7 @@ #define HID_MACRO_HEADERTABLISTBOX (HID_CUI_START + 335) #define HID_GALLERY_ENTER_TITLE (HID_CUI_START + 336) #define HID_GALLERY_TITLE_EDIT (HID_CUI_START + 337) +#define HID_THES_LANGUAGE (HID_CUI_START + 338) // please adjust ACT_SVX_HID_END2 below if you add entries here! @@ -380,7 +381,7 @@ // Overrun check --------------------------------------------------------- // ----------------------------------------------------------------------- -#define ACT_CUI_HID_END HID_CUI_START + 337 +#define ACT_CUI_HID_END HID_CUI_START + 338 #if ACT_CUI_HID_END > HID_CUI_END #error Resource-Ueberlauf in #line, #file diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx new file mode 100644 index 000000000000..d91b0e342230 --- /dev/null +++ b/cui/source/inc/hyphen.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: hyphen.hxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_HYPHEN_HXX +#define _SVX_HYPHEN_HXX + +// include --------------------------------------------------------------- + +#include <vcl/edit.hxx> +#include <vcl/button.hxx> +#include <vcl/fixed.hxx> +#include <sfx2/basedlgs.hxx> +#include <com/sun/star/uno/Reference.hxx> + +// forward --------------------------------------------------------------- + +namespace com{namespace sun{namespace star{ +namespace linguistic2{ + class XHyphenator; + class XPossibleHyphens; +}}}} + +class SvxSpellWrapper; + +// class SvxHyphenEdit --------------------------------------------------- + +class SvxHyphenEdit : public Edit +{ +public: + SvxHyphenEdit( Window* pParent, const ResId& rResId ); + +protected: + virtual void KeyInput( const KeyEvent &rKEvt ); +}; + +// class SvxHyphenWordDialog --------------------------------------------- + +class SvxHyphenWordDialog : public SfxModalDialog +{ +public: + SvxHyphenWordDialog( const String &rWord, LanguageType nLang, + Window* pParent, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > &xHyphen, + SvxSpellWrapper* pWrapper ); + + void SelLeft(); + void SelRight(); + +private: + FixedText aWordFT; + SvxHyphenEdit aWordEdit; + ImageButton aLeftBtn; + ImageButton aRightBtn; + OKButton aOkBtn; + CancelButton aCancelBtn; + PushButton aContBtn; + PushButton aDelBtn; + HelpButton aHelpBtn; + String aLabel; + SvxSpellWrapper* pHyphWrapper; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > xHyphenator; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XPossibleHyphens > xPossHyph; + String aActWord; // actual (to be displayed) word + LanguageType nActLanguage; // and language + sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos + sal_uInt16 nHyphPos; + sal_uInt16 nOldPos; + sal_Bool bBusy; + + void EnableLRBtn_Impl(); + void SetLabel_Impl( LanguageType nLang ); + String EraseUnusableHyphens_Impl( + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XPossibleHyphens > &rxPossHyph, + sal_uInt16 nMaxHyphenationPos ); + + void InitControls_Impl(); + void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 ); + sal_uInt16 GetHyphIndex_Impl(); + + DECL_LINK( CutHdl_Impl, Button* ); + DECL_LINK( DeleteHdl_Impl, Button* ); + DECL_LINK( ContinueHdl_Impl, Button* ); + DECL_LINK( CancelHdl_Impl, Button* ); + DECL_LINK( Left_Impl, Button* ); + DECL_LINK( Right_Impl, Button* ); + DECL_LINK( GetFocusHdl_Impl, Edit* ); + DECL_LINK( LangError_Impl, void* ); +}; + + +#endif + diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx new file mode 100644 index 000000000000..bf5fb812946b --- /dev/null +++ b/cui/source/inc/thesdlg.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thesdlg.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_THESDLG_HXX +#define _SVX_THESDLG_HXX + +// include --------------------------------------------------------------- + +#include <vcl/edit.hxx> +#include <vcl/button.hxx> +#include <vcl/lstbox.hxx> +#include <vcl/fixed.hxx> +#include <svx/stddlg.hxx> +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/beans/PropertyValues.hpp> + +// forward --------------------------------------------------------------- + +struct ThesDlg_Impl; + +class SvxThesaurusLanguageDlg_Impl; + +namespace com { namespace sun { namespace star { + namespace linguistic2 { + class XThesaurus; + class XMeaning; + } + namespace lang { + struct Locale; + } +}}} + +// class SvxThesaurusDialog ---------------------------------------------- + +class SvxThesaurusDialog : public SvxStandardDialog +{ +public: + friend class SvxThesaurusLanguageDlg_Impl; + + SvxThesaurusDialog( Window* pParent, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, sal_Int16 nLanguage ); + ~SvxThesaurusDialog(); + + String GetWord() { return aReplaceEdit.GetText(); } + + sal_uInt16 GetLanguage() const; + +private: + FixedText aWordText; + ListBox aWordLB; + FixedText aReplaceText; + Edit aReplaceEdit; + FixedText aMeanText; + ListBox aMeanLB; + FixedText aSynonymText; + ListBox aSynonymLB; + FixedLine aVarFL; + + OKButton aOkBtn; + CancelButton aCancelBtn; + PushButton aLookUpBtn; + PushButton aLangBtn; + HelpButton aHelpBtn; + + String aErrStr; + + ThesDlg_Impl* pImpl; // always != NULL + + virtual void Apply(); + + void UpdateSynonymBox_Impl(); + void UpdateMeaningBox_Impl( + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XMeaning > > *pMeaningSeq = NULL ); + void Init_Impl(sal_Int16 nLanguage); + + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XMeaning > > + SAL_CALL queryMeanings_Impl( + ::rtl::OUString& rTerm, + const ::com::sun::star::lang::Locale& rLocale, + const ::com::sun::star::beans::PropertyValues& rProperties ) + throw(::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + // Handler + DECL_LINK( SelectHdl_Impl, ListBox * ); + DECL_LINK( SynonymHdl_Impl, ListBox * ); + DECL_LINK( LookUpHdl_Impl, Button * ); + DECL_LINK( LanguageHdl_Impl, Button * ); + DECL_LINK( EntryHdl_Impl, ListBox * ); + DECL_LINK( SpellErrorHdl_Impl, void * ); +}; + +#endif + |