Kaydet (Commit) 557dd803 authored tarafından Mathias Bauer's avatar Mathias Bauer

#i107450#: move ThesaurusDialog and HyphenWordDialog to cui

üst 5a85f2a0
This diff is collapsed.
/*************************************************************************
*
* 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.hrc,v $
* $Revision: 1.4 $
*
* 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_HRC
#define _SVX_HYPHEN_HRC
// defines ------------------------------------------------------------------
#define ED_WORD 10
#define BTN_LEFT 11
#define BTN_RIGHT 12
#define FT_WORD 13
#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
#endif
/*************************************************************************
*
* 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.src,v $
* $Revision: 1.24 $
*
* 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.
*
************************************************************************/
// include ---------------------------------------------------------------
#include "helpid.hrc"
#include "cuires.hrc"
#include "hyphen.hrc"
String RID_SVXSTR_HMERR_CHECKINSTALL
{
/* ### ACHTUNG: Neuer Text in Resource? ist für die Prüfung nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : ist f³r die Pr³fung nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */
/* ### ACHTUNG: Neuer Text in Resource? ist für die Prüfung nicht verfügbar. \nÜberprüfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewünschte Sprache : ist f³r die Pr³fung nicht verf³gbar. \nšberpr³fen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gew³nschte Sprache */
Text [ en-US ] = "is not available for spellchecking\nPlease check your installation and install the desired language\n" ;
};
// RID_SVXDLG_HYPHENATE --------------------------------------------------
ModalDialog RID_SVXDLG_HYPHENATE
{
HelpId = HID_HYPHENATE ;
Size = MAP_APPFONT ( 188 , 100 ) ;
OutputSize = TRUE ;
SvLook = TRUE ;
Text [ en-US ] = "Hyphenation" ;
Moveable = TRUE ;
Edit ED_WORD
{
BORDER = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
TABSTOP = TRUE ;
LEFT = TRUE ;
};
ImageButton BTN_LEFT
{
Pos = MAP_APPFONT ( 6 , 33 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
TABSTOP = TRUE ;
SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
};
ImageButton BTN_RIGHT
{
Pos = MAP_APPFONT ( 22 , 33 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
TABSTOP = TRUE ;
Symbol = IMAGEBUTTON_ARROW_RIGHT ;
};
FixedText FT_WORD
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "~Word" ;
};
PushButton BTN_HYPH_CONTINUE
{
Pos = MAP_APPFONT ( 132 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Next" ;
TABSTOP = TRUE ;
};
PushButton BTN_HYPH_DELETE
{
Pos = MAP_APPFONT ( 132 , 60 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Remove" ;
TABSTOP = TRUE ;
};
OKButton BTN_HYPH_CUT
{
Pos = MAP_APPFONT ( 132 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Hyphenate" ;
TABSTOP = TRUE ;
DEFBUTTON = TRUE ;
};
CancelButton BTN_HYPH_CANCEL
{
Pos = MAP_APPFONT ( 132 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TABSTOP = TRUE ;
};
HelpButton BTN_HYPH_HELP
{
Pos = MAP_APPFONT ( 132 , 80 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TABSTOP = TRUE ;
};
};
// ******************************************************************* EOF
......@@ -54,6 +54,7 @@ SRC1FILES = \
gallery.src \
grfflt.src \
hangulhanjadlg.src \
hyphen.src \
hlmarkwn.src \
hyperdlg.src \
iconcdlg.src \
......@@ -69,6 +70,7 @@ SRC1FILES = \
srchxtra.src \
svuidlg.src \
tbxform.src \
thesdlg.src \
zoom.src \
......@@ -89,6 +91,7 @@ SLOFILES+=\
$(SLO)$/hlmailtp.obj \
$(SLO)$/hlmarkwn.obj \
$(SLO)$/hltpbase.obj \
$(SLO)$/hyphen.obj \
$(SLO)$/iconcdlg.obj \
$(SLO)$/insdlg.obj \
$(SLO)$/insrc.obj \
......@@ -106,6 +109,7 @@ SLOFILES+=\
$(SLO)$/SpellDialog.obj \
$(SLO)$/splitcelldlg.obj \
$(SLO)$/srchxtra.obj \
$(SLO)$/thesdlg.obj \
$(SLO)$/zoom.obj \
......
This diff is collapsed.
/*************************************************************************
*
* 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.hrc,v $
* $Revision: 1.4 $
*
* 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_HRC
#define _SVX_THESDLG_HRC
// defines ---------------------------------------------------------------
#define BTN_THES_OK 10
#define BTN_THES_CANCEL 11
#define BTN_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 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
#endif
/*************************************************************************
*
* 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.src,v $
* $Revision: 1.23 $
*
* 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.
*
************************************************************************/
// 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 ) ;
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
{
Pos = MAP_APPFONT ( 219 , 40 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Search" ;
};
PushButton BTN_LANGUAGE
{
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 ) ;
};
FixedText FT_WORD
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 96 , 8 ) ;
Text [ en-US ] = "~Word" ;
LEFT = TRUE ;
};
ListBox LB_WORD
{
DropDown = TRUE ;
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 96 , 65 ) ;
};
FixedText FT_MEAN
{
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 ;
};
FixedText FT_SYNON
{
Pos = MAP_APPFONT ( 111 , 43 ) ;
Size = MAP_APPFONT ( 96 , 8 ) ;
Text [ en-US ] = "Sy~nonym" ;
LEFT = TRUE ;
};
ListBox LB_SYNON
{
BORDER = TRUE ;
Pos = MAP_APPFONT ( 111 , 55 ) ;
Size = MAP_APPFONT ( 96 , 50 ) ;
AutoHScroll = TRUE ;
};
FixedText FT_REPL
{
Pos = MAP_APPFONT ( 111 , 14 ) ;
Size = MAP_APPFONT ( 96 , 8 ) ;
Text [ en-US ] = "~Replace" ;
LEFT = TRUE ;
};
Edit ED_REPL
{
BORDER = TRUE ;
Pos = MAP_APPFONT ( 111 , 25 ) ;
Size = MAP_APPFONT ( 96 , 12 ) ;
LEFT = TRUE ;
};
FixedLine FL_VAR
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 207 , 8 ) ;
Text [ en-US ] = "Variations" ;
};
String STR_ERR_WORDNOTFOUND
{
Text [ en-US ] = "Word not found in thesaurus" ;
};
};
// 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
{
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 60 ) ;
Sort = TRUE ;
};
FixedLine FL_THES_LANGUAGE
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 102 , 8 ) ;
Text [ en-US ] = "Selection" ;
};
OKButton BTN_LANG_OK
{
Pos = MAP_APPFONT ( 114 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BTN_LANG_CANCEL
{
Pos = MAP_APPFONT ( 114 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton BTN_LANG_HELP
{
Pos = MAP_APPFONT ( 114 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
// ********************************************************************** EOF
......@@ -103,6 +103,8 @@
#include "macroass.hxx"
#include "acccfg.hxx"
#include "insrc.hxx"
#include "hyphen.hxx"
#include "thesdlg.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
......@@ -119,6 +121,8 @@ IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxDistributeDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl)
IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl)
AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl() \
{
......@@ -356,6 +360,36 @@ String AbstractHangulHanjaConversionDialog_Impl::GetCurrentSuggestion( ) const
return pDlg->GetCurrentSuggestion();
}
String AbstractThesaurusDialog_Impl::GetWord()
{
return pDlg->GetWord();
};
sal_uInt16 AbstractThesaurusDialog_Impl::GetLanguage() const
{
return pDlg->GetLanguage();
};
Window* AbstractThesaurusDialog_Impl::GetWindow()
{
return pDlg;
}
void AbstractHyphenWordDialog_Impl::SelLeft()
{
pDlg->SelLeft();
}
void AbstractHyphenWordDialog_Impl::SelRight()
{
pDlg->SelRight();
}
Window* AbstractHyphenWordDialog_Impl::GetWindow()
{
return pDlg;
}
Reference < com::sun::star::embed::XEmbeddedObject > AbstractInsertObjectDialog_Impl::GetObject()
{
return pDlg->GetObject();
......@@ -1107,6 +1141,23 @@ AbstractHangulHanjaConversionDialog* AbstractDialogFactory_Impl::CreateHangulHan
return new AbstractHangulHanjaConversionDialog_Impl( pDlg );
}
AbstractThesaurusDialog* AbstractDialogFactory_Impl::CreateThesaurusDialog( Window* pParent,
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus,
const String &rWord, sal_Int16 nLanguage )
{
SvxThesaurusDialog* pDlg = new SvxThesaurusDialog( pParent, xThesaurus, rWord, nLanguage );
return new AbstractThesaurusDialog_Impl( pDlg );
}
AbstractHyphenWordDialog* AbstractDialogFactory_Impl::CreateHyphenWordDialog( Window* pParent,
const String &rWord, LanguageType nLang,
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper )
{
SvxHyphenWordDialog* pDlg = new SvxHyphenWordDialog( rWord, nLang, pParent, xHyphen, pWrapper );
return new AbstractHyphenWordDialog_Impl( pDlg );
}
AbstractFmShowColsDialog * AbstractDialogFactory_Impl::CreateFmShowColsDialog( Window* pParent )
{
FmShowColsDialog* pDlg = new FmShowColsDialog( pParent);
......
......@@ -66,6 +66,8 @@ class SvPasteObjectDialog;
class SvBaseLinksDlg;
class SvxTransformTabDialog;
class SvxCaptionTabDialog;
class SvxThesaurusDialog;
class SvxHyphenWordDialog;
namespace svx{
class HangulHanjaConversionDialog;
......@@ -184,7 +186,22 @@ class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConver
virtual String GetCurrentSuggestion( ) const;
};
// for HangulHanjaConversionDialog end
class AbstractThesaurusDialog_Impl : public AbstractThesaurusDialog
{
DECL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl,SvxThesaurusDialog)
virtual String GetWord();
virtual sal_uInt16 GetLanguage() const;
virtual Window* GetWindow();
};
class AbstractHyphenWordDialog_Impl: public AbstractHyphenWordDialog
{
DECL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl,SvxHyphenWordDialog)
virtual void SelLeft();
virtual void SelRight();
virtual Window* GetWindow();
};
// for FmShowColsDialog begin
class FmShowColsDialog;
......@@ -633,6 +650,13 @@ public:
virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent, //add for HangulHanjaConversionDialog CHINA001
HangulHanjaConversion::ConversionDirection _ePrimaryDirection );
virtual AbstractThesaurusDialog* CreateThesaurusDialog( Window*, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus > xThesaurus,
const String &rWord, sal_Int16 nLanguage );
virtual AbstractHyphenWordDialog* CreateHyphenWordDialog( Window*,
const String &rWord, LanguageType nLang,
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper );
virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( Window* pParent ); //add for FmShowColsDialog
virtual AbstractSvxZoomDialog * CreateSvxZoomDialog( Window* pParent, //add for SvxZoomDialog
......
......@@ -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)
......
......@@ -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
......
/*************************************************************************
*
* 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
/*************************************************************************
*
* 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
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