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

convert footnote area page to .ui format

this, for non-CTL/CJK mode, completes format->page in writer to dynamic .ui
format

Change-Id: I576eed5d39807eff3c3fa775f7c4f2445f1ce940
üst 0c9f4dcd
...@@ -140,7 +140,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\ ...@@ -140,7 +140,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/misc/glossary.src \ sw/source/ui/misc/glossary.src \
sw/source/ui/misc/numberingtypelistbox.src \ sw/source/ui/misc/numberingtypelistbox.src \
sw/source/ui/misc/outline.src \ sw/source/ui/misc/outline.src \
sw/source/ui/misc/pgfnote.src \
sw/source/ui/misc/pggrid.src \ sw/source/ui/misc/pggrid.src \
sw/source/ui/misc/redlndlg.src \ sw/source/ui/misc/redlndlg.src \
sw/source/ui/misc/srtdlg.src \ sw/source/ui/misc/srtdlg.src \
......
...@@ -26,6 +26,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\ ...@@ -26,6 +26,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/exchangedatabases \ sw/uiconfig/swriter/ui/exchangedatabases \
sw/uiconfig/swriter/ui/formattablepage \ sw/uiconfig/swriter/ui/formattablepage \
sw/uiconfig/swriter/ui/footnotepage \ sw/uiconfig/swriter/ui/footnotepage \
sw/uiconfig/swriter/ui/footnoteareapage \
sw/uiconfig/swriter/ui/indexentry \ sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/insertbookmark \ sw/uiconfig/swriter/ui/insertbookmark \
sw/uiconfig/swriter/ui/insertbreak \ sw/uiconfig/swriter/ui/insertbreak \
......
...@@ -151,7 +151,6 @@ ...@@ -151,7 +151,6 @@
#define HID_FRM_EXT "SW_HID_FRM_EXT" #define HID_FRM_EXT "SW_HID_FRM_EXT"
#define HID_FRM_STD "SW_HID_FRM_STD" #define HID_FRM_STD "SW_HID_FRM_STD"
#define HID_GRF_EXT "SW_HID_GRF_EXT" #define HID_GRF_EXT "SW_HID_GRF_EXT"
#define HID_FOOTNOTE_PAGE "SW_HID_FOOTNOTE_PAGE"
#define HID_LAB_LAB "SW_HID_LAB_LAB" #define HID_LAB_LAB "SW_HID_LAB_LAB"
#define HID_LAB_PRT "SW_HID_LAB_PRT" #define HID_LAB_PRT "SW_HID_LAB_PRT"
#define HID_ENV_PRT "SW_HID_ENV_PRT" #define HID_ENV_PRT "SW_HID_ENV_PRT"
......
...@@ -44,26 +44,17 @@ private: ...@@ -44,26 +44,17 @@ private:
SwFootNotePage(Window *pParent, const SfxItemSet &rSet); SwFootNotePage(Window *pParent, const SfxItemSet &rSet);
~SwFootNotePage(); ~SwFootNotePage();
FixedLine aPosHeader; RadioButton* m_pMaxHeightPageBtn;
RadioButton aMaxHeightPageBtn; RadioButton* m_pMaxHeightBtn;
RadioButton aMaxHeightBtn; MetricField* m_pMaxHeightEdit;
MetricField aMaxHeightEdit; MetricField* m_pDistEdit;
FixedText aDistLbl;
MetricField aDistEdit; ListBox* m_pLinePosBox;
LineListBox* m_pLineTypeBox;
FixedLine aLineHeader; MetricField* m_pLineWidthEdit;
FixedText aLinePosLbl; ColorListBox* m_pLineColorBox;
ListBox aLinePosBox; MetricField* m_pLineLengthEdit;
FixedText aLineTypeLbl; MetricField* m_pLineDistEdit;
LineListBox aLineTypeBox;
FixedText aLineWidthLbl;
MetricField aLineWidthEdit;
FixedText aLineColorLbl;
ColorListBox aLineColorBox;
FixedText aLineLengthLbl;
MetricField aLineLengthEdit;
FixedText aLineDistLbl;
MetricField aLineDistEdit;
DECL_LINK(HeightPage, void *); DECL_LINK(HeightPage, void *);
DECL_LINK(HeightMetric, void *); DECL_LINK(HeightMetric, void *);
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include <globals.hrc> #include <globals.hrc>
#include <misc.hrc> #include <misc.hrc>
#include <pgfnote.hrc>
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -56,7 +55,7 @@ static sal_uInt16 aPageRg[] = { ...@@ -56,7 +55,7 @@ static sal_uInt16 aPageRg[] = {
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
IMPL_LINK_NOARG_INLINE_START(SwFootNotePage, HeightPage) IMPL_LINK_NOARG_INLINE_START(SwFootNotePage, HeightPage)
{ {
aMaxHeightEdit.Enable(sal_False); m_pMaxHeightEdit->Enable(sal_False);
return 0; return 0;
} }
IMPL_LINK_NOARG_INLINE_END(SwFootNotePage, HeightPage) IMPL_LINK_NOARG_INLINE_END(SwFootNotePage, HeightPage)
...@@ -64,8 +63,8 @@ IMPL_LINK_NOARG_INLINE_END(SwFootNotePage, HeightPage) ...@@ -64,8 +63,8 @@ IMPL_LINK_NOARG_INLINE_END(SwFootNotePage, HeightPage)
IMPL_LINK_NOARG_INLINE_START(SwFootNotePage, HeightMetric) IMPL_LINK_NOARG_INLINE_START(SwFootNotePage, HeightMetric)
{ {
aMaxHeightEdit.Enable(); m_pMaxHeightEdit->Enable();
aMaxHeightEdit.GrabFocus(); m_pMaxHeightEdit->GrabFocus();
return 0; return 0;
} }
IMPL_LINK_NOARG_INLINE_END(SwFootNotePage, HeightMetric) IMPL_LINK_NOARG_INLINE_END(SwFootNotePage, HeightMetric)
...@@ -75,21 +74,21 @@ IMPL_LINK_NOARG_INLINE_END(SwFootNotePage, HeightMetric) ...@@ -75,21 +74,21 @@ IMPL_LINK_NOARG_INLINE_END(SwFootNotePage, HeightMetric)
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
IMPL_LINK_NOARG(SwFootNotePage, HeightModify) IMPL_LINK_NOARG(SwFootNotePage, HeightModify)
{ {
aMaxHeightEdit.SetMax(aMaxHeightEdit.Normalize(lMaxHeight - m_pMaxHeightEdit->SetMax(m_pMaxHeightEdit->Normalize(lMaxHeight -
(aDistEdit.Denormalize(aDistEdit.GetValue(FUNIT_TWIP)) + (m_pDistEdit->Denormalize(m_pDistEdit->GetValue(FUNIT_TWIP)) +
aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP)))), m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP)))),
FUNIT_TWIP); FUNIT_TWIP);
if(aMaxHeightEdit.GetValue() < 0) if(m_pMaxHeightEdit->GetValue() < 0)
aMaxHeightEdit.SetValue(0); m_pMaxHeightEdit->SetValue(0);
aDistEdit.SetMax(aDistEdit.Normalize(lMaxHeight - m_pDistEdit->SetMax(m_pDistEdit->Normalize(lMaxHeight -
(aMaxHeightEdit.Denormalize(aMaxHeightEdit.GetValue(FUNIT_TWIP)) + (m_pMaxHeightEdit->Denormalize(m_pMaxHeightEdit->GetValue(FUNIT_TWIP)) +
aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP)))), m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP)))),
FUNIT_TWIP); FUNIT_TWIP);
if(aDistEdit.GetValue() < 0) if(m_pDistEdit->GetValue() < 0)
aDistEdit.SetValue(0); m_pDistEdit->SetValue(0);
aLineDistEdit.SetMax(aLineDistEdit.Normalize(lMaxHeight - m_pLineDistEdit->SetMax(m_pLineDistEdit->Normalize(lMaxHeight -
(aMaxHeightEdit.Denormalize(aMaxHeightEdit.GetValue(FUNIT_TWIP)) + (m_pMaxHeightEdit->Denormalize(m_pMaxHeightEdit->GetValue(FUNIT_TWIP)) +
aDistEdit.Denormalize(aDistEdit.GetValue(FUNIT_TWIP)))), m_pDistEdit->Denormalize(m_pDistEdit->GetValue(FUNIT_TWIP)))),
FUNIT_TWIP); FUNIT_TWIP);
return 0; return 0;
} }
...@@ -97,57 +96,44 @@ IMPL_LINK_NOARG(SwFootNotePage, HeightModify) ...@@ -97,57 +96,44 @@ IMPL_LINK_NOARG(SwFootNotePage, HeightModify)
IMPL_LINK_NOARG(SwFootNotePage, LineWidthChanged_Impl) IMPL_LINK_NOARG(SwFootNotePage, LineWidthChanged_Impl)
{ {
sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue( sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
aLineWidthEdit.GetValue( ), m_pLineWidthEdit->GetValue( ),
aLineWidthEdit.GetDecimalDigits( ), m_pLineWidthEdit->GetDecimalDigits( ),
aLineWidthEdit.GetUnit(), MAP_TWIP )); m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
aLineTypeBox.SetWidth( nVal ); m_pLineTypeBox->SetWidth( nVal );
return 0; return 0;
} }
IMPL_LINK_NOARG(SwFootNotePage, LineColorSelected_Impl) IMPL_LINK_NOARG(SwFootNotePage, LineColorSelected_Impl)
{ {
aLineTypeBox.SetColor( aLineColorBox.GetSelectEntryColor() ); m_pLineTypeBox->SetColor( m_pLineColorBox->GetSelectEntryColor() );
return 0; return 0;
} }
// CTOR / DTOR ----------------------------------------------------------- SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "FootnoteAreaPage",
SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) : "modules/swriter/ui/footnoteareapage.ui", rSet)
{
SfxTabPage(pParent, SW_RES(TP_FOOTNOTE_PAGE), rSet), get(m_pMaxHeightPageBtn, "maxheightpage");
aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)), get(m_pMaxHeightBtn, "maxheight");
aMaxHeightPageBtn(this, SW_RES(RB_MAXHEIGHT_PAGE)), get(m_pMaxHeightEdit, "maxheightsb");
aMaxHeightBtn(this, SW_RES(RB_MAXHEIGHT)), get(m_pDistEdit, "spacetotext");
aMaxHeightEdit(this, SW_RES(ED_MAXHEIGHT)),
aDistLbl(this, SW_RES(FT_DIST)), get(m_pLinePosBox, "position");
aDistEdit(this, SW_RES(ED_DIST)), get(m_pLineTypeBox, "style");
get(m_pLineWidthEdit, "thickness");
aLineHeader(this, SW_RES(FL_LINE)), get(m_pLineColorBox, "color");
aLinePosLbl(this, SW_RES(FT_LINEPOS)), get(m_pLineLengthEdit, "length");
aLinePosBox(this, SW_RES(DLB_LINEPOS)), get(m_pLineDistEdit, "spacingtocontents");
aLineTypeLbl(this, SW_RES(FT_LINETYPE)),
aLineTypeBox(this, SW_RES(DLB_LINETYPE)),
aLineWidthLbl(this, SW_RES(FT_LINEWIDTH)),
aLineWidthEdit(this, SW_RES(ED_LINEWIDTH)),
aLineColorLbl(this, SW_RES(FT_LINECOLOR)),
aLineColorBox(this, SW_RES(DLB_LINECOLOR)),
aLineLengthLbl(this, SW_RES(FT_LINELENGTH)),
aLineLengthEdit(this, SW_RES(ED_LINELENGTH)),
aLineDistLbl(this, SW_RES(FT_LINEDIST)),
aLineDistEdit(this, SW_RES(ED_LINEDIST))
{
FreeResource();
SetExchangeSupport(); SetExchangeSupport();
FieldUnit aMetric = ::GetDfltMetric(sal_False); FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric( aMaxHeightEdit, aMetric ); SetMetric(*m_pMaxHeightEdit, aMetric);
SetMetric( aDistEdit, aMetric ); SetMetric(*m_pDistEdit, aMetric);
SetMetric( aLineDistEdit, aMetric ); SetMetric(*m_pLineDistEdit, aMetric);
MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134; long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134;
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(nHeightValue),FUNIT_TWIP); m_pMaxHeightEdit->SetValue(m_pMaxHeightEdit->Normalize(nHeightValue),FUNIT_TWIP);
aMaxHeightEdit.SetAccessibleRelationLabeledBy(&aMaxHeightBtn);
} }
SwFootNotePage::~SwFootNotePage() SwFootNotePage::~SwFootNotePage()
...@@ -180,44 +166,44 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) ...@@ -180,44 +166,44 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
SwTwips lHeight = pFtnInfo->GetHeight(); SwTwips lHeight = pFtnInfo->GetHeight();
if(lHeight) if(lHeight)
{ {
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(lHeight),FUNIT_TWIP); m_pMaxHeightEdit->SetValue(m_pMaxHeightEdit->Normalize(lHeight),FUNIT_TWIP);
aMaxHeightBtn.Check(sal_True); m_pMaxHeightBtn->Check(sal_True);
} }
else else
{ {
aMaxHeightPageBtn.Check(sal_True); m_pMaxHeightPageBtn->Check(sal_True);
aMaxHeightEdit.Enable(sal_False); m_pMaxHeightEdit->Enable(sal_False);
} }
aMaxHeightPageBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightPage)); m_pMaxHeightPageBtn->SetClickHdl(LINK(this,SwFootNotePage,HeightPage));
aMaxHeightBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightMetric)); m_pMaxHeightBtn->SetClickHdl(LINK(this,SwFootNotePage,HeightMetric));
Link aLk = LINK(this, SwFootNotePage, HeightModify); Link aLk = LINK(this, SwFootNotePage, HeightModify);
aMaxHeightEdit.SetLoseFocusHdl( aLk ); m_pMaxHeightEdit->SetLoseFocusHdl( aLk );
aDistEdit.SetLoseFocusHdl( aLk ); m_pDistEdit->SetLoseFocusHdl( aLk );
aLineDistEdit.SetLoseFocusHdl( aLk ); m_pLineDistEdit->SetLoseFocusHdl( aLk );
// Separator width // Separator width
aLineWidthEdit.SetModifyHdl( LINK( this, SwFootNotePage, LineWidthChanged_Impl ) ); m_pLineWidthEdit->SetModifyHdl( LINK( this, SwFootNotePage, LineWidthChanged_Impl ) );
sal_Int64 nWidthPt = static_cast<sal_Int64>(MetricField::ConvertDoubleValue( sal_Int64 nWidthPt = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
sal_Int64( pFtnInfo->GetLineWidth() ), aLineWidthEdit.GetDecimalDigits(), sal_Int64( pFtnInfo->GetLineWidth() ), m_pLineWidthEdit->GetDecimalDigits(),
MAP_TWIP, aLineWidthEdit.GetUnit( ) )); MAP_TWIP, m_pLineWidthEdit->GetUnit( ) ));
aLineWidthEdit.SetValue( nWidthPt ); m_pLineWidthEdit->SetValue( nWidthPt );
// Separator style // Separator style
aLineTypeBox.SetSourceUnit( FUNIT_TWIP ); m_pLineTypeBox->SetSourceUnit( FUNIT_TWIP );
aLineTypeBox.SetNone(SW_RESSTR(SW_STR_NONE)); m_pLineTypeBox->SetNone(SW_RESSTR(SW_STR_NONE));
aLineTypeBox.InsertEntry( m_pLineTypeBox->InsertEntry(
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::SOLID), ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::SOLID),
table::BorderLineStyle::SOLID ); table::BorderLineStyle::SOLID );
aLineTypeBox.InsertEntry( m_pLineTypeBox->InsertEntry(
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DOTTED), ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DOTTED),
table::BorderLineStyle::DOTTED ); table::BorderLineStyle::DOTTED );
aLineTypeBox.InsertEntry( m_pLineTypeBox->InsertEntry(
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DASHED), ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DASHED),
table::BorderLineStyle::DASHED ); table::BorderLineStyle::DASHED );
aLineTypeBox.SetWidth( pFtnInfo->GetLineWidth( ) ); m_pLineTypeBox->SetWidth( pFtnInfo->GetLineWidth( ) );
aLineTypeBox.SelectEntry( pFtnInfo->GetLineStyle() ); m_pLineTypeBox->SelectEntry( pFtnInfo->GetLineStyle() );
// Separator Color // Separator Color
SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxObjectShell* pDocSh = SfxObjectShell::Current();
...@@ -236,39 +222,39 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) ...@@ -236,39 +222,39 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
if ( pColorList.is() ) if ( pColorList.is() )
{ {
aLineColorBox.SetUpdateMode( sal_False ); m_pLineColorBox->SetUpdateMode( sal_False );
for ( long i = 0; i < pColorList->Count(); ++i ) for ( long i = 0; i < pColorList->Count(); ++i )
{ {
XColorEntry* pEntry = pColorList->GetColor(i); XColorEntry* pEntry = pColorList->GetColor(i);
aLineColorBox.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); m_pLineColorBox->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
} }
aLineColorBox.SetUpdateMode( sal_True ); m_pLineColorBox->SetUpdateMode( sal_True );
} }
// select color in the list or add it as a user color // select color in the list or add it as a user color
sal_uInt16 nSelPos = aLineColorBox.GetEntryPos( pFtnInfo->GetLineColor() ); sal_uInt16 nSelPos = m_pLineColorBox->GetEntryPos( pFtnInfo->GetLineColor() );
if( nSelPos == LISTBOX_ENTRY_NOTFOUND ) if( nSelPos == LISTBOX_ENTRY_NOTFOUND )
nSelPos = aLineColorBox.InsertEntry( pFtnInfo->GetLineColor(), nSelPos = m_pLineColorBox->InsertEntry( pFtnInfo->GetLineColor(),
String( SW_RES( RID_SVXSTR_COLOR_USER ) ) ); String( SW_RES( RID_SVXSTR_COLOR_USER ) ) );
aLineColorBox.SetSelectHdl( LINK( this, SwFootNotePage, LineColorSelected_Impl ) ); m_pLineColorBox->SetSelectHdl( LINK( this, SwFootNotePage, LineColorSelected_Impl ) );
aLineColorBox.SelectEntryPos( nSelPos ); m_pLineColorBox->SelectEntryPos( nSelPos );
aLineTypeBox.SetColor( pFtnInfo->GetLineColor() ); m_pLineTypeBox->SetColor( pFtnInfo->GetLineColor() );
// position // position
aLinePosBox.SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) ); m_pLinePosBox->SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) );
// width // width
Fraction aTmp( 100, 1 ); Fraction aTmp( 100, 1 );
aTmp *= pFtnInfo->GetWidth(); aTmp *= pFtnInfo->GetWidth();
aLineLengthEdit.SetValue( static_cast<long>(aTmp) ); m_pLineLengthEdit->SetValue( static_cast<long>(aTmp) );
// gap footnote area // gap footnote area
aDistEdit.SetValue(aDistEdit.Normalize(pFtnInfo->GetTopDist()),FUNIT_TWIP); m_pDistEdit->SetValue(m_pDistEdit->Normalize(pFtnInfo->GetTopDist()),FUNIT_TWIP);
aLineDistEdit.SetValue( m_pLineDistEdit->SetValue(
aLineDistEdit.Normalize(pFtnInfo->GetBottomDist()), FUNIT_TWIP); m_pLineDistEdit->Normalize(pFtnInfo->GetBottomDist()), FUNIT_TWIP);
ActivatePage( rSet ); ActivatePage( rSet );
delete pDefFtnInfo; delete pDefFtnInfo;
} }
...@@ -284,36 +270,36 @@ sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet) ...@@ -284,36 +270,36 @@ sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet)
SwPageFtnInfo &rFtnInfo = aItem.GetPageFtnInfo(); SwPageFtnInfo &rFtnInfo = aItem.GetPageFtnInfo();
// footnote area's height // footnote area's height
if(aMaxHeightBtn.IsChecked()) if(m_pMaxHeightBtn->IsChecked())
rFtnInfo.SetHeight( static_cast< SwTwips >( rFtnInfo.SetHeight( static_cast< SwTwips >(
aMaxHeightEdit.Denormalize(aMaxHeightEdit.GetValue(FUNIT_TWIP)))); m_pMaxHeightEdit->Denormalize(m_pMaxHeightEdit->GetValue(FUNIT_TWIP))));
else else
rFtnInfo.SetHeight(0); rFtnInfo.SetHeight(0);
// gap footnote area // gap footnote area
rFtnInfo.SetTopDist( static_cast< SwTwips >( rFtnInfo.SetTopDist( static_cast< SwTwips >(
aDistEdit.Denormalize(aDistEdit.GetValue(FUNIT_TWIP)))); m_pDistEdit->Denormalize(m_pDistEdit->GetValue(FUNIT_TWIP))));
rFtnInfo.SetBottomDist( static_cast< SwTwips >( rFtnInfo.SetBottomDist( static_cast< SwTwips >(
aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP)))); m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP))));
// Separator style // Separator style
rFtnInfo.SetLineStyle( ::editeng::SvxBorderStyle( aLineTypeBox.GetSelectEntryStyle() ) ); rFtnInfo.SetLineStyle( ::editeng::SvxBorderStyle( m_pLineTypeBox->GetSelectEntryStyle() ) );
// Separator width // Separator width
long nWidth = static_cast<long>(MetricField::ConvertDoubleValue( long nWidth = static_cast<long>(MetricField::ConvertDoubleValue(
aLineWidthEdit.GetValue( ), m_pLineWidthEdit->GetValue( ),
aLineWidthEdit.GetDecimalDigits( ), m_pLineWidthEdit->GetDecimalDigits( ),
aLineWidthEdit.GetUnit(), MAP_TWIP )); m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
rFtnInfo.SetLineWidth( nWidth ); rFtnInfo.SetLineWidth( nWidth );
// Separator color // Separator color
rFtnInfo.SetLineColor( aLineColorBox.GetSelectEntryColor() ); rFtnInfo.SetLineColor( m_pLineColorBox->GetSelectEntryColor() );
// Position // Position
rFtnInfo.SetAdj((SwFtnAdj)aLinePosBox.GetSelectEntryPos()); rFtnInfo.SetAdj((SwFtnAdj)m_pLinePosBox->GetSelectEntryPos());
// Breite // Breite
rFtnInfo.SetWidth(Fraction( static_cast< long >(aLineLengthEdit.GetValue()), 100)); rFtnInfo.SetWidth(Fraction( static_cast< long >(m_pLineLengthEdit->GetValue()), 100));
const SfxPoolItem* pOldItem; const SfxPoolItem* pOldItem;
if(0 == (pOldItem = GetOldItem( rSet, FN_PARAM_FTN_INFO )) || if(0 == (pOldItem = GetOldItem( rSet, FN_PARAM_FTN_INFO )) ||
......
/* -*- 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 RB_MAXHEIGHT_PAGE 1
#define RB_MAXHEIGHT 2
#define ED_MAXHEIGHT 3
#define FT_DIST 4
#define ED_DIST 5
#define FL_FOOTNOTE_SIZE 10
#define FT_LINETYPE 20
#define DLB_LINETYPE 21
#define FT_LINEPOS 22
#define DLB_LINEPOS 23
#define FT_LINELENGTH 24
#define ED_LINELENGTH 25
#define FT_LINEDIST 26
#define ED_LINEDIST 27
#define FL_LINE 30
#define FT_LINEWIDTH 31
#define ED_LINEWIDTH 32
#define FT_LINECOLOR 33
#define DLB_LINECOLOR 34
/* 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 "globals.hrc"
#include "pgfnote.hrc"
#include "helpid.h"
TabPage TP_FOOTNOTE_PAGE
{
HelpID = HID_FOOTNOTE_PAGE ;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
Hide = TRUE;
RadioButton RB_MAXHEIGHT_PAGE
{
HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT_PAGE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 132 , 10 ) ;
Text [ en-US ] = "~Not larger than page area" ;
TabStop = TRUE ;
Group = TRUE ;
};
RadioButton RB_MAXHEIGHT
{
HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 132 , 10 ) ;
Text [ en-US ] = "Maximum footnote ~height" ;
};
MetricField ED_MAXHEIGHT
{
HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_MAXHEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 26 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
TabStop = TRUE ;
Group = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 50 ;
Maximum = 99999 ;
DecimalDigits = 2 ;
Value = 200 ;
Unit = FUNIT_CM ;
First = 10 ;
Last = 99999 ;
SpinSize = 10 ;
};
FixedText FT_DIST
{
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 132 , 8 ) ;
Text [ en-US ] = "Space to text" ;
Left = TRUE ;
};
MetricField ED_DIST
{
HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_DIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 42 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 999 ;
DecimalDigits = 2 ;
Value = 10 ;
Unit = FUNIT_CM ;
First = 5 ;
Last = 99999 ;
SpinSize = 10 ;
};
FixedLine FL_FOOTNOTE_SIZE
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Footnote area" ;
};
FixedText FT_LINEPOS
{
Pos = MAP_APPFONT ( 12 , 73 ) ;
Size = MAP_APPFONT ( 132 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "~Position" ;
};
ListBox DLB_LINEPOS
{
HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINEPOS";
Pos = MAP_APPFONT ( 148 , 71 ) ;
Size = MAP_APPFONT ( 57 , 40 ) ;
TabStop = TRUE ;
Group = TRUE ;
DropDown = TRUE ;
CurPos = 0 ;
StringList [ en-US ] =
{
< "Left" ; Default ; > ;
< "Centered" ; Default ; > ;
< "Right" ; Default ; > ;
};
};
FixedText FT_LINETYPE
{
Pos = MAP_APPFONT ( 12 , 89 ) ;
Size = MAP_APPFONT ( 132 , 8 ) ;
Group = TRUE ;
Left = TRUE ;
Text [ en-US ] = "~Style" ;
};
ListBox DLB_LINETYPE
{
HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINETYPE";
Pos = MAP_APPFONT ( 148 , 87 ) ;
Size = MAP_APPFONT ( 57 , 50 ) ;
TabStop = TRUE ;
Group = TRUE ;
DropDown = TRUE ;
};
FixedText FT_LINEWIDTH
{
Pos = MAP_APPFONT ( 12 , 105 ) ;
Size = MAP_APPFONT ( 132 , 8 ) ;
Group = TRUE ;
Left = TRUE ;
Text [ en-US ] = "~Thickness" ;
};
MetricField ED_LINEWIDTH
{
HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEWIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 103 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
Spin = TRUE ;
Repeat = TRUE ;
SpinSize = 25 ;
First = 25 ;
Last = 900 ;
Maximum = 900 ;
Minimum = 25 ;
DecimalDigits = 2 ;
Unit = FUNIT_POINT ;
TabStop = TRUE ;
Left = TRUE ;
};
FixedText FT_LINECOLOR
{
Pos = MAP_APPFONT ( 12 , 121 ) ;
Size = MAP_APPFONT ( 132 , 8 ) ;
Group = TRUE ;
Left = TRUE ;
Text [ en-US ] = "~Color" ;
};
ListBox DLB_LINECOLOR
{
Pos = MAP_APPFONT ( 148 , 119 ) ;
Size = MAP_APPFONT ( 57 , 50 ) ;
TabStop = TRUE ;
Group = TRUE ;
DropDown = TRUE ;
DDExtraWidth = TRUE ;
Border = TRUE ;
};
FixedText FT_LINELENGTH
{
Pos = MAP_APPFONT ( 12 , 137 ) ;
Size = MAP_APPFONT ( 132 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "~Length" ;
};
MetricField ED_LINELENGTH
{
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 135 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
Value = 100 ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
First = 10 ;
Last = 100 ;
};
FixedText FT_LINEDIST
{
Pos = MAP_APPFONT ( 12 , 153 ) ;
Size = MAP_APPFONT ( 132 , 8 ) ;
Text [ en-US ] = "~Spacing to footnote contents" ;
Left = TRUE ;
};
MetricField ED_LINEDIST
{
HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEDIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 151 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 999 ;
DecimalDigits = 2 ;
Value = 10 ;
Unit = FUNIT_CM ;
First = 5 ;
Last = 99999 ;
SpinSize = 10 ;
};
FixedLine FL_LINE
{
Pos = MAP_APPFONT ( 6 , 60 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Separator line" ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">0.5</property>
<property name="upper">999.99000000000001</property>
<property name="value">2</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">999</property>
<property name="value">0.10000000000000001</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
<property name="lower">0.25</property>
<property name="upper">9</property>
<property name="value">0.25</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment4">
<property name="upper">100</property>
<property name="value">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment5">
<property name="upper">999.99000000000001</property>
<property name="value">0.10000000000000001</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkBox" id="FootnoteAreaPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkRadioButton" id="maxheightpage">
<property name="label" translatable="yes">_Not larger than page area</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">maxheight</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="maxheight">
<property name="label" translatable="yes">Maximum footnote _height</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">maxheightpage</property>
<accessibility>
<relation type="label-for" target="maxheightsb:0.00cm"/>
</accessibility>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Space to text</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">spacetotext:0.00cm</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spacetotext:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="maxheightsb:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment1</property>
<property name="digits">2</property>
<accessibility>
<relation type="labelled-by" target="maxheight"/>
</accessibility>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Footnote area</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Position</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">position</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Style</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">style</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Thickness</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">thickness:0.00pt</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Color</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">color</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Length</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">length:0%</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Spacing to footnote contents</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">spacingtocontents:0.00cm</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="position">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<items>
<item translatable="yes">Left</item>
<item translatable="yes">Centered</item>
<item translatable="yes">Right</item>
</items>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="svtlo-LineListBox" id="style">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="svtlo-ColorListBox" id="color">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="length:0%">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
<property name="adjustment">adjustment4</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spacingtocontents:0.00cm">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
<property name="adjustment">adjustment5</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="thickness:0.00pt">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment3</property>
<property name="digits">2</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Separator line</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<widgets>
<widget name="spacetotext:0.00cm"/>
<widget name="maxheightsb:0.00cm"/>
<widget name="position"/>
<widget name="style"/>
<widget name="color"/>
<widget name="length:0%"/>
<widget name="spacingtocontents:0.00cm"/>
<widget name="thickness:0.00pt"/>
</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