diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-12-19 12:33:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-12-19 15:23:15 +0000 |
commit | ae4f2c72b7a93085025859cbf1698651831e1b44 (patch) | |
tree | e143b83aedd425f9d3513424bc49a95a7f163612 | |
parent | 8c2da9a4ba786b08d1aa07e01060bbf1eb9f167f (diff) |
split out custom properties info page and convert to .ui
The CustomPropertiesWindow could be converted to something that inherits from
one of the new containers and remove a load of that custom positioning code but
for now just minimally retro-fit the existing manual position setting code of
the custom scrolling widget.
Change-Id: I6c85286f3652a11bf8c8d827c4986b5b9d745523
-rw-r--r-- | sfx2/inc/sfx2/dinfdlg.hxx | 46 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfx.hrc | 1 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 163 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.hrc | 21 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.src | 134 | ||||
-rw-r--r-- | sfx2/source/inc/helpid.hrc | 3 | ||||
-rw-r--r-- | sfx2/source/inc/sfxlocal.hrc | 1 | ||||
-rw-r--r-- | sfx2/uiconfig/ui/custominfopage.ui | 55 |
8 files changed, 198 insertions, 226 deletions
diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx index 3bd64daee6a9..94f196a605ba 100644 --- a/sfx2/inc/sfx2/dinfdlg.hxx +++ b/sfx2/inc/sfx2/dinfdlg.hxx @@ -23,18 +23,23 @@ #include "sfx2/dllapi.h" #include <com/sun/star/util/DateTime.hpp> -#include <vcl/edit.hxx> -#include <vcl/field.hxx> -#include <svtools/stdctrl.hxx> +#include <com/sun/star/util/Duration.hpp> + #include <svl/stritem.hxx> +#include <svl/zforlist.hxx> + +#include <svtools/headbar.hxx> +#include <svtools/stdctrl.hxx> #include <svtools/svmedit.hxx> +#include <unotools/syslocale.hxx> + +#include <vcl/edit.hxx> +#include <vcl/field.hxx> +#include <vcl/layout.hxx> #include <vcl/lstbox.hxx> #include <vcl/scrbar.hxx> -#include <svtools/headbar.hxx> -#include <unotools/syslocale.hxx> -#include <svl/zforlist.hxx> -#include <com/sun/star/util/Duration.hpp> + #include "tabdlg.hxx" namespace com { namespace sun { namespace star { @@ -478,7 +483,10 @@ private: void ValidateLine( CustomPropertyLine* pLine, bool bIsFromTypeBox ); public: - CustomPropertiesWindow( Window* pParent, const ResId& rResId ); + CustomPropertiesWindow(Window* pParent, + const OUString &rHeaderAccName, + const OUString &rHeaderAccType, + const OUString &rHeaderAccValue); ~CustomPropertiesWindow(); void InitControls( HeaderBar* pHeaderBar, const ScrollBar* pScrollBar ); @@ -492,16 +500,20 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetCustomProperties() const; void SetRemovedHdl( const Link& rLink ) { m_aRemovedHdl = rLink; } + + void InitRemoveButton(const ScrollBar &rScrollBar); + void updateLineWidth(); }; // class CustomPropertiesControl ----------------------------------------- -class CustomPropertiesControl : public Control +class CustomPropertiesControl : public VclVBox { private: - HeaderBar m_aHeaderBar; - CustomPropertiesWindow m_aPropertiesWin; - ScrollBar m_aVertScroll; + HeaderBar* m_pHeaderBar; + VclHBox* m_pBody; + CustomPropertiesWindow* m_pPropertiesWin; + ScrollBar* m_pVertScroll; sal_Int32 m_nThumbPos; @@ -509,16 +521,18 @@ private: DECL_LINK( RemovedHdl, void* ); public: - CustomPropertiesControl( Window* pParent, const ResId& rResId ); + CustomPropertiesControl(Window* pParent); ~CustomPropertiesControl(); void AddLine( const ::rtl::OUString& sName, com::sun::star::uno::Any& rAny, bool bInteractive ); - inline bool AreAllLinesValid() const { return m_aPropertiesWin.AreAllLinesValid(); } - inline void ClearAllLines() { m_aPropertiesWin.ClearAllLines(); } + inline bool AreAllLinesValid() const { return m_pPropertiesWin->AreAllLinesValid(); } + inline void ClearAllLines() { m_pPropertiesWin->ClearAllLines(); } inline ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetCustomProperties() const - { return m_aPropertiesWin.GetCustomProperties(); } + { return m_pPropertiesWin->GetCustomProperties(); } + void Init(VclBuilderContainer& rParent); + virtual void setAllocation(const Size &rAllocation); }; // class SfxCustomPropertiesPage ----------------------------------------- diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc index cd1ecdc05d15..cb31562a25ec 100644 --- a/sfx2/inc/sfx2/sfx.hrc +++ b/sfx2/inc/sfx2/sfx.hrc @@ -132,7 +132,6 @@ #define TP_DOCINFODESC (RID_SFX_START+3) #define TP_DOCINFODOC (RID_SFX_START+4) -#define TP_DOCINFOUSER (RID_SFX_START+5) #define TP_DOCINFORELOAD (RID_SFX_START+13) #define TP_CUSTOMPROPERTIES (RID_SFX_START+14) #define TP_DOCINFOSECURITY (RID_SFX_START+215) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index d83528116f31..6de396d7d8da 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1698,10 +1698,11 @@ void CustomPropertyLine::SetRemoved() m_aRemoveButton.Hide(); } -// class CustomPropertiesWindow ------------------------------------------ -CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rResId ) : - - Window( pParent, rResId ), +CustomPropertiesWindow::CustomPropertiesWindow(Window* pParent, + const OUString &rHeaderAccName, + const OUString &rHeaderAccType, + const OUString &rHeaderAccValue) : + Window(pParent), m_aNameBox ( this, SfxResId( SFX_CB_PROPERTY_NAME ) ), m_aTypeBox ( this, SfxResId( SFX_LB_PROPERTY_TYPE ) ), m_aValueEdit ( this, SfxResId( SFX_ED_PROPERTY_VALUE ) ), @@ -1721,10 +1722,9 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR m_aBoxLoseFocusTimer.SetTimeout( 300 ); m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) ); - ResMgr* pResMgr = rResId.GetResMgr(); - m_aNameBox.SetAccessibleName( ResId( STR_HEADER_NAME, *pResMgr ).toString() ); - m_aTypeBox.SetAccessibleName( ResId( STR_HEADER_TYPE, *pResMgr ).toString() ); - m_aValueEdit.SetAccessibleName( ResId( STR_HEADER_VALUE, *pResMgr ).toString() ); + m_aNameBox.SetAccessibleName(rHeaderAccName); + m_aTypeBox.SetAccessibleName(rHeaderAccType); + m_aValueEdit.SetAccessibleName(rHeaderAccValue); } CustomPropertiesWindow::~CustomPropertiesWindow() @@ -1911,7 +1911,7 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa Rectangle aRect = pHeaderBar->GetItemRect( pHeaderBar->GetItemId( nPos++ ) ); Size aSize = (*pCurrent)->GetSizePixel(); Point aPos = (*pCurrent)->GetPosPixel(); - long nWidth = aRect.getWidth() - nOffset; + long nWidth = aRect.GetWidth() - nOffset; if ( *pCurrent == &m_aRemoveButton ) nWidth -= pScrollBar->GetSizePixel().Width(); aSize.Width() = nWidth; @@ -1960,6 +1960,39 @@ sal_uInt16 CustomPropertiesWindow::GetVisibleLineCount() const return nCount; } +void CustomPropertiesWindow::updateLineWidth() +{ + Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit, + &m_aDateField, &m_aTimeField, + &m_aDurationField, &m_aEditButton, + &m_aYesNoButton, &m_aRemoveButton, NULL }; + + for (std::vector< CustomPropertyLine* >::iterator aI = + m_aCustomPropertiesLines.begin(), aEnd = m_aCustomPropertiesLines.end(); + aI != aEnd; ++aI) + { + CustomPropertyLine* pNewLine = *aI; + + Window* pNewWindows[] = + { &pNewLine->m_aNameBox, &pNewLine->m_aTypeBox, &pNewLine->m_aValueEdit, + &pNewLine->m_aDateField, &pNewLine->m_aTimeField, + &pNewLine->m_aDurationField, &pNewLine->m_aEditButton, + &pNewLine->m_aYesNoButton, &pNewLine->m_aRemoveButton, NULL }; + + Window** pCurrent = pWindows; + Window** pNewCurrent = pNewWindows; + while ( *pCurrent ) + { + Size aSize = (*pCurrent)->GetSizePixel(); + Point aPos = (*pCurrent)->GetPosPixel(); + aPos.Y() = (*pNewCurrent)->GetPosPixel().Y(); + (*pNewCurrent)->SetPosSizePixel( aPos, aSize ); + pCurrent++; + pNewCurrent++; + } + } +} + void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) { CustomPropertyLine* pNewLine = new CustomPropertyLine( this ); @@ -2186,81 +2219,112 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c return aPropertiesSeq; } -// class CustomPropertiesControl ----------------------------------------- -CustomPropertiesControl::CustomPropertiesControl( Window* pParent, const ResId& rResId ) : +CustomPropertiesControl::CustomPropertiesControl(Window* pParent) + : VclVBox(pParent) + , m_nThumbPos(0) +{ +} - Control( pParent, rResId ), +void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) +{ + m_pHeaderBar = new HeaderBar(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER); + m_pBody = new VclHBox(this); + OUString sName = rBuilder.get<FixedText>("name")->GetText(); + OUString sType = rBuilder.get<FixedText>("type")->GetText(); + OUString sValue = rBuilder.get<FixedText>("value")->GetText(); + m_pPropertiesWin = new CustomPropertiesWindow(m_pBody, sName, sType, sValue); + m_pVertScroll = new ScrollBar(m_pBody, WB_VERT); - m_aHeaderBar ( this, WB_BUTTONSTYLE | WB_BOTTOMBORDER ), - m_aPropertiesWin( this, ResId( WIN_PROPERTIES, *rResId.GetResMgr() ) ), - m_aVertScroll ( this, ResId( SB_VERTICAL, *rResId.GetResMgr() ) ), + set_hexpand(true); + set_vexpand(true); + set_expand(true); + set_fill(true); - m_nThumbPos ( 0 ) + m_pBody->set_hexpand(true); + m_pBody->set_vexpand(true); + m_pBody->set_expand(true); + m_pBody->set_fill(true); + m_pBody->Show(); + + m_pPropertiesWin->set_hexpand(true); + m_pPropertiesWin->set_vexpand(true); + m_pPropertiesWin->set_expand(true); + m_pPropertiesWin->set_fill(true); + m_pPropertiesWin->Show(); + + m_pPropertiesWin->SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) ); + m_pVertScroll->EnableDrag(); + m_pVertScroll->Show(); + + m_pHeaderBar->set_height_request(16); -{ - m_aPropertiesWin.SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) ); - m_aVertScroll.EnableDrag(); - m_aVertScroll.Show(); - long nWidth = GetOutputSizePixel().Width(); - m_aHeaderBar.SetPosSizePixel( Point(), Size( nWidth, m_aVertScroll.GetPosPixel().Y() ) ); const HeaderBarItemBits nHeadBits = HIB_VCENTER | HIB_FIXED | HIB_FIXEDPOS | HIB_LEFT; - nWidth = nWidth / 4; - ResMgr* pResMgr = rResId.GetResMgr(); - m_aHeaderBar.InsertItem( HI_NAME, ResId( STR_HEADER_NAME, *pResMgr ).toString(), nWidth, nHeadBits ); - m_aHeaderBar.InsertItem( HI_TYPE, ResId( STR_HEADER_TYPE, *pResMgr ).toString(), nWidth, nHeadBits ); - m_aHeaderBar.InsertItem( HI_VALUE, ResId( STR_HEADER_VALUE, *pResMgr ).toString(), nWidth, nHeadBits ); - m_aHeaderBar.InsertItem( HI_ACTION, ResId( STR_HEADER_ACTION, *pResMgr ).toString(), nWidth, nHeadBits ); - m_aHeaderBar.Show(); - FreeResource(); + m_pHeaderBar->InsertItem( HI_NAME, sName, 0, nHeadBits ); + m_pHeaderBar->InsertItem( HI_TYPE, sType, 0, nHeadBits ); + m_pHeaderBar->InsertItem( HI_VALUE, sValue, 0, nHeadBits ); + m_pHeaderBar->InsertItem( HI_ACTION, OUString(), 0, nHeadBits ); + m_pHeaderBar->Show(); - m_aPropertiesWin.InitControls( &m_aHeaderBar, &m_aVertScroll ); - m_aPropertiesWin.SetRemovedHdl( LINK( this, CustomPropertiesControl, RemovedHdl ) ); + m_pPropertiesWin->SetRemovedHdl( LINK( this, CustomPropertiesControl, RemovedHdl ) ); - m_aVertScroll.SetRangeMin( 0 ); - sal_Int32 nScrollOffset = m_aPropertiesWin.GetLineHeight(); - sal_Int32 nVisibleEntries = m_aPropertiesWin.GetSizePixel().Height() / nScrollOffset; - m_aVertScroll.SetRangeMax( nVisibleEntries ); - m_aVertScroll.SetPageSize( nVisibleEntries - 1 ); - m_aVertScroll.SetVisibleSize( nVisibleEntries ); + m_pVertScroll->SetRangeMin( 0 ); + m_pVertScroll->SetRangeMax( 0 ); + m_pVertScroll->SetVisibleSize( 0xFFFF ); Link aScrollLink = LINK( this, CustomPropertiesControl, ScrollHdl ); - m_aVertScroll.SetScrollHdl( aScrollLink ); + m_pVertScroll->SetScrollHdl( aScrollLink ); +} + +void CustomPropertiesControl::setAllocation(const Size &rAllocation) +{ + VclVBox::setAllocation(rAllocation); + + m_pPropertiesWin->InitControls( m_pHeaderBar, m_pVertScroll ); + sal_Int32 nScrollOffset = m_pPropertiesWin->GetLineHeight(); + sal_Int32 nVisibleEntries = m_pPropertiesWin->GetSizePixel().Height() / nScrollOffset; + m_pVertScroll->SetPageSize( nVisibleEntries - 1 ); + m_pVertScroll->SetVisibleSize( nVisibleEntries ); + m_pPropertiesWin->updateLineWidth(); } extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCustomPropertiesControl(Window *pParent, VclBuilder::stringmap &) { - return new CustomPropertiesControl(pParent, SfxResId(SFX_CTRL_CUSTOM_PROPERTIES)); + return new CustomPropertiesControl(pParent); } CustomPropertiesControl::~CustomPropertiesControl() { + delete m_pVertScroll; + delete m_pPropertiesWin; + delete m_pBody; + delete m_pHeaderBar; } IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar ) { - sal_Int32 nOffset = m_aPropertiesWin.GetLineHeight(); + sal_Int32 nOffset = m_pPropertiesWin->GetLineHeight(); nOffset *= ( m_nThumbPos - pScrollBar->GetThumbPos() ); m_nThumbPos = pScrollBar->GetThumbPos(); - m_aPropertiesWin.DoScroll( nOffset ); + m_pPropertiesWin->DoScroll( nOffset ); return 0; } IMPL_LINK_NOARG(CustomPropertiesControl, RemovedHdl) { - m_aVertScroll.SetRangeMax( m_aPropertiesWin.GetVisibleLineCount() + 1 ); - if ( m_aPropertiesWin.GetOutputSizePixel().Height() < m_aPropertiesWin.GetVisibleLineCount() * m_aPropertiesWin.GetLineHeight() ) - m_aVertScroll.DoScrollAction ( SCROLL_LINEUP ); + m_pVertScroll->SetRangeMax( m_pPropertiesWin->GetVisibleLineCount() + 1 ); + if ( m_pPropertiesWin->GetOutputSizePixel().Height() < m_pPropertiesWin->GetVisibleLineCount() * m_pPropertiesWin->GetLineHeight() ) + m_pVertScroll->DoScrollAction ( SCROLL_LINEUP ); return 0; } void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny, bool bInteractive ) { - m_aPropertiesWin.AddLine( sName, rAny ); - m_aVertScroll.SetRangeMax( m_aPropertiesWin.GetVisibleLineCount() + 1 ); - if ( bInteractive && m_aPropertiesWin.GetOutputSizePixel().Height() < m_aPropertiesWin.GetVisibleLineCount() * m_aPropertiesWin.GetLineHeight() ) - m_aVertScroll.DoScroll( m_aPropertiesWin.GetVisibleLineCount() + 1 ); + m_pPropertiesWin->AddLine( sName, rAny ); + m_pVertScroll->SetRangeMax( m_pPropertiesWin->GetVisibleLineCount() + 1 ); + if ( bInteractive && m_pPropertiesWin->GetOutputSizePixel().Height() < m_pPropertiesWin->GetVisibleLineCount() * m_pPropertiesWin->GetLineHeight() ) + m_pVertScroll->DoScroll( m_pPropertiesWin->GetVisibleLineCount() + 1 ); } // class SfxCustomPropertiesPage ----------------------------------------- @@ -2268,6 +2332,7 @@ SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItem : SfxTabPage(pParent, "CustomInfoPage", "sfx/ui/custominfopage.ui", rItemSet) { get(m_pPropertiesCtrl, "properties"); + m_pPropertiesCtrl->Init(*this); get<PushButton>("add")->SetClickHdl(LINK(this, SfxCustomPropertiesPage, AddHdl)); } diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc index 2df47b86a363..eea59c7c03cc 100644 --- a/sfx2/source/dialog/dinfdlg.hrc +++ b/sfx2/source/dialog/dinfdlg.hrc @@ -32,30 +32,9 @@ // defines --------------------------------------------------------------- -#define FT_INFO1 15 -#define ED_INFO1 16 -#define FT_INFO2 17 -#define ED_INFO2 18 -#define FT_INFO3 19 -#define ED_INFO3 20 -#define FT_INFO4 21 -#define ED_INFO4 22 -#define BTN_EDITLABEL 34 - -#define WIN_PROPERTIES 90 -#define SB_VERTICAL 91 -#define FT_PROPERTIES 92 -#define BTN_ADD 94 #define RB_PROPERTY_YES 100 #define RB_PROPERTY_NO 101 -#define STR_HEADER_NAME 90 -#define STR_HEADER_TYPE 91 -#define STR_HEADER_VALUE 92 -#define STR_HEADER_ACTION 93 - -#define EDIT_FILE_NAME 94 - #define PB_OK 100 #define PB_CANCEL 101 #define PB_HELP 102 diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index 007a6d223500..a90e271ea1d1 100644 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -29,139 +29,6 @@ String STR_SFX_NEWOFFICEDOC Text [ en-US ] = "%PRODUCTNAME document" ; }; - // TP_DOCINFOUSER -------------------------------------------------------- - -TabPage TP_DOCINFOUSER -{ - HelpId = HID_DOCINFOUSER ; - Hide = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - FixedText FT_INFO1 - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDTEXT_HEIGHT ) ; - Left = TRUE ; - }; - Edit ED_INFO1 - { - HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO1"; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 17 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ; - Left = TRUE ; - }; - FixedText FT_INFO2 - { - Pos = MAP_APPFONT ( 6 , 32 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDTEXT_HEIGHT ) ; - Left = TRUE ; - }; - Edit ED_INFO2 - { - HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO2"; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 43 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ; - Left = TRUE ; - }; - FixedText FT_INFO3 - { - Pos = MAP_APPFONT ( 6 , 58 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDTEXT_HEIGHT ) ; - Left = TRUE ; - }; - Edit ED_INFO3 - { - HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO3"; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 69 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ; - Left = TRUE ; - }; - FixedText FT_INFO4 - { - Pos = MAP_APPFONT ( 6 , 84 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDTEXT_HEIGHT ) ; - Left = TRUE ; - }; - Edit ED_INFO4 - { - HelpID = "sfx2:Edit:TP_DOCINFOUSER:ED_INFO4"; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 95 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_TEXTBOX_HEIGHT ) ; - Left = TRUE ; - }; - PushButton BTN_EDITLABEL - { - HelpID = "sfx2:PushButton:TP_DOCINFOUSER:BTN_EDITLABEL"; - Pos = MAP_APPFONT ( 194 , 165 ) ; - Size = MAP_APPFONT ( 60 , RSC_CD_PUSHBUTTON_HEIGHT ) ; - Text [ en-US ] = "~Info fields..." ; - }; -}; - -Control SFX_CTRL_CUSTOM_PROPERTIES -{ - HelpId = HID_CTRL_CUSTOMPROPERTIES; - Pos = MAP_APPFONT ( 6 , 18 ) ; - Size = MAP_APPFONT ( 248 , 141 ) ; - Border = TRUE; - DialogControl = TRUE; - Window WIN_PROPERTIES - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 0 , 10 ) ; - Size = MAP_APPFONT ( 240 , 134 ) ; - DialogControl = TRUE; - }; - ScrollBar SB_VERTICAL - { - Pos = MAP_APPFONT ( 238 , 10 ) ; - Size = MAP_APPFONT ( 8 , 129 ) ; - VScroll = TRUE; - }; - String STR_HEADER_NAME - { - Text [ en-US ] = "Name" ; - }; - String STR_HEADER_TYPE - { - Text [ en-US ] = "Type" ; - }; - String STR_HEADER_VALUE - { - Text [ en-US ] = "Value" ; - }; - String STR_HEADER_ACTION - { - Text [ en-US ] = "" ; - }; -}; - -// TP_CUSTOMPROPERTIES --------------------------------------------------- - -TabPage TP_CUSTOMPROPERTIES -{ - HelpId = HID_TP_CUSTOMPROPERTIES ; - Hide = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - FixedText FT_PROPERTIES - { - Pos = MAP_APPFONT ( 6 , 7 ) ; - Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDTEXT_HEIGHT ) ; - Left = TRUE ; - Text [ en-US ] = "~Properties" ; - }; - PushButton BTN_ADD - { - HelpID = "sfx2:PushButton:TP_CUSTOMPROPERTIES:BTN_ADD"; - Pos = MAP_APPFONT( 204 , 165 ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - Text [ en-US ] = "~Add"; - }; -}; - ComboBox SFX_CB_PROPERTY_NAME { Pos = MAP_APPFONT ( 0 , 2 ) ; @@ -317,6 +184,7 @@ TabDialog SID_DOCINFO OutputSize = TRUE ; SVLook = TRUE ; Moveable = TRUE ; + Sizeable = TRUE ; Text [ en-US ] = "Properties of " ; TabControl 1 { diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc index e1dc196e54e9..88583c916cd6 100644 --- a/sfx2/source/inc/helpid.hrc +++ b/sfx2/source/inc/helpid.hrc @@ -26,7 +26,6 @@ #define HID_PRINTMONITOR "SFX2_HID_PRINTMONITOR" #define HID_MANAGE_STYLES "SFX2_HID_MANAGE_STYLES" #define HID_CONFIG_EVENT "SFX2_HID_CONFIG_EVENT" -#define HID_DOCINFOUSER "SFX2_HID_DOCINFOUSER" #define HID_BROWSERCONTROL "SFX2_HID_BROWSERCONTROL" #define HID_PRINT_OPTIONS "SFX2_HID_PRINT_OPTIONS" #define HID_PREVIEW_FRAME "SFX2_HID_PREVIEW_FRAME" @@ -135,8 +134,6 @@ #define HID_WARNING_ALIENFORMAT "SFX2_HID_WARNING_ALIENFORMAT" #define HID_HELP_ONSTARTUP_BOX "SFX2_HID_HELP_ONSTARTUP_BOX" #define HID_DLG_CHECKFORONLINEUPDATE "SFX2_HID_DLG_CHECKFORONLINEUPDATE" -#define HID_TP_CUSTOMPROPERTIES "SFX2_HID_TP_CUSTOMPROPERTIES" -#define HID_CTRL_CUSTOMPROPERTIES "SFX2_HID_CTRL_CUSTOMPROPERTIES" #define HID_CTRL_CUSTOMPROPS_YES_NO "SFX2_HID_CTRL_CUSTOMPROPS_YES_NO" #define HID_DLG_CUSTOMPROPS_DURATION "SFX2_HID_DLG_CUSTOMPROPS_DURATION" diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc index 134f9bb5987c..2a3cbcb631ab 100644 --- a/sfx2/source/inc/sfxlocal.hrc +++ b/sfx2/source/inc/sfxlocal.hrc @@ -48,7 +48,6 @@ #define SFX_FLD_TIME (RID_SFX_SFXLOCAL_START + 11) #define SFX_FLD_DURATION (RID_SFX_SFXLOCAL_START + 12) #define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13) -#define SFX_CTRL_CUSTOM_PROPERTIES (RID_SFX_SFXLOCAL_START + 14) // Images ---------------------------------------------------------------- diff --git a/sfx2/uiconfig/ui/custominfopage.ui b/sfx2/uiconfig/ui/custominfopage.ui index fe4f2076ac19..0cc0612b57da 100644 --- a/sfx2/uiconfig/ui/custominfopage.ui +++ b/sfx2/uiconfig/ui/custominfopage.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> - <object class="GtkGrid" id="grid12"> + <object class="GtkGrid" id="CustomInfoPage"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> @@ -35,7 +35,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">3</property> <property name="width">1</property> <property name="height">1</property> </packing> @@ -49,6 +49,57 @@ </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="GtkBox" id="box1"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="hexpand">True</property> + <property name="spacing">12</property> + <property name="homogeneous">True</property> + <child> + <object class="GtkLabel" id="name"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Name</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="type"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Type</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="value"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Value</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</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> |