summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/inc/autocdlg.hxx46
-rw-r--r--cui/source/inc/cuires.hrc3
-rw-r--r--cui/source/inc/helpid.hrc1
-rw-r--r--cui/source/tabpages/autocdlg.cxx164
-rw-r--r--cui/source/tabpages/autocdlg.src134
-rw-r--r--cui/uiconfig/ui/autocorrectdialog.ui4
-rw-r--r--cui/uiconfig/ui/wordcompletionpage.ui391
-rw-r--r--extras/source/glade/libreoffice-catalog.xml.in3
9 files changed, 513 insertions, 234 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 6ebab43701db..49919721ab77 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -168,6 +168,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/thesaurus \
cui/uiconfig/ui/transparencytabpage \
cui/uiconfig/ui/twolinespage \
+ cui/uiconfig/ui/wordcompletionpage \
cui/uiconfig/ui/zoomdialog \
))
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 943ad099167c..ab5a31cc7826 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -399,36 +399,36 @@ public:
class OfaAutoCompleteTabPage : public SfxTabPage
{
- using TabPage::ActivatePage;
-
+public:
class AutoCompleteMultiListBox : public MultiListBox
{
- OfaAutoCompleteTabPage& rPage;
+ OfaAutoCompleteTabPage* m_pPage;
public:
- AutoCompleteMultiListBox( OfaAutoCompleteTabPage& rPg,
- const ResId& rResId )
- : MultiListBox( &rPg, rResId ), rPage( rPg ) {}
-
+ AutoCompleteMultiListBox(Window *pParent, WinBits nBits)
+ : MultiListBox(pParent, nBits)
+ , m_pPage(NULL)
+ {
+ }
+ void SetPage(OfaAutoCompleteTabPage *pPage) { m_pPage = pPage; }
virtual bool PreNotify( NotifyEvent& rNEvt );
};
- CheckBox aCBActiv; ///<Enable word completion
- CheckBox aCBAppendSpace;///<Append space
- CheckBox aCBAsTip; ///<Show as tip
-
- CheckBox aCBCollect;///<Collect words
- CheckBox aCBRemoveList;///<...save the list for later use...
-
- FixedText aFTExpandKey;
- ListBox aDCBExpandKey;
- FixedText aFTMinWordlen;
- NumericField aNFMinWordlen;
- FixedText aFTMaxEntries;
- NumericField aNFMaxEntries;
- AutoCompleteMultiListBox aLBEntries;
- PushButton aPBEntries;
+private:
+ using TabPage::ActivatePage;
+ CheckBox* m_pCBActiv; ///<Enable word completion
+ CheckBox* m_pCBAppendSpace;///<Append space
+ CheckBox* m_pCBAsTip; ///<Show as tip
+
+ CheckBox* m_pCBCollect;///<Collect words
+ CheckBox* m_pCBRemoveList;///<...save the list for later use...
+
+ ListBox* m_pDCBExpandKey;
+ NumericField* m_pNFMinWordlen;
+ NumericField* m_pNFMaxEntries;
+ AutoCompleteMultiListBox* m_pLBEntries;
+ PushButton* m_pPBEntries;
editeng::SortedAutoCompleteStrings* m_pAutoCompleteList;
- sal_uInt16 nAutoCmpltListCnt;
+ sal_uInt16 m_nAutoCmpltListCnt;
DECL_LINK( CheckHdl, CheckBox* );
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index ab879cf2e162..3d598e2330b4 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -95,9 +95,6 @@
#define RID_SVXSTR_CHARNAME_STYLE (RID_SVX_START + 242)
#define RID_SVXSTR_CHARNAME_TYPEFACE (RID_SVX_START + 243)
-// autocor
-#define RID_OFAPAGE_AUTOCOMPLETE_OPTIONS (RID_OFA_START + 119)
-
// options
#define RID_SVXSTR_DIAGRAM_ROW (RID_SVX_START + 1162)
#define RID_OFAPAGE_CONNPOOLOPTIONS (RID_OFA_START + 122)
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 2f11a84c65e2..0180f138625f 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -197,7 +197,6 @@
#define HID_TPCOLOR_CMYK_1 "CUI_HID_TPCOLOR_CMYK_1"
#define HID_TPCOLOR_CMYK_2 "CUI_HID_TPCOLOR_CMYK_2"
#define HID_TPCOLOR_CMYK_3 "CUI_HID_TPCOLOR_CMYK_3"
-#define HID_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS"
#define HID_MEASURE_CTL_POSITION "CUI_HID_MEASURE_CTL_POSITION"
#define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM"
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 85f6223068e7..38610445292e 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2082,26 +2082,38 @@ OUString OfaQuoteTabPage::ChangeStringExt_Impl( sal_UCS4 cChar )
return aOUStr;
}
-OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent,
- const SfxItemSet& rSet )
- : SfxTabPage(pParent, CUI_RES( RID_OFAPAGE_AUTOCOMPLETE_OPTIONS ), rSet),
- aCBActiv (this, CUI_RES(CB_ACTIV)),
- aCBAppendSpace (this, CUI_RES(CB_APPEND_SPACE)),
- aCBAsTip (this, CUI_RES(CB_AS_TIP)),
- aCBCollect (this, CUI_RES(CB_COLLECT)),
- aCBRemoveList (this, CUI_RES(CB_REMOVE_LIST)),
- aFTExpandKey (this, CUI_RES(FT_EXPAND_KEY)),
- aDCBExpandKey (this, CUI_RES(DCB_EXPAND_KEY)),
- aFTMinWordlen (this, CUI_RES(FT_MIN_WORDLEN)),
- aNFMinWordlen (this, CUI_RES(NF_MIN_WORDLEN)),
- aFTMaxEntries (this, CUI_RES(FT_MAX_ENTRIES)),
- aNFMaxEntries (this, CUI_RES(NF_MAX_ENTRIES)),
- aLBEntries (*this, CUI_RES(LB_ENTRIES)),
- aPBEntries (this, CUI_RES(PB_ENTRIES)),
- m_pAutoCompleteList( 0 ),
- nAutoCmpltListCnt( 0 )
-{
- FreeResource();
+OfaAutoCompleteTabPage::OfaAutoCompleteTabPage(Window* pParent,
+ const SfxItemSet& rSet)
+ : SfxTabPage(pParent, "WordCompletionPage",
+ "cui/ui/wordcompletionpage.ui", rSet)
+ , m_pAutoCompleteList(0)
+ , m_nAutoCmpltListCnt(0)
+{
+ get(m_pCBActiv, "enablewordcomplete");
+ get(m_pCBAppendSpace, "appendspace");
+ get(m_pCBAsTip, "showastip");
+ get(m_pCBCollect, "collectwords");
+ get(m_pCBRemoveList, "whenclosing");
+
+ //fdo#65595, we need height-for-width support here, but for now we can
+ //bodge it
+ Size aPrefSize(m_pCBRemoveList->get_preferred_size());
+ Size aSize(m_pCBRemoveList->CalcMinimumSize(32*approximate_char_width()));
+ if (aPrefSize.Width() > aSize.Width())
+ {
+ m_pCBRemoveList->set_width_request(aSize.Width());
+ m_pCBRemoveList->set_height_request(aSize.Height());
+ }
+
+ get(m_pDCBExpandKey, "acceptwith");
+ get(m_pNFMinWordlen, "minwordlen");
+ get(m_pNFMaxEntries, "maxentries");
+ get(m_pLBEntries, "entries");
+ m_pLBEntries->SetPage(this);
+ aSize = LogicToPixel(Size(121, 158), MAP_APPFONT);
+ m_pLBEntries->set_width_request(aSize.Width());
+ m_pLBEntries->set_height_request(aSize.Height());
+ get(m_pPBEntries, "delete");
// the defined KEYs
static const sal_uInt16 aKeyCodes[] = {
@@ -2116,16 +2128,15 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent,
for( const sal_uInt16* pKeys = aKeyCodes; *pKeys; ++pKeys )
{
KeyCode aKCode( *pKeys );
- sal_uInt16 nPos = aDCBExpandKey.InsertEntry( aKCode.GetName() );
- aDCBExpandKey.SetEntryData( nPos, (void*)(sal_uLong)*pKeys );
+ sal_uInt16 nPos = m_pDCBExpandKey->InsertEntry( aKCode.GetName() );
+ m_pDCBExpandKey->SetEntryData( nPos, (void*)(sal_uLong)*pKeys );
if( KEY_RETURN == *pKeys ) // default to RETURN
- aDCBExpandKey.SelectEntryPos( nPos );
+ m_pDCBExpandKey->SelectEntryPos( nPos );
}
- aPBEntries.SetClickHdl(LINK(this, OfaAutoCompleteTabPage, DeleteHdl));
- aCBActiv.SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl));
- aCBCollect.SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl));
- aLBEntries.SetAccessibleRelationLabeledBy(&aLBEntries);
+ m_pPBEntries->SetClickHdl(LINK(this, OfaAutoCompleteTabPage, DeleteHdl));
+ m_pCBActiv->SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl));
+ m_pCBCollect->SetToggleHdl(LINK(this, OfaAutoCompleteTabPage, CheckHdl));
}
OfaAutoCompleteTabPage::~OfaAutoCompleteTabPage()
@@ -2145,39 +2156,39 @@ sal_Bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& )
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
sal_uInt16 nVal;
- bCheck = aCBActiv.IsChecked();
+ bCheck = m_pCBActiv->IsChecked();
bModified |= pOpt->bAutoCompleteWords != bCheck;
pOpt->bAutoCompleteWords = bCheck;
- bCheck = aCBCollect.IsChecked();
+ bCheck = m_pCBCollect->IsChecked();
bModified |= pOpt->bAutoCmpltCollectWords != bCheck;
pOpt->bAutoCmpltCollectWords = bCheck;
- bCheck = !aCBRemoveList.IsChecked(); // inverted value!
+ bCheck = !m_pCBRemoveList->IsChecked(); // inverted value!
bModified |= pOpt->bAutoCmpltKeepList != bCheck;
pOpt->bAutoCmpltKeepList = bCheck;
- bCheck = aCBAppendSpace.IsChecked();
+ bCheck = m_pCBAppendSpace->IsChecked();
bModified |= pOpt->bAutoCmpltAppendBlanc != bCheck;
pOpt->bAutoCmpltAppendBlanc = bCheck;
- bCheck = aCBAsTip.IsChecked();
+ bCheck = m_pCBAsTip->IsChecked();
bModified |= pOpt->bAutoCmpltShowAsTip != bCheck;
pOpt->bAutoCmpltShowAsTip = bCheck;
- nVal = (sal_uInt16)aNFMinWordlen.GetValue();
+ nVal = (sal_uInt16)m_pNFMinWordlen->GetValue();
bModified |= nVal != pOpt->nAutoCmpltWordLen;
pOpt->nAutoCmpltWordLen = nVal;
- nVal = (sal_uInt16)aNFMaxEntries.GetValue();
+ nVal = (sal_uInt16)m_pNFMaxEntries->GetValue();
bModified |= nVal != pOpt->nAutoCmpltListLen;
pOpt->nAutoCmpltListLen = nVal;
- nVal = aDCBExpandKey.GetSelectEntryPos();
- if( nVal < aDCBExpandKey.GetEntryCount() )
+ nVal = m_pDCBExpandKey->GetSelectEntryPos();
+ if( nVal < m_pDCBExpandKey->GetEntryCount() )
{
- sal_uLong nKey = (sal_uLong)aDCBExpandKey.GetEntryData( nVal );
+ sal_uLong nKey = (sal_uLong)m_pDCBExpandKey->GetEntryData( nVal );
bModified |= nKey != pOpt->nAutoCmpltExpandKey;
pOpt->nAutoCmpltExpandKey = (sal_uInt16)nKey;
}
- if (m_pAutoCompleteList && nAutoCmpltListCnt != aLBEntries.GetEntryCount())
+ if (m_pAutoCompleteList && m_nAutoCmpltListCnt != m_pLBEntries->GetEntryCount())
{
bModified = true;
pOpt->m_pAutoCompleteList = m_pAutoCompleteList;
@@ -2196,22 +2207,22 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& )
SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
- aCBActiv.Check( pOpt->bAutoCompleteWords );
- aCBCollect.Check( pOpt->bAutoCmpltCollectWords );
- aCBRemoveList.Check( !pOpt->bAutoCmpltKeepList ); //inverted value!
- aCBAppendSpace.Check( pOpt->bAutoCmpltAppendBlanc );
- aCBAsTip.Check( pOpt->bAutoCmpltShowAsTip );
+ m_pCBActiv->Check( pOpt->bAutoCompleteWords );
+ m_pCBCollect->Check( pOpt->bAutoCmpltCollectWords );
+ m_pCBRemoveList->Check( !pOpt->bAutoCmpltKeepList ); //inverted value!
+ m_pCBAppendSpace->Check( pOpt->bAutoCmpltAppendBlanc );
+ m_pCBAsTip->Check( pOpt->bAutoCmpltShowAsTip );
- aNFMinWordlen.SetValue( pOpt->nAutoCmpltWordLen );
- aNFMaxEntries.SetValue( pOpt->nAutoCmpltListLen );
+ m_pNFMinWordlen->SetValue( pOpt->nAutoCmpltWordLen );
+ m_pNFMaxEntries->SetValue( pOpt->nAutoCmpltListLen );
// select the specific KeyCode:
{
sal_uLong nKey = pOpt->nAutoCmpltExpandKey;
- for( sal_uInt16 n = 0, nCnt = aDCBExpandKey.GetEntryCount(); n < nCnt; ++n )
- if( nKey == (sal_uLong)aDCBExpandKey.GetEntryData( n ))
+ for( sal_uInt16 n = 0, nCnt = m_pDCBExpandKey->GetEntryCount(); n < nCnt; ++n )
+ if( nKey == (sal_uLong)m_pDCBExpandKey->GetEntryData( n ))
{
- aDCBExpandKey.SelectEntryPos( n );
+ m_pDCBExpandKey->SelectEntryPos( n );
break;
}
}
@@ -2221,23 +2232,23 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& )
m_pAutoCompleteList = const_cast<editeng::SortedAutoCompleteStrings*>(
pOpt->m_pAutoCompleteList);
pOpt->m_pAutoCompleteList = 0;
- nAutoCmpltListCnt = m_pAutoCompleteList->size();
- for (size_t n = 0; n < nAutoCmpltListCnt; ++n)
+ m_nAutoCmpltListCnt = m_pAutoCompleteList->size();
+ for (size_t n = 0; n < m_nAutoCmpltListCnt; ++n)
{
const OUString* pStr =
&(*m_pAutoCompleteList)[n]->GetAutoCompleteString();
- sal_uInt16 nPos = aLBEntries.InsertEntry( *pStr );
- aLBEntries.SetEntryData( nPos, (void*)pStr );
+ sal_uInt16 nPos = m_pLBEntries->InsertEntry( *pStr );
+ m_pLBEntries->SetEntryData( nPos, (void*)pStr );
}
}
else
{
- aLBEntries.Disable();
- aPBEntries.Disable();
+ m_pLBEntries->Disable();
+ m_pPBEntries->Disable();
}
- CheckHdl( &aCBActiv );
- CheckHdl( &aCBCollect );
+ CheckHdl(m_pCBActiv);
+ CheckHdl(m_pCBCollect);
}
void OfaAutoCompleteTabPage::ActivatePage( const SfxItemSet& )
@@ -2248,12 +2259,12 @@ void OfaAutoCompleteTabPage::ActivatePage( const SfxItemSet& )
IMPL_LINK_NOARG(OfaAutoCompleteTabPage, DeleteHdl)
{
sal_uInt16 nSelCnt =
- (m_pAutoCompleteList) ? aLBEntries.GetSelectEntryCount() : 0;
+ (m_pAutoCompleteList) ? m_pLBEntries->GetSelectEntryCount() : 0;
while( nSelCnt )
{
- sal_uInt16 nPos = aLBEntries.GetSelectEntryPos( --nSelCnt );
- OUString* pStr = static_cast<OUString*>(aLBEntries.GetEntryData(nPos));
- aLBEntries.RemoveEntry( nPos );
+ sal_uInt16 nPos = m_pLBEntries->GetSelectEntryPos( --nSelCnt );
+ OUString* pStr = static_cast<OUString*>(m_pLBEntries->GetEntryData(nPos));
+ m_pLBEntries->RemoveEntry( nPos );
editeng::IAutoCompleteString hack(*pStr); // UGLY
m_pAutoCompleteList->erase(&hack);
}
@@ -2263,21 +2274,21 @@ IMPL_LINK_NOARG(OfaAutoCompleteTabPage, DeleteHdl)
IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox )
{
sal_Bool bEnable = pBox->IsChecked();
- if( pBox == &aCBActiv )
+ if (pBox == m_pCBActiv)
{
- aCBAppendSpace.Enable( bEnable );
- aCBAppendSpace.Enable( bEnable );
- aCBAsTip.Enable( bEnable );
- aDCBExpandKey.Enable( bEnable );
+ m_pCBAppendSpace->Enable( bEnable );
+ m_pCBAppendSpace->Enable( bEnable );
+ m_pCBAsTip->Enable( bEnable );
+ m_pDCBExpandKey->Enable( bEnable );
}
- else if(&aCBCollect == pBox)
- aCBRemoveList.Enable( bEnable );
+ else if (m_pCBCollect == pBox)
+ m_pCBRemoveList->Enable( bEnable );
return 0;
}
void OfaAutoCompleteTabPage::CopyToClipboard() const
{
- sal_uInt16 nSelCnt = aLBEntries.GetSelectEntryCount();
+ sal_uInt16 nSelCnt = m_pLBEntries->GetSelectEntryCount();
if (m_pAutoCompleteList && nSelCnt)
{
TransferDataContainer* pCntnr = new TransferDataContainer;
@@ -2296,7 +2307,7 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const
for( sal_uInt16 n = 0; n < nSelCnt; ++n )
{
- sData.append(OUStringToOString(aLBEntries.GetSelectEntry(n),
+ sData.append(OUStringToOString(m_pLBEntries->GetSelectEntry(n),
nEncode));
sData.append(aLineEnd);
}
@@ -2316,14 +2327,14 @@ bool OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify(
switch( rKeyCode.GetModifier() | rKeyCode.GetCode() )
{
case KEY_DELETE:
- rPage.DeleteHdl( 0 );
+ m_pPage->DeleteHdl( 0 );
nHandled = true;
break;
default:
if( KEYFUNC_COPY == rKeyCode.GetFunction() )
{
- rPage.CopyToClipboard();
+ m_pPage->CopyToClipboard();
nHandled = true;
}
break;
@@ -2332,6 +2343,17 @@ bool OfaAutoCompleteTabPage::AutoCompleteMultiListBox::PreNotify(
return nHandled;
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeAutoCompleteMultiListBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ WinBits nWinBits = WB_TABSTOP;
+
+ OString sBorder = VclBuilder::extractCustomProperty(rMap);
+ if (!sBorder.isEmpty())
+ nWinBits |= WB_BORDER;
+
+ return new OfaAutoCompleteTabPage::AutoCompleteMultiListBox(pParent, nWinBits);
+}
+
// class OfaSmartTagOptionsTabPage ---------------------------------------------
OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage( Window* pParent,
diff --git a/cui/source/tabpages/autocdlg.src b/cui/source/tabpages/autocdlg.src
index a8b2e0e7aae6..4da0c87824b7 100644
--- a/cui/source/tabpages/autocdlg.src
+++ b/cui/source/tabpages/autocdlg.src
@@ -24,140 +24,6 @@
/**************************************************************************/
/* */
-/* Beschreibung: automatische Wortergänzung */
-/* */
-/**************************************************************************/
-TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS
-{
- HelpId = HID_OFAPAGE_AUTOCOMPLETE_OPTIONS ;
- OutputSize = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- CheckBox CB_ACTIV
- {
- HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_ACTIV";
- Pos = MAP_APPFONT( 4, 3 );
- Size = MAP_APPFONT( 116, 10 );
- Text [ en-US ] = "Enable word ~completion";
- };
- CheckBox CB_APPEND_SPACE
- {
- HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_APPEND_SPACE";
- Pos = MAP_APPFONT( 10, 17 );
- Size = MAP_APPFONT( 110, 10 );
- Text [ en-US ] = "~Append space";
- };
- CheckBox CB_AS_TIP
- {
- HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_AS_TIP";
- Pos = MAP_APPFONT( 10, 31 );
- Size = MAP_APPFONT( 110, 10 );
- Text [ en-US ] = "~Show as tip";
- };
- CheckBox CB_COLLECT
- {
- HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_COLLECT";
- Pos = MAP_APPFONT( 4, 45 );
- Size = MAP_APPFONT( 116, 10 );
- Text [ en-US ] = "C~ollect words";
- };
- CheckBox CB_REMOVE_LIST
- {
- HelpID = "cui:CheckBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:CB_REMOVE_LIST";
- Pos = MAP_APPFONT( 10, 59 );
- Size = MAP_APPFONT( 110, 40 );
- WordBreak = TRUE;
- Text [ en-US ] = "~When closing a document, remove the words collected from it from the list";
- };
- FixedText FT_EXPAND_KEY
- {
- Pos = MAP_APPFONT( 4, 102 );
- Size = MAP_APPFONT( 116, 8 );
- Text [ en-US ] = "Acc~ept with";
- };
- ListBox DCB_EXPAND_KEY
- {
- HelpID = "cui:ListBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:DCB_EXPAND_KEY";
- Pos = MAP_APPFONT( 4, 113 );
- Size = MAP_APPFONT( 116, 60 );
- TabStop = TRUE;
- DropDown = TRUE;
- Group = TRUE;
- Sort = FALSE;
- };
- FixedText FT_MIN_WORDLEN
- {
- Pos = MAP_APPFONT( 4, 129 );
- Size = MAP_APPFONT( 116, 8 );
- Text [ en-US ] = "Mi~n. word length";
- };
- NumericField NF_MIN_WORDLEN
- {
- HelpID = "cui:NumericField:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:NF_MIN_WORDLEN";
- Border = TRUE;
- Pos = MAP_APPFONT( 4, 140 );
- Size = MAP_APPFONT( 30, 12 );
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Value = 10 ;
- Minimum = 5 ;
- First = 5 ;
- Last = 100 ;
- Maximum = 100 ;
- SpinSize = 1 ;
- };
- FixedText FT_MAX_ENTRIES
- {
- Pos = MAP_APPFONT( 4, 156 );
- Size = MAP_APPFONT( 116, 8 );
- Text [ en-US ] = "~Max. entries";
- };
- NumericField NF_MAX_ENTRIES
- {
- HelpID = "cui:NumericField:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:NF_MAX_ENTRIES";
- Border = TRUE;
- Pos = MAP_APPFONT( 4, 167 );
- Size = MAP_APPFONT( 30, 12 );
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Value = 500 ;
- Maximum = 10000;
- Last = 10000 ;
- First = 50 ;
- Minimum = 50;
- SpinSize = 25 ;
- };
- MultiListBox LB_ENTRIES
- {
- HelpID = "cui:MultiListBox:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:LB_ENTRIES";
- Pos = MAP_APPFONT( 127, 3 );
- Size = MAP_APPFONT( 121, 158 );
- TabStop = TRUE;
- DropDown = FALSE;
- Group = TRUE;
- Border = TRUE;
- Sort = TRUE;
- SimpleMode = TRUE;
- };
- PushButton PB_ENTRIES
- {
- HelpID = "cui:PushButton:RID_OFAPAGE_AUTOCOMPLETE_OPTIONS:PB_ENTRIES";
- Pos = MAP_APPFONT( 127, 165 );
- Size = MAP_APPFONT( 121, 14 );
- TabStop = TRUE ;
- Text [ en-US ] = "~Delete Entry";
- };
- Text [ en-US ] = "Word Completion";
-};
-
-
-/**************************************************************************/
-/* */
/* Beschreibung: Smart Tag Options */
/* */
/**************************************************************************/
diff --git a/cui/uiconfig/ui/autocorrectdialog.ui b/cui/uiconfig/ui/autocorrectdialog.ui
index e5051b67f584..052de9281bf1 100644
--- a/cui/uiconfig/ui/autocorrectdialog.ui
+++ b/cui/uiconfig/ui/autocorrectdialog.ui
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="AutoCorrectDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">AutoCorrect</property>
- <property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
diff --git a/cui/uiconfig/ui/wordcompletionpage.ui b/cui/uiconfig/ui/wordcompletionpage.ui
new file mode 100644
index 000000000000..6d867dfc5fe5
--- /dev/null
+++ b/cui/uiconfig/ui/wordcompletionpage.ui
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">50</property>
+ <property name="upper">10000</property>
+ <property name="value">500</property>
+ <property name="step_increment">25</property>
+ <property name="page_increment">100</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="lower">5</property>
+ <property name="upper">100</property>
+ <property name="value">10</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkBox" id="WordCompletionPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkButton" id="delete">
+ <property name="label" translatable="yes">_Delete Entry</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="cuilo-AutoCompleteMultiListBox" id="entries:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Max. entries</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">maxentries</property>
+ <property name="ellipsize">middle</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="maxentries">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="halign">start</property>
+ <property name="text" translatable="yes">500</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="value">500</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Mi_n. word length</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">maxentries</property>
+ <property name="ellipsize">middle</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="minwordlen">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="halign">start</property>
+ <property name="text" translatable="yes">100</property>
+ <property name="adjustment">adjustment2</property>
+ <property name="value">100</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="appendspace">
+ <property name="label" translatable="yes">_Append space</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="showastip">
+ <property name="label" translatable="yes">_Show as tip</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0.019999999552965164</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="enablewordcomplete">
+ <property name="label" translatable="yes">Enable word _completion</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="whenclosing:wrap">
+ <property name="label" translatable="yes">_When closing a document, remove the words collected from it from the list</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="collectwords">
+ <property name="label" translatable="yes">C_ollect words</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5899999737739563</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Acc_ept with</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">acceptwith</property>
+ <property name="ellipsize">middle</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="acceptwith">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="maxentries"/>
+ <widget name="minwordlen"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 797653578dcc..ebb007f6e2b7 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -284,6 +284,9 @@
<glade-widget-class title="MultiLine Edit" name="svtlo-MultiLineEditSyntaxHighlight"
generic-name="MultiLineEdit" parent="GtkTextView"
icon-name="widget-gtk-textview"/>
+ <glade-widget-class title="AutoComplete MultiLine Edit" name="cuilo-AutoCompleteMultiListBox"
+ generic-name="MultiLineEdit" parent="GtkTextView"
+ icon-name="widget-gtk-textview"/>
<glade-widget-class title="SvtFormattedField" name="svtlo-FormattedField"
generic-name="Formatted Field" parent="GtkSpinButton"
icon-name="widget-gtk-textentry"/>