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

convert captions option page to .ui

Change-Id: I571cc68bacce315ceafbe54deed6efeac51a6f1f
üst f20feba4
......@@ -445,6 +445,10 @@
generic-name="SelectionListBox" parent="VclComboBoxText"
icon-name="widget-gtk-comboboxtext"/>
<glade-widget-class title="CaptionComboBox" name="swuilo-CaptionComboBox"
generic-name="CaptionComboBox" parent="VclComboBoxText"
icon-name="widget-gtk-comboboxtext"/>
<glade-widget-class title="PropertyControl" name="sdlo-PropertyControl"
generic-name="PropertyControl" parent="VclComboBoxText"
icon-name="widget-gtk-comboboxtext"/>
......
......@@ -145,6 +145,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/objectdialog \
sw/uiconfig/swriter/ui/optcomparison \
sw/uiconfig/swriter/ui/optcompatpage \
sw/uiconfig/swriter/ui/optcaptionpage \
sw/uiconfig/swriter/ui/optfonttabpage \
sw/uiconfig/swriter/ui/optformataidspage \
sw/uiconfig/swriter/ui/optgeneralpage \
......
......@@ -122,7 +122,7 @@
// Sw-pages
#define TP_OPTPRINT_PAGE (RC_GLOBALS_BEGIN + 26)
#define TP_OPTCAPTION_PAGE (RC_GLOBALS_BEGIN + 77)
#define DLG_SVXTEST_NUM_BULLET (RC_GLOBALS_BEGIN + 79)
//maximum: RC_GLOBALS_BEGIN + 120
......
......@@ -136,7 +136,6 @@
// TabPage Help-IDs
#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL"
#define HID_OPTCAPTION_PAGE "SW_HID_OPTCAPTION_PAGE"
#define HID_ADD_STYLES_TLB "SW_HID_ADD_STYLES_TLB"
#define HID_COMPATIBILITY_OPTIONS_BOX "SW_HID_COMPATIBILITY_OPTIONS_BOX"
......
......@@ -713,4 +713,29 @@ String STR_ROTATE_TO_STANDARD_ORIENTATION
Text [ en-US ] = "This image is rotated. Would you like to rotate it into standard orientation?";
};
String STR_CAPTION_TABLE
{
Text [ en-US ] = "%PRODUCTNAME Writer Table";
};
String STR_CAPTION_FRAME
{
Text [ en-US ] = "%PRODUCTNAME Writer Frame";
};
String STR_CAPTION_GRAPHIC
{
Text [ en-US ] = "%PRODUCTNAME Writer Picture";
};
String STR_CAPTION_OLE
{
Text [ en-US ] = "Other OLE Objects";
};
String STR_CATEGORY_NONE
{
Text [ en-US ] = "<None>" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -543,7 +543,6 @@ SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
}
break;
}
case TP_OPTCAPTION_PAGE:
case RID_SW_TP_OPTCAPTION_PAGE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
......
......@@ -47,8 +47,8 @@ SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
{
}
SwComboBox::SwComboBox(Window* pParent)
: ComboBox(pParent)
SwComboBox::SwComboBox(Window* pParent, WinBits nStyle)
: ComboBox(pParent, nStyle)
{
Init();
}
......
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 .
*/
// SwCaptionOptPage -----------------------------
#define FT_OBJECTS 10
#define CLB_OBJECTS 11
#define FL_SETTINGS_2 12
#define TXT_CATEGORY 13
#define BOX_CATEGORY 14
#define TXT_FORMAT 15
#define BOX_FORMAT 16
#define TXT_TEXT 17
#define EDT_TEXT 18
#define TXT_POS 19
#define BOX_POS 20
#define FL_NUMCAPT 21
#define FT_LEVEL 22
#define LB_LEVEL 23
#define FT_SEPARATOR 24
#define ED_SEPARATOR 25
#define FL_CATEGORY 26
#define FT_CHARSTYLE 27
#define LB_CHARSTYLE 28
#define CB_APPLYBORDER 29
#define WIN_PREVIEW 30
#define STR_CATEGORY_NONE 31
#define LB_ORDER 32
#define FT_ORDER 33
#define FT_NUM_SEP 34
#define ED_NUM_SEP 35
#define STR_TABLE 10
#define STR_FRAME 11
#define STR_GRAPHIC 12
#define STR_OLE 13
#define STR_BEGINNING 14
#define STR_END 15
#define STR_ABOVE 16
#define STR_CP_BELOW 17
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,258 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "globals.hrc"
#include "optload.hrc"
#include "helpid.h"
#include "config.hrc"
TabPage TP_OPTCAPTION_PAGE
{
HelpID = HID_OPTCAPTION_PAGE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
Hide = TRUE ;
Text [ en-US ] = "Caption" ;
FixedText FT_OBJECTS
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 106 , 20 ) ;
WordBreak = TRUE ;
Text [ en-US ] = "Add captions automatically\nwhen inserting:" ;
};
Control CLB_OBJECTS
{
Pos = MAP_APPFONT ( 6 , 29 ) ;
Size = MAP_APPFONT ( 106 , 97 ) ;
Border = TRUE ;
TabStop = TRUE ;
};
FixedText FT_ORDER
{
Pos = MAP_APPFONT ( 6 , 130 ) ;
Size = MAP_APPFONT ( 106 , 8 ) ;
Text [ en-US ] = "Caption order" ;
};
ListBox LB_ORDER
{
HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_ORDER";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 141 ) ;
Size = MAP_APPFONT ( 106 , 60 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Category first" ; > ;
< "Numbering first" ; > ;
};
};
Window WIN_PREVIEW
{
Pos = MAP_APPFONT ( 6 , 159 ) ;
Size = MAP_APPFONT ( 106 , 20 ) ;
Border = TRUE;
};
String STR_TABLE
{
Text [ en-US ] = "%PRODUCTNAME Writer Table";
};
String STR_FRAME
{
Text [ en-US ] = "%PRODUCTNAME Writer Frame";
};
String STR_GRAPHIC
{
Text [ en-US ] = "%PRODUCTNAME Writer Picture";
};
String STR_OLE
{
Text [ en-US ] = "Other OLE Objects";
};
FixedLine FL_SETTINGS_2
{
Pos = MAP_APPFONT ( 118 , 3 ) ;
Size = MAP_APPFONT ( 136 , 8 ) ;
Text [ en-US ] = "Caption" ;
};
FixedText TXT_CATEGORY
{
Pos = MAP_APPFONT ( 125 , 16 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Text [ en-US ] = "Category" ;
Left = TRUE ;
};
ComboBox BOX_CATEGORY
{
HelpID = "sw:ComboBox:TP_OPTCAPTION_PAGE:BOX_CATEGORY";
Pos = MAP_APPFONT ( 189 , 14 ) ;
Size = MAP_APPFONT ( 59 , 61 ) ;
DropDown = TRUE ;
TabStop = TRUE ;
Sort = TRUE ;
};
FixedText TXT_FORMAT
{
Pos = MAP_APPFONT ( 125 , 31 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Text [ en-US ] = "~Numbering" ;
Left = TRUE ;
};
ListBox BOX_FORMAT
{
HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 189 , 29 ) ;
Size = MAP_APPFONT ( 59 , 61 ) ;
DropDown = TRUE ;
TabStop = TRUE ;
};
FixedText FT_NUM_SEP
{
Pos = MAP_APPFONT ( 125 , 46 ) ;
Size = MAP_APPFONT ( 61 , 8 ) ;
Text [ en-US ] = "Numbering separator" ;
Left = TRUE ;
};
Edit ED_NUM_SEP
{
HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_NUM_SEP";
Pos = MAP_APPFONT ( 189 , 44 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Text = ". " ;
};
FixedText TXT_TEXT
{
Pos = MAP_APPFONT ( 125 , 60 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Text [ en-US ] = "Separator" ;
Left = TRUE ;
};
Edit EDT_TEXT
{
HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:EDT_TEXT";
Pos = MAP_APPFONT ( 189 , 59 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
};
FixedText TXT_POS
{
Pos = MAP_APPFONT ( 125 , 75 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Left = TRUE ;
Text [ en-US ] = "Position" ;
};
ListBox BOX_POS
{
HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_POS";
Pos = MAP_APPFONT ( 189 , 74 ) ;
Size = MAP_APPFONT ( 59 , 61 ) ;
DropDown = TRUE ;
TabStop = TRUE ;
Border = TRUE ;
};
FixedLine FL_NUMCAPT
{
Pos = MAP_APPFONT ( 118 , 89 ) ;
Size = MAP_APPFONT ( 136 , 8 ) ;
Text [ en-US ] = "Numbering captions by chapter" ;
};
FixedText FT_LEVEL
{
Pos = MAP_APPFONT ( 125 , 102 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Text [ en-US ] = "Level" ;
};
ListBox LB_LEVEL
{
HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_LEVEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 189 , 100 ) ;
Size = MAP_APPFONT ( 59 , 60 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "None" ; > ;
};
};
FixedText FT_SEPARATOR
{
Pos = MAP_APPFONT ( 125 , 117 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Text [ en-US ] = "Separator" ;
};
Edit ED_SEPARATOR
{
HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_SEPARATOR";
Pos = MAP_APPFONT ( 189 , 115 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
Border = TRUE ;
MaxTextLength = 1 ;
TEXT = "." ;
};
FixedLine FL_CATEGORY
{
Pos = MAP_APPFONT ( 118 , 130 ) ;
Size = MAP_APPFONT ( 136 , 8 ) ;
Text [ en-US ] = "Category and frame format" ;
};
FixedText FT_CHARSTYLE
{
Pos = MAP_APPFONT ( 125 , 143 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
Text [ en-US ] = "Character style" ;
};
ListBox LB_CHARSTYLE
{
HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_CHARSTYLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 189 , 141 ) ;
Size = MAP_APPFONT ( 59 , 60 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "None" ; > ;
};
};
CheckBox CB_APPLYBORDER
{
HelpID = "sw:CheckBox:TP_OPTCAPTION_PAGE:CB_APPLYBORDER";
Pos = MAP_APPFONT ( 125 , 158 ) ;
Size = MAP_APPFONT ( 124 , 10 ) ;
Text [ en-US ] = "Apply border and shadow" ;
};
String STR_BEGINNING
{
Text [ en-US ] = "At the beginning" ;
};
String STR_END
{
Text [ en-US ] = "At the end" ;
};
String STR_ABOVE
{
Text [ en-US ] = "Above" ;
};
String STR_CP_BELOW
{
Text [ en-US ] = "Below" ;
};
String STR_CATEGORY_NONE
{
Text [ en-US ] = "<None>" ;
};
};
StringArray STR_ARR_METRIC
{
ItemList [ en-US ] =
......
......@@ -1142,7 +1142,6 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI
case RID_SW_TP_OPTLOAD_PAGE :
pRet = SwLoadOptPage::Create;
break;
case TP_OPTCAPTION_PAGE:
case RID_SW_TP_OPTCAPTION_PAGE:
return SwCaptionOptPage::Create;
case RID_SW_TP_CONTENT_OPT:
......
......@@ -101,10 +101,14 @@
#define STR_SIMPLE (RC_APP_BEGIN + 129)
#define STR_AUTHMRK_EDIT (RC_APP_BEGIN + 130)
#define STR_AUTHMRK_INSERT (RC_APP_BEGIN + 131)
#define STR_ROTATE_TO_STANDARD_ORIENTATION (RC_APP_BEGIN + 132)
#define STR_CAPTION_TABLE (RC_APP_BEGIN + 133)
#define STR_CAPTION_FRAME (RC_APP_BEGIN + 134)
#define STR_CAPTION_GRAPHIC (RC_APP_BEGIN + 135)
#define STR_CAPTION_OLE (RC_APP_BEGIN + 136)
#define STR_CATEGORY_NONE (RC_APP_BEGIN + 137)
#define APP_ACT_END STR_ROTATE_TO_STANDARD_ORIENTATION
#define APP_ACT_END STR_CATEGORY_NONE
#if APP_ACT_END > RC_APP_END
#error Resource-Id Ueberlauf in #file, #line
......
......@@ -37,7 +37,7 @@ class BookmarkCombo : public SwComboBox
virtual long PreNotify(NotifyEvent& rNEvt);
public:
BookmarkCombo( Window* pWin );
BookmarkCombo(Window* pWin, WinBits nStyle);
sal_uInt16 GetSelectEntryCount() const;
sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
......
......@@ -23,6 +23,7 @@
#include <vcl/group.hxx>
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
#include <svx/strarray.hxx>
......@@ -81,8 +82,8 @@ protected:
virtual void KeyInput( const KeyEvent& );
public:
CaptionComboBox( Window* pParent, const ResId& rResId)
: SwComboBox(pParent, rResId)
CaptionComboBox(Window* pParent, WinBits nStyle)
: SwComboBox(pParent, nStyle)
{}
};
......@@ -92,47 +93,38 @@ private:
OUString maText;
Point maDrawPos;
public:
SwCaptionPreview( Window* pParent );
SwCaptionPreview( Window* pParent, const ResId& rResId );
SwCaptionPreview( Window* pParent, WinBits nStyle );
void Init();
void SetPreviewText( const OUString& rText );
virtual void Paint( const Rectangle& rRect );
virtual Size GetOptimalSize() const;
};
class SwCaptionOptPage : public SfxTabPage
{
private:
FixedText aCheckFT;
SvxCheckListBox aCheckLB;
FixedText aFtCaptionOrder;
ListBox aLbCaptionOrder;
SwCaptionPreview aPreview;
FixedLine aSettingsGroupFL;
FixedText aCategoryText;
CaptionComboBox aCategoryBox;
FixedText aFormatText;
ListBox aFormatBox;
SvxCheckListBox* m_pCheckLB;
ListBox* m_pLbCaptionOrder;
SwCaptionPreview* m_pPreview;
VclContainer* m_pSettingsGroup;
CaptionComboBox* m_pCategoryBox;
FixedText* m_pFormatText;
ListBox* m_pFormatBox;
//#i61007# order of captions
FixedText aNumberingSeparatorFT;
Edit aNumberingSeparatorED;
FixedText aTextText;
Edit aTextEdit;
FixedText aPosText;
ListBox aPosBox;
FixedLine aNumCaptFL;
FixedText aFtLevel;
ListBox aLbLevel;
FixedText aFtDelim;
Edit aEdDelim;
FixedLine aCategoryFL;
FixedText aCharStyleFT;
ListBox aCharStyleLB;
CheckBox aApplyBorderCB;
FixedText* m_pNumberingSeparatorFT;
Edit* m_pNumberingSeparatorED;
FixedText* m_pTextText;
Edit* m_pTextEdit;
ListBox* m_pPosBox;
VclContainer* m_pNumCapt;
ListBox* m_pLbLevel;
Edit* m_pEdDelim;
VclContainer* m_pCategory;
ListBox* m_pCharStyleLB;
CheckBox* m_pApplyBorderCB;
OUString m_sSWTable;
OUString m_sSWFrame;
......
......@@ -66,7 +66,7 @@ class SW_DLLPUBLIC SwComboBox : public ComboBox
public:
SwComboBox(Window* pParent);
SwComboBox(Window* pParent, WinBits nStyle);
SwComboBox(Window* pParent, const ResId& rId);
~SwComboBox();
......
......@@ -157,8 +157,8 @@ SwInsertBookmarkDlg::~SwInsertBookmarkDlg()
{
}
BookmarkCombo::BookmarkCombo(Window* pWin)
: SwComboBox(pWin)
BookmarkCombo::BookmarkCombo(Window* pWin, WinBits nStyle)
: SwComboBox(pWin, nStyle)
{
}
......@@ -242,7 +242,7 @@ long BookmarkCombo::PreNotify( NotifyEvent& rNEvt )
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeBookmarkCombo(Window* pParent, VclBuilder::stringmap &)
{
return new BookmarkCombo(pParent);
return new BookmarkCombo(pParent, 0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -282,9 +282,7 @@
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="swuilo-SwCaptionPreview" id="preview">
<property name="width_request">200</property>
<property name="height_request">50</property>
<object class="swuilo-SwCaptionPreview" id="preview:border">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
......
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