Kaydet (Commit) c2b40175 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert calc paragraph dialog to .ui

and that's the last TabDialog in calc converted

Change-Id: Idecf1b4ba991f7b59e40ea0f0813a5dc5644dfd3
üst 51640a1b
......@@ -38,7 +38,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/globstr.src \
sc/source/ui/src/toolbox.src \
sc/source/ui/src/scfuncs.src \
sc/source/ui/src/textdlgs.src \
sc/source/ui/src/sc.src \
sc/source/ui/src/hdrcont.src \
sc/source/ui/src/scerrors.src \
......
......@@ -114,6 +114,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/optimalrowheightdialog \
sc/uiconfig/scalc/ui/optsortlists \
sc/uiconfig/scalc/ui/pagetemplatedialog \
sc/uiconfig/scalc/ui/paradialog \
sc/uiconfig/scalc/ui/paratemplatedialog \
sc/uiconfig/scalc/ui/printareasdialog \
sc/uiconfig/scalc/ui/printeroptions \
......
......@@ -1047,9 +1047,6 @@
#define RID_SCPAGE_PRINT (SC_DIALOGS_START + 70)
#define RID_SCDLG_COLORROW (SC_DIALOGS_START + 71)
#define RID_SCDLG_PARAGRAPH (SC_DIALOGS_START + 77)
#define RID_SCDLG_CONTACTS (SC_DIALOGS_START + 78)
#define RID_SCPAGE_STAT (SC_DIALOGS_START + 79)
......
......@@ -495,8 +495,8 @@ public:
virtual SfxAbstractTabDialog * CreateScCharDlg(Window* pParent,
const SfxItemSet* pAttr, const SfxObjectShell* pDocShell) = 0;
virtual SfxAbstractTabDialog * CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ,
int nId ) = 0;
virtual SfxAbstractTabDialog * CreateScParagraphDlg(Window* pParent,
const SfxItemSet* pAttr) = 0;
virtual SfxAbstractTabDialog * CreateScValidationDlg(Window* pParent,
const SfxItemSet* pArgSet, ScTabViewShell *pTabVwSh) = 0;
......
......@@ -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,
......
......@@ -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);
......
......@@ -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 );
......
......@@ -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: */
......@@ -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);
}
}
......
/* -*- 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: */
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Sat Jan 4 19:26:45 2014 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="ParagraphDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Paragraph</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="reset">
<property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_PARA_STD">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Indents &amp; Spacing</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_PARA_ALIGN">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0.4699999988079071</property>
<property name="label" translatable="yes">Alignment</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_PARA_ASIAN">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Asian Typography</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_TABULATOR">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Tabs</property>
</object>
<packing>
<property name="position">3</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">help</action-widget>
<action-widget response="0">reset</action-widget>
</action-widgets>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment