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

convert auto abstract dialog to .ui

Change-Id: Iaed5429c61c5655d81d0010c4b56e8889aa5f29b
üst 29cdabb8
......@@ -93,7 +93,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/dbui/mmoutputtypepage.src \
sw/source/ui/dbui/mmpreparemergepage.src \
sw/source/ui/dbui/selectdbtabledialog.src \
sw/source/ui/dialog/abstract.src \
sw/source/ui/dialog/dialog.src \
sw/source/ui/dialog/regionsw.src \
sw/source/ui/dochdl/dochdl.src \
......
......@@ -59,6 +59,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swriter,\
))
$(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/abstractdialog \
sw/uiconfig/swriter/ui/asciifilterdialog \
sw/uiconfig/swriter/ui/autoformattable \
sw/uiconfig/swriter/ui/autotext \
......
......@@ -65,7 +65,6 @@
#define HID_VS_NUM "SW_HID_VS_NUM"
#define HID_VS_BULLET "SW_HID_VS_BULLET"
#define HID_VS_NUMBMP "SW_HID_VS_NUMBMP"
#define HID_INSERT_ABSTRACT "SW_HID_INSERT_ABSTRACT"
#define HID_NAVI_TBX1 "SW_HID_NAVI_TBX1"
#define HID_NAVI_TBX2 "SW_HID_NAVI_TBX2"
#define HID_NAVI_TBX3 "SW_HID_NAVI_TBX3"
......
......@@ -22,41 +22,23 @@
#include "dialog.hrc"
#include "abstract.hxx"
#include "abstract.hrc"
SwInsertAbstractDlg::SwInsertAbstractDlg( Window* pParent ) :
SfxModalDialog(pParent, SW_RES(DLG_INSERT_ABSTRACT)),
aFL (this, SW_RES(FL_1 )),
aLevelFT(this, SW_RES(FT_LEVEL )),
aLevelNF(this, SW_RES(NF_LEVEL )),
aParaFT (this, SW_RES(FT_PARA )),
aParaNF (this, SW_RES(NF_PARA )),
aDescFT (this, SW_RES(FT_DESC )),
aOkPB (this, SW_RES(PB_OK )),
aCancelPB (this, SW_RES(PB_CANCEL )),
aHelpPB (this, SW_RES(PB_HELP ))
{
FreeResource();
}
SwInsertAbstractDlg::~SwInsertAbstractDlg()
SwInsertAbstractDlg::SwInsertAbstractDlg(Window* pParent)
: SfxModalDialog(pParent, "AbstractDialog",
"modules/swriter/ui/abstractdialog.ui")
{
get(m_pLevelNF, "outlines");
get(m_pParaNF, "paras");
}
sal_uInt8 SwInsertAbstractDlg::GetLevel() const
{
return static_cast< sal_uInt8 >(aLevelNF.GetValue() - 1);
return static_cast<sal_uInt8>(m_pLevelNF->GetValue() - 1);
}
sal_uInt8 SwInsertAbstractDlg::GetPara() const
{
return (sal_uInt8) aParaNF.GetValue();
return static_cast<sal_uInt8>(m_pParaNF->GetValue());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 FL_1 1
#define FT_PARA 2
#define NF_PARA 3
#define FT_LEVEL 4
#define NF_LEVEL 5
#define FT_DESC 6
#define PB_OK 7
#define PB_CANCEL 8
#define PB_HELP 9
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 "dialog.hrc"
#include "helpid.h"
#include "abstract.hrc"
ModalDialog DLG_INSERT_ABSTRACT
{
HelpID = HID_INSERT_ABSTRACT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 239 , 68 ) ;
Moveable = TRUE ;
FixedLine FL_1
{
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 174 , 8 ) ;
Text [ en-US ] = "Properties" ;
};
FixedText FT_LEVEL
{
Pos = MAP_APPFONT ( 12 , 12 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "Included outline levels" ;
};
NumericField NF_LEVEL
{
HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_LEVEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 153 , 12 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 1 ;
Maximum = 5 ;
Value = 3 ;
First = 1 ;
Last = 5 ;
};
FixedText FT_PARA
{
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "Paragraphs per level" ;
};
NumericField NF_PARA
{
HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_PARA";
Border = TRUE ;
Pos = MAP_APPFONT ( 153 , 27 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 1 ;
Maximum = 5 ;
Value = 1 ;
First = 1 ;
Last = 5 ;
};
FixedText FT_DESC
{
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 165 , 16 ) ;
WordBreak = TRUE ;
Text [ en-US ] = "The abstract contains the selected number of paragraphs from the included outline levels." ;
};
OKButton PB_OK
{
Pos = MAP_APPFONT ( 186 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton PB_CANCEL
{
Pos = MAP_APPFONT ( 186 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
HelpButton PB_HELP
{
Pos = MAP_APPFONT ( 186 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
Text [ en-US ] = "Create AutoAbstract" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -21,29 +21,17 @@
#include <sfx2/basedlgs.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
#include <vcl/button.hxx>
class SwInsertAbstractDlg : public SfxModalDialog
class SwInsertAbstractDlg : public SfxModalDialog
{
FixedLine aFL;
FixedText aLevelFT;
NumericField aLevelNF;
FixedText aParaFT;
NumericField aParaNF;
FixedText aDescFT;
OKButton aOkPB;
CancelButton aCancelPB;
HelpButton aHelpPB;
NumericField* m_pLevelNF;
NumericField* m_pParaNF;
protected:
public:
SwInsertAbstractDlg( Window* pParent );
~SwInsertAbstractDlg();
sal_uInt8 GetLevel() const;
sal_uInt8 GetPara() const;
......@@ -51,6 +39,4 @@ public:
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
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