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,\ ...@@ -13,6 +13,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/aboutdialog \ cui/uiconfig/ui/aboutdialog \
cui/uiconfig/ui/aboutconfigdialog\ cui/uiconfig/ui/aboutconfigdialog\
cui/uiconfig/ui/acorexceptpage \ cui/uiconfig/ui/acorexceptpage \
cui/uiconfig/ui/acoroptionspage \
cui/uiconfig/ui/acorreplacepage \ cui/uiconfig/ui/acorreplacepage \
cui/uiconfig/ui/applyautofmtpage \ cui/uiconfig/ui/applyautofmtpage \
cui/uiconfig/ui/applylocalizedpage \ cui/uiconfig/ui/applylocalizedpage \
......
...@@ -94,22 +94,21 @@ class OfaAutocorrOptionsPage : public SfxTabPage ...@@ -94,22 +94,21 @@ class OfaAutocorrOptionsPage : public SfxTabPage
using TabPage::ActivatePage; using TabPage::ActivatePage;
private: private:
SvxCheckListBox aCheckLB; SvxCheckListBox *m_pCheckLB;
String sInput; OUString m_sInput;
String sDoubleCaps; OUString m_sDoubleCaps;
String sStartCap; OUString m_sStartCap;
String sBoldUnderline; OUString m_sBoldUnderline;
String sURL; OUString m_sURL;
String sNoDblSpaces; OUString m_sNoDblSpaces;
String sDash; OUString m_sDash;
String sNonBrkSpace; OUString m_sNonBrkSpace;
String sFirst; OUString m_sFirst;
String sAccidentalCaps; OUString m_sAccidentalCaps;
public: public:
OfaAutocorrOptionsPage( Window* pParent, const SfxItemSet& rSet ); OfaAutocorrOptionsPage(Window* pParent, const SfxItemSet& rSet);
~OfaAutocorrOptionsPage();
static SfxTabPage* Create( Window* pParent, static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet); const SfxItemSet& rAttrSet);
......
...@@ -112,7 +112,6 @@ ...@@ -112,7 +112,6 @@
// autocor // autocor
#define RID_OFAPAGE_AUTOCOMPLETE_OPTIONS (RID_OFA_START + 119) #define RID_OFAPAGE_AUTOCOMPLETE_OPTIONS (RID_OFA_START + 119)
#define RID_OFAPAGE_AUTOCORR_OPTIONS (RID_OFA_START + 102)
// options // options
#define RID_SVXSTR_DIAGRAM_ROW (RID_SVX_START + 1162) #define RID_SVXSTR_DIAGRAM_ROW (RID_SVX_START + 1162)
......
...@@ -222,14 +222,12 @@ ...@@ -222,14 +222,12 @@
#define HID_SEARCHATTR "CUI_HID_SEARCHATTR" #define HID_SEARCHATTR "CUI_HID_SEARCHATTR"
#define HID_SEARCHSIMILARITY "CUI_HID_SEARCHSIMILARITY" #define HID_SEARCHSIMILARITY "CUI_HID_SEARCHSIMILARITY"
#define UID_SEARCH_RECORDSTATUS "CUI_UID_SEARCH_RECORDSTATUS" #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_1 "CUI_HID_TPCOLOR_RGB_1"
#define HID_TPCOLOR_RGB_2 "CUI_HID_TPCOLOR_RGB_2" #define HID_TPCOLOR_RGB_2 "CUI_HID_TPCOLOR_RGB_2"
#define HID_TPCOLOR_RGB_3 "CUI_HID_TPCOLOR_RGB_3" #define HID_TPCOLOR_RGB_3 "CUI_HID_TPCOLOR_RGB_3"
#define HID_TPCOLOR_CMYK_1 "CUI_HID_TPCOLOR_CMYK_1" #define HID_TPCOLOR_CMYK_1 "CUI_HID_TPCOLOR_CMYK_1"
#define HID_TPCOLOR_CMYK_2 "CUI_HID_TPCOLOR_CMYK_2" #define HID_TPCOLOR_CMYK_2 "CUI_HID_TPCOLOR_CMYK_2"
#define HID_TPCOLOR_CMYK_3 "CUI_HID_TPCOLOR_CMYK_3" #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_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS"
#define HID_PAGE_CONNECTION "CUI_HID_PAGE_CONNECTION" #define HID_PAGE_CONNECTION "CUI_HID_PAGE_CONNECTION"
#define HID_PAGE_CONNECTION_CTL_PREVIEW "CUI_HID_PAGE_CONNECTION_CTL_PREVIEW" #define HID_PAGE_CONNECTION_CTL_PREVIEW "CUI_HID_PAGE_CONNECTION_CTL_PREVIEW"
......
...@@ -175,27 +175,18 @@ IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox*, pBox) ...@@ -175,27 +175,18 @@ IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox*, pBox)
return 0; return 0;
} }
OfaAutocorrOptionsPage::OfaAutocorrOptionsPage( Window* pParent, OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(Window* pParent, const SfxItemSet& rSet)
const SfxItemSet& rSet ) : : SfxTabPage(pParent, "AutocorrectOptionsPage", "cui/ui/acoroptionspage.ui", rSet)
SfxTabPage(pParent, CUI_RES( RID_OFAPAGE_AUTOCORR_OPTIONS ), rSet), , m_sInput(CUI_RESSTR(RID_SVXSTR_USE_REPLACE))
aCheckLB (this, CUI_RES(CLB_SETTINGS )), , m_sDoubleCaps(CUI_RESSTR(RID_SVXSTR_CPTL_STT_WORD))
, m_sStartCap(CUI_RESSTR(RID_SVXSTR_CPTL_STT_SENT))
sInput (CUI_RES(RID_SVXSTR_USE_REPLACE )), , m_sBoldUnderline(CUI_RESSTR(RID_SVXSTR_BOLD_UNDER))
sDoubleCaps (CUI_RES(RID_SVXSTR_CPTL_STT_WORD )), , m_sURL(CUI_RESSTR(RID_SVXSTR_DETECT_URL))
sStartCap (CUI_RES(RID_SVXSTR_CPTL_STT_SENT )), , m_sNoDblSpaces(CUI_RESSTR(RID_SVXSTR_NO_DBL_SPACES))
sBoldUnderline (CUI_RES(RID_SVXSTR_BOLD_UNDER )), , m_sDash(CUI_RESSTR(RID_SVXSTR_DASH))
sURL (CUI_RES(RID_SVXSTR_DETECT_URL )), , m_sAccidentalCaps(CUI_RESSTR(RID_SVXSTR_CORRECT_ACCIDENTAL_CAPS_LOCK))
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()
{ {
get(m_pCheckLB, "checklist");
} }
SfxTabPage* OfaAutocorrOptionsPage::Create( Window* pParent, SfxTabPage* OfaAutocorrOptionsPage::Create( Window* pParent,
...@@ -210,14 +201,14 @@ sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) ...@@ -210,14 +201,14 @@ sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& )
long nFlags = pAutoCorrect->GetFlags(); long nFlags = pAutoCorrect->GetFlags();
sal_uInt16 nPos = 0; sal_uInt16 nPos = 0;
pAutoCorrect->SetAutoCorrFlag(Autocorrect, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(Autocorrect, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CptlSttWrd, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttWrd, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(ChgWeightUnderl, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(ChgWeightUnderl, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(SetINetAttr, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(SetINetAttr, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(ChgToEnEmDash, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(ChgToEnEmDash, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(IgnoreDoubleSpace, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(IgnoreDoubleSpace, m_pCheckLB->IsChecked(nPos++));
pAutoCorrect->SetAutoCorrFlag(CorrectCapsLock, aCheckLB.IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CorrectCapsLock, m_pCheckLB->IsChecked(nPos++));
sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags(); sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags();
if(bReturn ) if(bReturn )
...@@ -239,29 +230,29 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) ...@@ -239,29 +230,29 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& )
SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
const long nFlags = pAutoCorrect->GetFlags(); const long nFlags = pAutoCorrect->GetFlags();
aCheckLB.SetUpdateMode(sal_False); m_pCheckLB->SetUpdateMode(sal_False);
aCheckLB.Clear(); m_pCheckLB->Clear();
aCheckLB.InsertEntry(sInput); m_pCheckLB->InsertEntry(m_sInput);
aCheckLB.InsertEntry(sDoubleCaps); m_pCheckLB->InsertEntry(m_sDoubleCaps);
aCheckLB.InsertEntry(sStartCap); m_pCheckLB->InsertEntry(m_sStartCap);
aCheckLB.InsertEntry(sBoldUnderline); m_pCheckLB->InsertEntry(m_sBoldUnderline);
aCheckLB.InsertEntry(sURL); m_pCheckLB->InsertEntry(m_sURL);
aCheckLB.InsertEntry(sDash); m_pCheckLB->InsertEntry(m_sDash);
aCheckLB.InsertEntry(sNoDblSpaces); m_pCheckLB->InsertEntry(m_sNoDblSpaces);
aCheckLB.InsertEntry(sAccidentalCaps); m_pCheckLB->InsertEntry(m_sAccidentalCaps);
sal_uInt16 nPos = 0; sal_uInt16 nPos = 0;
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgWeightUnderl) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & ChgWeightUnderl) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & SetINetAttr) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & SetINetAttr) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgToEnEmDash) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & ChgToEnEmDash) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & IgnoreDoubleSpace) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & IgnoreDoubleSpace) );
aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CorrectCapsLock) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CorrectCapsLock) );
aCheckLB.SetUpdateMode(sal_True); m_pCheckLB->SetUpdateMode(sal_True);
} }
/*********************************************************************/ /*********************************************************************/
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
// defines ------------------------------------------------------------------ // defines ------------------------------------------------------------------
#define CLB_SETTINGS 1
#define ED_RIGHT_MARGIN 100 #define ED_RIGHT_MARGIN 100
#define BT_OK 101 #define BT_OK 101
#define BT_CANCEL 102 #define BT_CANCEL 102
......
...@@ -22,28 +22,6 @@ ...@@ -22,28 +22,6 @@
#include "helpid.hrc" #include "helpid.hrc"
#include <svx/svxids.hrc> // SID_AUTOFORMAT #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 */ /* 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