diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-07-13 14:38:37 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-07-13 14:38:37 +0200 |
commit | d773cda7d126918249f43776b2d6053d4bc73f33 (patch) | |
tree | 126336aad16b5e52d24e3bf3b5c947d17475dda2 /cui/source/inc | |
parent | c61aa274cb5631305cfbaea6f1894db756e911c8 (diff) | |
parent | 273fa6a6aa0d56660807ab29892f0618cfbb2e63 (diff) |
CWS changehid: resync to m84
Diffstat (limited to 'cui/source/inc')
-rw-r--r-- | cui/source/inc/SpellDialog.hxx | 13 | ||||
-rwxr-xr-x[-rw-r--r--] | cui/source/inc/cuires.hrc | 11 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 11 | ||||
-rw-r--r-- | cui/source/inc/hyphen.hxx | 65 | ||||
-rwxr-xr-x | cui/source/inc/passwdomdlg.hxx | 62 | ||||
-rw-r--r-- | cui/source/inc/thesdlg.hxx | 88 |
6 files changed, 116 insertions, 134 deletions
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index a2deb5192389..8d233b71e890 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -50,6 +50,8 @@ #include <svtools/xtextedt.hxx> #include <editeng/SpellPortions.hxx> +#include <set> + class ScrollBar; class TextEngine; class ExtTextView; @@ -72,11 +74,12 @@ class SentenceEditWindow_Impl : public MultiLineEdit/*, public SfxListener*/ using MultiLineEdit::SetText; private: + std::set< USHORT > m_aIgnoreErrorsAt; USHORT m_nErrorStart; USHORT m_nErrorEnd; bool m_bIsUndoEditMode; - Link m_aModifyLink; + Link m_aModifyLink; void CallModifyLink() {m_aModifyLink.Call(this);} @@ -93,7 +96,7 @@ public: void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd ); void SetText( const String& rStr ); - bool MarkNextError(); + bool MarkNextError( bool bIgnoreCurrentError ); void ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage); void MoveErrorMarkTo(USHORT nErrorStart, USHORT nErrorEnd, bool bGrammar); String GetErrorText() const; @@ -121,6 +124,8 @@ public: void UndoActionEnd( USHORT nId ); void MoveErrorEnd(long nOffset); + + void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); } }; @@ -221,7 +226,7 @@ private: void InitUserDicts(); void UpdateBoxes_Impl(); void Init_Impl(); - void SpellContinue_Impl(bool UseSavedSentence = false); + void SpellContinue_Impl(bool UseSavedSentence = false, bool bIgnoreCurrentError = false ); void LockFocusChanges( bool bLock ) {bFocusLocked = bLock;} void Impl_Restore(); @@ -230,7 +235,7 @@ private: /** Retrieves the next sentence. */ - bool GetNextSentence_Impl(bool bUseSavedSentence); + bool GetNextSentence_Impl(bool bUseSavedSentence, bool bRechek /*for rechecking the curretn sentence*/); /** Corrects all errors that have been selected to be changed always */ bool ApplyChangeAllList_Impl(SpellPortions& rSentence, bool& bHasReplaced); diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index e7cc7e1ca2f4..52549e934ecc 100644..100755 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -284,6 +284,9 @@ #define RID_SVXSTR_ARCHIVE_HEADLINE (RID_SVX_START + 485) #define RID_SVXSTR_MULTIFILE_DBL_ERR (RID_SVX_START + 486) +// password to open/modify dialog +#define RID_DLG_PASSWORD_TO_OPEN_MODIFY (RID_SVX_START + 500) + // multi path dialog #define RID_SVXDLG_MULTIPATH (RID_SVX_START + 201) #define RID_MULTIPATH_DBL_ERR (RID_SVX_START + 207) @@ -428,4 +431,12 @@ #define RID_SVXSTR_EVENT_FIELDMERGE_FINISHED (RID_SVX_START + 1188) #define RID_SVXSTR_EVENT_LAYOUT_FINISHED (RID_SVX_START + 1189) +// For now, keep new IDs unique only within cui. +// Later, cui should perhaps get an own range of IDs. +#define RID_SVXSTR_EVENT_SELECTIONCHANGED (RID_SVX_START + 1190) +#define RID_SVXSTR_EVENT_DOUBLECLICK (RID_SVX_START + 1191) +#define RID_SVXSTR_EVENT_RIGHTCLICK (RID_SVX_START + 1192) +#define RID_SVXSTR_EVENT_CALCULATE (RID_SVX_START + 1193) +#define RID_SVXSTR_EVENT_CONTENTCHANGED (RID_SVX_START + 1194) + #endif diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index 1a5bd8562f20..22a2b92f32bd 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -376,5 +376,16 @@ #define HID_OFAPAGE_QUOTE_SW_CLB "CUI_HID_OFAPAGE_QUOTE_SW_CLB" #define HID_OFAPAGE_QUOTE_CLB "CUI_HID_OFAPAGE_QUOTE_CLB" #define HID_POSTIT_DIALOG "CUI_HID_POSTIT_DIALOG" +#define HID_CT_THES_ALTERNATIVES "CUI_HID_CT_THES_ALTERNATIVES" + +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY" +#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY" +#define HID_HYPERLINK_DIALOG "CUI_HID_HYPERLINK_DIALOG" + #endif diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx index 42ec38e31331..502b212c8a91 100644 --- a/cui/source/inc/hyphen.hxx +++ b/cui/source/inc/hyphen.hxx @@ -29,6 +29,8 @@ // include --------------------------------------------------------------- +#include <memory> + #include <vcl/edit.hxx> #include <vcl/button.hxx> #include <vcl/fixed.hxx> @@ -45,73 +47,24 @@ namespace linguistic2{ class SvxSpellWrapper; -// class SvxHyphenEdit --------------------------------------------------- - -class SvxHyphenEdit : public Edit -{ -public: - SvxHyphenEdit( Window* pParent, const ResId& rResId ); - -protected: - virtual void KeyInput( const KeyEvent &rKEvt ); -}; - // class SvxHyphenWordDialog --------------------------------------------- +struct SvxHyphenWordDialog_Impl; + class SvxHyphenWordDialog : public SfxModalDialog { + std::auto_ptr< SvxHyphenWordDialog_Impl > m_pImpl; + public: SvxHyphenWordDialog( const String &rWord, LanguageType nLang, Window* pParent, - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XHyphenator > &xHyphen, + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper ); + virtual ~SvxHyphenWordDialog(); + void SetWindowTitle( LanguageType nLang ); 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* ); }; diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx new file mode 100755 index 000000000000..337c9b84da11 --- /dev/null +++ b/cui/source/inc/passwdomdlg.hxx @@ -0,0 +1,62 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 _CUI_PASSWDOMDLG_HXX_ +#define _CUI_PASSWDOMDLG_HXX_ + + +#include <sfx2/basedlgs.hxx> + +#include <memory> + +////////////////////////////////////////////////////////////////////// + +struct PasswordToOpenModifyDialog_Impl; + +class PasswordToOpenModifyDialog : public SfxModalDialog +{ + std::auto_ptr< PasswordToOpenModifyDialog_Impl > m_pImpl; + + // disallow use of copy c-tor and assignment operator + PasswordToOpenModifyDialog( const PasswordToOpenModifyDialog & ); + PasswordToOpenModifyDialog & operator = ( const PasswordToOpenModifyDialog & ); + +public: + PasswordToOpenModifyDialog( Window * pParent, sal_uInt16 nMinPasswdLen, + sal_uInt16 nMaxPasswdLen /* 0 -> no max len enforced */, + bool bIsPasswordToModify ); + virtual ~PasswordToOpenModifyDialog(); + + // AbstractPasswordToOpenModifyDialog + virtual String GetPasswordToOpen() const; + virtual String GetPasswordToModify() const; + virtual bool IsRecommendToOpenReadonly() const; +}; + +////////////////////////////////////////////////////////////////////// + +#endif + diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx index d46c2ce5affa..99b292b560a5 100644 --- a/cui/source/inc/thesdlg.hxx +++ b/cui/source/inc/thesdlg.hxx @@ -27,94 +27,34 @@ #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> +#include <com/sun/star/linguistic2/XThesaurus.hpp> -// forward --------------------------------------------------------------- +#include "svx/stddlg.hxx" +#include "svx/svxdllapi.h" -struct ThesDlg_Impl; +#include <memory> -class SvxThesaurusLanguageDlg_Impl; -namespace com { namespace sun { namespace star { - namespace linguistic2 { - class XThesaurus; - class XMeaning; - } - namespace lang { - struct Locale; - } -}}} +///////////////////////////////////////////////////////////////// -// class SvxThesaurusDialog ---------------------------------------------- +struct SvxThesaurusDialog_Impl; class SvxThesaurusDialog : public SvxStandardDialog { -public: - friend class SvxThesaurusLanguageDlg_Impl; + std::auto_ptr< SvxThesaurusDialog_Impl > m_pImpl; + + SVX_DLLPRIVATE virtual void Apply(); +public: SvxThesaurusDialog( Window* pParent, - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic2::XThesaurus > xThesaurus, - const String &rWord, sal_Int16 nLanguage ); + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus, + const String &rWord, LanguageType nLanguage ); ~SvxThesaurusDialog(); - String GetWord() { return aReplaceEdit.GetText(); } - + void SetWindowTitle( LanguageType nLanguage ); + String GetWord(); 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 |