diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-31 12:05:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-31 18:10:50 +0000 |
commit | c05984305b29606bd9cbc821a483206446d4c33e (patch) | |
tree | ef8e59cea8da9a98c048bb8e2067f30a7ba7c0ce /sfx2 | |
parent | ebd41daacdb11d1b96a50d7230249c85408ae5b5 (diff) |
de-resource custom properties widgets
Change-Id: Id0579d323016d760ec89185026a3c0803345695b
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 31 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.src | 42 | ||||
-rw-r--r-- | sfx2/source/inc/sfxlocal.hrc | 8 |
3 files changed, 23 insertions, 58 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index ff0b5b593282..470816deb304 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1294,8 +1294,10 @@ util::Duration DurationDialog_Impl::GetDuration() const return aRet; } -CustomPropertiesDurationField::CustomPropertiesDurationField( vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) : - Edit( pParent, rResId ), m_pLine( pLine ) +CustomPropertiesDurationField::CustomPropertiesDurationField(vcl::Window* pParent, WinBits nStyle, + CustomPropertyLine* pLine) + : Edit(pParent, nStyle) + , m_pLine(pLine) { SetDuration( util::Duration(false, 0, 0, 0, 0, 0, 0, 0) ); @@ -1369,14 +1371,14 @@ void CustomPropertiesYesNoButton::Resize() CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) : m_aNameBox ( pParent, SfxResId( SFX_CB_PROPERTY_NAME ) ), m_aTypeBox ( pParent, SfxResId( SFX_LB_PROPERTY_TYPE ), this ), - m_aValueEdit ( pParent, SfxResId( SFX_ED_PROPERTY_VALUE ), this ), - m_aDateField ( pParent, SfxResId( SFX_FLD_DATE), this), - m_aTimeField ( pParent, SfxResId( SFX_FLD_TIME), this), + m_aValueEdit ( pParent, WB_BORDER|WB_TABSTOP|WB_LEFT, this ), + m_aDateField ( pParent, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT, this ), + m_aTimeField ( pParent, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT, this ), m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT ).toString() ), - m_aDurationField( pParent, SfxResId( SFX_FLD_DURATION), this), + m_aDurationField( pParent, WB_BORDER|WB_TABSTOP|WB_READONLY, this ), m_aEditButton( pParent, SfxResId( SFX_PB_EDIT ), this), m_aYesNoButton ( pParent, SfxResId( SFX_WIN_PROPERTY_YESNO ) ), - m_aRemoveButton ( pParent, SfxResId( SFX_PB_PROPERTY_REMOVE ), this ), + m_aRemoveButton ( pParent, 0, this ), m_bIsDate ( false ), m_bIsRemoved ( false ), m_bTypeLostFocus( false ) @@ -1386,6 +1388,7 @@ CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) : m_aDateField.SetExtDateFormat( XTDATEF_SYSTEM_SHORT_YYYY ); m_aRemoveButton.SetModeImage(Image(SfxResId(SFX_IMG_PROPERTY_REMOVE))); + m_aRemoveButton.SetQuickHelpText(SfxResId(STR_SFX_REMOVE_PROPERTY).toString()); } void CustomPropertyLine::SetRemoved() @@ -1413,19 +1416,23 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent, m_pHeaderAccValue(pHeaderAccValue), m_aNameBox ( this, SfxResId( SFX_CB_PROPERTY_NAME ) ), m_aTypeBox ( this, SfxResId( SFX_LB_PROPERTY_TYPE ) ), - m_aValueEdit ( this, SfxResId( SFX_ED_PROPERTY_VALUE ) ), - m_aDateField ( this, SfxResId( SFX_FLD_DATE) ), - m_aTimeField ( this, SfxResId( SFX_FLD_TIME) ), - m_aDurationField( this, SfxResId( SFX_FLD_DURATION) ), + m_aValueEdit ( this, WB_BORDER|WB_TABSTOP|WB_LEFT ), + m_aDateField ( this, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT ), + m_aTimeField ( this, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT ), + m_aDurationField( this, WB_BORDER|WB_TABSTOP|WB_READONLY ), m_aEditButton( this, SfxResId( SFX_PB_EDIT )), m_aYesNoButton ( this, SfxResId( SFX_WIN_PROPERTY_YESNO ) ), - m_aRemoveButton ( this, SfxResId( SFX_PB_PROPERTY_REMOVE ) ), + m_aRemoveButton ( this, 0 ), m_nScrollPos (0), m_pCurrentLine (NULL), m_aNumberFormatter( ::comphelper::getProcessComponentContext(), Application::GetSettings().GetLanguageTag().getLanguageType() ) { + m_aRemoveButton.SetSizePixel(LogicToPixel(Size(RSC_CD_PUSHBUTTON_HEIGHT, RSC_CD_PUSHBUTTON_HEIGHT), MAP_APPFONT)); + + m_aValueEdit.SetSizePixel(LogicToPixel(Size(61, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT)); + m_aEditLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST ); m_aEditLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) ); m_aBoxLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST ); diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index ac379b194dc5..f923d1fef31c 100644 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -90,41 +90,6 @@ ListBox SFX_LB_PROPERTY_TYPE }; }; -Edit SFX_ED_PROPERTY_VALUE -{ - Border = TRUE ; - Pos = MAP_APPFONT ( 127 , 2 ) ; - Size = MAP_APPFONT ( 61 , RSC_CD_TEXTBOX_HEIGHT ) ; - TabStop = TRUE ; - Left = TRUE ; -}; -DateField SFX_FLD_DATE -{ - Border = TRUE ; - Pos = MAP_APPFONT ( 127 , 2 ) ; - Size = MAP_APPFONT ( 29 , RSC_CD_TEXTBOX_HEIGHT ) ; - TabStop = TRUE ; - Left = TRUE ; - Spin = TRUE; -}; -TimeField SFX_FLD_TIME -{ - Border = TRUE ; - Pos = MAP_APPFONT ( 159 , 2 ) ; - Size = MAP_APPFONT ( 29 , RSC_CD_TEXTBOX_HEIGHT ) ; - TabStop = TRUE ; - Left = TRUE ; - Spin = TRUE; -}; - -Edit SFX_FLD_DURATION -{ - Readonly = TRUE; - Border = TRUE ; - Pos = MAP_APPFONT ( 159 , 2 ) ; - Size = MAP_APPFONT ( 61 - RSC_CD_TEXTBOX_HEIGHT - 2, RSC_CD_TEXTBOX_HEIGHT ) ; - TabStop = TRUE ; -}; PushButton SFX_PB_EDIT { Pos = MAP_APPFONT ( 159 , 2 ) ; @@ -160,12 +125,11 @@ Control SFX_WIN_PROPERTY_YESNO }; }; -ImageButton SFX_PB_PROPERTY_REMOVE +String STR_SFX_REMOVE_PROPERTY { - Pos = MAP_APPFONT( 190 , 1 ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_HEIGHT, RSC_CD_PUSHBUTTON_HEIGHT ); - QuickHelpText [ en-US ] = "Remove Property" ; + Text [ en-US ] = "Remove Property" ; }; + Image SFX_IMG_PROPERTY_REMOVE { ImageBitmap = Bitmap { File = "deleterow.bmp" ; }; diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc index 4a570607649b..4b6d132b1876 100644 --- a/sfx2/source/inc/sfxlocal.hrc +++ b/sfx2/source/inc/sfxlocal.hrc @@ -25,8 +25,8 @@ #include <sfx2/sfx.hrc> // Strings --------------------------------------------------------------- - #define STR_SFX_NEWOFFICEDOC (RID_SFX_SFXLOCAL_START + 0) +#define STR_SFX_REMOVE_PROPERTY (RID_SFX_SFXLOCAL_START + 1) #define STR_SFX_FILEDLG_ACTUALVERSION (RID_SFX_SFXLOCAL_START + 2) #define STR_SFX_EXPLORERFILE_INSERT (RID_SFX_SFXLOCAL_START + 3) #define STR_SFX_EXPLORERFILE_BUTTONINSERT (RID_SFX_SFXLOCAL_START + 4) @@ -39,15 +39,9 @@ #define STR_SFX_QUERY_WRONG_TYPE (RID_SFX_SFXLOCAL_START + 11) // Controls -------------------------------------------------------------- - #define SFX_CB_PROPERTY_NAME (RID_SFX_SFXLOCAL_START + 0) -#define SFX_ED_PROPERTY_VALUE (RID_SFX_SFXLOCAL_START + 1) #define SFX_LB_PROPERTY_TYPE (RID_SFX_SFXLOCAL_START + 4) -#define SFX_PB_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 5) #define SFX_WIN_PROPERTY_YESNO (RID_SFX_SFXLOCAL_START + 6) -#define SFX_FLD_DATE (RID_SFX_SFXLOCAL_START + 10) -#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_CMIS_PROPERTY_NAME (RID_SFX_SFXLOCAL_START + 14) |