Kaydet (Commit) 3479c1fb authored tarafından Caolán McNamara's avatar Caolán McNamara

de-pimpl Hyphenation Dialog for simplicity

Change-Id: Icba94fdd75d5e09fd81744d2f5ce55886b8777b4
üst d559ffe0
This diff is collapsed.
......@@ -26,28 +26,71 @@
#include <vcl/fixed.hxx>
#include <sfx2/basedlgs.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/linguistic2/XHyphenator.hpp>
#include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
// forward ---------------------------------------------------------------
namespace com{namespace sun{namespace star{
namespace linguistic2{
class XHyphenator;
}}}}
using namespace ::com::sun::star;
class SvxSpellWrapper;
// class SvxHyphenWordDialog ---------------------------------------------
class HyphenEdit : public Edit
{
public:
HyphenEdit( Window* pParent, const ResId& rResId );
struct SvxHyphenWordDialog_Impl;
protected:
virtual void KeyInput( const KeyEvent &rKEvt );
};
// class SvxHyphenWordDialog ---------------------------------------------
class SvxHyphenWordDialog : public SfxModalDialog
{
std::auto_ptr< SvxHyphenWordDialog_Impl > m_pImpl;
FixedText aWordFT;
HyphenEdit aWordEdit;
ImageButton aLeftBtn;
ImageButton aRightBtn;
OKButton aOkBtn;
PushButton aContBtn;
PushButton aDelBtn;
FixedLine aFLBottom;
HelpButton aHelpBtn;
PushButton aHyphAll;
CancelButton aCancelBtn;
String aLabel;
SvxSpellWrapper* pHyphWrapper;
uno::Reference< linguistic2::XHyphenator > xHyphenator;
uno::Reference< linguistic2::XPossibleHyphens > xPossHyph;
String aEditWord; // aEditWord and aWordEdit.GetText() differ only by the character for the current selected hyphenation position
String aActWord; // actual word to be hyphenated
LanguageType nActLanguage; // and its language
sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos
sal_uInt16 nHyphPos;
sal_uInt16 nOldPos;
sal_Int32 nHyphenationPositionsOffset;
sal_Bool bBusy;
void EnableLRBtn_Impl();
String EraseUnusableHyphens_Impl( uno::Reference< linguistic2::XPossibleHyphens > &rxPossHyph, sal_uInt16 nMaxHyphenationPos );
void InitControls_Impl();
void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 );
sal_uInt16 GetHyphIndex_Impl();
DECL_LINK(Left_Impl, void *);
DECL_LINK(Right_Impl, void *);
DECL_LINK(CutHdl_Impl, void *);
DECL_LINK(ContinueHdl_Impl, void *);
DECL_LINK(DeleteHdl_Impl, void *);
DECL_LINK( HyphenateAllHdl_Impl, Button* );
DECL_LINK(CancelHdl_Impl, void *);
DECL_LINK(GetFocusHdl_Impl, void *);
public:
SvxHyphenWordDialog( const String &rWord, LanguageType nLang,
Window* pParent,
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator > &xHyphen,
uno::Reference< linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper );
virtual ~SvxHyphenWordDialog();
......
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