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

convert field ref page to .ui

Change-Id: I49b4ee1dd058ac4d2451ff8cfe8f801cee0ba5fa
üst 45cb9295
......@@ -365,6 +365,9 @@
<glade-widget-class title="Tab List" name="svtlo-SvTabListBox"
generic-name="Tab List" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Tooltip Tree List" name="swuilo-SwFldRefTreeListBox"
generic-name="Tooltip Tree List" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Checked Tree List" name="svxlo-SvxCheckListBox"
generic-name="Checked Tree List" parent="GtkTreeView"
icon-name="widget-gtk-treeview"/>
......
......@@ -102,7 +102,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/envelp/labfmt.src \
sw/source/ui/envelp/mailmrge.src \
sw/source/ui/fldui/flddb.src \
sw/source/ui/fldui/fldref.src \
sw/source/ui/fldui/fldtdlg.src \
sw/source/ui/fldui/fldui.src \
sw/source/ui/fldui/fldvar.src \
......
......@@ -93,6 +93,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/flddocinfopage \
sw/uiconfig/swriter/ui/flddocumentpage \
sw/uiconfig/swriter/ui/fldfuncpage \
sw/uiconfig/swriter/ui/fldrefpage \
sw/uiconfig/swriter/ui/formatsectiondialog \
sw/uiconfig/swriter/ui/formattablepage \
sw/uiconfig/swriter/ui/footendnotedialog \
......
......@@ -136,7 +136,6 @@
#define HID_MULTI_TOX_DLG "SW_HID_MULTI_TOX_DLG"
#define HID_GLBLTREE_EDIT_LINK "SW_HID_GLBLTREE_EDIT_LINK"
#define HID_FORMAT_NAME_OBJECT_NAME "SW_HID_FORMAT_NAME_OBJECT_NAME"
#define HID_REFSELECTION_TOOLTIP "SW_HID_REFSELECTION_TOOLTIP" // #i83479#
// TabPage Help-IDs
......
......@@ -21,17 +21,21 @@
#include <FldRefTreeListBox.hxx>
#include <helpid.h>
#include <vcl/builder.hxx>
#include <vcl/help.hxx>
SwFldRefTreeListBox::SwFldRefTreeListBox( Window* pParent,
const ResId& rResId)
: SvTreeListBox( pParent, rResId )
SwFldRefTreeListBox::SwFldRefTreeListBox(Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
{
SetHelpId( HID_REFSELECTION_TOOLTIP );
}
SwFldRefTreeListBox::~SwFldRefTreeListBox()
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwFldRefTreeListBox(Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinStyle = WB_TABSTOP;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
return new SwFldRefTreeListBox(pParent, nWinStyle);
}
void SwFldRefTreeListBox::RequestHelp( const HelpEvent& rHEvt )
......
......@@ -27,10 +27,7 @@ protected:
virtual void RequestHelp( const HelpEvent& rHEvt );
public:
SwFldRefTreeListBox(Window* pParent, const ResId& rResId);
virtual ~SwFldRefTreeListBox();
// virtual long GetTabPos( SvTreeListEntry*, SvLBoxTab* );
SwFldRefTreeListBox(Window* pParent, WinBits nStyle);
};
#endif
......
......@@ -65,6 +65,11 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pParent, const SfxItemSet& rCoreSet)
m_pSelectionLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
long nWidth = m_pTypeTLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
m_pTypeTLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
m_pTypeTLB->SetSelectionMode(SINGLE_SELECTION);
m_pTypeTLB->SetStyle(m_pTypeTLB->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
m_pTypeTLB->SetIndent(10);
......
......@@ -61,6 +61,11 @@ SwFldDokPage::SwFldDokPage(Window* pParent, const SfxItemSet& rCoreSet )
m_pSelectionLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
m_pNumFormatLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, NumFormatHdl));
......
......@@ -73,6 +73,14 @@ SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet)
get(m_pListNameFT, "listnameft");
get(m_pListNameED, "listname");
long nHeight = m_pTypeLB->GetTextHeight() * 20;
m_pTypeLB->set_height_request(nHeight);
m_pFormatLB->set_height_request(nHeight);
long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
m_pTypeLB->set_width_request(nWidth);
m_pFormatLB->set_width_request(nWidth);
m_pNameED->SetModifyHdl(LINK(this, SwFldFuncPage, ModifyHdl));
m_sOldValueFT = m_pValueFT->GetText();
......
This diff is collapsed.
......@@ -35,24 +35,22 @@ class SwTxtNode;
class SwFldRefPage : public SwFldPage
{
FixedText aTypeFT;
ListBox aTypeLB;
FixedText aSelectionFT;
ListBox aSelectionLB;
ListBox* m_pTypeLB;
VclContainer* m_pSelection;
ListBox* m_pSelectionLB;
// #i83479#
SwFldRefTreeListBox aSelectionToolTipLB;
FixedText aFormatFT;
ListBox aFormatLB;
FixedText aNameFT;
Edit aNameED;
FixedText aValueFT;
Edit aValueED;
const String sBookmarkTxt;
const String sFootnoteTxt;
const String sEndnoteTxt;
SwFldRefTreeListBox* m_pSelectionToolTipLB;
VclContainer* m_pFormat;
ListBox* m_pFormatLB;
FixedText* m_pNameFT;
Edit* m_pNameED;
Edit* m_pValueED;
OUString sBookmarkTxt;
OUString sFootnoteTxt;
OUString sEndnoteTxt;
// #i83479#
const String sHeadingTxt;
const String sNumItemTxt;
OUString sHeadingTxt;
OUString sNumItemTxt;
IDocumentOutlineNodes::tSortedOutlineNodeList maOutlineNodes;
IDocumentListItems::tSortedNodeNumList maNumItems;
......
/* -*- 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 "globals.hrc"
#include "fldtdlg.hrc"
#include "helpid.h"
TabPage TP_FLD_REF
{
HelpID = HID_FLD_REF ;
SVLook = TRUE ;
Hide = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
FixedText FT_REFTYPE
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 76 , 8 ) ;
Text [ en-US ] = "~Type" ;
Left = TRUE ;
};
ListBox LB_REFTYPE
{
HelpID = "sw:ListBox:TP_FLD_REF:LB_REFTYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 76 , 73 ) ;
TabStop = TRUE ;
AutoHScroll = TRUE ;
};
FixedText FT_REFSELECTION
{
Pos = MAP_APPFONT ( 88 , 3 ) ;
Size = MAP_APPFONT ( 76 , 8 ) ;
Text [ en-US ] = "S~election" ;
Left = TRUE ;
};
ListBox LB_REFSELECTION
{
HelpID = "sw:ListBox:TP_FLD_REF:LB_REFSELECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 14 ) ;
Size = MAP_APPFONT ( 166 , 136 ) ;
TabStop = TRUE ;
Sort = TRUE ;
};
/* TreeListBox in order to have tool tips - shares window position and size with LB_REFSELECTION */
Control LB_REFSELECTION_TOOLTIP
{
HelpID = HID_REFSELECTION_TOOLTIP ;
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 14 ) ;
Size = MAP_APPFONT ( 166 , 136 ) ;
TabStop = TRUE ;
};
FixedText FT_REFFORMAT
{
Pos = MAP_APPFONT ( 6 , 93 ) ;
Size = MAP_APPFONT ( 76 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "Insert ~reference to" ;
};
ListBox LB_REFFORMAT
{
HelpID = "sw:ListBox:TP_FLD_REF:LB_REFFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 104 ) ;
Size = MAP_APPFONT ( 76 , 75 ) ;
TabStop = TRUE ;
DropDown = FALSE ;
// Sort = TRUE;
};
FixedText FT_REFNAME
{
Pos = MAP_APPFONT ( 88 , 155 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
Left = TRUE ;
Text [ en-US ] = "Na~me" ;
};
Edit ED_REFNAME
{
HelpID = "sw:Edit:TP_FLD_REF:ED_REFNAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 167 ) ;
Size = MAP_APPFONT ( 80 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
};
FixedText FT_REFVALUE
{
Pos = MAP_APPFONT ( 174 , 155 ) ;
Size = MAP_APPFONT ( 80 , 8 ) ;
Text [ en-US ] = "~Value" ;
Disable = TRUE ;
Left = TRUE ;
};
Edit ED_REFVALUE
{
HelpID = "sw:Edit:TP_FLD_REF:ED_REFVALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 174 , 167 ) ;
Size = MAP_APPFONT ( 80 , 12 ) ;
TabStop = TRUE ;
Disable = TRUE ;
Left = TRUE ;
};
String STR_REFBOOKMARK
{
Text [ en-US ] = "Bookmarks" ;
};
String STR_REFFOOTNOTE
{
Text [ en-US ] = "Footnotes" ;
};
String STR_REFENDNOTE
{
Text [ en-US ] = "Endnotes" ;
};
String STR_REFHEADING
{
Text [ en-US ] = "Headings" ;
};
String STR_REFNUMITEM
{
Text [ en-US ] = "Numbered Paragraphs" ;
};
Text [ en-US ] = "Cross-references" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -20,6 +20,8 @@
#ifndef _FLDTDLG_HRC
#define _FLDTDLG_HRC
#define FIELD_COLUMN_WIDTH 76
#define RC_FLDTDLG_BEGIN 0
// database field TabPage:
......@@ -66,27 +68,7 @@
#define BT_VARDELETE (RC_TP_VAR_START + 20)
#define RC_TP_VAR_END (RC_TP_VAR_START + 21)
// Reference-TabPage:
#define RC_TP_REF_START (RC_TP_VAR_END)
#define FT_REFTYPE (RC_TP_REF_START + 1)
#define LB_REFTYPE (RC_TP_REF_START + 2)
#define FT_REFSELECTION (RC_TP_REF_START + 3)
#define LB_REFSELECTION (RC_TP_REF_START + 4)
#define LB_REFSELECTION_TOOLTIP (RC_TP_REF_START + 5)
#define LB_REFFORMAT (RC_TP_REF_START + 6)
#define FT_REFFORMAT (RC_TP_REF_START + 7)
#define FT_REFNAME (RC_TP_REF_START + 8)
#define ED_REFNAME (RC_TP_REF_START + 9)
#define FT_REFVALUE (RC_TP_REF_START + 10)
#define ED_REFVALUE (RC_TP_REF_START + 11)
#define STR_REFBOOKMARK (RC_TP_REF_START + 12)
#define STR_REFFOOTNOTE (RC_TP_REF_START + 13)
#define STR_REFENDNOTE (RC_TP_REF_START + 14)
#define STR_REFHEADING (RC_TP_REF_START + 15)
#define STR_REFNUMITEM (RC_TP_REF_START + 16)
#define RC_TP_REF_END (RC_TP_REF_START + 17)
#define RC_TP_END (RC_TP_REF_END)
#define RC_TP_END (RC_TP_VAR_END)
// Strings ------------------------------------------------------------------
......
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