summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-05-22 12:28:02 +0200
committerKohei Yoshida <libreoffice@kohei.us>2014-05-23 06:28:29 -0500
commitaca222ee87826eb99554dba8fcf22e0cf7c718e0 (patch)
tree8a9215caef39481c1bb531da4c5e33b6db9c8e68 /include
parentd4a19c4098f4556f05666ed92a85c6138b4f769a (diff)
switch the Western language list box to SvxLanguageComboBox
This allows the user to assign an arbitrary (but valid) BCP 47 language tag to a portion of text, so that customized spell-checkers or other language-dependent tools can be used without the need to wait for LibreOffice to add yet another language to the list in the next release. +bool SvtLanguageTable::HasLanguageType() (cherry picked from commit 2a8eff589a53c8dd65e18d7a9d11cdb98a937e68) + SvxLanguageComboBox EditModifyHdl(), SaveEditedAsEntry() (cherry picked from commit 29c024afbe6a46459e37c5ceec510de1cd0ca7c8) handle SvxLanguageComboBox edit (cherry picked from commit 1aad7628dcd7fd14d48814d00c3d04e4ec0c59d5) finally switch the Western language list box to SvxLanguageComboBox (cherry picked from commit dbe8b3b6d4f2d2cc2e8c702b78034e9013f71e8f) advance start of edit selection on a matching entry ... to allow continuous typing. (cherry picked from commit fe2b8ef18b11b226fddd1cf3fc7f9133426a1b1a) Change-Id: Id57eb51b69e50be78f85d19a7b3623c1acdf6509 Reviewed-on: https://gerrit.libreoffice.org/9447 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/langtab.hxx1
-rw-r--r--include/svx/langbox.hxx16
2 files changed, 16 insertions, 1 deletions
diff --git a/include/svtools/langtab.hxx b/include/svtools/langtab.hxx
index 003487373271..56d06188266c 100644
--- a/include/svtools/langtab.hxx
+++ b/include/svtools/langtab.hxx
@@ -29,6 +29,7 @@ class SVT_DLLPUBLIC SvtLanguageTable
{
public:
+ static bool HasLanguageType( const LanguageType eType );
static OUString GetLanguageString( const LanguageType eType );
static LanguageType GetLanguageType( const OUString& rStr );
static sal_uInt32 GetLanguageEntryCount();
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index 410b2405f30d..91b788cdf0c2 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -144,8 +144,20 @@ public:
SvxLanguageComboBox( Window* pParent, WinBits nBits, bool bCheck = false );
virtual ~SvxLanguageComboBox();
+ enum EditedAndValid
+ {
+ EDITED_NO,
+ EDITED_VALID,
+ EDITED_INVALID
+ };
+
+ EditedAndValid GetEditedAndValid() const;
+ sal_Int32 SaveEditedAsEntry();
+
+
private:
- sal_Int32 mnSavedValuePos;
+ sal_Int32 mnSavedValuePos;
+ EditedAndValid meEditedAndValid;
SVX_DLLPRIVATE virtual sal_Int32 ImplInsertImgEntry( const OUString& rEntry, sal_Int32 nPos, bool bChecked ) SAL_OVERRIDE;
SVX_DLLPRIVATE virtual void ImplRemoveEntryAt( sal_Int32 nPos ) SAL_OVERRIDE;
@@ -164,6 +176,8 @@ private:
SVX_DLLPRIVATE virtual void ImplDisable() SAL_OVERRIDE;
SVX_DLLPRIVATE virtual void ImplSaveValue() SAL_OVERRIDE;
SVX_DLLPRIVATE virtual sal_Int32 ImplGetSavedValue() const SAL_OVERRIDE;
+
+ DECL_LINK( EditModifyHdl, SvxLanguageComboBox* );
};
#endif