diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-12-10 19:12:58 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-12-10 19:12:58 +0100 |
commit | 557dd8031d3b8221e2664a8149401226a67d0f08 (patch) | |
tree | 0545f4a0aaf420463a484374daf3b2e9d1dd452c /cui/source/factory | |
parent | 5a85f2a075030f9f15e5d48ed0a82dbf5eb55d68 (diff) |
#i107450#: move ThesaurusDialog and HyphenWordDialog to cui
Diffstat (limited to 'cui/source/factory')
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 51 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 26 |
2 files changed, 76 insertions, 1 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 10095922f523..d781333f9d47 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -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); diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index eb3c7b932597..5773cb8292dd 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -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 |