diff options
author | Prashant Pandey <prashant3.yishu@gmail.com> | 2013-06-16 18:28:03 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-06-16 21:31:38 +0200 |
commit | 0813006e76880e78200cad47baefb5b70d9b21e8 (patch) | |
tree | 2117f6e196f10b8c5117f1bdcecc1708bbc7ac8f | |
parent | 02d58eb6e07599e48d53a40be225fa31c663640a (diff) |
sidebar: Conversion to .ui for Page property panel.
Change-Id: Ie05831a6d4958b3bcef666454a4c02dfc5288fe2
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/inc/rcid.hrc | 5 | ||||
-rw-r--r-- | sw/source/ui/sidebar/PagePropertyPanel.cxx | 128 | ||||
-rw-r--r-- | sw/source/ui/sidebar/PagePropertyPanel.hrc | 107 | ||||
-rw-r--r-- | sw/source/ui/sidebar/PagePropertyPanel.hxx | 19 | ||||
-rw-r--r-- | sw/source/ui/sidebar/PagePropertyPanel.src | 459 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/sidebarpage.ui | 249 |
7 files changed, 526 insertions, 442 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 7cf200e26e66..a5e5101dfc4c 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -109,6 +109,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/renameobjectdialog \ sw/uiconfig/swriter/ui/rowheight \ sw/uiconfig/swriter/ui/saveashtmldialog \ + sw/uiconfig/swriter/ui/sidebarpage \ sw/uiconfig/swriter/ui/sortdialog \ sw/uiconfig/swriter/ui/splittable \ sw/uiconfig/swriter/ui/statisticsinfopage \ diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc index 78fa83a7afde..c841e2c6342a 100644 --- a/sw/inc/rcid.hrc +++ b/sw/inc/rcid.hrc @@ -71,6 +71,7 @@ #define RC_ANNOTATION (RC_BASE + 4150) #define RC_PAGEFRM (RC_BASE + 4250) #define RC_IDXTXT (RC_BASE + 4350) +#define RC_SIDEBAR (RC_BASE + 4450) /*-------------------------------------------------------------------- Description: areas unharness @@ -259,6 +260,10 @@ // property panel #define RC_PROPERTYPANEL_BEGIN RC_PROPERTYPANEL #define RC_PROPERTYPANEL_END (RC_PROPERTYPANEL + 10) + +// sidebar (mostly the Page one) +#define RC_SIDEBAR_BEGIN RC_SIDEBAR + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/sidebar/PagePropertyPanel.cxx b/sw/source/ui/sidebar/PagePropertyPanel.cxx index 8dc4d288f3c6..5c14cf92409e 100644 --- a/sw/source/ui/sidebar/PagePropertyPanel.cxx +++ b/sw/source/ui/sidebar/PagePropertyPanel.cxx @@ -49,6 +49,11 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/document/XUndoManagerSupplier.hpp> +const char UNO_ORIENTATION[] = ".uno:Orientation"; +const char UNO_MARGIN[] = ".uno:Margin"; +const char UNO_SIZE[] = ".uno:Size"; +const char UNO_COLUMN[] = ".uno:Column"; + #define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) namespace { @@ -98,21 +103,9 @@ PagePropertyPanel::PagePropertyPanel( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame, SfxBindings* pBindings) - : Control(pParent, SW_RES(RID_PROPERTYPANEL_SWPAGE)) + : PanelLayout(pParent, "PagePropertyPanel", "modules/swriter/ui/sidebarpage.ui", rxFrame) , mpBindings(pBindings) - // visible controls - , maFtOrientation( this, SW_RES(FT_ORIENTATION) ) - , mpToolBoxOrientationBackground( ::sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this) ) - , mpToolBoxOrientation( ::sfx2::sidebar::ControlFactory::CreateToolBox( mpToolBoxOrientationBackground.get(), SW_RES(TB_ORIENTATION)) ) - , maFtMargin( this, SW_RES(FT_MARGIN) ) - , mpToolBoxMarginBackground( ::sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this) ) - , mpToolBoxMargin( ::sfx2::sidebar::ControlFactory::CreateToolBox( mpToolBoxMarginBackground.get(), SW_RES(TB_MARGIN)) ) - , maFtSize( this, SW_RES(FT_SIZE) ) - , mpToolBoxSizeBackground( ::sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this) ) - , mpToolBoxSize( ::sfx2::sidebar::ControlFactory::CreateToolBox( mpToolBoxSizeBackground.get(), SW_RES(TB_SIZE)) ) - , maFtColumn( this, SW_RES(FT_COLUMN) ) - , mpToolBoxColumnBackground( ::sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this) ) - , mpToolBoxColumn( ::sfx2::sidebar::ControlFactory::CreateToolBox( mpToolBoxColumnBackground.get(), SW_RES(TB_COLUMN)) ) + // image resources , maImgSize (NULL) , maImgSize_L (NULL) @@ -193,68 +186,47 @@ PagePropertyPanel::PagePropertyPanel( , mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify( false ) { + // visible controls + get(mpToolBoxOrientation, "selectorientation"); + get(mpToolBoxMargin, "selectmargin"); + get(mpToolBoxSize, "selectsize"); + get(mpToolBoxColumn, "selectcolumn"); + Initialize(); mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify = true; - FreeResource(); } PagePropertyPanel::~PagePropertyPanel() { delete[] maImgSize; delete[] maImgSize_L; - - // destroy the toolbox windows. - mpToolBoxOrientation.reset(); - mpToolBoxMargin.reset(); - mpToolBoxSize.reset(); - mpToolBoxColumn.reset(); - - // destroy the background windows of the toolboxes. - mpToolBoxOrientationBackground.reset(); - mpToolBoxMarginBackground.reset(); - mpToolBoxSizeBackground.reset(); - mpToolBoxColumnBackground.reset(); } void PagePropertyPanel::Initialize() { - maFtOrientation.SetBackground(Wallpaper()); - maFtMargin.SetBackground(Wallpaper()); - maFtSize.SetBackground(Wallpaper()); - maFtColumn.SetBackground(Wallpaper()); - // popup for page orientation + const sal_uInt16 nIdOrientation = mpToolBoxOrientation->GetItemId(UNO_ORIENTATION); Link aLink = LINK( this, PagePropertyPanel, ClickOrientationHdl ); mpToolBoxOrientation->SetDropdownClickHdl( aLink ); mpToolBoxOrientation->SetSelectHdl( aLink ); - mpToolBoxOrientation->SetItemImage( TBI_ORIENTATION, mImgPortrait); - mpToolBoxOrientation->SetItemBits( TBI_ORIENTATION, mpToolBoxOrientation->GetItemBits( TBI_ORIENTATION ) | TIB_DROPDOWNONLY ); - mpToolBoxOrientation->SetQuickHelpText(TBI_ORIENTATION,String(SW_RES(STR_QHELP_TB_ORIENTATION))); - mpToolBoxOrientation->SetOutputSizePixel( mpToolBoxOrientation->CalcWindowSizePixel() ); - mpToolBoxOrientation->SetBackground( Wallpaper() ); - mpToolBoxOrientation->SetPaintTransparent( sal_True ); + mpToolBoxOrientation->SetItemImage( nIdOrientation, mImgPortrait); + mpToolBoxOrientation->SetItemBits( nIdOrientation, mpToolBoxOrientation->GetItemBits( nIdOrientation ) | TIB_DROPDOWNONLY ); // popup for page margins + const sal_uInt16 nIdMargin = mpToolBoxMargin->GetItemId(UNO_MARGIN); aLink = LINK( this, PagePropertyPanel, ClickMarginHdl ); mpToolBoxMargin->SetDropdownClickHdl( aLink ); mpToolBoxMargin->SetSelectHdl( aLink ); - mpToolBoxMargin->SetItemImage(TBI_MARGIN, mImgNormal); - mpToolBoxMargin->SetItemBits( TBI_MARGIN, mpToolBoxMargin->GetItemBits( TBI_MARGIN ) | TIB_DROPDOWNONLY ); - mpToolBoxMargin->SetQuickHelpText(TBI_MARGIN,String(SW_RES(STR_QHELP_TB_MARGIN))); - mpToolBoxMargin->SetOutputSizePixel( mpToolBoxMargin->CalcWindowSizePixel() ); - mpToolBoxMargin->SetBackground(Wallpaper()); - mpToolBoxMargin->SetPaintTransparent( sal_True ); + mpToolBoxMargin->SetItemImage(nIdMargin, mImgNormal); + mpToolBoxMargin->SetItemBits( nIdMargin, mpToolBoxMargin->GetItemBits( nIdMargin ) | TIB_DROPDOWNONLY ); // popup for page size + const sal_uInt16 nIdSize = mpToolBoxSize->GetItemId(UNO_SIZE); aLink = LINK( this, PagePropertyPanel, ClickSizeHdl ); mpToolBoxSize->SetDropdownClickHdl( aLink ); mpToolBoxSize->SetSelectHdl( aLink ); - mpToolBoxSize->SetItemImage(TBI_SIZE, mImgLetter); - mpToolBoxSize->SetItemBits( TBI_SIZE, mpToolBoxSize->GetItemBits( TBI_SIZE ) | TIB_DROPDOWNONLY ); - mpToolBoxSize->SetQuickHelpText(TBI_SIZE,String(SW_RES(STR_QHELP_TB_SIZE))); - mpToolBoxSize->SetOutputSizePixel( mpToolBoxSize->CalcWindowSizePixel() ); - mpToolBoxSize->SetBackground(Wallpaper()); - mpToolBoxSize->SetPaintTransparent( sal_True ); + mpToolBoxSize->SetItemImage(nIdSize, mImgLetter); + mpToolBoxSize->SetItemBits( nIdSize, mpToolBoxSize->GetItemBits( nIdSize ) | TIB_DROPDOWNONLY ); maImgSize = new Image[8]; maImgSize[0] = mImgA3; maImgSize[1] = mImgA4; @@ -275,15 +247,12 @@ void PagePropertyPanel::Initialize() maImgSize_L[7] = mImgLegal_L; // popup for page column property + const sal_uInt16 nIdColumn = mpToolBoxColumn->GetItemId(UNO_COLUMN); aLink = LINK( this, PagePropertyPanel, ClickColumnHdl ); mpToolBoxColumn->SetDropdownClickHdl( aLink ); mpToolBoxColumn->SetSelectHdl( aLink ); - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn1); - mpToolBoxColumn->SetItemBits( TBI_COLUMN, mpToolBoxColumn->GetItemBits( TBI_COLUMN ) | TIB_DROPDOWNONLY ); - mpToolBoxColumn->SetQuickHelpText(TBI_COLUMN,String(SW_RES(STR_QHELP_TB_COLUMN))); - mpToolBoxColumn->SetOutputSizePixel( mpToolBoxColumn->CalcWindowSizePixel() ); - mpToolBoxColumn->SetBackground(Wallpaper()); - mpToolBoxColumn->SetPaintTransparent( sal_True ); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn1); + mpToolBoxColumn->SetItemBits( nIdColumn, mpToolBoxColumn->GetItemBits( nIdColumn ) | TIB_DROPDOWNONLY ); meFUnit = GetModuleFieldUnit(); meUnit = m_aSwPagePgSizeControl.GetCoreMetric(); @@ -549,14 +518,15 @@ void PagePropertyPanel::NotifyItemUpdate( if ( eState >= SFX_ITEM_AVAILABLE && pState && pState->ISA(SvxPageItem) ) { + const sal_uInt16 nIdOrientation = mpToolBoxOrientation->GetItemId(UNO_ORIENTATION); mpPageItem.reset( static_cast<SvxPageItem*>(pState->Clone()) ); if ( mpPageItem->IsLandscape() ) { - mpToolBoxOrientation->SetItemImage(TBI_ORIENTATION, mImgLandscape); + mpToolBoxOrientation->SetItemImage(nIdOrientation, mImgLandscape); } else { - mpToolBoxOrientation->SetItemImage(TBI_ORIENTATION, mImgPortrait); + mpToolBoxOrientation->SetItemImage(nIdOrientation, mImgPortrait); } ChangeMarginImage(); ChangeSizeImage(); @@ -626,37 +596,38 @@ void PagePropertyPanel::ChangeMarginImage() } const long cTolerance = 5; + const sal_uInt16 nIdMargin = mpToolBoxMargin->GetItemId(UNO_MARGIN); if( abs(mpPageLRMarginItem->GetLeft() - SWPAGE_NARROW_VALUE) <= cTolerance && abs(mpPageLRMarginItem->GetRight() - SWPAGE_NARROW_VALUE) <= cTolerance && abs(mpPageULMarginItem->GetUpper() - SWPAGE_NARROW_VALUE) <= cTolerance && abs(mpPageULMarginItem->GetLower() - SWPAGE_NARROW_VALUE) <= cTolerance && mpPageItem->GetPageUsage() != SVX_PAGE_MIRROR ) - mpToolBoxMargin->SetItemImage( TBI_MARGIN, mpPageItem->IsLandscape() ? mImgNarrow_L : mImgNarrow ); + mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgNarrow_L : mImgNarrow ); else if( abs(mpPageLRMarginItem->GetLeft() - SWPAGE_NORMAL_VALUE) <= cTolerance && abs(mpPageLRMarginItem->GetRight() - SWPAGE_NORMAL_VALUE) <= cTolerance && abs(mpPageULMarginItem->GetUpper() - SWPAGE_NORMAL_VALUE) <= cTolerance && abs(mpPageULMarginItem->GetLower() - SWPAGE_NORMAL_VALUE) <= cTolerance && mpPageItem->GetPageUsage() != SVX_PAGE_MIRROR ) - mpToolBoxMargin->SetItemImage(TBI_MARGIN, mpPageItem->IsLandscape() ? mImgNormal_L : mImgNormal ); + mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgNormal_L : mImgNormal ); else if( abs(mpPageLRMarginItem->GetLeft() - SWPAGE_WIDE_VALUE2) <= cTolerance && abs(mpPageLRMarginItem->GetRight() - SWPAGE_WIDE_VALUE2) <= cTolerance && abs(mpPageULMarginItem->GetUpper() - SWPAGE_WIDE_VALUE1) <= cTolerance && abs(mpPageULMarginItem->GetLower() - SWPAGE_WIDE_VALUE1) <= cTolerance && mpPageItem->GetPageUsage() != SVX_PAGE_MIRROR ) - mpToolBoxMargin->SetItemImage(TBI_MARGIN, mpPageItem->IsLandscape() ? mImgWide_L : mImgWide ); + mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgWide_L : mImgWide ); else if( abs(mpPageLRMarginItem->GetLeft() - SWPAGE_WIDE_VALUE3) <= cTolerance && abs(mpPageLRMarginItem->GetRight() - SWPAGE_WIDE_VALUE1) <= cTolerance && abs(mpPageULMarginItem->GetUpper() - SWPAGE_WIDE_VALUE1) <= cTolerance && abs(mpPageULMarginItem->GetLower() - SWPAGE_WIDE_VALUE1) <= cTolerance && mpPageItem->GetPageUsage() == SVX_PAGE_MIRROR ) - mpToolBoxMargin->SetItemImage(TBI_MARGIN, mpPageItem->IsLandscape() ? mImgMirrored_L : mImgMirrored ); + mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgMirrored_L : mImgMirrored ); else - mpToolBoxMargin->SetItemImage(TBI_MARGIN, mpPageItem->IsLandscape() ? mImgMarginCustom_L : mImgMarginCustom ); + mpToolBoxMargin->SetItemImage( nIdMargin, mpPageItem->IsLandscape() ? mImgMarginCustom_L : mImgMarginCustom ); } @@ -709,14 +680,16 @@ void PagePropertyPanel::ChangeSizeImage() break; } + const sal_uInt16 nIdSize = mpToolBoxSize->GetItemId(UNO_SIZE); + if ( nImageIdx == 0 ) { - mpToolBoxSize->SetItemImage( TBI_SIZE, + mpToolBoxSize->SetItemImage( nIdSize, ( mpPageItem->IsLandscape() ? mImgSizeNone_L : mImgSizeNone ) ); } else { - mpToolBoxSize->SetItemImage( TBI_SIZE, + mpToolBoxSize->SetItemImage( nIdSize, ( mpPageItem->IsLandscape() ? maImgSize_L[nImageIdx-1] : maImgSize[nImageIdx-1] ) ); } } @@ -729,27 +702,28 @@ void PagePropertyPanel::ChangeColumnImage( const sal_uInt16 nColumnType ) return; } + const sal_uInt16 nIdColumn = mpToolBoxColumn->GetItemId(UNO_COLUMN); if ( !mpPageItem->IsLandscape() ) { switch( nColumnType ) { case 1: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn1); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn1); break; case 2: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn2); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn2); break; case 3: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn3); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn3); break; case 4: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgLeft); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgLeft); break; case 5: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgRight); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgRight); break; default: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumnNone); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumnNone); } } else @@ -757,22 +731,22 @@ void PagePropertyPanel::ChangeColumnImage( const sal_uInt16 nColumnType ) switch( nColumnType ) { case 1: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn1_L); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn1_L); break; case 2: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn2_L); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn2_L); break; case 3: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumn3_L); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn3_L); break; case 4: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgLeft_L); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgLeft_L); break; case 5: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgRight_L); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgRight_L); break; default: - mpToolBoxColumn->SetItemImage(TBI_COLUMN, mImgColumnNone_L); + mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumnNone_L); } } } diff --git a/sw/source/ui/sidebar/PagePropertyPanel.hrc b/sw/source/ui/sidebar/PagePropertyPanel.hrc index a4592ae68588..d2294bd92899 100644 --- a/sw/source/ui/sidebar/PagePropertyPanel.hrc +++ b/sw/source/ui/sidebar/PagePropertyPanel.hrc @@ -15,17 +15,55 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ + +#include <rcid.hrc> #include "PropertyPanel.hrc" -#define FT_ORIENTATION 1 -#define TB_ORIENTATION 2 -#define FT_MARGIN 3 -#define TB_MARGIN 4 -#define FT_SIZE 5 -#define TB_SIZE 6 -#define FT_COLUMN 7 -#define TB_COLUMN 8 -#define TBI_MARGIN 9 +// global definitions +#define IMG_PAGE_PORTRAIT (RC_SIDEBAR_BEGIN + 0) +#define IMG_PAGE_LANDSCAPE (RC_SIDEBAR_BEGIN + 1) +#define IMG_PAGE_NARROW (RC_SIDEBAR_BEGIN + 2) +#define IMG_PAGE_NORMAL (RC_SIDEBAR_BEGIN + 3) +#define IMG_PAGE_WIDE (RC_SIDEBAR_BEGIN + 4) +#define IMG_PAGE_MIRRORED (RC_SIDEBAR_BEGIN + 5) +#define IMG_PAGE_MARGIN_CUSTOM (RC_SIDEBAR_BEGIN + 6) +#define IMG_PAGE_NARROW_L (RC_SIDEBAR_BEGIN + 7) +#define IMG_PAGE_NORMAL_L (RC_SIDEBAR_BEGIN + 8) +#define IMG_PAGE_WIDE_L (RC_SIDEBAR_BEGIN + 9) +#define IMG_PAGE_MIRRORED_L (RC_SIDEBAR_BEGIN + 10) +#define IMG_PAGE_MARGIN_CUSTOM_L (RC_SIDEBAR_BEGIN+ 11) +#define IMG_PAGE_A3 (RC_SIDEBAR_BEGIN + 12) +#define IMG_PAGE_A4 (RC_SIDEBAR_BEGIN + 13) +#define IMG_PAGE_A5 (RC_SIDEBAR_BEGIN + 14) +#define IMG_PAGE_B4 (RC_SIDEBAR_BEGIN + 15) +#define IMG_PAGE_B5 (RC_SIDEBAR_BEGIN + 16) +#define IMG_PAGE_C5 (RC_SIDEBAR_BEGIN + 17) +#define IMG_PAGE_LETTER (RC_SIDEBAR_BEGIN + 18) +#define IMG_PAGE_LEGAL (RC_SIDEBAR_BEGIN + 19) +#define IMG_PAGE_SIZE_NONE (RC_SIDEBAR_BEGIN + 20) +#define IMG_PAGE_A3_L (RC_SIDEBAR_BEGIN + 21) +#define IMG_PAGE_A4_L (RC_SIDEBAR_BEGIN + 22) +#define IMG_PAGE_A5_L (RC_SIDEBAR_BEGIN + 23) +#define IMG_PAGE_B4_L (RC_SIDEBAR_BEGIN + 24) +#define IMG_PAGE_B5_L (RC_SIDEBAR_BEGIN + 25) +#define IMG_PAGE_C5_L (RC_SIDEBAR_BEGIN + 26) +#define IMG_PAGE_LETTER_L (RC_SIDEBAR_BEGIN + 27) +#define IMG_PAGE_LEGAL_L (RC_SIDEBAR_BEGIN + 28) +#define IMG_PAGE_SIZE_NONE_L (RC_SIDEBAR_BEGIN + 29) +#define IMG_PAGE_COLUMN_1 (RC_SIDEBAR_BEGIN + 30) +#define IMG_PAGE_COLUMN_2 (RC_SIDEBAR_BEGIN + 31) +#define IMG_PAGE_COLUMN_3 (RC_SIDEBAR_BEGIN + 32) +#define IMG_PAGE_COLUMN_LEFT (RC_SIDEBAR_BEGIN + 33) +#define IMG_PAGE_COLUMN_RIGHT (RC_SIDEBAR_BEGIN + 34) +#define IMG_PAGE_COLUMN_NONE (RC_SIDEBAR_BEGIN + 35) +#define IMG_PAGE_COLUMN_1_L (RC_SIDEBAR_BEGIN + 36) +#define IMG_PAGE_COLUMN_2_L (RC_SIDEBAR_BEGIN + 37) +#define IMG_PAGE_COLUMN_3_L (RC_SIDEBAR_BEGIN + 38) +#define IMG_PAGE_COLUMN_LEFT_L (RC_SIDEBAR_BEGIN + 39) +#define IMG_PAGE_COLUMN_RIGHT_L (RC_SIDEBAR_BEGIN + 40) +#define IMG_PAGE_COLUMN_NONE_L (RC_SIDEBAR_BEGIN + 41) + +// local #define IMG_PORTRAIT 10 #define IMG_LANDSCAPE 11 #define STR_PORTRAIT 12 @@ -38,16 +76,12 @@ #define MF_SWRIGHT_MARGIN 19 #define MF_SWTOP_MARGIN 20 #define MF_SWBOTTOM_MARGIN 21 -#define TBI_SIZE 22 #define VS_SIZE 23 #define STR_LCVALUE 24 #define FT_CUSTOM 25 #define FLD_WIDTH_HEIGHT 26 -#define TBI_ORIENTATION 28 #define VS_ORIENTATION 29 -#define IMG_PAGE_PORTRAIT 30 -#define IMG_PAGE_LANDSCAPE 31 #define IMG_NARROW 32 #define IMG_NORMAL 33 #define IMG_WIDE 34 @@ -64,7 +98,6 @@ #define FT_BOTTOM 45 #define FT_INNER 46 #define FT_OUTER 47 -#define TBI_COLUMN 48 #define VS_COLUMN 49 #define MBOX_WIDTH 50 #define IMG_ONE 51 @@ -81,51 +114,11 @@ #define CB_SIZE_MORE 61 -#define IMG_PAGE_NARROW 64 -#define IMG_PAGE_NORMAL 65 -#define IMG_PAGE_WIDE 63 -#define IMG_PAGE_MIRRORED 67 -#define IMG_PAGE_MARGIN_CUSTOM 68 -#define IMG_PAGE_A3 69 -#define IMG_PAGE_A4 70 -#define IMG_PAGE_A5 71 -#define IMG_PAGE_B4 72 -#define IMG_PAGE_B5 73 -#define IMG_PAGE_C5 74 -#define IMG_PAGE_LETTER 75 -#define IMG_PAGE_LEGAL 76 -#define IMG_PAGE_COLUMN_1 77 -#define IMG_PAGE_COLUMN_2 78 -#define IMG_PAGE_COLUMN_3 79 -#define IMG_PAGE_COLUMN_LEFT 80 -#define IMG_PAGE_COLUMN_RIGHT 81 -#define IMG_PAGE_SIZE_NONE 82 -#define IMG_PAGE_COLUMN_NONE 83 -#define IMG_PAGE_COLUMN_1_L 84 -#define IMG_PAGE_COLUMN_2_L 85 -#define IMG_PAGE_COLUMN_3_L 86 -#define IMG_PAGE_COLUMN_LEFT_L 87 -#define IMG_PAGE_COLUMN_RIGHT_L 88 -#define IMG_PAGE_COLUMN_NONE_L 89 #define IMG_ONE_L 90 #define IMG_TWO_L 91 #define IMG_THREE_L 92 #define IMG_LEFT_L 93 #define IMG_RIGHT_L 94 -#define IMG_PAGE_A3_L 95 -#define IMG_PAGE_A4_L 96 -#define IMG_PAGE_A5_L 97 -#define IMG_PAGE_B4_L 98 -#define IMG_PAGE_B5_L 99 -#define IMG_PAGE_C5_L 100 -#define IMG_PAGE_LETTER_L 101 -#define IMG_PAGE_LEGAL_L 102 -#define IMG_PAGE_SIZE_NONE_L 103 -#define IMG_PAGE_NARROW_L 104 -#define IMG_PAGE_NORMAL_L 105 -#define IMG_PAGE_WIDE_L 106 -#define IMG_PAGE_MIRRORED_L 107 -#define IMG_PAGE_MARGIN_CUSTOM_L 108 #define IMG_NARROW_L 109 #define IMG_NORMAL_L 110 #define IMG_WIDE_L 111 @@ -135,10 +128,6 @@ #define FLD_TOP_MARGIN 115 #define FLD_BOTTOM_MARGIN 116 -#define STR_QHELP_TB_ORIENTATION 117 -#define STR_QHELP_TB_MARGIN 118 -#define STR_QHELP_TB_SIZE 119 -#define STR_QHELP_TB_COLUMN 120 #define IMG_CUSTOM_DIS 121 // #define STR_MARGIN_TOOLTIP_LEFT 122 @@ -193,4 +182,4 @@ #define MARGIN_PANEL_HEIGHT POP_BORDER_Y + BD_HEIGHT + POPUP_MARGIN + OFFSET_Y #define CUST_MORE_BUTTON_IMG_OFF_X POPUPPANEL_MARGIN_HORIZONTAL + OFFSET_X -#define PAGE_HEIGHT TBX_COLUMN_Y + 20 + SECTIONPAGE_MARGIN_VERTICAL_BOT
\ No newline at end of file +#define PAGE_HEIGHT TBX_COLUMN_Y + 20 + SECTIONPAGE_MARGIN_VERTICAL_BOT diff --git a/sw/source/ui/sidebar/PagePropertyPanel.hxx b/sw/source/ui/sidebar/PagePropertyPanel.hxx index 095d07331ba7..c1f34af84756 100644 --- a/sw/source/ui/sidebar/PagePropertyPanel.hxx +++ b/sw/source/ui/sidebar/PagePropertyPanel.hxx @@ -22,6 +22,7 @@ #include <com/sun/star/document/XUndoManager.hpp> #include <svx/sidebar/Popup.hxx> +#include <svx/sidebar/PanelLayout.hxx> #include <sfx2/sidebar/ControllerItem.hxx> @@ -52,7 +53,7 @@ namespace cssu = ::com::sun::star::uno; namespace sw { namespace sidebar { class PagePropertyPanel - : public Control, + : public PanelLayout, public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface { public: @@ -109,18 +110,10 @@ namespace sw { namespace sidebar { SfxBindings* mpBindings; // toolboxes - on click open corresponding popup - FixedText maFtOrientation; - ::boost::scoped_ptr<Window> mpToolBoxOrientationBackground; - ::boost::scoped_ptr<ToolBox> mpToolBoxOrientation; - FixedText maFtMargin; - ::boost::scoped_ptr<Window> mpToolBoxMarginBackground; - ::boost::scoped_ptr<ToolBox> mpToolBoxMargin; - FixedText maFtSize; - ::boost::scoped_ptr<Window> mpToolBoxSizeBackground; - ::boost::scoped_ptr<ToolBox> mpToolBoxSize; - FixedText maFtColumn; - ::boost::scoped_ptr<Window> mpToolBoxColumnBackground; - ::boost::scoped_ptr<ToolBox> mpToolBoxColumn; + ToolBox* mpToolBoxOrientation; + ToolBox* mpToolBoxMargin; + ToolBox* mpToolBoxSize; + ToolBox* mpToolBoxColumn; Image* maImgSize; Image* maImgSize_L; diff --git a/sw/source/ui/sidebar/PagePropertyPanel.src b/sw/source/ui/sidebar/PagePropertyPanel.src index d03f2d1c432d..519758bc1349 100644 --- a/sw/source/ui/sidebar/PagePropertyPanel.src +++ b/sw/source/ui/sidebar/PagePropertyPanel.src @@ -21,300 +21,173 @@ #include "PagePropertyPanel.hrc" #include "helpid.h" -// page property panel control -Control RID_PROPERTYPANEL_SWPAGE +Image IMG_PAGE_PORTRAIT { - OutputSize = TRUE; - DialogControl = TRUE; - Border = FALSE; - Size = MAP_APPFONT( PROPERTYPAGE_WIDTH, PAGE_HEIGHT ); - HelpID = HID_PROPERTYPANEL_SWPAGE_SECTION; - Text = "Page"; - - FixedText FT_ORIENTATION - { - Pos = MAP_APPFONT ( FT_ORIENTATION_X, FT_ORIENTATION_Y ); - Size = MAP_APPFONT ( MBOX_WIDTH, TEXT_HEIGHT) ; - Text [ en-US ] = "~Orientation:"; - }; - ToolBox TB_ORIENTATION - { - Pos = MAP_APPFONT (TBX_ORIENTATION_X, TBX_ORIENTATION_Y) ; - HelpID = HID_SWPAGE_ORIENTATION; - SVLook = TRUE ; - TabStop = TRUE ; - Text = "Orientation" ; - ItemList = - { - ToolBoxItem - { - HelpID = HID_SWPAGE_TBI_ORIENTATION; - Identifier = TBI_ORIENTATION ; - Text [ en-US ] = "Orientation" ; - DropDown = TRUE ; - }; - }; - }; - String STR_QHELP_TB_ORIENTATION - { - Text [ en-US ] = "Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style."; - }; - - FixedText FT_MARGIN - { - Pos = MAP_APPFONT ( FT_MARGIN_X, FT_MARGIN_Y ); - Size = MAP_APPFONT ( MBOX_WIDTH + 50, TEXT_HEIGHT) ; - Text [ en-US ] = "~Margin:"; - }; - ToolBox TB_MARGIN - { - SVLook = TRUE ; - Pos = MAP_APPFONT (TBX_MARGIN_X, TBX_MARGIN_Y) ; - HelpID = HID_SWPAGE_MARGIN; - TabStop = TRUE ; - Text = "Margin" ; - ItemList = - { - ToolBoxItem - { - HelpID = HID_SWPAGE_TBI_MARGIN; - Identifier = TBI_MARGIN ; - Text [ en-US ] = "Margin" ; - DropDown = TRUE ; - }; - }; - }; - String STR_QHELP_TB_MARGIN - { - Text [ en-US ] = "Select the margin values for the current page style."; - }; - - FixedText FT_SIZE - { - Pos = MAP_APPFONT ( FT_SIZE_X, FT_SIZE_Y ); - Size = MAP_APPFONT ( MBOX_WIDTH, TEXT_HEIGHT) ; - Text [ en-US ] = "~Size:"; - }; - ToolBox TB_SIZE - { - SVLook = TRUE ; - Pos = MAP_APPFONT ( TBX_SIZE_X , TBX_SIZE_Y ) ; - HelpID = HID_SWPAGE_SIZE; - TabStop = TRUE ; - Text = "Size" ; - ItemList = - { - ToolBoxItem - { - HelpID = HID_SWPAGE_TBI_SIZE; - Identifier = TBI_SIZE ; - Text [ en-US ] = "Size" ; - DropDown = TRUE ; - }; - }; - }; - String STR_QHELP_TB_SIZE - { - Text [ en-US ] = "Select a predefined paper size for the current page style."; - }; - - FixedText FT_COLUMN - { - Pos = MAP_APPFONT ( FT_COLUMN_X, FT_COLUMN_Y ); - Size = MAP_APPFONT ( MBOX_WIDTH + 50, TEXT_HEIGHT) ; - Text [ en-US ] = "~Column:"; - }; - ToolBox TB_COLUMN - { - SVLook = TRUE ; - Pos = MAP_APPFONT ( TBX_COLUMN_X , TBX_COLUMN_Y ) ; - HelpID = HID_SWPAGE_COLUMN; - TabStop = TRUE ; - Text = "Column" ; - ItemList = - { - ToolBoxItem - { - HelpID = HID_SWPAGE_TBI_COLUMN; - Identifier = TBI_COLUMN; - Text [ en-US ] = "Column" ; - DropDown = TRUE ; - }; - }; - }; - String STR_QHELP_TB_COLUMN - { - Text [ en-US ] = "Select the layout and the number of columns for the current page style."; - }; - - Image IMG_PAGE_PORTRAIT - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/portraitcopy_24x24.png";}; - }; - Image IMG_PAGE_LANDSCAPE - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/Landscapecopy_24x24.png";}; - }; - Image IMG_PAGE_NARROW - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_narrow_24x24.png";}; - }; - Image IMG_PAGE_NORMAL - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_nomal_24x24.png";}; - }; - Image IMG_PAGE_WIDE - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_wide_24x24.png";}; - }; - Image IMG_PAGE_MIRRORED - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_mirror_24x24.png";}; - }; - Image IMG_PAGE_MARGIN_CUSTOM - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_copy_24x24.png";}; - }; - Image IMG_PAGE_NARROW_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatnarrow_24x24.png";}; - }; - Image IMG_PAGE_NORMAL_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatnormal_24x24.png";}; - }; - Image IMG_PAGE_WIDE_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatwide_24x24.png";}; - }; - Image IMG_PAGE_MIRRORED_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatmirror_24x24.png";}; - }; - Image IMG_PAGE_MARGIN_CUSTOM_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatcopy_24x24.png";}; - }; - Image IMG_PAGE_A3 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A3_24x24.png";}; - }; - Image IMG_PAGE_A4 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A4_24x24.png";}; - }; - Image IMG_PAGE_A5 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A5_24x24.png";}; - }; - Image IMG_PAGE_B4 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_B4_24x24.png";}; - }; - Image IMG_PAGE_B5 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_B5_24x24.png";}; - }; - Image IMG_PAGE_C5 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_C5_24x24.png";}; - }; - Image IMG_PAGE_LETTER - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";}; - }; - Image IMG_PAGE_LEGAL - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";}; - }; - Image IMG_PAGE_SIZE_NONE - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";}; - }; - Image IMG_PAGE_A3_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA3_24x24.png";}; - }; - Image IMG_PAGE_A4_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA4_24x24.png";}; - }; - Image IMG_PAGE_A5_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA5_24x24.png";}; - }; - Image IMG_PAGE_B4_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeB4_24x24.png";}; - }; - Image IMG_PAGE_B5_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeB5_24x24.png";}; - }; - Image IMG_PAGE_C5_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeC5_24x24.png";}; - }; - Image IMG_PAGE_LETTER_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";}; - }; - Image IMG_PAGE_LEGAL_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";}; - }; - Image IMG_PAGE_SIZE_NONE_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_1 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_1_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_2 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_2_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_3 - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_3_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_LEFT - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_left_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_RIGHT - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_right_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_NONE - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_copy_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_1_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column1_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_2_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column2_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_3_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column3_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_LEFT_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columnleft_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_RIGHT_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columnright_24x24.png";}; - }; - Image IMG_PAGE_COLUMN_NONE_L - { - ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columncopy_24x24.png";}; - }; + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/portraitcopy_24x24.png";}; +}; +Image IMG_PAGE_LANDSCAPE +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/Landscapecopy_24x24.png";}; +}; +Image IMG_PAGE_NARROW +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_narrow_24x24.png";}; +}; +Image IMG_PAGE_NORMAL +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_nomal_24x24.png";}; +}; +Image IMG_PAGE_WIDE +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_wide_24x24.png";}; +}; +Image IMG_PAGE_MIRRORED +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_mirror_24x24.png";}; +}; +Image IMG_PAGE_MARGIN_CUSTOM +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/format_L_copy_24x24.png";}; +}; +Image IMG_PAGE_NARROW_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatnarrow_24x24.png";}; +}; +Image IMG_PAGE_NORMAL_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatnormal_24x24.png";}; +}; +Image IMG_PAGE_WIDE_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatwide_24x24.png";}; +}; +Image IMG_PAGE_MIRRORED_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatmirror_24x24.png";}; +}; +Image IMG_PAGE_MARGIN_CUSTOM_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/formatcopy_24x24.png";}; +}; +Image IMG_PAGE_A3 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A3_24x24.png";}; +}; +Image IMG_PAGE_A4 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A4_24x24.png";}; +}; +Image IMG_PAGE_A5 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_A5_24x24.png";}; +}; +Image IMG_PAGE_B4 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_B4_24x24.png";}; +}; +Image IMG_PAGE_B5 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_B5_24x24.png";}; +}; +Image IMG_PAGE_C5 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_C5_24x24.png";}; +}; +Image IMG_PAGE_LETTER +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";}; +}; +Image IMG_PAGE_LEGAL +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";}; +}; +Image IMG_PAGE_SIZE_NONE +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsize_L_copy_24x24.png";}; +}; +Image IMG_PAGE_A3_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA3_24x24.png";}; +}; +Image IMG_PAGE_A4_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA4_24x24.png";}; +}; +Image IMG_PAGE_A5_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeA5_24x24.png";}; +}; +Image IMG_PAGE_B4_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeB4_24x24.png";}; +}; +Image IMG_PAGE_B5_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeB5_24x24.png";}; +}; +Image IMG_PAGE_C5_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizeC5_24x24.png";}; +}; +Image IMG_PAGE_LETTER_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";}; +}; +Image IMG_PAGE_LEGAL_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";}; +}; +Image IMG_PAGE_SIZE_NONE_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/documentsizecopy_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_1 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_1_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_2 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_2_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_3 +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_3_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_LEFT +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_left_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_RIGHT +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_right_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_NONE +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column_L_copy_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_1_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column1_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_2_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column2_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_3_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/column3_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_LEFT_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columnleft_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_RIGHT_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columnright_24x24.png";}; +}; +Image IMG_PAGE_COLUMN_NONE_L +{ + ImageBitmap = Bitmap{File = "sidebar/pageproppanel/columncopy_24x24.png";}; }; // popup for page orientation attribute diff --git a/sw/uiconfig/swriter/ui/sidebarpage.ui b/sw/uiconfig/swriter/ui/sidebarpage.ui new file mode 100644 index 000000000000..05fd516d70de --- /dev/null +++ b/sw/uiconfig/swriter/ui/sidebarpage.ui @@ -0,0 +1,249 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkGrid" id="PagePropertyPanel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_homogeneous">True</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkBox" id="box1"> + <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="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_bottom">30</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="orientationlabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">23</property> + <property name="label" translatable="yes">_Orientation:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkToolbar" id="selectorientation"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuToolButton" id="orientation"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes">Select the paper orientation - vertically (portrait) or horizontally (landscape) - for the current page style.</property> + <property name="action_name">.uno:Orientation</property> + <property name="label" translatable="yes">toolbutton1</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">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="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_bottom">30</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="marginlabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">37</property> + <property name="label" translatable="yes">_Margin:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkToolbar" id="selectmargin"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuToolButton" id="margin"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes">Select the margin values for the current page style.</property> + <property name="action_name">.uno:Margin</property> + <property name="label" translatable="yes">toolbutton2</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </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> + <child> + <object class="GtkBox" id="box5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="sizelabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">67</property> + <property name="label" translatable="yes">_Size:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkToolbar" id="selectsize"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuToolButton" id="size"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes">Select a predefined paper size for the current page style.</property> + <property name="margin_bottom">25</property> + <property name="action_name">.uno:Size</property> + <property name="label" translatable="yes">toolbutton3</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</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> + <child> + <object class="GtkBox" id="box6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="columnlabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">30</property> + <property name="label" translatable="yes">_Column:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkToolbar" id="selectcolumn"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuToolButton" id="column"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="tooltip_text" translatable="yes">Select the layout and the number of columns for the current page style.</property> + <property name="margin_right">15</property> + <property name="margin_bottom">25</property> + <property name="action_name">.uno:Column</property> + <property name="label" translatable="yes">toolbutton4</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </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> + </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> + </object> +</interface> |