diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-04 20:08:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-04 20:13:22 +0000 |
commit | c2b40175fd2b6ec2169e89ffd3bac14a3cf679dc (patch) | |
tree | e63dfa005dc7ecb6a25f53d865598557c5555aa8 /sc/source | |
parent | 51640a1bcdc17a87c2f5dd9348bd2d4493bd05e6 (diff) |
convert calc paragraph dialog to .ui
and that's the last TabDialog in calc converted
Change-Id: Idecf1b4ba991f7b59e40ea0f0813a5dc5644dfd3
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 19 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob1.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/inc/textdlgs.hxx | 9 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/textdlgs.cxx | 35 | ||||
-rw-r--r-- | sc/source/ui/src/textdlgs.src | 90 |
6 files changed, 27 insertions, 133 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 1ac1e0eeec5b..9e3f47eb02b8 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -1132,22 +1132,11 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScCharDlg( return new ScAbstractTabDialog_Impl(pDlg); } -SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr , - int nId ) +SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScParagraphDlg( + Window* pParent, const SfxItemSet* pAttr) { - SfxTabDialog* pDlg=NULL; - switch ( nId ) - { - case RID_SCDLG_PARAGRAPH : - pDlg = new ScParagraphDlg( pParent, pAttr ); - break; - default: - break; - } - - if ( pDlg ) - return new ScAbstractTabDialog_Impl( pDlg ); - return 0; + SfxTabDialog* pDlg = new ScParagraphDlg(pParent, pAttr); + return new ScAbstractTabDialog_Impl(pDlg); } SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScValidationDlg(Window* pParent, diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index cbbf0702a5d6..91c450b11f4f 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -562,8 +562,8 @@ public: virtual SfxAbstractTabDialog * CreateScCharDlg(Window* pParent, const SfxItemSet* pAttr, const SfxObjectShell* pDocShell); - virtual SfxAbstractTabDialog * CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr , - int nId ); + virtual SfxAbstractTabDialog * CreateScParagraphDlg(Window* pParent, + const SfxItemSet* pAttr); virtual SfxAbstractTabDialog * CreateScValidationDlg(Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell *pTabVwSh); diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 141062d01944..5142bf38bcc5 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -94,7 +94,8 @@ sal_Bool ScDrawTextObjectBar::ExecuteParaDlg( const SfxItemSet& rArgs, ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - SfxAbstractTabDialog* pDlg = pFact->CreateScParagraphDlg( pViewData->GetDialogParent(), &aNewAttr, RID_SCDLG_PARAGRAPH); + SfxAbstractTabDialog* pDlg = pFact->CreateScParagraphDlg( + pViewData->GetDialogParent(), &aNewAttr); OSL_ENSURE(pDlg, "Dialog create fail!"); sal_Bool bRet = ( pDlg->Execute() == RET_OK ); diff --git a/sc/source/ui/inc/textdlgs.hxx b/sc/source/ui/inc/textdlgs.hxx index 65e4d56d9585..abcd88ab5438 100644 --- a/sc/source/ui/inc/textdlgs.hxx +++ b/sc/source/ui/inc/textdlgs.hxx @@ -40,15 +40,14 @@ public: class ScParagraphDlg : public SfxTabDialog { private: - virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); + sal_uInt16 m_nTabPageId; + + virtual void PageCreated(sal_uInt16 nId, SfxTabPage &rPage); public: - ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ); - ~ScParagraphDlg() {} + ScParagraphDlg(Window* pParent, const SfxItemSet* pAttr); }; - - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx index 324dce7e355c..3b19249be091 100644 --- a/sc/source/ui/miscdlgs/textdlgs.cxx +++ b/sc/source/ui/miscdlgs/textdlgs.cxx @@ -67,36 +67,31 @@ void ScCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) // ----------------------------------------------------------------------- -ScParagraphDlg::ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ) : - SfxTabDialog ( pParent, ScResId( RID_SCDLG_PARAGRAPH ), pAttr ) +ScParagraphDlg::ScParagraphDlg(Window* pParent, const SfxItemSet* pAttr) + : SfxTabDialog(pParent, "ParagraphDialog", + "modules/scalc/ui/paradialog.ui", pAttr) + , m_nTabPageId(0) { - FreeResource(); - + AddTabPage("labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH); + AddTabPage("labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH); SvtCJKOptions aCJKOptions; - - AddTabPage( RID_SVXPAGE_STD_PARAGRAPH ); - AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH ); - if ( aCJKOptions.IsAsianTypographyEnabled() ) - AddTabPage( RID_SVXPAGE_PARA_ASIAN); + if (aCJKOptions.IsAsianTypographyEnabled() ) + AddTabPage("labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN); else - RemoveTabPage( RID_SVXPAGE_PARA_ASIAN ); - AddTabPage( RID_SVXPAGE_TABULATOR ); + RemoveTabPage("labelTP_PARA_ASIAN"); + m_nTabPageId = AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR); } // ----------------------------------------------------------------------- void ScParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { - switch( nId ) + if (nId == m_nTabPageId) { - case RID_SVXPAGE_TABULATOR: - { - SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS,(TABTYPE_ALL &~TABTYPE_LEFT) | - (TABFILL_ALL &~TABFILL_NONE) )); - rPage.PageCreated(aSet); - } - break; + SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); + aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS, + (TABTYPE_ALL &~TABTYPE_LEFT) | (TABFILL_ALL &~TABFILL_NONE))); + rPage.PageCreated(aSet); } } diff --git a/sc/source/ui/src/textdlgs.src b/sc/source/ui/src/textdlgs.src deleted file mode 100644 index 57caacf8f160..000000000000 --- a/sc/source/ui/src/textdlgs.src +++ /dev/null @@ -1,90 +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 <svx/dialogs.hrc> -#include "sc.hrc" - -TabDialog RID_SCDLG_PARAGRAPH -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 289 , 176 ) ; - Text [ en-US ] = "Paragraph" ; - Moveable = TRUE ; - Closeable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 3 , 3 ) ; - Size = MAP_APPFONT ( 260 , 135 ) ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_STD_PARAGRAPH ; - Text [ en-US ] = "Indents & Spacing" ; - PageResID = RID_SVXPAGE_STD_PARAGRAPH ; - }; - PageItem - { - Identifier = RID_SVXPAGE_ALIGN_PARAGRAPH ; - PageResID = RID_SVXPAGE_ALIGN_PARAGRAPH ; - Text [ en-US ] = "Alignment" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_PARA_ASIAN ; - Text [ en-US ] = "Asian Typography"; - }; - PageItem - { - Identifier = RID_SVXPAGE_TABULATOR ; - Text [ en-US ] = "Tab" ; - 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: */ |