Kaydet (Commit) d7432381 authored tarafından Olivier Hallot's avatar Olivier Hallot Kaydeden (comit) Caolán McNamara

Convert Drop Caps tab page to UI widgets

Conflicts:
	sw/UIConfig_swriter.mk

Conflicts:
	sw/source/ui/chrdlg/drpcps.cxx

Change-Id: Ic66f367d23b84666dd0165108c405b5b625b798b
Reviewed-on: https://gerrit.libreoffice.org/4236Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 97cd0f38
......@@ -120,6 +120,9 @@
<glade-widget-class title="Caption Preview" name="swuilo-SwCaptionPreview"
generic-name="Caption Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Drop Caps Preview" name="swuilo-SwDropCapsPict"
generic-name="Drop Caps Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Extension List" name="deploymentgui-ExtBoxWithBtns"
generic-name="Extensions List" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
......
......@@ -74,6 +74,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/converttexttable \
sw/uiconfig/swriter/ui/createauthorentry \
sw/uiconfig/swriter/ui/createautomarkdialog \
sw/uiconfig/swriter/ui/dropcapspage \
sw/uiconfig/swriter/ui/dropdownfielddialog \
sw/uiconfig/swriter/ui/endnotepage \
sw/uiconfig/swriter/ui/editcategories \
......
This diff is collapsed.
/* -*- 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 .
*/
#ifndef _DRPCPS_HRC
#define _DRPCPS_HRC
// #define ******************************************************************
#define FT_DROPCAPS 1
#define FLD_DROPCAPS 2
#define TXT_LINES 3
#define FLD_LINES 4
#define TXT_DISTANCE 5
#define FLD_DISTANCE 6
#define CNT_PICT 7
#define TXT_TEXT 8
#define EDT_TEXT 9
#define TXT_TEMPLATE 10
#define BOX_TEMPLATE 11
#define FL_SETTINGS 12
#define CB_SWITCH 13
#define FL_CONTENT 15
#define CB_WORD 16
#endif
// ********************************************************************** EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -19,7 +19,6 @@
#include "globals.hrc"
#include "chrdlg.hrc"
#include "drpcps.hrc"
#include "helpid.h"
// TabDialog ****************************************************************
TabDialog DLG_DROPCAPS
......@@ -42,146 +41,7 @@ TabDialog DLG_DROPCAPS
};
};
};
// TabPage ******************************************************************
TabPage TP_DROPCAPS
{
HelpID = HID_DROPCAPS ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
Hide = TRUE ;
CheckBox CB_SWITCH
{
HelpID = "sw:CheckBox:TP_DROPCAPS:CB_SWITCH";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "Display drop caps" ;
};
CheckBox CB_WORD
{
HelpID = "sw:CheckBox:TP_DROPCAPS:CB_WORD";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "~Whole word" ;
};
FixedText FT_DROPCAPS
{
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 70 , 8 ) ;
Text [ en-US ] = "Number of ~characters:" ;
};
NumericField FLD_DROPCAPS
{
HelpID = "sw:NumericField:TP_DROPCAPS:FLD_DROPCAPS";
Border = TRUE ;
First = 1 ;
Last = 9 ;
Left = TRUE ;
Maximum = 9 ;
Minimum = 1 ;
Pos = MAP_APPFONT ( 89 , 42 ) ;
Repeat = TRUE ;
Size = MAP_APPFONT ( 36 , 12 ) ;
Spin = TRUE ;
TabStop = TRUE ;
};
FixedText TXT_LINES
{
Left = TRUE ;
Pos = MAP_APPFONT ( 12 , 60 ) ;
Size = MAP_APPFONT ( 70 , 8 ) ;
Text [ en-US ] = "~Lines" ;
};
NumericField FLD_LINES
{
HelpID = "sw:NumericField:TP_DROPCAPS:FLD_LINES";
Border = TRUE ;
First = 2 ;
Last = 9 ;
Left = TRUE ;
Maximum = 9 ;
Minimum = 2 ;
Pos = MAP_APPFONT ( 89 , 58 ) ;
Repeat = TRUE ;
Size = MAP_APPFONT ( 36 , 12 ) ;
Spin = TRUE ;
TabStop = TRUE ;
};
FixedText TXT_DISTANCE
{
Left = TRUE ;
Pos = MAP_APPFONT ( 12 , 76 ) ;
Size = MAP_APPFONT ( 70 , 8 ) ;
Text [ en-US ] = "Space to text" ;
};
MetricField FLD_DISTANCE
{
HelpID = "sw:MetricField:TP_DROPCAPS:FLD_DISTANCE";
Border = TRUE ;
DecimalDigits = 2 ;
First = 0 ;
Last = 200 ;
Left = TRUE ;
Maximum = 200 ;
Minimum = 0 ;
Pos = MAP_APPFONT ( 89 , 74 ) ;
Repeat = TRUE ;
Size = MAP_APPFONT ( 36 , 12 ) ;
Spin = TRUE ;
SpinSize = 10 ;
TabStop = TRUE ;
Unit = FUNIT_CM ;
};
FixedLine FL_SETTINGS
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 125 , 8 ) ;
Text [ en-US ] = "Settings" ;
};
Control CNT_PICT
{
Border = TRUE ;
Pos = MAP_APPFONT ( 143 , 7 ) ;
Size = MAP_APPFONT ( 105 , 80 ) ;
};
FixedText TXT_TEXT
{
Left = TRUE ;
Pos = MAP_APPFONT ( 12 , 102 ) ;
Size = MAP_APPFONT ( 125 , 8 ) ;
Text [ en-US ] = "~Text" ;
};
Edit EDT_TEXT
{
HelpID = "sw:Edit:TP_DROPCAPS:EDT_TEXT";
Border = TRUE ;
Left = TRUE ;
Pos = MAP_APPFONT ( 143 , 100 ) ;
Size = MAP_APPFONT ( 105 , 12 ) ;
TabStop = TRUE ;
MaxTextLength = 9 ;
};
FixedText TXT_TEMPLATE
{
Left = TRUE ;
Pos = MAP_APPFONT ( 12 , 118 ) ;
Size = MAP_APPFONT ( 125 , 8 ) ;
Text [ en-US ] = "Character St~yle" ;
};
ListBox BOX_TEMPLATE
{
HelpID = "sw:ListBox:TP_DROPCAPS:BOX_TEMPLATE";
Border = TRUE ;
DropDown = TRUE ;
Pos = MAP_APPFONT ( 143 , 116 ) ;
Size = MAP_APPFONT ( 105 , 61 ) ;
TabStop = TRUE ;
};
FixedLine FL_CONTENT
{
Pos = MAP_APPFONT ( 6 , 89 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Contents" ;
};
};
// ********************************************************************** EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -53,28 +53,29 @@ class SwDropCapsPict;
class SwDropCapsPage : public SfxTabPage
{
friend class SwDropCapsPict;
FixedLine aSettingsFL;
CheckBox aDropCapsBox;
CheckBox aWholeWordCB;
FixedText aSwitchText;
NumericField aDropCapsField;
FixedText aLinesText;
NumericField aLinesField;
FixedText aDistanceText;
MetricField aDistanceField;
FixedLine aContentFL;
FixedText aTextText;
Edit aTextEdit;
FixedText aTemplateText;
ListBox aTemplateBox;
SwDropCapsPict *pPict;
sal_Bool bModified;
sal_Bool bFormat;
sal_Bool bHtmlMode;
// TODO: Work in progress
VclGrid* m_pSwDropCapsGrid;
//FixedLine aSettingsFL;
CheckBox* m_pDropCapsBox;
CheckBox* m_pWholeWordCB;
//FixedText aSwitchText;
NumericField* m_pDropCapsField;
//FixedText aLinesText;
NumericField* m_pLinesField;
//FixedText aDistanceText;
MetricField* m_pDistanceField;
VclFrame* m_pContentFL;
FixedText* m_pTextText;
Edit* m_pTextEdit;
//FixedText aTemplateText;
ListBox* m_pTemplateBox;
SwDropCapsPict* m_pPict;
sal_Bool bModified;
sal_Bool bFormat;
sal_Bool bHtmlMode;
SwWrtShell &rSh;
......@@ -101,6 +102,9 @@ public:
virtual void Reset (const SfxItemSet &rSet);
void SetFormat(sal_Bool bSet){bFormat = bSet;}
protected:
void aSwitchText(sal_Bool bChecked);
//void SW_RES(int arg1);
};
#endif
......
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