diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk index b4642be40085..978c41583588 100644 --- a/sd/AllLangResTarget_sd.mk +++ b/sd/AllLangResTarget_sd.mk @@ -48,7 +48,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ sd/source/ui/dlg/dlg_char.src \ sd/source/ui/dlg/dlgfield.src \ sd/source/ui/dlg/dlgolbul.src \ - sd/source/ui/dlg/dlgpage.src \ sd/source/ui/dlg/inspagob.src \ sd/source/ui/dlg/ins_paste.src \ sd/source/ui/dlg/LayerDialog.src \ diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index f5a5d1f40303..292955f750a6 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -68,7 +68,8 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/sdraw,\ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/dlgsnap \ sd/uiconfig/sdraw/ui/copydlg \ - sd/uiconfig/sdraw/ui/drawparadialog \ + sd/uiconfig/sdraw/ui/drawparadialog \ + sd/uiconfig/sdraw/ui/drawpagedialog \ sd/uiconfig/sdraw/ui/insertlayer \ sd/uiconfig/sdraw/ui/paranumberingtab \ sd/uiconfig/sdraw/ui/printeroptions \ diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx index e0bae00c4fcc..b6eebfc51440 100644 --- a/sd/source/ui/dlg/dlgpage.cxx +++ b/sd/source/ui/dlg/dlgpage.cxx @@ -34,8 +34,11 @@ * Constructor of tab dialog: appends pages to the dialog */ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, sal_Bool bAreaPage ) : - SfxTabDialog ( pParent, SdResId( TAB_PAGE ), pAttr ), - mpDocShell ( pDocSh ) + SfxTabDialog ( pParent + ,"DrawPageDialog" + ,"modules/sdraw/ui/drawpagedialog.ui" + , pAttr ), + mpDocShell ( pDocSh ) { SvxColorListItem aColorListItem(*( (const SvxColorListItem*) ( mpDocShell->GetItem( SID_COLOR_TABLE ) ) ) ); @@ -51,43 +54,38 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* mpHatchingList = aHatchListItem.GetHatchList(); mpBitmapList = aBitmapListItem.GetBitmapList(); - FreeResource(); - SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); - AddTabPage( RID_SVXPAGE_PAGE, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 ); - AddTabPage( RID_SVXPAGE_AREA, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), 0 ); + mnPage = AddTabPage( "RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 ); + mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), 0 ); if(!bAreaPage) // I have to add the page before I remove it ! - RemoveTabPage( RID_SVXPAGE_AREA ); + RemoveTabPage( "RID_SVXPAGE_AREA" ); } void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - switch(nId) + if (nId == mnPage) { - case RID_SVXPAGE_PAGE: aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_PRESENTATION)); aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_PAPER_START, PAPER_A0)); aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_PAPER_END, PAPER_E)); rPage.PageCreated(aSet); - break; - case RID_SVXPAGE_AREA: - aSet.Put (SvxColorListItem(mpColorList,SID_COLOR_TABLE)); - aSet.Put (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST)); - aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST)); - aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST)); - aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0)); - aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1)); - aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0)); - rPage.PageCreated(aSet); - break; + } + else if (nId == mnArea) + { + aSet.Put (SvxColorListItem(mpColorList,SID_COLOR_TABLE)); + aSet.Put (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST)); + aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST)); + aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST)); + aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0)); + aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1)); + aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0)); + rPage.PageCreated(aSet); } } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/dlgpage.src b/sd/source/ui/dlg/dlgpage.src deleted file mode 100644 index 7e3dbb5286f5..000000000000 --- a/sd/source/ui/dlg/dlgpage.src +++ /dev/null @@ -1,79 +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 "dlgpage.hrc" -TabDialog TAB_PAGE -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 289 , 176 ) ; - Text [ en-US ] = "Page Setup" ; - Moveable = TRUE ; - Closeable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 3 , 3 ) ; - Size = MAP_APPFONT ( 260 , 135 ) ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_PAGE ; - Text [ en-US ] = "Page" ; - PageResID = RID_SVXPAGE_PAGE ; - }; - - PageItem - { - Identifier = RID_SVXPAGE_AREA; - PageResID = RID_SVXPAGE_AREA; - Text [ en-US ] = "Background"; - }; - }; - }; - OKButton 1 - { - Pos = MAP_APPFONT ( 6 , 151 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - CancelButton 1 - { - Pos = MAP_APPFONT ( 60 , 151 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton 1 - { - Pos = MAP_APPFONT ( 114 , 151 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - PushButton 1 - { - Pos = MAP_APPFONT ( 169 , 151 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "Return" ; - TabStop = TRUE ; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/dlgpage.hrc b/sd/source/ui/inc/dlgpage.hrc deleted file mode 100644 index 6742088e76e5..000000000000 --- a/sd/source/ui/inc/dlgpage.hrc +++ /dev/null @@ -1,21 +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_PAGE 20625 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx index 952a6101559c..4e53efd8e824 100644 --- a/sd/source/ui/inc/dlgpage.hxx +++ b/sd/source/ui/inc/dlgpage.hxx @@ -22,7 +22,6 @@ #define _SD_DLGPAGE_HXX #include -#include "dlgpage.hrc" class SfxObjectShell; @@ -40,6 +39,9 @@ private: XGradientListRef mpGradientList; XHatchListRef mpHatchingList; XBitmapListRef mpBitmapList; + sal_uInt16 mnArea; + sal_uInt16 mnPage; + public: SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, sal_Bool bAreaPage = sal_True ); diff --git a/sd/uiconfig/sdraw/ui/drawpagedialog.ui b/sd/uiconfig/sdraw/ui/drawpagedialog.ui new file mode 100644 index 000000000000..df9e19eac1f1 --- /dev/null +++ b/sd/uiconfig/sdraw/ui/drawpagedialog.ui @@ -0,0 +1,132 @@ + + + + + False + 6 + 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 + Page + + + False + + + + + + + + True + False + Background + + + 1 + False + + + + + False + True + 1 + + + + + + ok + cancel + help + reset + + +