diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index 6da235f55dd9..15966db855d4 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -40,7 +40,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/dialogs/multipat.src \ cui/source/dialogs/passwdomdlg.src \ cui/source/dialogs/scriptdlg.src \ - cui/source/dialogs/sdrcelldlg.src \ cui/source/dialogs/showcols.src \ cui/source/dialogs/srchxtra.src \ cui/source/dialogs/svuidlg.src \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 78eaa8cbc379..4bfd0bd01ec7 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -41,6 +41,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/connpooloptions \ cui/uiconfig/ui/dbregisterpage \ cui/uiconfig/ui/effectspage \ + cui/uiconfig/ui/formatcellsdialog \ cui/uiconfig/ui/hatchpage \ cui/uiconfig/ui/hyphenate \ cui/uiconfig/ui/insertfloatingframe \ diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx index 2a2a982d6c47..79f924902e42 100644 --- a/cui/source/dialogs/sdrcelldlg.cxx +++ b/cui/source/dialogs/sdrcelldlg.cxx @@ -28,47 +28,37 @@ #include SvxFormatCellsDialog::SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel ) -: SfxTabDialog ( pParent, CUI_RES( RID_SVX_FORMAT_CELLS_DLG ), pAttr ) -, mrOutAttrs ( *pAttr ) -, mpColorTab ( pModel->GetColorList() ) -, mpGradientList ( pModel->GetGradientList() ) -, mpHatchingList ( pModel->GetHatchList() ) -, mpBitmapList ( pModel->GetBitmapList() ) - -{ - FreeResource(); - - AddTabPage( RID_SVXPAGE_CHAR_NAME ); - AddTabPage( RID_SVXPAGE_CHAR_EFFECTS ); - AddTabPage( RID_SVXPAGE_BORDER ); - AddTabPage( RID_SVXPAGE_AREA ); -} - -SvxFormatCellsDialog::~SvxFormatCellsDialog() + : SfxTabDialog(pParent, "FormatCellsDialog", "cui/ui/formatcellsdialog.ui", pAttr) + , mrOutAttrs(*pAttr) + , mpColorTab(pModel->GetColorList()) + , mpGradientList(pModel->GetGradientList()) + , mpHatchingList(pModel->GetHatchList()) + , mpBitmapList(pModel->GetBitmapList()) + , m_nAreaPageId(0) { + AddTabPage("name", RID_SVXPAGE_CHAR_NAME); + AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage("border", RID_SVXPAGE_BORDER ); + m_nAreaPageId = AddTabPage("area", RID_SVXPAGE_AREA); } void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { - switch( nId ) + if (nId == m_nAreaPageId) { - case RID_SVXPAGE_AREA: - ( (SvxAreaTabPage&) rPage ).SetColorList( mpColorTab ); - ( (SvxAreaTabPage&) rPage ).SetGradientList( mpGradientList ); - ( (SvxAreaTabPage&) rPage ).SetHatchingList( mpHatchingList ); - ( (SvxAreaTabPage&) rPage ).SetBitmapList( mpBitmapList ); - ( (SvxAreaTabPage&) rPage ).SetPageType( PT_AREA ); - ( (SvxAreaTabPage&) rPage ).SetDlgType( 1 ); - ( (SvxAreaTabPage&) rPage ).SetPos( 0 ); - ( (SvxAreaTabPage&) rPage ).Construct(); - ( (SvxAreaTabPage&) rPage ).ActivatePage( mrOutAttrs ); - - break; - - default: - SfxTabDialog::PageCreated( nId, rPage ); - break; + SvxAreaTabPage& rAreaPage = ((SvxAreaTabPage&)rPage); + rAreaPage.SetColorList( mpColorTab ); + rAreaPage.SetGradientList( mpGradientList ); + rAreaPage.SetHatchingList( mpHatchingList ); + rAreaPage.SetBitmapList( mpBitmapList ); + rAreaPage.SetPageType( PT_AREA ); + rAreaPage.SetDlgType( 1 ); + rAreaPage.SetPos( 0 ); + rAreaPage.Construct(); + rAreaPage.ActivatePage( mrOutAttrs ); } + else + SfxTabDialog::PageCreated( nId, rPage ); } void SvxFormatCellsDialog::Apply() diff --git a/cui/source/dialogs/sdrcelldlg.src b/cui/source/dialogs/sdrcelldlg.src deleted file mode 100644 index 387c7998a33b..000000000000 --- a/cui/source/dialogs/sdrcelldlg.src +++ /dev/null @@ -1,91 +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 - -TabDialog RID_SVX_FORMAT_CELLS_DLG -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 289 , 176 ) ; - Text [ en-US ] = "Format Cells" ; - Moveable = TRUE ; - Closeable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 3 , 3 ) ; - Size = MAP_APPFONT ( 260 , 135 ) ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_CHAR_NAME ; - PageResID = RID_SVXPAGE_CHAR_NAME ; - Text [ en-US ] = "Font" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_CHAR_EFFECTS ; - PageResID = RID_SVXPAGE_CHAR_EFFECTS ; - Text [ en-US ] = "Font Effects" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_BORDER; - PageResID = RID_SVXPAGE_BORDER; - Text [ en-US ] = "Borders" ; - }; - 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/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index f91d65305884..194cd9cd9b50 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -39,10 +39,6 @@ #define RID_CUI_GALLERY_START (RID_SVX_START + 360) // RID_CUI_GALLERY_END (RID_SVX_START + 410) -// tab pages -// used in "dialogs" -#define RID_SVX_FORMAT_CELLS_DLG ( RID_SVX_START + 42 ) - // used in "tabpages" #define RID_SVXDLG_LINE (RID_SVX_START + 50) #define RID_SVXDLG_BBDLG (RID_SVX_START + 40) diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx index 5a42021cdae5..76153a6ca53f 100644 --- a/cui/source/inc/sdrcelldlg.hxx +++ b/cui/source/inc/sdrcelldlg.hxx @@ -35,12 +35,13 @@ private: XHatchListRef mpHatchingList; XBitmapListRef mpBitmapList; + sal_uInt16 m_nAreaPageId; + protected: virtual void Apply(); public: SvxFormatCellsDialog( Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel ); - ~SvxFormatCellsDialog(); virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); diff --git a/cui/uiconfig/ui/formatcellsdialog.ui b/cui/uiconfig/ui/formatcellsdialog.ui new file mode 100644 index 000000000000..ea3f9ae2e293 --- /dev/null +++ b/cui/uiconfig/ui/formatcellsdialog.ui @@ -0,0 +1,161 @@ + + + + + False + 6 + Format Cells + 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 + Font + + + False + + + + + + + + True + False + Font Effects + + + 1 + False + + + + + + + + True + False + Borders + + + 2 + False + + + + + + + + True + False + Background + + + 3 + False + + + + + False + True + 1 + + + + + + ok + cancel + help + reset + + +