diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-09 14:20:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-09 20:46:24 +0100 |
commit | f41e7c704898fa0e86d6d128f5bd28f37c081e92 (patch) | |
tree | 660ac1f3e0f2dcbd869c557a10ece4a5facdde94 /sd/source/ui/dlg | |
parent | e3cf54875031b8740b3ed76d6f530c44d2d8c44e (diff) |
convert SfxStyleDialogs to .ui
Change-Id: I32aa538026669e22e0756cd062b72e67f8d179e5
Diffstat (limited to 'sd/source/ui/dlg')
-rw-r--r-- | sd/source/ui/dlg/tabtempl.cxx | 207 | ||||
-rw-r--r-- | sd/source/ui/dlg/tabtempl.src | 148 |
2 files changed, 99 insertions, 256 deletions
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx index 33b34cda31f4..7077321ccc26 100644 --- a/sd/source/ui/dlg/tabtempl.cxx +++ b/sd/source/ui/dlg/tabtempl.cxx @@ -38,7 +38,6 @@ #include "DrawDocShell.hxx" #include "tabtempl.hxx" -#include "tabtempl.hrc" #include "sdresid.hxx" #include "dlg_char.hxx" #include "paragr.hxx" @@ -51,39 +50,53 @@ SdTabTemplateDlg::SdTabTemplateDlg( Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, - SdrView* pView ) : - SfxStyleDialog ( pParent, SdResId( TAB_TEMPLATE ), rStyleBase, sal_False ), - rDocShell ( *pDocShell ), - pSdrView ( pView ), - pColorList ( pModel->GetColorList() ), - pGradientList ( pModel->GetGradientList() ), - pHatchingList ( pModel->GetHatchList() ), - pBitmapList ( pModel->GetBitmapList() ), - pDashList ( pModel->GetDashList() ), - pLineEndList ( pModel->GetLineEndList() ) + SdrView* pView ) + : SfxStyleDialog(pParent, "TemplateDialog", + "modules/simpress/ui/templatedialog.ui", + rStyleBase) + , rDocShell(*pDocShell) + , pSdrView(pView) + , pColorList(pModel->GetColorList()) + , pGradientList(pModel->GetGradientList()) + , pHatchingList(pModel->GetHatchList()) + , pBitmapList(pModel->GetBitmapList()) + , pDashList(pModel->GetDashList()) + , pLineEndList(pModel->GetLineEndList()) + , m_nLineId(0) + , m_nAreaId(0) + , m_nShadowId(0) + , m_nTransparencyId(0) + , m_nFontId(0) + , m_nFontEffectId(0) + , m_nIndentsId(0) + , m_nTextId(0) + , m_nAnimationId(0) + , m_nDimensionId(0) + , m_nConnectorId(0) + , m_nAlignId(0) + , m_nTabId(0) + , m_nAsianTypoId(0) { - FreeResource(); - // fill Listbox and overload Select-Handler - AddTabPage( RID_SVXPAGE_LINE); - AddTabPage( RID_SVXPAGE_AREA); - AddTabPage( RID_SVXPAGE_SHADOW); - AddTabPage( RID_SVXPAGE_TRANSPARENCE); - AddTabPage( RID_SVXPAGE_CHAR_NAME ); - AddTabPage( RID_SVXPAGE_CHAR_EFFECTS ); - AddTabPage( RID_SVXPAGE_STD_PARAGRAPH ); - AddTabPage( RID_SVXPAGE_TEXTATTR ); - AddTabPage( RID_SVXPAGE_TEXTANIMATION ); - AddTabPage( RID_SVXPAGE_MEASURE); - AddTabPage( RID_SVXPAGE_CONNECTION); - AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH ); - AddTabPage( RID_SVXPAGE_TABULATOR ); + m_nLineId = AddTabPage("line", RID_SVXPAGE_LINE); + m_nAreaId = AddTabPage("area", RID_SVXPAGE_AREA); + m_nShadowId = AddTabPage("shadowing", RID_SVXPAGE_SHADOW); + m_nTransparencyId = AddTabPage("transparency", RID_SVXPAGE_TRANSPARENCE); + m_nFontId = AddTabPage("font", RID_SVXPAGE_CHAR_NAME); + m_nFontEffectId = AddTabPage("fonteffect", RID_SVXPAGE_CHAR_EFFECTS); + m_nIndentsId = AddTabPage("indents", RID_SVXPAGE_STD_PARAGRAPH); + m_nTextId = AddTabPage("text", RID_SVXPAGE_TEXTATTR); + m_nAnimationId = AddTabPage("animation", RID_SVXPAGE_TEXTANIMATION); + m_nDimensionId = AddTabPage("dimensioning", RID_SVXPAGE_MEASURE); + m_nConnectorId = AddTabPage("connector", RID_SVXPAGE_CONNECTION); + m_nAlignId = AddTabPage("alignment", RID_SVXPAGE_ALIGN_PARAGRAPH); + m_nTabId = AddTabPage("tabs", RID_SVXPAGE_TABULATOR); SvtCJKOptions aCJKOptions; if( aCJKOptions.IsAsianTypographyEnabled() ) - AddTabPage( RID_SVXPAGE_PARA_ASIAN ); + m_nAsianTypoId = AddTabPage("asiantype", RID_SVXPAGE_PARA_ASIAN); else - RemoveTabPage( RID_SVXPAGE_PARA_ASIAN ); + RemoveTabPage("asiantypo"); nDlgType = 1; nPageType = 0; @@ -97,90 +110,68 @@ SdTabTemplateDlg::SdTabTemplateDlg( Window* pParent, // ----------------------------------------------------------------------- -SdTabTemplateDlg::~SdTabTemplateDlg() -{ -} - -// ----------------------------------------------------------------------- - void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - switch( nId ) + if (nId == m_nLineId) + { + aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE)); + aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST)); + aSet.Put (SvxLineEndListItem(pLineEndList,SID_LINEEND_LIST)); + aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType)); + rPage.PageCreated(aSet); + } + else if (nId == m_nAreaId) + { + aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE)); + aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST)); + aSet.Put (SvxHatchListItem(pHatchingList,SID_HATCH_LIST)); + aSet.Put (SvxBitmapListItem(pBitmapList,SID_BITMAP_LIST)); + aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType)); + aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType)); + aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,nPos)); + rPage.PageCreated(aSet); + } + else if (nId == m_nShadowId) + { + aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE)); + aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType)); + aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType)); + rPage.PageCreated(aSet); + } + else if (nId == m_nTransparencyId) + { + aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType)); + aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType)); + rPage.PageCreated(aSet); + } + else if (nId == m_nFontId) + { + SvxFontListItem aItem(*( (const SvxFontListItem*) + ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) ); + + aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); + rPage.PageCreated(aSet); + } + else if (nId == m_nFontEffectId) + { + aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); + rPage.PageCreated(aSet); + } + else if (nId == m_nTextId) + { + aSet.Put(OfaPtrItem(SID_SVXTEXTATTRPAGE_VIEW,pSdrView)); + rPage.PageCreated(aSet); + } + else if (nId == m_nDimensionId) + { + aSet.Put (OfaPtrItem(SID_OBJECT_LIST,pSdrView)); + rPage.PageCreated(aSet); + } + else if (nId == m_nConnectorId) { - case RID_SVXPAGE_LINE: - aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE)); - aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST)); - aSet.Put (SvxLineEndListItem(pLineEndList,SID_LINEEND_LIST)); - aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType)); - rPage.PageCreated(aSet); - break; - - case RID_SVXPAGE_AREA: - aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE)); - aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST)); - aSet.Put (SvxHatchListItem(pHatchingList,SID_HATCH_LIST)); - aSet.Put (SvxBitmapListItem(pBitmapList,SID_BITMAP_LIST)); - aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType)); - aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType)); - aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,nPos)); - rPage.PageCreated(aSet); - - - break; - - case RID_SVXPAGE_SHADOW: - aSet.Put (SvxColorListItem(pColorList,SID_COLOR_TABLE)); - aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType)); - aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType)); - rPage.PageCreated(aSet); - break; - - case RID_SVXPAGE_TRANSPARENCE: - aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType)); - aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType)); - rPage.PageCreated(aSet); - break; - - case RID_SVXPAGE_CHAR_NAME: - { - SvxFontListItem aItem(*( (const SvxFontListItem*) - ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) ); - - aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); - rPage.PageCreated(aSet); - } - break; - - case RID_SVXPAGE_CHAR_EFFECTS: - aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); - rPage.PageCreated(aSet); - break; - - case RID_SVXPAGE_STD_PARAGRAPH: - break; - - case RID_SVXPAGE_TEXTATTR: - { - aSet.Put(OfaPtrItem(SID_SVXTEXTATTRPAGE_VIEW,pSdrView)); - rPage.PageCreated(aSet); - } - break; - - case RID_SVXPAGE_TEXTANIMATION: - break; - - case RID_SVXPAGE_MEASURE: - aSet.Put (OfaPtrItem(SID_OBJECT_LIST,pSdrView)); - rPage.PageCreated(aSet); - break; - - case RID_SVXPAGE_CONNECTION: - { - aSet.Put (OfaPtrItem(SID_OBJECT_LIST,pSdrView)); - rPage.PageCreated(aSet); - } - break; + aSet.Put (OfaPtrItem(SID_OBJECT_LIST,pSdrView)); + rPage.PageCreated(aSet); } } diff --git a/sd/source/ui/dlg/tabtempl.src b/sd/source/ui/dlg/tabtempl.src deleted file mode 100644 index be905b9d12b6..000000000000 --- a/sd/source/ui/dlg/tabtempl.src +++ /dev/null @@ -1,148 +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 "tabtempl.hrc" -#include <svx/dialogs.hrc> -TabDialog TAB_TEMPLATE -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 289 , 176 ) ; - Text [ en-US ] = "Graphics Styles" ; - Moveable = TRUE ; - // Closeable = TRUE; // This dialog has an OK and/or a Cancel button! (KH) - TabControl 1 - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 3 , 3 ) ; - Size = MAP_APPFONT ( 260 , 135 ) ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_LINE ; - Text [ en-US ] = "Line" ; - PageResID = RID_SVXPAGE_LINE ; - }; - PageItem - { - Identifier = RID_SVXPAGE_AREA ; - Text [ en-US ] = "Area" ; - PageResID = RID_SVXPAGE_AREA ; - }; - PageItem - { - Identifier = RID_SVXPAGE_SHADOW ; - PageResID = RID_SVXPAGE_SHADOW ; - Text [ en-US ] = "Shadowing" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_TRANSPARENCE ; - Text [ en-US ] = "Transparency"; - }; - PageItem - { - Identifier = RID_SVXPAGE_CHAR_NAME; - Text [ en-US ] = "Font" ; - PageResID = RID_SVXPAGE_CHAR_NAME ; - }; - PageItem - { - Identifier = RID_SVXPAGE_CHAR_EFFECTS ; - Text [ en-US ] = "Font Effect" ; - PageResID = RID_SVXPAGE_CHAR_EFFECTS ; - }; - PageItem - { - Identifier = RID_SVXPAGE_STD_PARAGRAPH ; - Text [ en-US ] = "Indents & Spacing" ; - PageResID = RID_SVXPAGE_STD_PARAGRAPH ; - }; - PageItem - { - Identifier = RID_SVXPAGE_TEXTATTR ; - PageResID = RID_SVXPAGE_TEXTATTR ; - Text [ en-US ] = "Text" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_TEXTANIMATION ; - PageResID = RID_SVXPAGE_TEXTANIMATION ; - Text [ en-US ] = "Text Animation" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_MEASURE ; - Text [ en-US ] = "Dimensioning" ; - PageResID = RID_SVXPAGE_MEASURE ; - }; - PageItem - { - Identifier = RID_SVXPAGE_CONNECTION ; - Text [ en-US ] = "Connector" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_ALIGN_PARAGRAPH ; - PageResID = RID_SVXPAGE_ALIGN_PARAGRAPH ; - Text [ en-US ] = "Alignment" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_PARA_ASIAN ; - PageResID = RID_SVXPAGE_PARA_ASIAN ; - Text[ en-US ] = "Asian Typography"; - }; - PageItem - { - Identifier = RID_SVXPAGE_TABULATOR ; - Text [ en-US ] = "Tabs" ; - PageResID = RID_SVXPAGE_TABULATOR ; - }; - }; - }; - 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 ] = "Back" ; - TabStop = TRUE ; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |