[Libreoffice-commits] core.git: include/sfx2 sfx2/source

Caolán McNamara caolanm at redhat.com
Thu Jan 1 04:38:19 PST 2015


 include/sfx2/dinfdlg.hxx       |    4 ++--
 sfx2/source/dialog/dialog.hrc  |    2 +-
 sfx2/source/dialog/dinfdlg.cxx |   19 ++++++++++++++-----
 sfx2/source/dialog/dinfdlg.src |    5 ++---
 4 files changed, 19 insertions(+), 11 deletions(-)

New commits:
commit 5f1fc3d547b2b51d247918e43155e1a44dbf03a0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 1 12:36:27 2015 +0000

    de-resource SFX_PB_EDIT
    
    Change-Id: Ia8002d76443dee819b57779df5213707bd52f890

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 83c3b80..2f481e8 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -346,7 +346,7 @@ class CustomPropertiesEditButton : public PushButton
     CustomPropertyLine*             m_pLine;
 
 public:
-    CustomPropertiesEditButton( vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine );
+    CustomPropertiesEditButton(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine);
     virtual ~CustomPropertiesEditButton();
 
     DECL_LINK(ClickHdl, void *);
@@ -394,7 +394,7 @@ struct CustomPropertyLine
     CustomPropertiesTimeField       m_aTimeField;
     const OUString                  m_sDurationFormat;
     CustomPropertiesDurationField   m_aDurationField;
-    CustomPropertiesEditButton     m_aEditButton;
+    CustomPropertiesEditButton      m_aEditButton;
     CustomPropertiesYesNoButton     m_aYesNoButton;
     CustomPropertiesRemoveButton    m_aRemoveButton;
 
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 73e39ac..58fb183 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -60,8 +60,8 @@
 
 #define STR_PDF_EXPORT_SEND             ( RC_DIALOG_BEGIN + 120 )
 #define IMG_INFO                        ( RC_DIALOG_BEGIN + 122 )
-#define SFX_PB_EDIT                     ( RC_DIALOG_BEGIN + 124 )
 
+#define SFX_ST_EDIT                     ( RC_DIALOG_BEGIN + 124 )
 #define STR_STYLE_ELEMTLIST             ( RC_DIALOG_BEGIN + 125 )
 #define STR_FONT_TABPAGE                ( RC_DIALOG_BEGIN + 126 )
 
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 470816d..2ebf8a8 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1335,8 +1335,10 @@ void CustomPropertiesDurationField::SetDuration( const util::Duration& rDuration
     SetText( sText );
 }
 
-CustomPropertiesEditButton::CustomPropertiesEditButton( vcl::Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
-        PushButton( pParent, rResId ), m_pLine( pLine )
+CustomPropertiesEditButton::CustomPropertiesEditButton(vcl::Window* pParent, WinBits nStyle,
+                                                       CustomPropertyLine* pLine)
+    : PushButton(pParent, nStyle)
+    , m_pLine(pLine)
 {
     SetClickHdl( LINK( this, CustomPropertiesEditButton, ClickHdl ));
 }
@@ -1376,7 +1378,7 @@ CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) :
     m_aTimeField    ( pParent, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT, this ),
     m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT ).toString() ),
     m_aDurationField( pParent, WB_BORDER|WB_TABSTOP|WB_READONLY, this ),
-    m_aEditButton(    pParent, SfxResId( SFX_PB_EDIT ), this),
+    m_aEditButton   ( pParent, WB_TABSTOP, this ),
     m_aYesNoButton  ( pParent, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
     m_aRemoveButton ( pParent, 0, this ),
     m_bIsDate       ( false ),
@@ -1389,6 +1391,8 @@ CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) :
 
     m_aRemoveButton.SetModeImage(Image(SfxResId(SFX_IMG_PROPERTY_REMOVE)));
     m_aRemoveButton.SetQuickHelpText(SfxResId(STR_SFX_REMOVE_PROPERTY).toString());
+
+    m_aEditButton.SetText(SfxResId(SFX_ST_EDIT).toString());
 }
 
 void CustomPropertyLine::SetRemoved()
@@ -1420,7 +1424,7 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
     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_aEditButton(    this, WB_TABSTOP ),
     m_aYesNoButton  ( this, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
     m_aRemoveButton ( this, 0 ),
     m_nScrollPos (0),
@@ -1429,9 +1433,14 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent,
                         Application::GetSettings().GetLanguageTag().getLanguageType() )
 
 {
+    m_aEditButton.SetPosSizePixel(
+        LogicToPixel(Point(159, 2), MAP_APPFONT),
+        LogicToPixel(Size(RSC_CD_TEXTBOX_HEIGHT, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT));
     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_aValueEdit.SetPosSizePixel(
+        LogicToPixel(Point(159, 2), MAP_APPFONT),
+        LogicToPixel(Size(61, RSC_CD_TEXTBOX_HEIGHT), MAP_APPFONT));
 
     m_aEditLoseFocusIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
     m_aEditLoseFocusIdle.SetIdleHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) );
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index f923d1f..450ba7a 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -90,12 +90,11 @@ ListBox SFX_LB_PROPERTY_TYPE
     };
 };
 
-PushButton SFX_PB_EDIT
+String SFX_ST_EDIT
 {
-    Pos = MAP_APPFONT ( 159 , 2 ) ;
-    Size = MAP_APPFONT ( RSC_CD_TEXTBOX_HEIGHT , RSC_CD_TEXTBOX_HEIGHT ) ;
     Text = "...";
 };
+
 String SFX_ST_DURATION_FORMAT
 {
     Text [en-US] = " Y: %1 M: %2 D: %3 H: %4 M: %5 S: %6";


More information about the Libreoffice-commits mailing list