From 1163b54c2973e3e67d1259ad10b2ff81be74055b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 12 Jul 2013 10:36:52 +0100 Subject: add back text flow options and some other reorgs Change-Id: I7139779728907b20d577bf465090674238f80649 --- sw/inc/helpid.h | 1 - sw/source/ui/frmdlg/frmpage.cxx | 81 ++++-------------------------------- sw/source/ui/inc/frmpage.hxx | 53 ++++++++++++----------- 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 @@ vertical 12 - + True False True @@ -97,7 +97,7 @@ False start - None + <None> @@ -113,7 +113,7 @@ False start - None + <None> @@ -177,7 +177,7 @@ - + True False True @@ -238,6 +238,7 @@ True True False + True 0 True @@ -336,35 +337,29 @@ 6 12 - - True + False - end - - Left-to-right (horizontal) - Right-to-left (horizontal) - Right-to-left (vertical) - Use superordinate object settings - + True + 0 + _Text direction: + True + textflow - 1 + 0 0 1 1 - - True + False - 0 - _Text direction: - True - textflow + True + liststore1 - 0 + 1 0 1 1 @@ -400,4 +395,44 @@ + + + + + + + + + + Left-to-right + 0 + + + Right-to-left + 1 + + + Use superordinate object settings + 4 + + + + + True + + + + + + + + + + True + + + + + + -- cgit