[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
Caolán McNamara
caolan at kemper.freedesktop.org
Sun Jul 15 14:13:07 PDT 2012
sc/source/ui/inc/datafdlg.hxx | 13 +++++++------
sc/source/ui/miscdlgs/datafdlg.cxx | 17 +++++++++++------
sc/source/ui/src/datafdlg.src | 36 +++++++++++++++++-------------------
3 files changed, 35 insertions(+), 31 deletions(-)
New commits:
commit 12b3bdea08062fb4ad8b11d63a117c50d60f5b93
Author: Andras Timar <atimar at suse.com>
Date: Sun Jul 15 21:18:42 2012 +0200
fdo#47947 Data Form dialog layout fix
Change-Id: Ifa1689ff9be7afa14f5694825c506f7c8c3eff43
(cherry picked from commit c61e3c941d46fe1ae6066f31e01786100e39da56)
Signed-off-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
index 5600d2c..ef80611 100644
--- a/sc/source/ui/inc/datafdlg.hxx
+++ b/sc/source/ui/inc/datafdlg.hxx
@@ -43,12 +43,13 @@
#define MAX_DATAFORM_COLS 256
#define MAX_DATAFORM_ROWS 32000
-#define CTRL_HEIGHT 22
-#define FIXED_WIDTH 60
-#define EDIT_WIDTH 140
-#define FIXED_LEFT 12
-#define EDIT_LEFT 78
-#define LINE_HEIGHT 30
+#define FIXED_WIDTH 54
+#define EDIT_WIDTH 86
+#define FIXED_HEIGHT 10
+#define EDIT_HEIGHT 12
+#define FIXED_LEFT 6
+#define EDIT_LEFT 62
+#define LINE_HEIGHT 16
//zhangyun
class ScDataFormDlg : public ModalDialog
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 698eb7b..1cbb8d4 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -163,10 +163,15 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
String aFieldName;
- int nTop = 12;
+ //align with LAB_DATAFORM_RECORDNO
+ int nTop = LogicToPixel( Size(1,6), MapMode(MAP_APPFONT) ).getHeight();
+ const int nOne = LogicToPixel( Size(1,1), MapMode(MAP_APPFONT) ).getHeight();
+ const int nLineHeight = LogicToPixel( Size(1, LINE_HEIGHT), MapMode(MAP_APPFONT) ).getHeight();
+ const int nFixedLeft = LogicToPixel( Size(FIXED_LEFT, 1), MapMode(MAP_APPFONT) ).getWidth();
+ const int nEditLeft = LogicToPixel( Size(EDIT_LEFT, 1), MapMode(MAP_APPFONT) ).getWidth();
- Size nFixedSize(FIXED_WIDTH, CTRL_HEIGHT );
- Size nEditSize(EDIT_WIDTH, CTRL_HEIGHT );
+ Size nFixedSize(LogicToPixel( Size(FIXED_WIDTH, FIXED_HEIGHT), MapMode(MAP_APPFONT) ));
+ Size nEditSize(LogicToPixel( Size(EDIT_WIDTH, EDIT_HEIGHT), MapMode(MAP_APPFONT) ));
aColLength = nEndCol - nStartCol + 1;
@@ -185,13 +190,13 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri
maFixedTexts[nIndex].SetSizePixel(nFixedSize);
maEdits[nIndex].SetSizePixel(nEditSize);
- maFixedTexts[nIndex].SetPosPixel(Point(FIXED_LEFT, nTop));
- maEdits[nIndex].SetPosPixel(Point(EDIT_LEFT, nTop));
+ maFixedTexts[nIndex].SetPosPixel(Point(nFixedLeft, nTop + nOne));
+ maEdits[nIndex].SetPosPixel(Point(nEditLeft, nTop));
maFixedTexts[nIndex].SetText(aFieldName);
maFixedTexts[nIndex].Show();
maEdits[nIndex].Show();
- nTop += LINE_HEIGHT;
+ nTop += nLineHeight;
}
else
{
diff --git a/sc/source/ui/src/datafdlg.src b/sc/source/ui/src/datafdlg.src
index 5c0ee6d..0b6d01f 100644
--- a/sc/source/ui/src/datafdlg.src
+++ b/sc/source/ui/src/datafdlg.src
@@ -26,67 +26,66 @@
*/
#include "datafdlg.hrc"
-//zhangyun, dataform
ModalDialog RID_SCDLG_DATAFORM
{
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 191 , 180 ) ;
+ Size = MAP_APPFONT ( 257 , 180 ) ;
Text [ en-US ] = "Data Form" ;
Moveable = TRUE ;
Closeable = TRUE ;
FixedText LAB_DATAFORM_RECORDNO
{
- Pos = MAP_APPFONT ( 136 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- Text [ en-US ] = "/" ;
+ Pos = MAP_APPFONT ( 162 , 6 ) ;
+ Size = MAP_APPFONT ( 60 , 12 ) ;
+ Text = "/" ; //placeholder only
};
PushButton BTN_DATAFORM_NEW
{
- Pos = MAP_APPFONT ( 135 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 161 , 23 ) ;
+ Size = MAP_APPFONT ( 90 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
Text [ en-US ] = "New" ;
};
PushButton BTN_DATAFORM_DELETE
{
- Pos = MAP_APPFONT ( 135 , 40 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 161 , 40 ) ;
+ Size = MAP_APPFONT ( 90 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Delete" ;
};
PushButton BTN_DATAFORM_RESTORE
{
- Pos = MAP_APPFONT ( 135 , 57 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 161 , 57 ) ;
+ Size = MAP_APPFONT ( 90 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Restore" ;
};
PushButton BTN_DATAFORM_PREV
{
- Pos = MAP_APPFONT ( 135 , 82 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 161 , 82 ) ;
+ Size = MAP_APPFONT ( 90 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Previous Record" ;
};
PushButton BTN_DATAFORM_NEXT
{
- Pos = MAP_APPFONT ( 135 , 99 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 161 , 99 ) ;
+ Size = MAP_APPFONT ( 90 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Next Record" ;
};
PushButton BTN_DATAFORM_CLOSE
{
- Pos = MAP_APPFONT ( 135 , 116 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 161 , 116 ) ;
+ Size = MAP_APPFONT ( 90 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Close" ;
};
ScrollBar WND_DATAFORM_SCROLLBAR
{
- Pos = MAP_APPFONT ( 124 , 6 ) ;
+ Pos = MAP_APPFONT ( 150 , 6 ) ;
Size = MAP_APPFONT ( 8 , 135 ) ;
HScroll = FALSE ;
TabStop = FALSE ;
@@ -96,4 +95,3 @@ ModalDialog RID_SCDLG_DATAFORM
Text [ en-US ] = "New Record" ;
};
};
-//end
More information about the Libreoffice-commits
mailing list