From 6abf5a706ff49c996dd3c608939481fa8eccd5f7 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Mon, 19 Aug 2013 22:06:31 -0300 Subject: Convert position and size dialog to widget UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I283667cd21fee7dd905c5353245317ed90102c96 Reviewed-on: https://gerrit.libreoffice.org/5524 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- cui/AllLangResTarget_cui.mk | 1 - cui/UIConfig_cui.mk | 1 + cui/source/factory/dlgfact.cxx | 6 +- cui/source/inc/cuires.hrc | 1 - cui/source/inc/swpossizetabpage.hxx | 147 ++++++++++++++++++++++++++++ cui/source/inc/transfrm.hxx | 6 +- cui/source/tabpages/swpossizetabpage.cxx | 4 +- cui/source/tabpages/swpossizetabpage.hrc | 53 ---------- cui/source/tabpages/swpossizetabpage.hxx | 147 ---------------------------- cui/source/tabpages/transfrm.cxx | 45 ++++----- cui/source/tabpages/transfrm.hrc | 24 ----- cui/source/tabpages/transfrm.src | 74 -------------- cui/uiconfig/ui/positionsizedialog.ui | 161 +++++++++++++++++++++++++++++++ include/svx/dialogs.hrc | 2 - 14 files changed, 338 insertions(+), 334 deletions(-) create mode 100644 cui/source/inc/swpossizetabpage.hxx delete mode 100644 cui/source/tabpages/swpossizetabpage.hrc delete mode 100644 cui/source/tabpages/swpossizetabpage.hxx delete mode 100644 cui/source/tabpages/transfrm.hrc delete mode 100644 cui/source/tabpages/transfrm.src create mode 100644 cui/uiconfig/ui/positionsizedialog.ui diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index 2ba3b3afe2d0..af8e41d18ede 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -75,7 +75,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/tabpages/page.src \ cui/source/tabpages/paragrph.src \ cui/source/tabpages/strings.src \ - cui/source/tabpages/transfrm.src \ )) # vim: set noet sw=4 ts=4: diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 9435977de9d1..a0d790c90a4b 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -89,6 +89,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/picknumberingpage \ cui/uiconfig/ui/pickoutlinepage \ cui/uiconfig/ui/positionpage \ + cui/uiconfig/ui/positionsizedialog \ cui/uiconfig/ui/possizetabpage \ cui/uiconfig/ui/querychangelineenddialog \ cui/uiconfig/ui/querydeletechartcolordialog \ diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index e3436c45a0ea..ab7a4bab0914 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1386,14 +1386,14 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateSchTransformTabDialog( W case RID_SCH_TransformTabDLG_SVXPAGE_ANGLE : { pDlg = new SvxTransformTabDialog( pParent, pAttr,pSdrView, bSizeTabPage ? SVX_OBJ_NOPROTECT : SVX_OBJ_NOPROTECT|SVX_OBJ_NORESIZE); - pDlg->RemoveTabPage( RID_SVXPAGE_ANGLE ); - pDlg->RemoveTabPage( RID_SVXPAGE_SLANT ); + pDlg->RemoveTabPage( "RID_SVXPAGE_ANGLE" ); + pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" ); } break; case RID_SCH_TransformTabDLG_SVXPAGE_SLANT: { pDlg = new SvxTransformTabDialog( pParent, pAttr,pSdrView, bSizeTabPage ? SVX_OBJ_NOPROTECT : SVX_OBJ_NOPROTECT|SVX_OBJ_NORESIZE); - pDlg->RemoveTabPage( RID_SVXPAGE_SLANT ); + pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" ); } break; default: diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index 1a54c25d4326..abf3728150aa 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -44,7 +44,6 @@ #define RID_SVX_FORMAT_CELLS_DLG ( RID_SVX_START + 42 ) // used in "tabpages" -#define RID_SVXDLG_TRANSFORM (RID_SVX_START + 45) #define RID_SVXDLG_LINE (RID_SVX_START + 50) #define RID_SVXDLG_BBDLG (RID_SVX_START + 40) #define RID_SVXDLG_CAPTION (RID_SVX_START + 151) diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx new file mode 100644 index 000000000000..ee26c6826fb1 --- /dev/null +++ b/cui/source/inc/swpossizetabpage.hxx @@ -0,0 +1,147 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef _SVX_SWPOSSIZETABPAGE_HXX +#define _SVX_SWPOSSIZETABPAGE_HXX + +#include +#include +#include +#include +#include +#include +#include + +// SvxSwPosSizeTabPage - position and size page for Writer drawing objects +struct FrmMap; +class SdrView; +class SvxSwPosSizeTabPage : public SfxTabPage +{ + using TabPage::DeactivatePage; + + MetricField* m_pWidthMF; + MetricField* m_pHeightMF; + CheckBox* m_pKeepRatioCB; + + RadioButton* m_pToPageRB; + RadioButton* m_pToParaRB; + RadioButton* m_pToCharRB; + RadioButton* m_pAsCharRB; + RadioButton* m_pToFrameRB; + + TriStateBox* m_pPositionCB; + TriStateBox* m_pSizeCB; + + VclContainer* m_pPosFrame; + FixedText* m_pHoriFT; + ListBox* m_pHoriLB; + FixedText* m_pHoriByFT; + MetricField* m_pHoriByMF; + FixedText* m_pHoriToFT; + ListBox* m_pHoriToLB; + + CheckBox* m_pHoriMirrorCB; + + FixedText* m_pVertFT; + ListBox* m_pVertLB; + FixedText* m_pVertByFT; + MetricField* m_pVertByMF; + FixedText* m_pVertToFT; + ListBox* m_pVertToLB; + + CheckBox* m_pFollowCB; + + SvxSwFrameExample* m_pExampleWN; + + Link m_aValidateLink; + + //'string provider' + SvxSwFramePosString m_aFramePosString; + + Rectangle m_aRect; //size of all selected objects + Rectangle m_aWorkArea; + Point m_aAnchorPos; + + FrmMap* m_pVMap; + FrmMap* m_pHMap; + const SdrView* m_pSdrView; + + // initial values + short m_nOldH; + short m_nOldHRel; + short m_nOldV; + short m_nOldVRel; + + double m_fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button + sal_uInt16 m_nHtmlMode; + bool m_bHtmlMode; + bool m_bAtHoriPosModified; + bool m_bAtVertPosModified; + bool m_bIsVerticalFrame; + bool m_bPositioningDisabled; + bool m_bIsMultiSelection; + bool m_bIsInRightToLeft; + + + + DECL_LINK(RangeModifyHdl, void *); + DECL_LINK(AnchorTypeHdl, void *); + DECL_LINK( PosHdl, ListBox * ); + DECL_LINK( RelHdl, ListBox * ); + DECL_LINK(MirrorHdl, void *); + DECL_LINK( ModifyHdl, Edit * ); + DECL_LINK(ProtectHdl, void *); + + void InitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, + sal_uInt16 nV, sal_uInt16 nVRel, + long nX, long nY); + sal_uInt16 GetMapPos(FrmMap *pMap, ListBox &rAlignLB); + short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); + short GetRelation(FrmMap *pMap, ListBox &rRelationLB); + short GetAnchorType(bool* pbHasChanged = 0); + sal_uLong FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT); + sal_uInt16 FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, ListBox &rLB); + + void UpdateExample(); + + void setOptimalFrmWidth(); + void setOptimalRelWidth(); + +public: + SvxSwPosSizeTabPage( Window* pParent, const SfxItemSet& rInAttrs ); + ~SvxSwPosSizeTabPage(); + + static SfxTabPage* Create( Window*, const SfxItemSet& ); + static sal_uInt16* GetRanges(); + + virtual sal_Bool FillItemSet( SfxItemSet& ); + virtual void Reset( const SfxItemSet & ); + + virtual int DeactivatePage( SfxItemSet* pSet ); + + void EnableAnchorTypes(sal_uInt16 nAnchorEnable); + + void SetValidateFramePosLink( const Link& rLink ) + {m_aValidateLink = rLink;} + + void SetView( const SdrView* pSdrView ); +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx index 5b3138a29507..ab5e9f20373e 100644 --- a/cui/source/inc/transfrm.hxx +++ b/cui/source/inc/transfrm.hxx @@ -46,10 +46,14 @@ const sal_uInt16 SVX_OBJ_NOPROTECT = 0x0200; class SvxTransformTabDialog : public SfxTabDialog { + sal_uInt16 nPosSize; + sal_uInt16 nSWPosSize; + sal_uInt16 nRotation; + sal_uInt16 nSlant; private: const SdrView* pView; - sal_uInt16 nAnchorCtrls; + sal_uInt16 nAnchorCtrls; Link aValidateLink; virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index c7c140753034..9fc706763b25 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -1748,8 +1748,8 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u // Probably anchor change. So look for a similar relation. switch (nRel) { - case RelOrientation::FRAME: nRel = RelOrientation::PAGE_FRAME; break; - case RelOrientation::PRINT_AREA: nRel = RelOrientation::PAGE_PRINT_AREA; break; + case RelOrientation::FRAME: nRel = RelOrientation::PAGE_FRAME; break; + case RelOrientation::PRINT_AREA: nRel = RelOrientation::PAGE_PRINT_AREA; break; case RelOrientation::PAGE_LEFT: nRel = RelOrientation::FRAME_LEFT; break; case RelOrientation::PAGE_RIGHT: nRel = RelOrientation::FRAME_RIGHT; break; case RelOrientation::FRAME_LEFT: nRel = RelOrientation::PAGE_LEFT; break; diff --git a/cui/source/tabpages/swpossizetabpage.hrc b/cui/source/tabpages/swpossizetabpage.hrc deleted file mode 100644 index b74871ba8918..000000000000 --- a/cui/source/tabpages/swpossizetabpage.hrc +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#define FL_SIZE 1 -#define FT_WIDTH 2 -#define MF_WIDTH 3 -#define FT_HEIGHT 4 -#define MF_HEIGHT 5 -#define CB_KEEPRATIO 6 -#define FL_SEPARATOR 7 -#define FL_ANCHOR 8 -#define RB_TOPAGE 9 -#define RB_TOPARA 10 -#define RB_TOCHAR 11 -#define RB_ASCHAR 12 -#define RB_TOFRAME 13 -#define FL_PROTECTION 14 -#define CB_POSITION 15 -#define CB_SIZE 16 -#define FL_POSITION 17 -#define FT_HORI 18 -#define LB_HORI 19 -#define FT_HORIBY 20 -#define MF_HORIBY 21 -#define FT_HORITO 22 -#define LB_HORITO 23 -#define CB_HORIMIRROR 24 -#define FT_VERT 25 -#define LB_VERT 26 -#define FT_VERTBY 27 -#define MF_VERTBY 28 -#define FT_VERTTO 29 -#define LB_VERTTO 30 -#define CB_FOLLOW 31 -#define WN_EXAMPLE 32 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/swpossizetabpage.hxx b/cui/source/tabpages/swpossizetabpage.hxx deleted file mode 100644 index ee26c6826fb1..000000000000 --- a/cui/source/tabpages/swpossizetabpage.hxx +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef _SVX_SWPOSSIZETABPAGE_HXX -#define _SVX_SWPOSSIZETABPAGE_HXX - -#include -#include -#include -#include -#include -#include -#include - -// SvxSwPosSizeTabPage - position and size page for Writer drawing objects -struct FrmMap; -class SdrView; -class SvxSwPosSizeTabPage : public SfxTabPage -{ - using TabPage::DeactivatePage; - - MetricField* m_pWidthMF; - MetricField* m_pHeightMF; - CheckBox* m_pKeepRatioCB; - - RadioButton* m_pToPageRB; - RadioButton* m_pToParaRB; - RadioButton* m_pToCharRB; - RadioButton* m_pAsCharRB; - RadioButton* m_pToFrameRB; - - TriStateBox* m_pPositionCB; - TriStateBox* m_pSizeCB; - - VclContainer* m_pPosFrame; - FixedText* m_pHoriFT; - ListBox* m_pHoriLB; - FixedText* m_pHoriByFT; - MetricField* m_pHoriByMF; - FixedText* m_pHoriToFT; - ListBox* m_pHoriToLB; - - CheckBox* m_pHoriMirrorCB; - - FixedText* m_pVertFT; - ListBox* m_pVertLB; - FixedText* m_pVertByFT; - MetricField* m_pVertByMF; - FixedText* m_pVertToFT; - ListBox* m_pVertToLB; - - CheckBox* m_pFollowCB; - - SvxSwFrameExample* m_pExampleWN; - - Link m_aValidateLink; - - //'string provider' - SvxSwFramePosString m_aFramePosString; - - Rectangle m_aRect; //size of all selected objects - Rectangle m_aWorkArea; - Point m_aAnchorPos; - - FrmMap* m_pVMap; - FrmMap* m_pHMap; - const SdrView* m_pSdrView; - - // initial values - short m_nOldH; - short m_nOldHRel; - short m_nOldV; - short m_nOldVRel; - - double m_fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button - sal_uInt16 m_nHtmlMode; - bool m_bHtmlMode; - bool m_bAtHoriPosModified; - bool m_bAtVertPosModified; - bool m_bIsVerticalFrame; - bool m_bPositioningDisabled; - bool m_bIsMultiSelection; - bool m_bIsInRightToLeft; - - - - DECL_LINK(RangeModifyHdl, void *); - DECL_LINK(AnchorTypeHdl, void *); - DECL_LINK( PosHdl, ListBox * ); - DECL_LINK( RelHdl, ListBox * ); - DECL_LINK(MirrorHdl, void *); - DECL_LINK( ModifyHdl, Edit * ); - DECL_LINK(ProtectHdl, void *); - - void InitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, - sal_uInt16 nV, sal_uInt16 nVRel, - long nX, long nY); - sal_uInt16 GetMapPos(FrmMap *pMap, ListBox &rAlignLB); - short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); - short GetRelation(FrmMap *pMap, ListBox &rRelationLB); - short GetAnchorType(bool* pbHasChanged = 0); - sal_uLong FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT); - sal_uInt16 FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, ListBox &rLB); - - void UpdateExample(); - - void setOptimalFrmWidth(); - void setOptimalRelWidth(); - -public: - SvxSwPosSizeTabPage( Window* pParent, const SfxItemSet& rInAttrs ); - ~SvxSwPosSizeTabPage(); - - static SfxTabPage* Create( Window*, const SfxItemSet& ); - static sal_uInt16* GetRanges(); - - virtual sal_Bool FillItemSet( SfxItemSet& ); - virtual void Reset( const SfxItemSet & ); - - virtual int DeactivatePage( SfxItemSet* pSet ); - - void EnableAnchorTypes(sal_uInt16 nAnchorEnable); - - void SetValidateFramePosLink( const Link& rLink ) - {m_aValidateLink = rLink;} - - void SetView( const SdrView* pSdrView ); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 6e5bd24decfa..5e64bd9dc4c8 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -104,28 +104,32 @@ static void lcl_ScaleRect(basegfx::B2DRange& rRange, const Fraction aUIScale) \************************************************************************/ SvxTransformTabDialog::SvxTransformTabDialog( Window* pParent, const SfxItemSet* pAttr, - const SdrView* pSdrView, sal_uInt16 nAnchorTypes ) : - SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_TRANSFORM ), pAttr ), - pView ( pSdrView ), - nAnchorCtrls(nAnchorTypes) + const SdrView* pSdrView, sal_uInt16 nAnchorTypes ) + : SfxTabDialog( pParent + ,"PositionAndSizeDialog" + ,"cui/ui/positionsizedialog.ui" + , pAttr ) + , nPosSize(0) + , nSWPosSize(0) + , pView(pSdrView) + , nAnchorCtrls(nAnchorTypes) { DBG_ASSERT(pView, "no valid view (!)"); - FreeResource(); //different positioning page in Writer if(nAnchorCtrls & 0x00ff) { - AddTabPage(RID_SVXPAGE_SWPOSSIZE, SvxSwPosSizeTabPage::Create, SvxSwPosSizeTabPage::GetRanges); - RemoveTabPage(RID_SVXPAGE_POSITION_SIZE); + nSWPosSize = AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create, SvxSwPosSizeTabPage::GetRanges); + RemoveTabPage("RID_SVXPAGE_POSITION_SIZE"); } else { - AddTabPage(RID_SVXPAGE_POSITION_SIZE, SvxPositionSizeTabPage::Create, SvxPositionSizeTabPage::GetRanges); - RemoveTabPage(RID_SVXPAGE_SWPOSSIZE); + nPosSize = AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create, SvxPositionSizeTabPage::GetRanges); + RemoveTabPage("RID_SVXPAGE_SWPOSSIZE"); } - AddTabPage(RID_SVXPAGE_ANGLE, SvxAngleTabPage::Create, SvxAngleTabPage::GetRanges); - AddTabPage(RID_SVXPAGE_SLANT, SvxSlantTabPage::Create, SvxSlantTabPage::GetRanges); + nRotation = AddTabPage("RID_SVXPAGE_ANGLE", SvxAngleTabPage::Create, SvxAngleTabPage::GetRanges); + nSlant = AddTabPage("RID_SVXPAGE_SLANT", SvxSlantTabPage::Create, SvxSlantTabPage::GetRanges); } // ----------------------------------------------------------------------- @@ -138,9 +142,7 @@ SvxTransformTabDialog::~SvxTransformTabDialog() void SvxTransformTabDialog::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { - switch(nId) - { - case RID_SVXPAGE_POSITION_SIZE: + if (nId==nPosSize) { SvxPositionSizeTabPage& rSvxPos = static_cast(rPage); rSvxPos.SetView(pView); @@ -156,40 +158,31 @@ void SvxTransformTabDialog::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) rSvxPos.DisableProtect(); rSvxPos.UpdateControlStates(); } - - break; } - case RID_SVXPAGE_SWPOSSIZE : + else if (nId == nSWPosSize) { SvxSwPosSizeTabPage& rSwPos = static_cast(rPage); rSwPos.EnableAnchorTypes(nAnchorCtrls); rSwPos.SetValidateFramePosLink(aValidateLink); rSwPos.SetView(pView); - - break; } - case RID_SVXPAGE_ANGLE: + else if( nId == nRotation) { SvxAngleTabPage& rSvxAng = static_cast(rPage); rSvxAng.SetView( pView ); rSvxAng.Construct(); - - break; } - case RID_SVXPAGE_SLANT: + else if (nId == nSlant) { SvxSlantTabPage& rSvxSlnt = static_cast(rPage); rSvxSlnt.SetView( pView ); rSvxSlnt.Construct(); - - break; } - } } // ----------------------------------------------------------------------- diff --git a/cui/source/tabpages/transfrm.hrc b/cui/source/tabpages/transfrm.hrc deleted file mode 100644 index dbe55118a03d..000000000000 --- a/cui/source/tabpages/transfrm.hrc +++ /dev/null @@ -1,24 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#define TAB_CONTROL 1 -#define BTN_OK 2 -#define BTN_CANCEL 3 -#define BTN_HELP 4 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/transfrm.src b/cui/source/tabpages/transfrm.src deleted file mode 100644 index 605a3d3ee42c..000000000000 --- a/cui/source/tabpages/transfrm.src +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include -#include -#include "transfrm.hrc" -#include - -#define MA_TABPAGE_HEIGHT 185 - -#define _POS_SIZE_TEXT \ - Text [ en-US ] = "Position and Size" ; \ - - -TabDialog RID_SVXDLG_TRANSFORM\ -{ - OutputSize = TRUE ; - SvLook = TRUE ; - Size = MAP_APPFONT ( 289 , MA_TABPAGE_HEIGHT + 41 ) ; - Text [ en-US ] = "Position and Size" ;\ - Moveable = TRUE ; - TabControl TAB_CONTROL\ - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 3 , 3 ) ; - Size = MAP_APPFONT ( 260 , MA_TABPAGE_HEIGHT ) ; - PageList = - { - PageItem\ - { - Identifier = RID_SVXPAGE_POSITION_SIZE ; - PageResID = RID_SVXPAGE_POSITION_SIZE ; - _POS_SIZE_TEXT - }; - PageItem - { - Identifier = RID_SVXPAGE_SWPOSSIZE; - PageResID = RID_SVXPAGE_SWPOSSIZE; - _POS_SIZE_TEXT - }; - PageItem - { - Identifier = RID_SVXPAGE_ANGLE ; - Text [ en-US ] = "Rotation" ; - PageResID = RID_SVXPAGE_ANGLE ; - }; - PageItem - { - Identifier = RID_SVXPAGE_SLANT ; - PageResID = RID_SVXPAGE_SLANT ; - Text [ en-US ] = "Slant & Corner Radius" ; - }; - }; - }; -}; - // ********************************************************************** EOF - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/uiconfig/ui/positionsizedialog.ui b/cui/uiconfig/ui/positionsizedialog.ui new file mode 100644 index 000000000000..1bba91bf913d --- /dev/null +++ b/cui/uiconfig/ui/positionsizedialog.ui @@ -0,0 +1,161 @@ + + + + + False + 6 + Position and size + dialog + + + False + vertical + 12 + + + False + end + + + gtk-ok + True + True + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + + + False + True + 1 + + + + + gtk-help + True + True + True + True + + + False + True + 2 + + + + + gtk-revert-to-saved + True + True + True + True + + + False + True + 3 + + + + + False + True + end + 0 + + + + + True + False + True + True + + + + + + True + False + Position and Size + + + False + + + + + + + + True + False + Position and Size + + + 1 + False + + + + + + + + True + False + Rotation + + + 2 + False + + + + + + + + True + False + Slant & Corner Radius + + + 3 + False + + + + + False + True + 1 + + + + + + ok + cancel + help + reset + + + diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index f5f01668638f..a8f19a2968ec 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -89,8 +89,6 @@ #define RID_SVXPAGE_HATCH (RID_SVX_START + 57) #define RID_SVXPAGE_BITMAP (RID_SVX_START + 58) #define RID_SVXPAGE_GRADIENT (RID_SVX_START + 59) -#define RID_SVXPAGE_ANGLE (RID_SVX_START + 48) -#define RID_SVXPAGE_SLANT (RID_SVX_START + 49) #define RID_SVXPAGE_DISTRIBUTE (RID_SVX_START + 236) #define RID_SVXPAGE_MACROASSIGN (RID_SVX_START + 296) -- cgit