diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-14 19:05:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-14 20:30:12 +0100 |
commit | bfb2266c9241bad140ce3b0f0c6dbeab638e947e (patch) | |
tree | 9bc97ceeb80e2c8d607ff442b8a99404c04066fb /sw | |
parent | 084ac2bfcb37a15d16abfca9e13db3829f89a28e (diff) |
convert env format page to .ui
Change-Id: Ie69237d0c51508f08ec87441e5776e80d5d88bee
Diffstat (limited to 'sw')
-rw-r--r-- | sw/AllLangResTarget_sw.mk | 1 | ||||
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/inc/helpid.h | 1 | ||||
-rw-r--r-- | sw/source/ui/envelp/envfmt.cxx | 362 | ||||
-rw-r--r-- | sw/source/ui/envelp/envfmt.hrc | 73 | ||||
-rw-r--r-- | sw/source/ui/envelp/envfmt.hxx | 38 | ||||
-rw-r--r-- | sw/source/ui/envelp/envfmt.src | 281 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/envaddresspage.ui | 5 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/envformatpage.ui | 669 |
9 files changed, 849 insertions, 582 deletions
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk index c847ef765268..0876fc25f5e5 100644 --- a/sw/AllLangResTarget_sw.mk +++ b/sw/AllLangResTarget_sw.mk @@ -97,7 +97,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\ sw/source/ui/docvw/access.src \ sw/source/ui/docvw/docvw.src \ sw/source/ui/envelp/envelp.src \ - sw/source/ui/envelp/envfmt.src \ sw/source/ui/envelp/envlop.src \ sw/source/ui/envelp/envprt.src \ sw/source/ui/envelp/label.src \ diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 4cd027344b85..36bfc1fa8040 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -86,6 +86,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/editsectiondialog \ sw/uiconfig/swriter/ui/endnotepage \ sw/uiconfig/swriter/ui/envaddresspage \ + sw/uiconfig/swriter/ui/envformatpage \ sw/uiconfig/swriter/ui/envprinterpage \ sw/uiconfig/swriter/ui/exchangedatabases \ sw/uiconfig/swriter/ui/formatsectiondialog \ diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 6af945cd6c68..e28e4d1b998b 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -144,7 +144,6 @@ #define HID_FRM_STD "SW_HID_FRM_STD" #define HID_GRF_EXT "SW_HID_GRF_EXT" -#define HID_ENV_FMT "SW_HID_ENV_FMT" #define HID_COND_COLL "SW_HID_COND_COLL" #define HID_FLD_DB "SW_HID_FLD_DB" diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index e49a991d0a7c..25265be7e757 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -41,8 +41,6 @@ #include <poolfmt.hxx> #include <uitool.hxx> -#include <envfmt.hrc> - #include <vector> #include <algorithm> @@ -116,89 +114,66 @@ namespace swui SwAbstractDialogFactory * GetFactory(); } -static PopupMenu *pMenu; static long lUserW = 5669; // 10 cm static long lUserH = 5669; // 10 cm -SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) : - - SfxTabPage(pParent, SW_RES(TP_ENV_FMT), rSet), - - aAddrFL (this, SW_RES( FL_ADDRESSEE )), - aAddrPosInfo (this, SW_RES( TXT_ADDR_POS )), - aAddrLeftText (this, SW_RES( TXT_ADDR_LEFT )), - aAddrLeftField (this, SW_RES( FLD_ADDR_LEFT )), - aAddrTopText (this, SW_RES( TXT_ADDR_TOP )), - aAddrTopField (this, SW_RES( FLD_ADDR_TOP )), - aAddrFormatInfo (this, SW_RES( TXT_ADDR_FORMAT )), - aAddrEditButton (this, SW_RES( BTN_ADDR_EDIT )), - aSendFL (this, SW_RES( FL_SENDER )), - aSendPosInfo (this, SW_RES( TXT_SEND_POS )), - aSendLeftText (this, SW_RES( TXT_SEND_LEFT )), - aSendLeftField (this, SW_RES( FLD_SEND_LEFT )), - aSendTopText (this, SW_RES( TXT_SEND_TOP )), - aSendTopField (this, SW_RES( FLD_SEND_TOP )), - aSendFormatInfo (this, SW_RES( TXT_SEND_FORMAT )), - aSendEditButton (this, SW_RES( BTN_SEND_EDIT )), - aSizeFL (this, SW_RES( FL_SIZE )), - aSizeFormatText (this, SW_RES( TXT_SIZE_FORMAT )), - aSizeFormatBox (this, SW_RES( BOX_SIZE_FORMAT )), - aSizeWidthText (this, SW_RES( TXT_SIZE_WIDTH )), - aSizeWidthField (this, SW_RES( FLD_SIZE_WIDTH )), - aSizeHeightText (this, SW_RES( TXT_SIZE_HEIGHT )), - aSizeHeightField (this, SW_RES( FLD_SIZE_HEIGHT )), - aPreview (this, SW_RES( WIN_PREVIEW )) - +SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) + : SfxTabPage(pParent, "EnvFormatPage", + "modules/swriter/ui/envformatpage.ui", rSet) { - FreeResource(); + get(m_pAddrLeftField, "leftaddr"); + get(m_pAddrTopField, "topaddr"); + get(m_pSendLeftField,"leftsender"); + get(m_pSendTopField, "topsender"); + get(m_pSizeFormatBox, "format"); + get(m_pSizeWidthField, "width"); + get(m_pSizeHeightField, "height"); + get(m_pPreview, "preview"); + get(m_pAddrEditButton, "addredit"); + get(m_pSendEditButton, "senderedit"); SetExchangeSupport(); // Metrics FieldUnit aMetric = ::GetDfltMetric(sal_False); - SetMetric(aAddrLeftField, aMetric); - SetMetric(aAddrTopField, aMetric); - SetMetric(aSendLeftField, aMetric); - SetMetric(aSendTopField, aMetric); - SetMetric(aSizeWidthField, aMetric); - SetMetric(aSizeHeightField, aMetric); - - // Hook in Menues - ::pMenu = new PopupMenu(SW_RES(MNU_EDIT)); - aAddrEditButton.SetPopupMenu(::pMenu); - aSendEditButton.SetPopupMenu(::pMenu); + SetMetric(*m_pAddrLeftField, aMetric); + SetMetric(*m_pAddrTopField, aMetric); + SetMetric(*m_pSendLeftField, aMetric); + SetMetric(*m_pSendTopField, aMetric); + SetMetric(*m_pSizeWidthField, aMetric); + SetMetric(*m_pSizeHeightField, aMetric); // Install handlers Link aLk = LINK(this, SwEnvFmtPage, ModifyHdl); - aAddrLeftField .SetUpHdl( aLk ); - aAddrTopField .SetUpHdl( aLk ); - aSendLeftField .SetUpHdl( aLk ); - aSendTopField .SetUpHdl( aLk ); - aSizeWidthField .SetUpHdl( aLk ); - aSizeHeightField.SetUpHdl( aLk ); - - aAddrLeftField .SetDownHdl( aLk ); - aAddrTopField .SetDownHdl( aLk ); - aSendLeftField .SetDownHdl( aLk ); - aSendTopField .SetDownHdl( aLk ); - aSizeWidthField .SetDownHdl( aLk ); - aSizeHeightField.SetDownHdl( aLk ); - - aAddrLeftField .SetLoseFocusHdl( aLk ); - aAddrTopField .SetLoseFocusHdl( aLk ); - aSendLeftField .SetLoseFocusHdl( aLk ); - aSendTopField .SetLoseFocusHdl( aLk ); - aSizeWidthField .SetLoseFocusHdl( aLk ); - aSizeHeightField.SetLoseFocusHdl( aLk ); + m_pAddrLeftField->SetUpHdl( aLk ); + m_pAddrTopField->SetUpHdl( aLk ); + m_pSendLeftField->SetUpHdl( aLk ); + m_pSendTopField->SetUpHdl( aLk ); + m_pSizeWidthField->SetUpHdl( aLk ); + m_pSizeHeightField->SetUpHdl( aLk ); + + m_pAddrLeftField->SetDownHdl( aLk ); + m_pAddrTopField->SetDownHdl( aLk ); + m_pSendLeftField->SetDownHdl( aLk ); + m_pSendTopField->SetDownHdl( aLk ); + m_pSizeWidthField->SetDownHdl( aLk ); + m_pSizeHeightField->SetDownHdl( aLk ); + + m_pAddrLeftField->SetLoseFocusHdl( aLk ); + m_pAddrTopField->SetLoseFocusHdl( aLk ); + m_pSendLeftField->SetLoseFocusHdl( aLk ); + m_pSendTopField->SetLoseFocusHdl( aLk ); + m_pSizeWidthField->SetLoseFocusHdl( aLk ); + m_pSizeHeightField->SetLoseFocusHdl( aLk ); aLk = LINK(this, SwEnvFmtPage, EditHdl ); - aAddrEditButton.SetSelectHdl( aLk ); - aSendEditButton.SetSelectHdl( aLk ); + m_pAddrEditButton->SetSelectHdl( aLk ); + m_pSendEditButton->SetSelectHdl( aLk ); - aPreview.SetBorderStyle( WINDOW_BORDER_MONO ); + m_pPreview->SetBorderStyle( WINDOW_BORDER_MONO ); - aSizeFormatBox .SetSelectHdl(LINK(this, SwEnvFmtPage, FormatHdl)); + m_pSizeFormatBox->SetSelectHdl(LINK(this, SwEnvFmtPage, FormatHdl)); - // aSizeFormatBox + // m_pSizeFormatBox for (sal_uInt16 i = PAPER_A3; i <= PAPER_KAI32BIG; i++) { if (i != PAPER_USER) @@ -208,60 +183,53 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) : sal_uInt16 nPos = 0; bool bFound = false; - while (nPos < aSizeFormatBox.GetEntryCount() && !bFound) + while (nPos < m_pSizeFormatBox->GetEntryCount() && !bFound) { - aEntryName = aSizeFormatBox.GetEntry(i); + aEntryName = m_pSizeFormatBox->GetEntry(i); if (aEntryName < aPaperName) nPos++; else bFound = true; } - aSizeFormatBox.InsertEntry(aPaperName, nPos); + m_pSizeFormatBox->InsertEntry(aPaperName, nPos); aIDs.insert( aIDs.begin() + nPos, (sal_uInt16) i); } } - aSizeFormatBox.InsertEntry(SvxPaperInfo::GetName(PAPER_USER)); + m_pSizeFormatBox->InsertEntry(SvxPaperInfo::GetName(PAPER_USER)); aIDs.push_back( (sal_uInt16) PAPER_USER ); } -SwEnvFmtPage::~SwEnvFmtPage() -{ - aAddrEditButton.SetPopupMenu(0); - aSendEditButton.SetPopupMenu(0); - delete ::pMenu; -} - IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit ) { - long lWVal = static_cast< long >(GetFldVal(aSizeWidthField )); - long lHVal = static_cast< long >(GetFldVal(aSizeHeightField)); + long lWVal = static_cast< long >(GetFldVal(*m_pSizeWidthField )); + long lHVal = static_cast< long >(GetFldVal(*m_pSizeHeightField)); long lWidth = std::max(lWVal, lHVal); long lHeight = std::min(lWVal, lHVal); - if (pEdit == &aSizeWidthField || pEdit == &aSizeHeightField) + if (pEdit == m_pSizeWidthField || pEdit == m_pSizeHeightField) { Paper ePaper = SvxPaperInfo::GetSvxPaper( Size(lHeight, lWidth), MAP_TWIP, sal_True); for (sal_uInt16 i = 0; i < (sal_uInt16)aIDs.size(); i++) if (aIDs[i] == (sal_uInt16)ePaper) - aSizeFormatBox.SelectEntryPos(i); + m_pSizeFormatBox->SelectEntryPos(i); // remember user size - if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (sal_uInt16)PAPER_USER) + if (aIDs[m_pSizeFormatBox->GetSelectEntryPos()] == (sal_uInt16)PAPER_USER) { lUserW = lWidth ; lUserH = lHeight; } - aSizeFormatBox.GetSelectHdl().Call(&aSizeFormatBox); + m_pSizeFormatBox->GetSelectHdl().Call(m_pSizeFormatBox); } else { FillItem(GetParentSwEnvDlg()->aEnvItem); SetMinMax(); - aPreview.Invalidate(); + m_pPreview->Invalidate(); } return 0; } @@ -273,93 +241,89 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) OSL_ENSURE(pSh, "Shell missing"); // determine collection-ptr - bool bSender = pButton != &aAddrEditButton; + bool bSender = pButton != m_pAddrEditButton; SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >( bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS)); OSL_ENSURE(pColl, "Text collection missing"); - switch (pButton->GetCurItemId()) + OString sIdent(pButton->GetCurItemIdent()); + + if (sIdent == "character") { - case MID_CHAR: - { - SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender); + SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender); - // In order for the background color not to get ironed over: - SfxAllItemSet aTmpSet(*pCollSet); - ::ConvertAttrCharToGen(aTmpSet, CONV_ATTR_ENV); + // In order for the background color not to get ironed over: + SfxAllItemSet aTmpSet(*pCollSet); + ::ConvertAttrCharToGen(aTmpSet, CONV_ATTR_ENV); - SwAbstractDialogFactory* pFact = swui::GetFactory(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); + SwAbstractDialogFactory* pFact = swui::GetFactory(); + OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - const String sFmtStr = pColl->GetName(); - SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_CHAR_ENV, &sFmtStr); - OSL_ENSURE(pDlg, "Dialogdiet fail!"); - if (pDlg->Execute() == RET_OK) - { - SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() ); - ::ConvertAttrGenToChar(aOutputSet, CONV_ATTR_ENV); - pCollSet->Put(aOutputSet); - } - delete pDlg; - } - break; - - case MID_PARA: + const String sFmtStr = pColl->GetName(); + SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_CHAR_ENV, &sFmtStr); + OSL_ENSURE(pDlg, "Dialogdiet fail!"); + if (pDlg->Execute() == RET_OK) { - SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender); + SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() ); + ::ConvertAttrGenToChar(aOutputSet, CONV_ATTR_ENV); + pCollSet->Put(aOutputSet); + } + delete pDlg; + } + else if (sIdent == "paragraph") + { + SfxItemSet *pCollSet = GetCollItemSet(pColl, bSender); - // In order for the tabulators not to get ironed over: - SfxAllItemSet aTmpSet(*pCollSet); + // In order for the tabulators not to get ironed over: + SfxAllItemSet aTmpSet(*pCollSet); - // Insert tabs, default tabs into ItemSet - const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&) - pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP); + // Insert tabs, default tabs into ItemSet + const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&) + pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP); - sal_uInt16 nDefDist = ::GetTabDist( rDefTabs ); - SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist ); - aTmpSet.Put( aDefDistItem ); + sal_uInt16 nDefDist = ::GetTabDist( rDefTabs ); + SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist ); + aTmpSet.Put( aDefDistItem ); - // Current tab - SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 ); - aTmpSet.Put( aTabPos ); + // Current tab + SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 ); + aTmpSet.Put( aTabPos ); - // left border as offset - const long nOff = ((SvxLRSpaceItem&)aTmpSet.Get( RES_LR_SPACE )). - GetTxtLeft(); - SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff ); - aTmpSet.Put( aOff ); + // left border as offset + const long nOff = ((SvxLRSpaceItem&)aTmpSet.Get( RES_LR_SPACE )). + GetTxtLeft(); + SfxInt32Item aOff( SID_ATTR_TABSTOP_OFFSET, nOff ); + aTmpSet.Put( aOff ); - // set BoxInfo - ::PrepareBoxInfo( aTmpSet, *pSh ); + // set BoxInfo + ::PrepareBoxInfo( aTmpSet, *pSh ); - const String sFmtStr = pColl->GetName(); - SwParaDlg *pDlg = new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr); + const String sFmtStr = pColl->GetName(); + SwParaDlg *pDlg = new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr); - if ( pDlg->Execute() == RET_OK ) + if ( pDlg->Execute() == RET_OK ) + { + // maybe relocate defaults + const SfxPoolItem* pItem = 0; + SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet(); + sal_uInt16 nNewDist; + + if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, + sal_False, &pItem ) && + nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) + { + SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); + MakeDefTabs( nNewDist, aDefTabs ); + pSh->SetDefault( aDefTabs ); + pOutputSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS ); + } + if( pOutputSet->Count() ) { - // maybe relocate defaults - const SfxPoolItem* pItem = 0; - SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet(); - sal_uInt16 nNewDist; - - if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, - sal_False, &pItem ) && - nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) ) - { - SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); - MakeDefTabs( nNewDist, aDefTabs ); - pSh->SetDefault( aDefTabs ); - pOutputSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS ); - } - if( pOutputSet->Count() ) - { - pCollSet->Put(*pOutputSet); - } + pCollSet->Put(*pOutputSet); } - delete pDlg; } - break; + delete pDlg; } return 0; } @@ -414,7 +378,7 @@ IMPL_LINK_NOARG(SwEnvFmtPage, FormatHdl) long lAddrFromLeft; long lAddrFromTop; - sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; + sal_uInt16 nPaper = aIDs[m_pSizeFormatBox->GetSelectEntryPos()]; if (nPaper != (sal_uInt16)PAPER_USER) { Size aSz = SvxPaperInfo::GetPaperSize((Paper)nPaper); @@ -432,56 +396,56 @@ IMPL_LINK_NOARG(SwEnvFmtPage, FormatHdl) lAddrFromLeft = lWidth / 2; lAddrFromTop = lHeight / 2; - SetFldVal(aAddrLeftField, lAddrFromLeft); - SetFldVal(aAddrTopField , lAddrFromTop ); - SetFldVal(aSendLeftField, lSendFromLeft); - SetFldVal(aSendTopField , lSendFromTop ); + SetFldVal(*m_pAddrLeftField, lAddrFromLeft); + SetFldVal(*m_pAddrTopField , lAddrFromTop ); + SetFldVal(*m_pSendLeftField, lSendFromLeft); + SetFldVal(*m_pSendTopField , lSendFromTop ); - SetFldVal(aSizeWidthField , lWidth ); - SetFldVal(aSizeHeightField, lHeight); + SetFldVal(*m_pSizeWidthField , lWidth ); + SetFldVal(*m_pSizeHeightField, lHeight); SetMinMax(); FillItem(GetParentSwEnvDlg()->aEnvItem); - aPreview.Invalidate(); + m_pPreview->Invalidate(); return 0; } void SwEnvFmtPage::SetMinMax() { - long lWVal = static_cast< long >(GetFldVal(aSizeWidthField )); - long lHVal = static_cast< long >(GetFldVal(aSizeHeightField)); + long lWVal = static_cast< long >(GetFldVal(*m_pSizeWidthField )); + long lHVal = static_cast< long >(GetFldVal(*m_pSizeHeightField)); long lWidth = std::max(lWVal, lHVal), lHeight = std::min(lWVal, lHVal); // Min and Max - aAddrLeftField.SetMin((long) 100 * (GetFldVal(aSendLeftField) + 566), FUNIT_TWIP); - aAddrLeftField.SetMax((long) 100 * (lWidth - 2 * 566), FUNIT_TWIP); - aAddrTopField .SetMin((long) 100 * (GetFldVal(aSendTopField ) + 2 * 566), FUNIT_TWIP); - aAddrTopField .SetMax((long) 100 * (lHeight - 2 * 566), FUNIT_TWIP); - aSendLeftField.SetMin((long) 100 * (566), FUNIT_TWIP); - aSendLeftField.SetMax((long) 100 * (GetFldVal(aAddrLeftField) - 566), FUNIT_TWIP); - aSendTopField .SetMin((long) 100 * (566), FUNIT_TWIP); - aSendTopField .SetMax((long) 100 * (GetFldVal(aAddrTopField ) - 2 * 566), FUNIT_TWIP); + m_pAddrLeftField->SetMin((long) 100 * (GetFldVal(*m_pSendLeftField) + 566), FUNIT_TWIP); + m_pAddrLeftField->SetMax((long) 100 * (lWidth - 2 * 566), FUNIT_TWIP); + m_pAddrTopField->SetMin((long) 100 * (GetFldVal(*m_pSendTopField ) + 2 * 566), FUNIT_TWIP); + m_pAddrTopField->SetMax((long) 100 * (lHeight - 2 * 566), FUNIT_TWIP); + m_pSendLeftField->SetMin((long) 100 * (566), FUNIT_TWIP); + m_pSendLeftField->SetMax((long) 100 * (GetFldVal(*m_pAddrLeftField) - 566), FUNIT_TWIP); + m_pSendTopField->SetMin((long) 100 * (566), FUNIT_TWIP); + m_pSendTopField->SetMax((long) 100 * (GetFldVal(*m_pAddrTopField ) - 2 * 566), FUNIT_TWIP); // First and last - aAddrLeftField.SetFirst(aAddrLeftField.GetMin()); - aAddrLeftField.SetLast (aAddrLeftField.GetMax()); - aAddrTopField .SetFirst(aAddrTopField .GetMin()); - aAddrTopField .SetLast (aAddrTopField .GetMax()); - aSendLeftField.SetFirst(aSendLeftField.GetMin()); - aSendLeftField.SetLast (aSendLeftField.GetMax()); - aSendTopField .SetFirst(aSendTopField .GetMin()); - aSendTopField .SetLast (aSendTopField .GetMax()); + m_pAddrLeftField->SetFirst(m_pAddrLeftField->GetMin()); + m_pAddrLeftField->SetLast(m_pAddrLeftField->GetMax()); + m_pAddrTopField->SetFirst(m_pAddrTopField->GetMin()); + m_pAddrTopField->SetLast(m_pAddrTopField->GetMax()); + m_pSendLeftField->SetFirst(m_pSendLeftField->GetMin()); + m_pSendLeftField->SetLast(m_pSendLeftField->GetMax()); + m_pSendTopField->SetFirst(m_pSendTopField->GetMin()); + m_pSendTopField->SetLast(m_pSendTopField->GetMax()); // Reformat fields - aAddrLeftField .Reformat(); - aAddrTopField .Reformat(); - aSendLeftField .Reformat(); - aSendTopField .Reformat(); - aSizeWidthField .Reformat(); - aSizeHeightField.Reformat(); + m_pAddrLeftField->Reformat(); + m_pAddrTopField->Reformat(); + m_pSendLeftField->Reformat(); + m_pSendTopField->Reformat(); + m_pSizeWidthField->Reformat(); + m_pSizeHeightField->Reformat(); } SfxTabPage* SwEnvFmtPage::Create(Window* pParent, const SfxItemSet& rSet) @@ -505,16 +469,16 @@ int SwEnvFmtPage::DeactivatePage(SfxItemSet* _pSet) void SwEnvFmtPage::FillItem(SwEnvItem& rItem) { - rItem.lAddrFromLeft = static_cast< sal_Int32 >(GetFldVal(aAddrLeftField)); - rItem.lAddrFromTop = static_cast< sal_Int32 >(GetFldVal(aAddrTopField )); - rItem.lSendFromLeft = static_cast< sal_Int32 >(GetFldVal(aSendLeftField)); - rItem.lSendFromTop = static_cast< sal_Int32 >(GetFldVal(aSendTopField )); + rItem.lAddrFromLeft = static_cast< sal_Int32 >(GetFldVal(*m_pAddrLeftField)); + rItem.lAddrFromTop = static_cast< sal_Int32 >(GetFldVal(*m_pAddrTopField )); + rItem.lSendFromLeft = static_cast< sal_Int32 >(GetFldVal(*m_pSendLeftField)); + rItem.lSendFromTop = static_cast< sal_Int32 >(GetFldVal(*m_pSendTopField )); - sal_uInt16 nPaper = aIDs[aSizeFormatBox.GetSelectEntryPos()]; + sal_uInt16 nPaper = aIDs[m_pSizeFormatBox->GetSelectEntryPos()]; if (nPaper == (sal_uInt16)PAPER_USER) { - long lWVal = static_cast< long >(GetFldVal(aSizeWidthField )); - long lHVal = static_cast< long >(GetFldVal(aSizeHeightField)); + long lWVal = static_cast< long >(GetFldVal(*m_pSizeWidthField )); + long lHVal = static_cast< long >(GetFldVal(*m_pSizeHeightField)); rItem.lWidth = std::max(lWVal, lHVal); rItem.lHeight = std::min(lWVal, lHVal); } @@ -543,15 +507,15 @@ void SwEnvFmtPage::Reset(const SfxItemSet& rSet) std::max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, sal_True); for (sal_uInt16 i = 0; i < (sal_uInt16) aIDs.size(); i++) if (aIDs[i] == (sal_uInt16)ePaper) - aSizeFormatBox.SelectEntryPos(i); + m_pSizeFormatBox->SelectEntryPos(i); // Metric fields - SetFldVal(aAddrLeftField, rItem.lAddrFromLeft); - SetFldVal(aAddrTopField , rItem.lAddrFromTop ); - SetFldVal(aSendLeftField, rItem.lSendFromLeft); - SetFldVal(aSendTopField , rItem.lSendFromTop ); - SetFldVal(aSizeWidthField , std::max(rItem.lWidth, rItem.lHeight)); - SetFldVal(aSizeHeightField , std::min(rItem.lWidth, rItem.lHeight)); + SetFldVal(*m_pAddrLeftField, rItem.lAddrFromLeft); + SetFldVal(*m_pAddrTopField, rItem.lAddrFromTop ); + SetFldVal(*m_pSendLeftField, rItem.lSendFromLeft); + SetFldVal(*m_pSendTopField, rItem.lSendFromTop ); + SetFldVal(*m_pSizeWidthField , std::max(rItem.lWidth, rItem.lHeight)); + SetFldVal(*m_pSizeHeightField , std::min(rItem.lWidth, rItem.lHeight)); SetMinMax(); DELETEZ(GetParentSwEnvDlg()->pSenderSet); diff --git a/sw/source/ui/envelp/envfmt.hrc b/sw/source/ui/envelp/envfmt.hrc deleted file mode 100644 index c3091ac3df6e..000000000000 --- a/sw/source/ui/envelp/envfmt.hrc +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- 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 _ENVFMT_HRC -#define _ENVFMT_HRC - -#include "envelp.hrc" - -// local resources ********************************************************* - -#define FL_ADDRESSEE 11 -#define TXT_ADDR_POS 12 -#define TXT_ADDR_LEFT 13 -#define FLD_ADDR_LEFT 14 -#define TXT_ADDR_TOP 15 -#define FLD_ADDR_TOP 16 -#define TXT_ADDR_FORMAT 17 -#define BTN_ADDR_EDIT 18 - -#define FL_SENDER 21 -#define TXT_SEND_POS 22 -#define TXT_SEND_LEFT 23 -#define FLD_SEND_LEFT 24 -#define TXT_SEND_TOP 25 -#define FLD_SEND_TOP 26 -#define TXT_SEND_FORMAT 27 -#define BTN_SEND_EDIT 28 - -#define FL_SIZE 31 -#define TXT_SIZE_FORMAT 32 -#define BOX_SIZE_FORMAT 33 -#define TXT_SIZE_WIDTH 34 -#define FLD_SIZE_WIDTH 35 -#define TXT_SIZE_HEIGHT 36 -#define FLD_SIZE_HEIGHT 37 - -#define WIN_PREVIEW 41 - - -#define MID_CHAR 1 -#define MID_PARA 2 - -// global resources ******************************************************** - -#define MNU_EDIT (RC_ENVFMT_BEGIN ) - -// overflow check ******************************************************** - -#define ENVFMT_ACT_END MNU_EDIT - -#if ENVFMT_ACT_END > RC_ENVFMT_END -#error resource overflow in #file, #line -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx index 8404a60ed3b9..d86944077b8e 100644 --- a/sw/source/ui/envelp/envfmt.hxx +++ b/sw/source/ui/envelp/envfmt.hxx @@ -32,36 +32,20 @@ class SwTxtFmtColl; class SwEnvFmtPage : public SfxTabPage { - - FixedLine aAddrFL; - FixedInfo aAddrPosInfo; - FixedText aAddrLeftText; - MetricField aAddrLeftField; - FixedText aAddrTopText; - MetricField aAddrTopField; - FixedInfo aAddrFormatInfo; - MenuButton aAddrEditButton; - FixedLine aSendFL; - FixedInfo aSendPosInfo; - FixedText aSendLeftText; - MetricField aSendLeftField; - FixedText aSendTopText; - MetricField aSendTopField; - FixedInfo aSendFormatInfo; - MenuButton aSendEditButton; - FixedLine aSizeFL; - FixedText aSizeFormatText; - ListBox aSizeFormatBox; - FixedText aSizeWidthText; - MetricField aSizeWidthField; - FixedText aSizeHeightText; - MetricField aSizeHeightField; - SwEnvPreview aPreview; + MetricField* m_pAddrLeftField; + MetricField* m_pAddrTopField; + MenuButton* m_pAddrEditButton; + MetricField* m_pSendLeftField; + MetricField* m_pSendTopField; + MenuButton* m_pSendEditButton; + ListBox* m_pSizeFormatBox; + MetricField* m_pSizeWidthField; + MetricField* m_pSizeHeightField; + SwEnvPreview* m_pPreview; std::vector<sal_uInt16> aIDs; - SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet); - ~SwEnvFmtPage(); + SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet); DECL_LINK( ModifyHdl, Edit * ); DECL_LINK( EditHdl, MenuButton * ); diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src deleted file mode 100644 index e62288c831c5..000000000000 --- a/sw/source/ui/envelp/envfmt.src +++ /dev/null @@ -1,281 +0,0 @@ -/* -*- 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 "envfmt.hrc" -#include "helpid.h" - // TP_ENV_FMT --------------------------------------------------------------- -TabPage TP_ENV_FMT -{ - HelpID = HID_ENV_FMT ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE ; - FixedLine FL_ADDRESSEE - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Addressee" ; - }; - FixedText TXT_ADDR_POS - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "Position"; - }; - FixedText TXT_ADDR_LEFT - { - Pos = MAP_APPFONT ( 18 , 27 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "from left" ; - }; - MetricField FLD_ADDR_LEFT - { - HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_LEFT"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 25 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Spin = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - Minimum = 0 ; - Maximum = 10000 ; - First = 0 ; - Last = 10000 ; - SpinSize = 10 ; - Repeat = TRUE ; - }; - FixedText TXT_ADDR_TOP - { - Pos = MAP_APPFONT ( 18 , 43 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "from top" ; - }; - MetricField FLD_ADDR_TOP - { - HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_TOP"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 41 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Spin = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - Minimum = 0 ; - Maximum = 10000 ; - First = 0 ; - Last = 10000 ; - SpinSize = 10 ; - Repeat = TRUE ; - }; - FixedText TXT_ADDR_FORMAT - { - Pos = MAP_APPFONT ( 149 , 27 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "Format"; - }; - MenuButton BTN_ADDR_EDIT - { - HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_ADDR_EDIT"; - Pos = MAP_APPFONT ( 194 , 24 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Edit" ; - }; - FixedLine FL_SENDER - { - Pos = MAP_APPFONT ( 6 , 56 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Sender" ; - }; - FixedText TXT_SEND_POS - { - Pos = MAP_APPFONT ( 12 , 67 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "Position"; - }; - FixedText TXT_SEND_LEFT - { - Pos = MAP_APPFONT ( 18 , 80 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "from left" ; - }; - MetricField FLD_SEND_LEFT - { - HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_LEFT"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 78 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Spin = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - Minimum = 0 ; - Maximum = 10000 ; - First = 0 ; - Last = 10000 ; - SpinSize = 10 ; - Repeat = TRUE ; - }; - FixedText TXT_SEND_TOP - { - Pos = MAP_APPFONT ( 18 , 96 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "from top" ; - }; - MetricField FLD_SEND_TOP - { - HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_TOP"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 94 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Spin = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - Minimum = 0 ; - Maximum = 10000 ; - First = 0 ; - Last = 10000 ; - SpinSize = 10 ; - Repeat = TRUE ; - }; - FixedText TXT_SEND_FORMAT - { - Pos = MAP_APPFONT ( 149 , 80 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "Format"; - }; - MenuButton BTN_SEND_EDIT - { - HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_SEND_EDIT"; - Pos = MAP_APPFONT ( 194 , 77 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "Edit" ; - TabStop = TRUE ; - }; - FixedLine FL_SIZE - { - Pos = MAP_APPFONT ( 6 , 109 ) ; - Size = MAP_APPFONT ( 148 , 8 ) ; - Text [ en-US ] = "Size" ; - }; - FixedText TXT_SIZE_FORMAT - { - Pos = MAP_APPFONT ( 12 , 122 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Text [ en-US ] = "F~ormat" ; - Left = TRUE ; - }; - ListBox BOX_SIZE_FORMAT - { - HelpID = "sw:ListBox:TP_ENV_FMT:BOX_SIZE_FORMAT"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 120 ) ; - Size = MAP_APPFONT ( 40 , 72 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - FixedText TXT_SIZE_WIDTH - { - Pos = MAP_APPFONT ( 12 , 138 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Text [ en-US ] = "~Width" ; - Left = TRUE ; - }; - MetricField FLD_SIZE_WIDTH - { - HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_WIDTH"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 136 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Spin = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - Minimum = 500 ; - Maximum = 10000 ; - First = 500 ; - Last = 10000 ; - SpinSize = 10 ; - Repeat = TRUE ; - }; - FixedText TXT_SIZE_HEIGHT - { - Pos = MAP_APPFONT ( 12 , 154 ) ; - Size = MAP_APPFONT ( 40 , 8 ) ; - Left = TRUE ; - Text [ en-US ] = "~Height" ; - }; - MetricField FLD_SIZE_HEIGHT - { - HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_HEIGHT"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 152 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Spin = TRUE ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - Minimum = 500 ; - Maximum = 10000 ; - First = 500 ; - Last = 10000 ; - SpinSize = 10 ; - Repeat = TRUE ; - }; - Window WIN_PREVIEW - { - Border = TRUE ; - Pos = MAP_APPFONT ( 160 , 116 ) ; - Size = MAP_APPFONT ( 84 , 63 ) ; - }; -}; - // Menu ********************************************************************* -Menu MNU_EDIT -{ - ItemList = - { - MenuItem - { - IDENTIFIER = MID_CHAR ; - Text [ en-US ] = "C~haracter..." ; - }; - MenuItem - { - IDENTIFIER = MID_PARA ; - Text [ en-US ] = "P~aragraph..." ; - }; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/uiconfig/swriter/ui/envaddresspage.ui b/sw/uiconfig/swriter/ui/envaddresspage.ui index 3893f7d9bea1..ce09a4f5f643 100644 --- a/sw/uiconfig/swriter/ui/envaddresspage.ui +++ b/sw/uiconfig/swriter/ui/envaddresspage.ui @@ -344,6 +344,11 @@ <object class="swuilo-SwEnvPreview" id="preview"> <property name="visible">True</property> <property name="can_focus">False</property> + <child internal-child="accessible"> + <object class="AtkObject" id="preview-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Preview</property> + </object> + </child> </object> <packing> <property name="left_attach">2</property> diff --git a/sw/uiconfig/swriter/ui/envformatpage.ui b/sw/uiconfig/swriter/ui/envformatpage.ui new file mode 100644 index 000000000000..c2b1061b1ba1 --- /dev/null +++ b/sw/uiconfig/swriter/ui/envformatpage.ui @@ -0,0 +1,669 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkGrid" id="EnvFormatPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="row_spacing">12</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</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="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkFrame" id="frame4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <child> + <object class="GtkGrid" id="grid4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">18</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkGrid" id="grid7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkSpinButton" id="leftaddr:0.00cm"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</property> + <property name="digits">2</property> + </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="GtkSpinButton" id="topaddr:0.00cm"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</property> + <property name="digits">2</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="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">from left</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">leftaddr:0.00cm</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </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="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">from top</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">topaddr:0.00cm</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </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> + </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="GtkGrid" id="grid8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Format</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">addredit:editmenu</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="GtkButton" id="addredit:editmenu"> + <property name="label" translatable="yes">Edit</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </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> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </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> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label">Position</property> + </object> + </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">Addressee</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </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="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</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="GtkFrame" id="frame5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">18</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkGrid" id="grid5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkSpinButton" id="leftsender:0.00cm"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</property> + <property name="digits">2</property> + </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="GtkSpinButton" id="topsender:0.00cm"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustment1</property> + <property name="digits">2</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="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">from left</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">leftsender:0.00cm</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </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="GtkBox" id="box4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">12</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">from top</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">topsender:0.00cm</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </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> + </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="GtkGrid" id="grid6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Format</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">senderedit:editmenu</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="GtkButton" id="senderedit:editmenu"> + <property name="label" translatable="yes">Edit</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </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> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </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> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label">Position</property> + </object> + </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">Sender</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </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="GtkFrame" id="frame3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <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="column_spacing">12</property> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="label12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">F_ormat</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">format</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="label13"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Width</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">width:0.00cm</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="label14"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Height</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">height: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="width:0.00cm"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">start</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">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="height:0.00cm"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">start</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="GtkComboBoxText" id="format"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + </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> + </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="swuilo-SwEnvPreview" id="preview"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child internal-child="accessible"> + <object class="AtkObject" id="preview-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Preview</property> + </object> + </child> + </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> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label">Size</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </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> + </object> + <object class="GtkAdjustment" id="adjustment1"> + <property name="upper">100</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment2"> + <property name="lower">5</property> + <property name="upper">100</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkMenu" id="editmenu"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuItem" id="character"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">C_haracter...</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="paragraph"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">P_aragraph...</property> + <property name="use_underline">True</property> + </object> + </child> + </object> + <object class="GtkSizeGroup" id="sizegroup1"> + <widgets> + <widget name="leftaddr:0.00cm"/> + <widget name="topaddr:0.00cm"/> + <widget name="leftsender:0.00cm"/> + <widget name="topsender:0.00cm"/> + <widget name="width:0.00cm"/> + <widget name="height:0.00cm"/> + </widgets> + </object> + <object class="GtkSizeGroup" id="sizegroup2"> + <widgets> + <widget name="box1"/> + <widget name="box2"/> + <widget name="box3"/> + <widget name="box4"/> + <widget name="label12"/> + <widget name="label13"/> + <widget name="label14"/> + </widgets> + </object> +</interface> |