diff options
-rw-r--r-- | sw/inc/helpid.h | 1 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 81 | ||||
-rw-r--r-- | sw/source/ui/inc/frmpage.hxx | 53 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/frmaddpage.ui | 77 |
4 files changed, 90 insertions, 122 deletions
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index bc85c4263a7b..062ae991a1c3 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -153,7 +153,6 @@ #define HID_ENV_FMT "SW_HID_ENV_FMT" #define HID_FRM_URL "SW_HID_FRM_URL" #define HID_COND_COLL "SW_HID_COND_COLL" -#define HID_FRM_ADD "SW_HID_FRM_ADD" #define HID_FLD_DB "SW_HID_FLD_DB" #define HID_FLD_DOKINF "SW_HID_FLD_DOKINF" diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 47e98bc283eb..210293f665fe 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2733,13 +2733,6 @@ IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl) return 0; } -static void lcl_Move(Window& rWin, sal_Int32 nDiff) -{ - Point aPos(rWin.GetPosPixel()); - aPos.Y() -= nDiff; - rWin.SetPosPixel(aPos); -} - SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) : SfxTabPage(pParent, "FrmAddPage" , "modules/swriter/ui/frmaddpage.ui", rSet), pWrtSh(0), @@ -2749,7 +2742,7 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) : bFormat(sal_False), bNew(sal_False) { - get(pNamesFT,""); + get(pNameFrame, "nameframe"); get(pNameFT,"name_label"); get(pNameED,"name"); get(pAltNameFT,"altname_label"); @@ -2758,12 +2751,11 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) : get(pPrevLB,"prev"); get(pNextFT,"next_label"); get(pNextLB,"next"); - get(pProtectFT,"label1"); + get(pProtectFrame,"protect"); get(pProtectContentCB,"protectcontent"); get(pProtectFrameCB,"protectframe"); get(pProtectSizeCB,"protectsize"); - get(pExtFT,"label2"); get(pEditInReadonlyCB,"editinreadonly"); get(pPrintFrameCB,"printframe"); @@ -2786,20 +2778,15 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) const SfxPoolItem* pItem; sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current()); bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False; - if(bHtmlMode) + if (bHtmlMode) { - pProtectContentCB->Hide(); - pProtectFrameCB->Hide(); - pProtectSizeCB->Hide(); + pProtectFrame->Hide(); pEditInReadonlyCB->Hide(); pPrintFrameCB->Hide(); - pExtFT->Hide(); - pProtectFT->Hide(); } if ( DLG_FRM_GRF == nDlgType || DLG_FRM_OLE == nDlgType ) { pEditInReadonlyCB->Hide(); - pPrintFrameCB->SetPosPixel(pEditInReadonlyCB->GetPosPixel()); } if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, sal_False, &pItem)) @@ -2843,37 +2830,11 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet ) pAltNameED->Enable(sal_False); pNameFT->Enable( sal_False ); pAltNameFT->Enable(sal_False); - pNamesFT->Enable(sal_False); } if(nDlgType == DLG_FRM_STD && pAltNameFT->IsVisible()) { pAltNameFT->Hide(); pAltNameED->Hide(); - //move all controls one step up - /*Window* aWindows[] = - { - pPrevFT, - pPrevLB, - pNextFT, - pNextLB, - pNamesFT, - pProtectContentCB, - pProtectFrameCB, - pProtectSizeCB, - pProtectFT, - pEditInReadonlyCB, - pPrintFrameCB, - pTextFlowFT, - pTextFlowLB, - pExtFT, - 0 - }; - sal_Int32 nOffset = pAltNameED->GetPosPixel().Y() - pNameED->GetPosPixel().Y(); - sal_Int32 nIdx = 0; - while(aWindows[nIdx]) - { - lcl_Move(*aWindows[nIdx++], nOffset); - }*/ } else { @@ -3054,38 +3015,12 @@ IMPL_LINK_NOARG(SwFrmAddPage, EditModifyHdl) return 0; } -void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt) +void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt) { - bFormat = bFmt; - if(bFormat) + bFormat = bFmt; + if (bFormat) { - pNameFT->Show(sal_False); - pNameED->Show(sal_False); - pAltNameFT->Show(sal_False); - pAltNameED->Show(sal_False); - pPrevFT->Show(sal_False); - pPrevLB->Show(sal_False); - pNextFT->Show(sal_False); - pNextLB->Show(sal_False); - pNamesFT->Show(sal_False); - - sal_Int32 nDiff = pExtFT->GetPosPixel().Y() - pNamesFT->GetPosPixel().Y(); - Window* aWindows[] = - { - pProtectContentCB, - pProtectFrameCB, - pProtectSizeCB, - pProtectFT, - pEditInReadonlyCB, - pPrintFrameCB, - pExtFT, - pTextFlowFT, - pTextFlowLB, - 0 - }; - sal_Int32 nIdx = 0; - while(aWindows[nIdx]) - lcl_Move(*aWindows[nIdx++], nDiff); + pNameFrame->Hide(); } } diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx index a47406dc1739..8b15ed67d351 100644 --- a/sw/source/ui/inc/frmpage.hxx +++ b/sw/source/ui/inc/frmpage.hxx @@ -274,33 +274,32 @@ public: class SwFrmAddPage : public SfxTabPage { - FixedText* pNamesFT; - FixedText* pNameFT; - Edit* pNameED; - FixedText* pAltNameFT; - Edit* pAltNameED; - FixedText* pPrevFT; - ListBox* pPrevLB; - FixedText* pNextFT; - ListBox* pNextLB; - FixedText* pProtectFT; - - CheckBox* pProtectContentCB; - CheckBox* pProtectFrameCB; - CheckBox* pProtectSizeCB; - FixedText* pExtFT; - - CheckBox* pEditInReadonlyCB; - CheckBox* pPrintFrameCB; - FixedText* pTextFlowFT; - ListBox* pTextFlowLB; - - SwWrtShell* pWrtSh; - - sal_uInt16 nDlgType; - sal_Bool bHtmlMode; - sal_Bool bFormat; - sal_Bool bNew; + VclContainer* pNameFrame; + FixedText* pNameFT; + Edit* pNameED; + FixedText* pAltNameFT; + Edit* pAltNameED; + FixedText* pPrevFT; + ListBox* pPrevLB; + FixedText* pNextFT; + ListBox* pNextLB; + + VclContainer* pProtectFrame; + CheckBox* pProtectContentCB; + CheckBox* pProtectFrameCB; + CheckBox* pProtectSizeCB; + + CheckBox* pEditInReadonlyCB; + CheckBox* pPrintFrameCB; + FixedText* pTextFlowFT; + ListBox* pTextFlowLB; + + SwWrtShell* pWrtSh; + + sal_uInt16 nDlgType; + sal_Bool bHtmlMode; + sal_Bool bFormat; + sal_Bool bNew; DECL_LINK(EditModifyHdl, void *); DECL_LINK(ChainModifyHdl, ListBox*); diff --git a/sw/uiconfig/swriter/ui/frmaddpage.ui b/sw/uiconfig/swriter/ui/frmaddpage.ui index 0fef3af86022..168dac788c7d 100644 --- a/sw/uiconfig/swriter/ui/frmaddpage.ui +++ b/sw/uiconfig/swriter/ui/frmaddpage.ui @@ -8,7 +8,7 @@ <property name="orientation">vertical</property> <property name="spacing">12</property> <child> - <object class="GtkFrame" id="frame1"> + <object class="GtkFrame" id="nameframe"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> @@ -97,7 +97,7 @@ <property name="can_focus">False</property> <property name="halign">start</property> <items> - <item>None</item> + <item><None></item> </items> </object> <packing> @@ -113,7 +113,7 @@ <property name="can_focus">False</property> <property name="halign">start</property> <items> - <item>None</item> + <item><None></item> </items> </object> <packing> @@ -177,7 +177,7 @@ </packing> </child> <child> - <object class="GtkFrame" id="frame2"> + <object class="GtkFrame" id="protect"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> @@ -238,6 +238,7 @@ <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> @@ -336,35 +337,29 @@ <property name="row_spacing">6</property> <property name="column_spacing">12</property> <child> - <object class="GtkComboBox" id="textflow"> - <property name="visible">True</property> + <object class="GtkLabel" id="textflow_label"> <property name="can_focus">False</property> - <property name="halign">end</property> - <items> - <item>Left-to-right (horizontal)</item> - <item>Right-to-left (horizontal)</item> - <item>Right-to-left (vertical)</item> - <item>Use superordinate object settings</item> - </items> + <property name="no_show_all">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Text direction:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">textflow</property> </object> <packing> - <property name="left_attach">1</property> + <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="GtkLabel" id="textflow_label"> - <property name="visible">True</property> + <object class="GtkComboBox" id="textflow"> <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Text direction:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">textflow</property> + <property name="no_show_all">True</property> + <property name="model">liststore1</property> </object> <packing> - <property name="left_attach">0</property> + <property name="left_attach">1</property> <property name="top_attach">0</property> <property name="width">1</property> <property name="height">1</property> @@ -400,4 +395,44 @@ </packing> </child> </object> + <object class="GtkListStore" id="liststore1"> + <columns> + <!-- column-name gchararray1 --> + <column type="gchararray"/> + <!-- column-name gint1 --> + <column type="gint"/> + </columns> + <data> + <row> + <col id="0" translatable="yes">Left-to-right</col> + <col id="1">0</col> + </row> + <row> + <col id="0" translatable="yes">Right-to-left</col> + <col id="1">1</col> + </row> + <row> + <col id="0" translatable="yes">Use superordinate object settings</col> + <col id="1">4</col> + </row> + </data> + </object> + <object class="GtkSizeGroup" id="sizegroup1"> + <property name="ignore_hidden">True</property> + <widgets> + <widget name="name_label"/> + <widget name="altname_label"/> + <widget name="prev_label"/> + <widget name="next_label"/> + <widget name="textflow_label"/> + </widgets> + </object> + <object class="GtkSizeGroup" id="sizegroup2"> + <property name="ignore_hidden">True</property> + <widgets> + <widget name="prev"/> + <widget name="next"/> + <widget name="textflow"/> + </widgets> + </object> </interface> |