Kaydet (Commit) 4b81079c authored tarafından Caolán McNamara's avatar Caolán McNamara

convert autocorrect options page to .ui

Change-Id: If4370e300c74a543ca72f3e4b850d2f494f8d9ea
üst c3ed56fd
......@@ -13,6 +13,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/aboutdialog \
cui/uiconfig/ui/aboutconfigdialog\
cui/uiconfig/ui/acorexceptpage \
cui/uiconfig/ui/acoroptionspage \
cui/uiconfig/ui/acorreplacepage \
cui/uiconfig/ui/applyautofmtpage \
cui/uiconfig/ui/applylocalizedpage \
......
......@@ -94,22 +94,21 @@ class OfaAutocorrOptionsPage : public SfxTabPage
using TabPage::ActivatePage;
private:
SvxCheckListBox aCheckLB;
String sInput;
String sDoubleCaps;
String sStartCap;
String sBoldUnderline;
String sURL;
String sNoDblSpaces;
String sDash;
String sNonBrkSpace;
String sFirst;
String sAccidentalCaps;
SvxCheckListBox *m_pCheckLB;
OUString m_sInput;
OUString m_sDoubleCaps;
OUString m_sStartCap;
OUString m_sBoldUnderline;
OUString m_sURL;
OUString m_sNoDblSpaces;
OUString m_sDash;
OUString m_sNonBrkSpace;
OUString m_sFirst;
OUString m_sAccidentalCaps;
public:
OfaAutocorrOptionsPage( Window* pParent, const SfxItemSet& rSet );
~OfaAutocorrOptionsPage();
OfaAutocorrOptionsPage(Window* pParent, const SfxItemSet& rSet);
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
......
......@@ -112,7 +112,6 @@
// autocor
#define RID_OFAPAGE_AUTOCOMPLETE_OPTIONS (RID_OFA_START + 119)
#define RID_OFAPAGE_AUTOCORR_OPTIONS (RID_OFA_START + 102)
// options
#define RID_SVXSTR_DIAGRAM_ROW (RID_SVX_START + 1162)
......
......@@ -222,14 +222,12 @@
#define HID_SEARCHATTR "CUI_HID_SEARCHATTR"
#define HID_SEARCHSIMILARITY "CUI_HID_SEARCHSIMILARITY"
#define UID_SEARCH_RECORDSTATUS "CUI_UID_SEARCH_RECORDSTATUS"
#define HID_OFAPAGE_AUTOCORR_CLB "CUI_HID_OFAPAGE_AUTOCORR_CLB"
#define HID_TPCOLOR_RGB_1 "CUI_HID_TPCOLOR_RGB_1"
#define HID_TPCOLOR_RGB_2 "CUI_HID_TPCOLOR_RGB_2"
#define HID_TPCOLOR_RGB_3 "CUI_HID_TPCOLOR_RGB_3"
#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_AUTOCORR_OPTIONS "CUI_HID_OFAPAGE_AUTOCORR_OPTIONS"
#define HID_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS"
#define HID_PAGE_CONNECTION "CUI_HID_PAGE_CONNECTION"
#define HID_PAGE_CONNECTION_CTL_PREVIEW "CUI_HID_PAGE_CONNECTION_CTL_PREVIEW"
......
......@@ -175,27 +175,18 @@ IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox*, pBox)
return 0;
}
OfaAutocorrOptionsPage::OfaAutocorrOptionsPage( Window* pParent,
const SfxItemSet& rSet ) :
SfxTabPage(pParent, CUI_RES( RID_OFAPAGE_AUTOCORR_OPTIONS ), rSet),
aCheckLB (this, CUI_RES(CLB_SETTINGS )),
sInput (CUI_RES(RID_SVXSTR_USE_REPLACE )),
sDoubleCaps (CUI_RES(RID_SVXSTR_CPTL_STT_WORD )),
sStartCap (CUI_RES(RID_SVXSTR_CPTL_STT_SENT )),
sBoldUnderline (CUI_RES(RID_SVXSTR_BOLD_UNDER )),
sURL (CUI_RES(RID_SVXSTR_DETECT_URL )),
sNoDblSpaces (CUI_RES(RID_SVXSTR_NO_DBL_SPACES )),
sDash (CUI_RES(RID_SVXSTR_DASH )),
sAccidentalCaps (CUI_RES(RID_SVXSTR_CORRECT_ACCIDENTAL_CAPS_LOCK))
{
FreeResource();
aCheckLB.SetHelpId(HID_OFAPAGE_AUTOCORR_CLB);
}
OfaAutocorrOptionsPage::~OfaAutocorrOptionsPage()
OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "AutocorrectOptionsPage", "cui/ui/acoroptionspage.ui", rSet)
, m_sInput(CUI_RESSTR(RID_SVXSTR_USE_REPLACE))
, m_sDoubleCaps(CUI_RESSTR(RID_SVXSTR_CPTL_STT_WORD))
, m_sStartCap(CUI_RESSTR(RID_SVXSTR_CPTL_STT_SENT))
, m_sBoldUnderline(CUI_RESSTR(RID_SVXSTR_BOLD_UNDER))
, m_sURL(CUI_RESSTR(RID_SVXSTR_DETECT_URL))
, m_sNoDblSpaces(CUI_RESSTR(RID_SVXSTR_NO_DBL_SPACES))
, m_sDash(CUI_RESSTR(RID_SVXSTR_DASH))
, m_sAccidentalCaps(CUI_RESSTR(RID_SVXSTR_CORRECT_ACCIDENTAL_CAPS_LOCK))
{
get(m_pCheckLB, "checklist");
}
SfxTabPage* OfaAutocorrOptionsPage::Create( Window* pParent,
......@@ -210,14 +201,14 @@ sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& )
long nFlags = pAutoCorrect->GetFlags();
sal_uInt16 nPos = 0;
pAutoCorrect->SetAutoCorrFlag(Autocorrect, aCheckLB.IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CptlSttWrd, aCheckLB.IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, aCheckLB.IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(ChgWeightUnderl, aCheckLB.IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(SetINetAttr, aCheckLB.IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(ChgToEnEmDash, aCheckLB.IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(IgnoreDoubleSpace, aCheckLB.IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CorrectCapsLock, aCheckLB.IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(Autocorrect, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CptlSttWrd, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(ChgWeightUnderl, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(SetINetAttr, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(ChgToEnEmDash, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(IgnoreDoubleSpace, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CorrectCapsLock, m_pCheckLB->IsChecked(nPos++));
sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags();
if(bReturn )
......@@ -239,29 +230,29 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& )
SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
const long nFlags = pAutoCorrect->GetFlags();
aCheckLB.SetUpdateMode(sal_False);
aCheckLB.Clear();
m_pCheckLB->SetUpdateMode(sal_False);
m_pCheckLB->Clear();
aCheckLB.InsertEntry(sInput);
aCheckLB.InsertEntry(sDoubleCaps);
aCheckLB.InsertEntry(sStartCap);
aCheckLB.InsertEntry(sBoldUnderline);
aCheckLB.InsertEntry(sURL);
aCheckLB.InsertEntry(sDash);
aCheckLB.InsertEntry(sNoDblSpaces);
aCheckLB.InsertEntry(sAccidentalCaps);
m_pCheckLB->InsertEntry(m_sInput);
m_pCheckLB->InsertEntry(m_sDoubleCaps);
m_pCheckLB->InsertEntry(m_sStartCap);
m_pCheckLB->InsertEntry(m_sBoldUnderline);
m_pCheckLB->InsertEntry(m_sURL);
m_pCheckLB->InsertEntry(m_sDash);
m_pCheckLB->InsertEntry(m_sNoDblSpaces);
m_pCheckLB->InsertEntry(m_sAccidentalCaps);
sal_uInt16 nPos = 0;
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgWeightUnderl) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & SetINetAttr) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgToEnEmDash) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & IgnoreDoubleSpace) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CorrectCapsLock) );
aCheckLB.SetUpdateMode(sal_True);
m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) );
m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) );
m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) );
m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & ChgWeightUnderl) );
m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & SetINetAttr) );
m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & ChgToEnEmDash) );
m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & IgnoreDoubleSpace) );
m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CorrectCapsLock) );
m_pCheckLB->SetUpdateMode(sal_True);
}
/*********************************************************************/
......
......@@ -23,8 +23,6 @@
// defines ------------------------------------------------------------------
#define CLB_SETTINGS 1
#define ED_RIGHT_MARGIN 100
#define BT_OK 101
#define BT_CANCEL 102
......
......@@ -22,28 +22,6 @@
#include "helpid.hrc"
#include <svx/svxids.hrc> // SID_AUTOFORMAT
/**************************************************************************/
/* */
/* Beschreibung: Autokorrektur-Optionen */
/* */
/**************************************************************************/
TabPage RID_OFAPAGE_AUTOCORR_OPTIONS
{
HelpId = HID_OFAPAGE_AUTOCORR_OPTIONS ;
OutputSize = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
Hide = TRUE ;
SVLook = TRUE ;
Text [ en-US ] = "Settings" ;
Control CLB_SETTINGS
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 248 , 173 ) ;
Border = TRUE ;
TabStop = TRUE ;
};
};
/**************************************************************************/
/* */
/* Beschreibung: automatische Wortergnzung */
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="AutocorrectOptionsPage">
<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="svxcorelo-SvxCheckListBox" id="checklist:border">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Check List Box-selection1"/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</interface>
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