summaryrefslogtreecommitdiff
path: root/cui/source/factory
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/factory')
-rw-r--r--cui/source/factory/dlgfact.cxx64
-rw-r--r--cui/source/factory/dlgfact.hxx39
2 files changed, 88 insertions, 15 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index db4e1b6537cb..8929e9ebdef5 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -100,6 +100,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;
@@ -116,6 +118,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() \
{
@@ -267,12 +271,12 @@ void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( sal_Bool _bByChar
pDlg->SetByCharacter(_bByCharacter);
}
-void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( sal_Bool _bTryBothDirections, HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection )
+void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection )
{
pDlg->SetConversionDirectionState(_bTryBothDirections, _ePrimaryConversionDirection);
}
-void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( HangulHanjaConversion::ConversionFormat _eType )
+void AbstractHangulHanjaConversionDialog_Impl::SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType )
{
pDlg->SetConversionFormat(_eType);
}
@@ -321,7 +325,7 @@ sal_Bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const
return pDlg->GetUseBothDirections();
}
-HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const
+editeng::HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog_Impl::GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const
{
return pDlg->GetDirection( _eDefaultDirection );
}
@@ -338,7 +342,7 @@ String AbstractHangulHanjaConversionDialog_Impl::GetCurrentString( ) const
{
return pDlg->GetCurrentString();
}
-HangulHanjaConversion::ConversionFormat AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const
+editeng::HangulHanjaConversion::ConversionFormat AbstractHangulHanjaConversionDialog_Impl::GetConversionFormat( ) const
{
return pDlg->GetConversionFormat();
}
@@ -353,6 +357,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();
@@ -1098,12 +1132,29 @@ AbstractSvxDistributeDialog* AbstractDialogFactory_Impl::CreateSvxDistributeD
}
AbstractHangulHanjaConversionDialog* AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(Window* pParent,
- HangulHanjaConversion::ConversionDirection _ePrimaryDirection )
+ editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection )
{
HangulHanjaConversionDialog* pDlg = new HangulHanjaConversionDialog( pParent, _ePrimaryDirection);
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);
@@ -1868,7 +1919,7 @@ SfxAbstractPasteDialog* AbstractDialogFactory_Impl::CreatePasteDialog( Window* p
return new AbstractPasteDialog_Impl( new SvPasteObjectDialog( pParent ) );
}
-SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( Window* pParent, sfx2::SvLinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p)
+SfxAbstractLinksDialog* AbstractDialogFactory_Impl::CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p)
{
SvBaseLinksDlg* pLinkDlg = new SvBaseLinksDlg( pParent, pMgr, bHTML );
if ( p )
@@ -1901,4 +1952,3 @@ SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Wind
{
return new SvxInsRowColDlg( pParent, bCol, nHelpId );
}
-
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index f609d3f81c27..844439efbf61 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -63,6 +63,8 @@ class SvPasteObjectDialog;
class SvBaseLinksDlg;
class SvxTransformTabDialog;
class SvxCaptionTabDialog;
+class SvxThesaurusDialog;
+class SvxHyphenWordDialog;
namespace svx{
class HangulHanjaConversionDialog;
@@ -158,8 +160,8 @@ class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConver
virtual void EndDialog(long nResult = 0);
virtual void EnableRubySupport( sal_Bool _bVal );
virtual void SetByCharacter( sal_Bool _bByCharacter ) ;
- virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection );
- virtual void SetConversionFormat( HangulHanjaConversion::ConversionFormat _eType );
+ virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection );
+ virtual void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType );
virtual void SetOptionsChangedHdl( const Link& _rHdl );
virtual void SetIgnoreHdl( const Link& _rHdl );
virtual void SetIgnoreAllHdl( const Link& _rHdl ) ;
@@ -169,19 +171,34 @@ class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConver
virtual void SetConversionFormatChangedHdl( const Link& _rHdl ) ;
virtual void SetFindHdl( const Link& _rHdl );
virtual sal_Bool GetUseBothDirections( ) const;
- virtual HangulHanjaConversion::ConversionDirection GetDirection( HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const;
+ virtual editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const;
virtual void SetCurrentString(
const String& _rNewString,
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions,
bool _bOriginatesFromDocument = true
);
virtual String GetCurrentString( ) const ;
- virtual HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const ;
+ virtual editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const ;
virtual void FocusSuggestion( );
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;
@@ -576,7 +593,6 @@ private:
//AbstractDialogFactory_Impl implementations
class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory
{
-
public:
virtual VclAbstractDialog* CreateVclDialog( Window* pParent, sal_uInt32 nResId );
virtual VclAbstractDialog* CreateSfxDialog( Window* pParent, const SfxBindings& rBindings, sal_uInt32 nResId );
@@ -626,10 +642,17 @@ public:
virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, USHORT nSlotId,
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj );
virtual SfxAbstractPasteDialog* CreatePasteDialog( Window* pParent );
- virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::SvLinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p=0 );
+ virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML, sfx2::SvBaseLink* p=0 );
virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent, //add for HangulHanjaConversionDialog CHINA001
- HangulHanjaConversion::ConversionDirection _ePrimaryDirection );
+ editeng::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