sfx2/inc/sfx2/tabdlg.hxx | 1 sfx2/source/dialog/tabdlg.cxx | 9 - sw/UI_swriter.mk | 1 sw/source/ui/config/optpage.cxx | 135 +++++++-------------- sw/source/ui/inc/optpage.hxx | 21 +-- sw/uiconfig/swriter/ui/opttestpage.ui | 212 ++++++++++++++++++++++++++++++++++ 6 files changed, 269 insertions(+), 110 deletions(-)
New commits: commit 8e0053560a92b5d96b3d896f680b0ef3ad647812 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 11 09:57:15 2013 +0000 post writer test page conversion, remove unused ctor Change-Id: I67bce02ad32e9e35bbd94458a922352567af2ba5 diff --git a/sfx2/inc/sfx2/tabdlg.hxx b/sfx2/inc/sfx2/tabdlg.hxx index d25a72c..e637187 100644 --- a/sfx2/inc/sfx2/tabdlg.hxx +++ b/sfx2/inc/sfx2/tabdlg.hxx @@ -252,7 +252,6 @@ private: protected: SfxTabPage( Window *pParent, const ResId &, const SfxItemSet &rAttrSet ); SfxTabPage(Window *pParent, const rtl::OString& rID, const rtl::OUString& rUIXMLDescription, const SfxItemSet &rAttrSet); - SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAttrSet ); sal_uInt16 GetSlot( sal_uInt16 nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index adb3e68..b17b038 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -239,15 +239,6 @@ SfxTabPage::SfxTabPage(Window *pParent, const rtl::OString& rID, const rtl::OUSt } // ----------------------------------------------------------------------- -SfxTabPage:: SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAttrSet ) : - TabPage(pParent, nStyle), - pSet ( &rAttrSet ), - bHasExchangeSupport ( sal_False ), - pTabDlg ( NULL ), - pImpl ( new TabPageImpl ) -{ -} -// ----------------------------------------------------------------------- SfxTabPage::~SfxTabPage() commit c61d8227182611881171f50f112f3bc25499d0e9 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 11 09:44:45 2013 +0000 convert writer test tabpage to .ui Change-Id: I60349c3dd74774e1c5e6fe81d5cb78cf65756f6a diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk index d410de6..060f8b9 100644 --- a/sw/UI_swriter.mk +++ b/sw/UI_swriter.mk @@ -34,6 +34,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/insertscript \ sw/uiconfig/swriter/ui/inserttable \ sw/uiconfig/swriter/ui/linenumbering \ + sw/uiconfig/swriter/ui/opttestpage \ sw/uiconfig/swriter/ui/outlinenumbering \ sw/uiconfig/swriter/ui/outlinenumberingpage \ sw/uiconfig/swriter/ui/outlinepositionpage \ diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index d28bd4d..e67d58d 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -2398,64 +2398,21 @@ IMPL_LINK_NOARG(SwCompareOptionsTabPage, IgnoreHdl) #ifdef DBG_UTIL -static void lcl_SetPosSize(Window& rWin, Point aPos, Size aSize) -{ - aPos = rWin.LogicToPixel(aPos, MAP_APPFONT); - aSize = rWin.OutputDevice::LogicToPixel(aSize, MAP_APPFONT); - rWin.SetPosSizePixel(aPos, aSize); -} - -SwTestTabPage::SwTestTabPage( Window* pParent, - const SfxItemSet& rCoreSet) : - SfxTabPage( pParent, WB_HIDE, rCoreSet), - aTestFL ( this, WB_GROUP ), - aTest1CBox ( this, 0 ), - aTest2CBox ( this, 0 ), - aTest3CBox ( this, 0 ), - aTest4CBox ( this, 0 ), - aTest5CBox ( this, 0 ), - aTest6CBox ( this, 0 ), - aTest7CBox ( this, 0 ), - aTest8CBox ( this, 0 ), - aTest9CBox ( this, 0 ), - aTest10CBox ( this, 0 ), - bAttrModified( sal_False ) -{ - lcl_SetPosSize(*this, Point(0,0), Size(260 , 135)); - lcl_SetPosSize(aTestFL, Point(6,2), Size(209,8)); - lcl_SetPosSize(aTest1CBox , Point(12 , 14), Size(74 , 10)); - lcl_SetPosSize(aTest2CBox , Point(12 , 27), Size(74 , 10)); - lcl_SetPosSize(aTest3CBox , Point(12 , 40), Size(74 , 10)); - lcl_SetPosSize(aTest4CBox , Point(12 , 53), Size(74 , 10)); - lcl_SetPosSize(aTest5CBox , Point(12 , 66), Size(74 , 10)); - lcl_SetPosSize(aTest6CBox , Point(116, 14), Size(74 , 10)); - lcl_SetPosSize(aTest7CBox , Point(116, 27), Size(74 , 10)); - lcl_SetPosSize(aTest8CBox , Point(116, 40), Size(74 , 10)); - lcl_SetPosSize(aTest9CBox , Point(116, 53), Size(74 , 10)); - lcl_SetPosSize(aTest10CBox , Point(116, 66), Size(74 , 10)); - - aTestFL.SetText(rtl::OUString("Settings only for testpurposes")); - aTest1CBox.SetText(rtl::OUString("unused")); - aTest2CBox.SetText(rtl::OUString("dynamic")); - aTest3CBox.SetText(rtl::OUString("No calm")); - aTest4CBox.SetText(rtl::OUString("WYSIWYG debug")); - aTest5CBox.SetText(rtl::OUString("No idle format")); - aTest6CBox.SetText(rtl::OUString("No screen adj")); - aTest7CBox.SetText(rtl::OUString("win format")); - aTest8CBox.SetText(rtl::OUString("No Scroll")); - aTest9CBox.SetText(rtl::OUString("DrawingLayerNotLoading")); - aTest10CBox.SetText(rtl::OUString("AutoFormat by Input")); - aTestFL.Show(); - aTest1CBox .Show(); - aTest2CBox .Show(); - aTest3CBox .Show(); - aTest4CBox .Show(); - aTest5CBox .Show(); - aTest6CBox .Show(); - aTest7CBox .Show(); - aTest8CBox .Show(); - aTest9CBox .Show(); - aTest10CBox.Show(); +SwTestTabPage::SwTestTabPage(Window* pParent, const SfxItemSet& rCoreSet) + : SfxTabPage( pParent, "OptTestPage", "modules/swriter/ui/opttestpage.ui", rCoreSet) + , bAttrModified( sal_False ) +{ + get(m_pTest1CBox, "unused"); + get(m_pTest2CBox, "dynamic"); + get(m_pTest3CBox, "nocalm"); + get(m_pTest4CBox, "wysiwygdbg"); + get(m_pTest5CBox, "noidle"); + get(m_pTest6CBox, "noscreenadj"); + get(m_pTest7CBox, "winformat"); + get(m_pTest8CBox, "noscroll"); + get(m_pTest9CBox, "DrawingLayerNotLoading"); + get(m_pTest10CBox, "AutoFormatByInput"); + Init(); } @@ -2463,7 +2420,7 @@ SwTestTabPage::SwTestTabPage( Window* pParent, SfxTabPage* SwTestTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) { - return ( new SwTestTabPage( pParent, rAttrSet ) ); + return new SwTestTabPage(pParent, rAttrSet); } sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet ) @@ -2472,16 +2429,16 @@ sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet ) if ( bAttrModified ) { SwTestItem aTestItem(FN_PARAM_SWTEST); - aTestItem.bTest1=aTest1CBox.IsChecked(); - aTestItem.bTest2=aTest2CBox.IsChecked(); - aTestItem.bTest3=aTest3CBox.IsChecked(); - aTestItem.bTest4=aTest4CBox.IsChecked(); - aTestItem.bTest5=aTest5CBox.IsChecked(); - aTestItem.bTest6=aTest6CBox.IsChecked(); - aTestItem.bTest7=aTest7CBox.IsChecked(); - aTestItem.bTest8=aTest8CBox.IsChecked(); - aTestItem.bTest9=aTest9CBox.IsChecked(); - aTestItem.bTest10=aTest10CBox.IsChecked(); + aTestItem.bTest1=m_pTest1CBox->IsChecked(); + aTestItem.bTest2=m_pTest2CBox->IsChecked(); + aTestItem.bTest3=m_pTest3CBox->IsChecked(); + aTestItem.bTest4=m_pTest4CBox->IsChecked(); + aTestItem.bTest5=m_pTest5CBox->IsChecked(); + aTestItem.bTest6=m_pTest6CBox->IsChecked(); + aTestItem.bTest7=m_pTest7CBox->IsChecked(); + aTestItem.bTest8=m_pTest8CBox->IsChecked(); + aTestItem.bTest9=m_pTest9CBox->IsChecked(); + aTestItem.bTest10=m_pTest10CBox->IsChecked(); rCoreSet.Put(aTestItem); } return bAttrModified; @@ -2495,16 +2452,16 @@ void SwTestTabPage::Reset( const SfxItemSet& ) if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , sal_False, (const SfxPoolItem**)&pTestAttr )) { - aTest1CBox.Check(pTestAttr->bTest1); - aTest2CBox.Check(pTestAttr->bTest2); - aTest3CBox.Check(pTestAttr->bTest3); - aTest4CBox.Check(pTestAttr->bTest4); - aTest5CBox.Check(pTestAttr->bTest5); - aTest6CBox.Check(pTestAttr->bTest6); - aTest7CBox.Check(pTestAttr->bTest7); - aTest8CBox.Check(pTestAttr->bTest8); - aTest9CBox.Check(pTestAttr->bTest9); - aTest10CBox.Check(pTestAttr->bTest10); + m_pTest1CBox->Check(pTestAttr->bTest1); + m_pTest2CBox->Check(pTestAttr->bTest2); + m_pTest3CBox->Check(pTestAttr->bTest3); + m_pTest4CBox->Check(pTestAttr->bTest4); + m_pTest5CBox->Check(pTestAttr->bTest5); + m_pTest6CBox->Check(pTestAttr->bTest6); + m_pTest7CBox->Check(pTestAttr->bTest7); + m_pTest8CBox->Check(pTestAttr->bTest8); + m_pTest9CBox->Check(pTestAttr->bTest9); + m_pTest10CBox->Check(pTestAttr->bTest10); } } @@ -2512,16 +2469,16 @@ void SwTestTabPage::Init() { // handler Link aLk = LINK( this, SwTestTabPage, AutoClickHdl ); - aTest1CBox.SetClickHdl( aLk ); - aTest2CBox.SetClickHdl( aLk ); - aTest3CBox.SetClickHdl( aLk ); - aTest4CBox.SetClickHdl( aLk ); - aTest5CBox.SetClickHdl( aLk ); - aTest6CBox.SetClickHdl( aLk ); - aTest7CBox.SetClickHdl( aLk ); - aTest8CBox.SetClickHdl( aLk ); - aTest9CBox.SetClickHdl( aLk ); - aTest10CBox.SetClickHdl( aLk ); + m_pTest1CBox->SetClickHdl( aLk ); + m_pTest2CBox->SetClickHdl( aLk ); + m_pTest3CBox->SetClickHdl( aLk ); + m_pTest4CBox->SetClickHdl( aLk ); + m_pTest5CBox->SetClickHdl( aLk ); + m_pTest6CBox->SetClickHdl( aLk ); + m_pTest7CBox->SetClickHdl( aLk ); + m_pTest8CBox->SetClickHdl( aLk ); + m_pTest9CBox->SetClickHdl( aLk ); + m_pTest10CBox->SetClickHdl( aLk ); } IMPL_LINK_NOARG_INLINE_START(SwTestTabPage, AutoClickHdl) diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index 1948dac..88ea2a9 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -442,17 +442,16 @@ public: virtual void Reset( const SfxItemSet& rSet ); private: - FixedLine aTestFL; - CheckBox aTest1CBox; - CheckBox aTest2CBox; - CheckBox aTest3CBox; - CheckBox aTest4CBox; - CheckBox aTest5CBox; - CheckBox aTest6CBox; - CheckBox aTest7CBox; - CheckBox aTest8CBox; - CheckBox aTest9CBox; - CheckBox aTest10CBox; + CheckBox* m_pTest1CBox; + CheckBox* m_pTest2CBox; + CheckBox* m_pTest3CBox; + CheckBox* m_pTest4CBox; + CheckBox* m_pTest5CBox; + CheckBox* m_pTest6CBox; + CheckBox* m_pTest7CBox; + CheckBox* m_pTest8CBox; + CheckBox* m_pTest9CBox; + CheckBox* m_pTest10CBox; sal_Bool bAttrModified; diff --git a/sw/uiconfig/swriter/ui/opttestpage.ui b/sw/uiconfig/swriter/ui/opttestpage.ui new file mode 100644 index 0000000..b2c8955 --- /dev/null +++ b/sw/uiconfig/swriter/ui/opttestpage.ui @@ -0,0 +1,212 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkBox" id="OptTestPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <property name="row_homogeneous">True</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkCheckButton" id="unused"> + <property name="label">unused</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</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="dynamic"> + <property name="label">dynamic</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</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> + <child> + <object class="GtkCheckButton" id="nocalm"> + <property name="label">No calm</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </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> + <child> + <object class="GtkCheckButton" id="wysiwygdbg"> + <property name="label">WYSIWYG debug</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </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="GtkCheckButton" id="winformat"> + <property name="label">win format</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="noscreenadj"> + <property name="label">No screen adj</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </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="GtkCheckButton" id="noscroll"> + <property name="label">No Scroll</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="AutoFormatByInput"> + <property name="label">AutoFormat by Input</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">4</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="DrawingLayerNotLoading"> + <property name="label">DrawingLayerNotLoading</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="noidle"> + <property name="label">No idle format</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </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> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label">Settings only for testpurposes</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> +</interface>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits