Kaydet (Commit) 8a0704ac authored tarafından obo's avatar obo

CWS-TOOLING: integrate CWS tl74

......@@ -473,7 +473,7 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG )
}
else
{
if( SvtLinguConfig().HasAnyVendorImages() )
if( SvtLinguConfig().HasVendorImages( "SpellAndGrammarDialogImage" ) )
{
pThis->aVendorImageFI.Show();
Size aVendorSize = pThis->aVendorImageFI.GetSizePixel();
......
This diff is collapsed.
......@@ -33,13 +33,14 @@
#define BTN_LEFT 11
#define BTN_RIGHT 12
#define FT_WORD 13
#define FL_BOTTOM 14
#define BTN_HYPH_CONTINUE 20
#define BTN_HYPH_DELETE 21
#define BTN_HYPH_CUT 22
#define BTN_HYPH_CANCEL 23
#define BTN_HYPH_HELP 24
#define BTN_HYPH_ALL 25
#endif
......@@ -40,104 +40,87 @@ String RID_SVXSTR_HMERR_CHECKINSTALL
ModalDialog RID_SVXDLG_HYPHENATE
{
HelpId = HID_HYPHENATE ;
Size = MAP_APPFONT ( 188 , 100 ) ;
Size = MAP_APPFONT ( 200 , 111 ) ;
OutputSize = TRUE ;
SvLook = TRUE ;
Text [ en-US ] = "Hyphenation" ;
Moveable = TRUE ;
FixedText FT_WORD
{
Pos = MAP_APPFONT ( 5 , 5 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "~Word" ;
};
Edit ED_WORD
{
BORDER = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
Pos = MAP_APPFONT ( 5 , 17 ) ;
Size = MAP_APPFONT ( 132 , 12 ) ;
TABSTOP = TRUE ;
LEFT = TRUE ;
};
ImageButton BTN_LEFT
{
Pos = MAP_APPFONT ( 6 , 33 ) ;
Pos = MAP_APPFONT ( 56 , 33 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
TABSTOP = TRUE ;
SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
};
ImageButton BTN_RIGHT
{
Pos = MAP_APPFONT ( 22 , 33 ) ;
Pos = MAP_APPFONT ( 75 , 33 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
TABSTOP = TRUE ;
Symbol = IMAGEBUTTON_ARROW_RIGHT ;
};
FixedText FT_WORD
OKButton BTN_HYPH_CUT
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "~Word" ;
Pos = MAP_APPFONT ( 144 , 17 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "H~yphenate" ;
TABSTOP = TRUE ;
DEFBUTTON = TRUE ;
};
PushButton BTN_HYPH_CONTINUE
{
Pos = MAP_APPFONT ( 132 , 43 ) ;
Pos = MAP_APPFONT ( 144 , 35 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Next" ;
Text [ en-US ] = "~Skip" ;
TABSTOP = TRUE ;
};
PushButton BTN_HYPH_DELETE
{
Pos = MAP_APPFONT ( 132 , 60 ) ;
Pos = MAP_APPFONT ( 144 , 52 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Remove" ;
TABSTOP = TRUE ;
};
OKButton BTN_HYPH_CUT
FixedLine FL_BOTTOM
{
Pos = MAP_APPFONT ( 0 , 81 ) ;
Size = MAP_APPFONT ( 200 , 8 ) ;
};
HelpButton BTN_HYPH_HELP
{
Pos = MAP_APPFONT ( 132 , 6 ) ;
Pos = MAP_APPFONT ( 5 , 93 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Hyphenate" ;
TABSTOP = TRUE ;
DEFBUTTON = TRUE ;
};
CancelButton BTN_HYPH_CANCEL
PushButton BTN_HYPH_ALL
{
Pos = MAP_APPFONT ( 132 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Pos = MAP_APPFONT ( 63 , 93 ) ;
Size = MAP_APPFONT ( 74 , 14 ) ;
Text [ en-US ] = "Hyphenate ~All" ;
TABSTOP = TRUE ;
};
HelpButton BTN_HYPH_HELP
CancelButton BTN_HYPH_CANCEL
{
Pos = MAP_APPFONT ( 132 , 80 ) ;
Pos = MAP_APPFONT ( 144 , 93 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Close";
TABSTOP = TRUE ;
};
};
// ******************************************************************* EOF
This diff is collapsed.
......@@ -29,30 +29,23 @@
// defines ---------------------------------------------------------------
#define BTN_LEFT 9
#define BTN_THES_OK 10
#define BTN_THES_CANCEL 11
#define BTN_LANGUAGE 12
#define MB_LANGUAGE 12
#define BTN_THES_HELP 13
#define BTN_LOOKUP 14
#define FT_WORD 15
#define LB_WORD 16
#define FT_MEAN 17
#define LB_MEAN 18
#define FT_SYNON 19
#define LB_SYNON 20
#define CB_WORD 16
#define FT_REPL 21
#define ED_REPL 22
#define FL_VAR 23
#define STR_ERR_WORDNOTFOUND 30
// LanguageDialog --------------------------------------------------------
#define LB_THES_LANGUAGE 10
#define FL_THES_LANGUAGE 11
#define BTN_LANG_OK 12
#define BTN_LANG_CANCEL 12
#define BTN_LANG_HELP 13
#define FL_VAR 23
#define FT_THES_ALTERNATIVES 24
#define CT_THES_ALTERNATIVES 25
#define IMG_VENDOR 26
#define IMG_DEFAULT_VENDOR 27
#define IMG_DEFAULT_VENDOR_HC 28
#define STR_ERR_TEXTNOTFOUND 101
#endif
......
......@@ -24,185 +24,123 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
// include ---------------------------------------------------------------
#include "cuires.hrc"
#include "thesdlg.hrc"
#include "helpid.hrc"
#include <svx/svxids.hrc> // SID_THESAURUS
// pragma ----------------------------------------------------------------
// RID_SVXDLG_THES -------------------------------------------------------
ModalDialog RID_SVXDLG_THESAURUS
{
HelpId = SID_THESAURUS ;
OutputSize = TRUE ;
Size = MAP_APPFONT ( 285 , 116 ) ;
Size = MAP_APPFONT ( 235, 230 ) ;
Text [ en-US ] = "Thesaurus" ;
Moveable = TRUE ;
SvLook = TRUE ;
OkButton BTN_THES_OK
{
Pos = MAP_APPFONT ( 219 , 6 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BTN_THES_CANCEL
{
Pos = MAP_APPFONT ( 219 , 23 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
};
PushButton BTN_LOOKUP
Moveable = TRUE ;
FixedImage IMG_VENDOR
{
Pos = MAP_APPFONT ( 219 , 40 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Search" ;
Pos = MAP_APPFONT ( 0, 0 ) ;
Size = MAP_APPFONT ( 235, 0 ) ; // correct size will be applied at runtime
Hide = TRUE;
};
PushButton BTN_LANGUAGE
ImageButton BTN_LEFT
{
Pos = MAP_APPFONT ( 219 , 57 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Language..." ;
};
HelpButton BTN_THES_HELP
{
Pos = MAP_APPFONT ( 219 , 77 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Pos = MAP_APPFONT ( 5 , 15 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
TABSTOP = TRUE ;
SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
};
FixedText FT_WORD
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 96 , 8 ) ;
Text [ en-US ] = "~Word" ;
Pos = MAP_APPFONT ( 24 , 5 ) ;
Size = MAP_APPFONT ( 143 , 8 ) ;
Text [ en-US ] = "Current ~word" ;
LEFT = TRUE ;
};
ListBox LB_WORD
ComboBox CB_WORD
{
DropDown = TRUE ;
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 96 , 65 ) ;
Pos = MAP_APPFONT ( 24 , 16 ) ;
Size = MAP_APPFONT ( 141 , 60 ) ; // have drop down space for several lines
};
FixedText FT_MEAN
MenuButton MB_LANGUAGE
{
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 96 , 8 ) ;
Text [ en-US ] = "~Meaning " ;
LEFT = TRUE ;
};
ListBox LB_MEAN
{
BORDER = TRUE ;
Pos = MAP_APPFONT ( 12 , 55 ) ;
Size = MAP_APPFONT ( 96 , 50 ) ;
AutoHScroll = TRUE ;
Pos = MAP_APPFONT ( 170 , 16 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Language" ;
};
FixedText FT_SYNON
FixedText FT_THES_ALTERNATIVES
{
Pos = MAP_APPFONT ( 111 , 43 ) ;
Size = MAP_APPFONT ( 96 , 8 ) ;
Text [ en-US ] = "Sy~nonym" ;
Pos = MAP_APPFONT ( 5 , 33 ) ;
Size = MAP_APPFONT ( 255 , 8 ) ;
Text [ en-US ] = "~Alternatives" ;
LEFT = TRUE ;
};
ListBox LB_SYNON
Control CT_THES_ALTERNATIVES
{
BORDER = TRUE ;
Pos = MAP_APPFONT ( 111 , 55 ) ;
Size = MAP_APPFONT ( 96 , 50 ) ;
AutoHScroll = TRUE ;
HelpID = HID_CT_THES_ALTERNATIVES ; // also needed for automatic testing to find the control
Pos = MAP_APPFONT ( 5 , 45 ) ;
Size = MAP_APPFONT ( 225 , 121 ) ;
Border = TRUE;
TabStop = TRUE ;
};
FixedText FT_REPL
{
Pos = MAP_APPFONT ( 111 , 14 ) ;
Size = MAP_APPFONT ( 96 , 8 ) ;
Text [ en-US ] = "~Replace" ;
Pos = MAP_APPFONT ( 5 , 173 ) ;
Size = MAP_APPFONT ( 255 , 8 ) ;
Text [ en-US ] = "Replace ~with" ;
LEFT = TRUE ;
};
Edit ED_REPL
{
BORDER = TRUE ;
Pos = MAP_APPFONT ( 111 , 25 ) ;
Size = MAP_APPFONT ( 96 , 12 ) ;
Pos = MAP_APPFONT ( 5 , 184 ) ;
Size = MAP_APPFONT ( 225 , 12 ) ;
LEFT = TRUE ;
};
FixedLine FL_VAR
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 207 , 8 ) ;
Text [ en-US ] = "Variations" ;
Pos = MAP_APPFONT ( 0 , 200 ) ;
Size = MAP_APPFONT ( 235 , 8 ) ;
};
String STR_ERR_WORDNOTFOUND
HelpButton BTN_THES_HELP
{
Text [ en-US ] = "Word not found in thesaurus" ;
Pos = MAP_APPFONT ( 5 , 210 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
};
};
// RID_SVXDLG_THES_LANGUAGE ----------------------------------------------
ModalDialog RID_SVXDLG_THES_LANGUAGE
{
HelpId = HID_THES_LANGUAGE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 170 , 86 ) ;
/* ### ACHTUNG: Neuer Text in Resource? Sprache auswhlen : Sprache auswhlen */
/* ### ACHTUNG: Neuer Text in Resource? Sprache auswhlen : Sprache auswhlen */
Text [ en-US ] = "Select Language" ;
Moveable = TRUE ;
ListBox LB_THES_LANGUAGE
OkButton BTN_THES_OK
{
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 60 ) ;
Sort = TRUE ;
Pos = MAP_APPFONT ( 105 , 210 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Replace" ;
DefButton = TRUE ;
};
FixedLine FL_THES_LANGUAGE
CancelButton BTN_THES_CANCEL
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
Text [ en-US ] = "Selection" ;
Pos = MAP_APPFONT ( 170 , 210 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
};
OKButton BTN_LANG_OK
String STR_ERR_TEXTNOTFOUND
{
Pos = MAP_APPFONT ( 114 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
Text [ en-US ] = "No alternatives found." ;
};
CancelButton BTN_LANG_CANCEL
Image IMG_DEFAULT_VENDOR
{
Pos = MAP_APPFONT ( 114 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
ImageBitmap = Bitmap { File = "vendor01.png"; };
};
HelpButton BTN_LANG_HELP
Image IMG_DEFAULT_VENDOR_HC
{
Pos = MAP_APPFONT ( 114 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
ImageBitmap = Bitmap { File = "vendor01h.png"; };
};
};
// ********************************************************************** EOF
/*************************************************************************
*
* 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: $
* $Revision: $
*
* 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_IMPL_HXX
#define _SVX_THESDLG_IMPL_HXX
#include "thesdlg.hxx"
#include <svtools/ehdl.hxx>
#include <svx/checklbx.hxx>
#include <vcl/button.hxx>
#include <vcl/combobox.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
#include <vcl/image.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/menubtn.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include <vcl/timer.hxx>
#include <vcl/wrkwin.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
#include <com/sun/star/linguistic2/XMeaning.hpp>
#include <stack>
#include <algorithm>
using namespace ::com::sun::star;
using ::rtl::OUString;
// class LookUpComboBox_Impl --------------------------------------------------
class LookUpComboBox_Impl : public ComboBox
{
Timer m_aModifyTimer;
Selection m_aSelection;
Button * m_pBtn;
SvxThesaurusDialog_Impl & m_rDialogImpl;
// disable copy c-tor and assignment operator
LookUpComboBox_Impl( const LookUpComboBox_Impl & );
LookUpComboBox_Impl & operator = ( const LookUpComboBox_Impl & );
public:
LookUpComboBox_Impl( Window *pParent, const ResId &rResId, SvxThesaurusDialog_Impl &rImpl );
virtual ~LookUpComboBox_Impl();
DECL_LINK( ModifyTimer_Hdl, Timer * );
void SetButton( Button *pBtn ) { m_pBtn = pBtn; }
// ComboBox
virtual void Modify();
};
// class ReplaceEdit_Impl --------------------------------------------------
class ReplaceEdit_Impl : public Edit
{
Button * m_pBtn;
// disable copy c-tor and assignment operator
ReplaceEdit_Impl( const ReplaceEdit_Impl & );
ReplaceEdit_Impl & operator = ( const ReplaceEdit_Impl & );
public:
ReplaceEdit_Impl( Window *pParent, const ResId &rResId );
virtual ~ReplaceEdit_Impl();
void SetButton( Button *pBtn ) { m_pBtn = pBtn; }
// Edit
virtual void Modify();
virtual void SetText( const XubString& rStr );
virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
};
// class ThesaurusAlternativesCtrl_Impl ----------------------------------
class AlternativesUserData_Impl
{
String sText;
bool bHeader;
// disable copy c-tor and assignment operator
AlternativesUserData_Impl( const AlternativesUserData_Impl & );
AlternativesUserData_Impl & operator = ( const AlternativesUserData_Impl & );
public:
AlternativesUserData_Impl( const String &rText, bool bIsHeader ) :
sText(rText),
bHeader(bIsHeader)
{
}
bool IsHeader() const { return bHeader; }
const String& GetText() const { return sText; }
};
class AlternativesString_Impl : public SvLBoxString
{
public:
AlternativesString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr )
: SvLBoxString( pEntry, nFlags, rStr ) {}
virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry);
};
class ThesaurusAlternativesCtrl_Impl :
public SvxCheckListBox
{
SvxThesaurusDialog_Impl & m_rDialogImpl;
// disable copy c-tor and assignment operator
ThesaurusAlternativesCtrl_Impl( const ThesaurusAlternativesCtrl_Impl & );
ThesaurusAlternativesCtrl_Impl & operator = ( const ThesaurusAlternativesCtrl_Impl & );
public:
ThesaurusAlternativesCtrl_Impl( Window* pParent, SvxThesaurusDialog_Impl &rImpl );
virtual ~ThesaurusAlternativesCtrl_Impl();
SvLBoxEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader );
void ClearUserData();
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void Paint( const Rectangle& rRect );
};
// struct SvxThesaurusDialog_Impl ----------------------------------------
struct SvxThesaurusDialog_Impl
{
SvxThesaurusDialog * m_pDialog;
FixedImage aVendorImageFI;
ImageButton aLeftBtn;
FixedText aWordText;
LookUpComboBox_Impl aWordCB;
FixedText m_aAlternativesText;
boost::shared_ptr< ThesaurusAlternativesCtrl_Impl > m_pAlternativesCT;
FixedText aReplaceText;
ReplaceEdit_Impl aReplaceEdit;
FixedLine aFL;
HelpButton aHelpBtn;
MenuButton aLangMBtn;
OKButton aReplaceBtn;
CancelButton aCancelBtn;
String aErrStr;
Image aVendorDefaultImage;
Image aVendorDefaultImageHC;
uno::Reference< linguistic2::XThesaurus > xThesaurus;
OUString aLookUpText;
LanguageType nLookUpLanguage;
std::stack< OUString > aLookUpHistory;
bool m_bWordFound;
// Handler
DECL_LINK( LeftBtnHdl_Impl, Button * );
DECL_LINK( LanguageHdl_Impl, MenuButton * );
DECL_LINK( LookUpHdl_Impl, Button * );
DECL_LINK( WordSelectHdl_Impl, ComboBox * );
DECL_LINK( AlternativesSelectHdl_Impl, SvxCheckListBox * );
DECL_LINK( AlternativesDoubleClickHdl_Impl, SvxCheckListBox * );
DECL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox * );
DECL_STATIC_LINK( SvxThesaurusDialog_Impl, VendorImageInitHdl, SvxThesaurusDialog_Impl * );
SvxThesaurusDialog_Impl( SvxThesaurusDialog * pDialog );
~SvxThesaurusDialog_Impl();
uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL
queryMeanings_Impl( ::rtl::OUString& rTerm, const lang::Locale& rLocale, const beans::PropertyValues& rProperties ) throw(lang::IllegalArgumentException, uno::RuntimeException);
bool UpdateAlternativesBox_Impl();
void UpdateVendorImage();
void LookUp( const String &rText );
void LookUp_Impl();
};
#endif
......@@ -373,14 +373,15 @@
#define HID_THES_LANGUAGE (HID_CUI_START + 338)
#define HID_OFAPAGE_QUOTE_SW_CLB (HID_CUI_START + 339)
#define HID_OFAPAGE_QUOTE_CLB (HID_CUI_START + 340)
#define HID_CT_THES_ALTERNATIVES (HID_CUI_START + 341)
// please adjust ACT_SVX_HID_END2 below if you add entries here!
// please adjust ACT_CUI_HID_END below if you add entries here!
// -----------------------------------------------------------------------
// Overrun check ---------------------------------------------------------
// -----------------------------------------------------------------------
#define ACT_CUI_HID_END HID_CUI_START + 340
#define ACT_CUI_HID_END HID_CUI_START + 341
#if ACT_CUI_HID_END > HID_CUI_END
#error Resource-Ueberlauf in #line, #file
......
......@@ -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* );
};
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment