summaryrefslogtreecommitdiff
path: root/padmin/source
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2001-12-06 16:19:58 +0000
committerPhilipp Lohmann <pl@openoffice.org>2001-12-06 16:19:58 +0000
commit6d300ea3479090cac6fd48d72c16cd353d01449e (patch)
treea66803b3a085a5a6fe5d9cab1b19a4f89a377be1 /padmin/source
parent5a9974957da862ed6b690eaa2c78b13a674c3e52 (diff)
#95498# show absolute margins again
Diffstat (limited to 'padmin/source')
-rw-r--r--padmin/source/prtsetup.cxx55
-rw-r--r--padmin/source/prtsetup.hxx9
-rw-r--r--padmin/source/rtsetup.src40
3 files changed, 59 insertions, 45 deletions
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 1e4dd32277a8..d108764b8b87 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: prtsetup.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: hr $ $Date: 2001-10-24 11:51:14 $
+ * last change: $Author: pl $ $Date: 2001-12-06 17:19:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -560,15 +560,27 @@ RTSOtherPage::~RTSOtherPage()
void RTSOtherPage::initValues()
{
- m_nMarginLeft = m_pParent->m_aJobData.m_nLeftMarginAdjust;
- m_nMarginRight = m_pParent->m_aJobData.m_nRightMarginAdjust;
- m_nMarginTop = m_pParent->m_aJobData.m_nTopMarginAdjust;
- m_nMarginBottom = m_pParent->m_aJobData.m_nBottomMarginAdjust;
-
- m_aLeftLB.SetValue( m_nMarginLeft );
- m_aRightLB.SetValue( m_nMarginRight );
- m_aTopLB.SetValue( m_nMarginTop );
- m_aBottomLB.SetValue( m_nMarginBottom );
+ int nMarginLeft;
+ int nMarginTop;
+ int nMarginRight;
+ int nMarginBottom;
+
+ m_pParent->m_aJobData.m_pParser->
+ getMargins( m_pParent->m_aJobData.m_pParser->getDefaultPaperDimension(),
+ nMarginLeft,
+ nMarginRight,
+ nMarginTop,
+ nMarginBottom );
+
+ nMarginLeft += m_pParent->m_aJobData.m_nLeftMarginAdjust;
+ nMarginRight += m_pParent->m_aJobData.m_nRightMarginAdjust;
+ nMarginTop += m_pParent->m_aJobData.m_nTopMarginAdjust;
+ nMarginBottom += m_pParent->m_aJobData.m_nBottomMarginAdjust;
+
+ m_aLeftLB.SetValue( nMarginLeft );
+ m_aRightLB.SetValue( nMarginRight );
+ m_aTopLB.SetValue( nMarginTop );
+ m_aBottomLB.SetValue( nMarginBottom );
m_aCommentEdt.SetText( m_pParent->m_aJobData.m_aComment );
}
@@ -576,10 +588,22 @@ void RTSOtherPage::initValues()
void RTSOtherPage::save()
{
- m_nMarginLeft = m_pParent->m_aJobData.m_nLeftMarginAdjust = m_aLeftLB.GetValue();
- m_nMarginRight = m_pParent->m_aJobData.m_nRightMarginAdjust = m_aRightLB.GetValue();
- m_nMarginTop = m_pParent->m_aJobData.m_nTopMarginAdjust = m_aTopLB.GetValue();
- m_nMarginBottom = m_pParent->m_aJobData.m_nBottomMarginAdjust = m_aBottomLB.GetValue();
+ int nMarginLeft = 0;
+ int nMarginTop = 0;
+ int nMarginRight = 0;
+ int nMarginBottom = 0;
+
+ m_pParent->m_aJobData.m_pParser->
+ getMargins( m_pParent->m_aJobData.m_pParser->getDefaultPaperDimension(),
+ nMarginLeft,
+ nMarginRight,
+ nMarginTop,
+ nMarginBottom );
+
+ m_pParent->m_aJobData.m_nLeftMarginAdjust = m_aLeftLB.GetValue() - nMarginLeft;
+ m_pParent->m_aJobData.m_nRightMarginAdjust = m_aRightLB.GetValue() - nMarginRight;
+ m_pParent->m_aJobData.m_nTopMarginAdjust = m_aTopLB.GetValue() - nMarginTop;
+ m_pParent->m_aJobData.m_nBottomMarginAdjust = m_aBottomLB.GetValue() - nMarginBottom;
m_pParent->m_aJobData.m_aComment = m_aCommentEdt.GetText();
}
@@ -589,7 +613,6 @@ IMPL_LINK( RTSOtherPage, ClickBtnHdl, Button*, pButton )
{
if( pButton == &m_aDefaultBtn )
{
- m_nMarginBottom = m_nMarginTop = m_nMarginRight = m_nMarginLeft = 0;
m_pParent->m_aJobData.m_nLeftMarginAdjust =
m_pParent->m_aJobData.m_nRightMarginAdjust =
m_pParent->m_aJobData.m_nTopMarginAdjust =
diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx
index 82c7cdef8a14..8247190fee14 100644
--- a/padmin/source/prtsetup.hxx
+++ b/padmin/source/prtsetup.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: prtsetup.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: pl $ $Date: 2001-05-08 11:56:36 $
+ * last change: $Author: pl $ $Date: 2001-12-06 17:19:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -222,11 +222,6 @@ class RTSOtherPage : public TabPage
{
RTSDialog* m_pParent;
- ULONG m_nMarginLeft;
- ULONG m_nMarginTop;
- ULONG m_nMarginRight;
- ULONG m_nMarginBottom;
-
FixedText m_aLeftTxt;
MetricField m_aLeftLB;
FixedText m_aTopTxt;
diff --git a/padmin/source/rtsetup.src b/padmin/source/rtsetup.src
index 7b0597ce0a5f..c176cc4b6ac9 100644
--- a/padmin/source/rtsetup.src
+++ b/padmin/source/rtsetup.src
@@ -2,9 +2,9 @@
*
* $RCSfile: rtsetup.src,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: obo $ $Date: 2001-11-16 23:40:31 $
+ * last change: $Author: pl $ $Date: 2001-12-06 17:19:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1293,9 +1293,9 @@ TabPage RID_RTS_OTHERPAGE
{
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 85, 8 );
- Text = "~Linke Randkorrektur" ;
- Text [ English ] = "~Left margin adjustment" ;
- Text[ english_us ] = "~Left margin adjustment";
+ Text = "~Linker Rand" ;
+ Text [ English ] = "~Left margin" ;
+ Text[ english_us ] = "~Left margin";
Text[ portuguese ] = "~Ajuste da margem esquerda";
Text[ russian ] = "~ ";
Text[ greek ] = " :";
@@ -1324,16 +1324,15 @@ TabPage RID_RTS_OTHERPAGE
StrictFormat = TRUE ;
Spin = TRUE;
Repeat = TRUE;
- Unit = FUNIT_MM;
- DecimalDigits = 2;
+ Unit = FUNIT_POINT;
};
FixedText RID_RTS_OTHER_TOPMARGIN_TXT
{
Pos = MAP_APPFONT( 5, 20 );
Size = MAP_APPFONT( 85, 8 );
- Text = "~Obere Randkorrektur" ;
- Text [ English ] = "~Top margin adjustment" ;
- Text[ english_us ] = "~Top margin adjustment";
+ Text = "~Oberer Rand" ;
+ Text [ English ] = "~Top margin" ;
+ Text[ english_us ] = "~Top margin";
Text[ portuguese ] = "Aju~ste da margem superior";
Text[ russian ] = "~ ";
Text[ greek ] = " ~ :";
@@ -1362,16 +1361,15 @@ TabPage RID_RTS_OTHERPAGE
StrictFormat = TRUE ;
Spin = TRUE;
Repeat = TRUE;
- Unit = FUNIT_MM;
- DecimalDigits = 2;
+ Unit = FUNIT_POINT;
};
FixedText RID_RTS_OTHER_RIGHTMARGIN_TXT
{
Pos = MAP_APPFONT( 5, 35 );
Size = MAP_APPFONT( 85, 8 );
- Text = "~Rechte Randkorrektur" ;
- Text [ English ] = "~Right margin adjustment" ;
- Text[ english_us ] = "~Right margin adjustment";
+ Text = "~Rechter Rand" ;
+ Text [ English ] = "~Right margin" ;
+ Text[ english_us ] = "~Right margin";
Text[ portuguese ] = "Ajuste ~da margem direita";
Text[ russian ] = "~ ";
Text[ greek ] = " ~ :";
@@ -1400,16 +1398,15 @@ TabPage RID_RTS_OTHERPAGE
StrictFormat = TRUE ;
Spin = TRUE;
Repeat = TRUE;
- Unit = FUNIT_MM;
- DecimalDigits = 2;
+ Unit = FUNIT_POINT;
};
FixedText RID_RTS_OTHER_BOTTOMMARGIN_TXT
{
Pos = MAP_APPFONT( 5, 50 );
Size = MAP_APPFONT( 85, 8 );
- Text = "~Untere Randkorrektur" ;
- Text [ English ] = "~Bottom margin adjustment" ;
- Text[ english_us ] = "~Bottom margin adjustment";
+ Text = "~Unterer Rand" ;
+ Text [ English ] = "~Bottom margin" ;
+ Text[ english_us ] = "~Bottom margin";
Text[ portuguese ] = "Ajuste da margem ~inferior";
Text[ russian ] = "~ ";
Text[ greek ] = " ~ :";
@@ -1438,8 +1435,7 @@ TabPage RID_RTS_OTHERPAGE
StrictFormat = TRUE ;
Spin = TRUE;
Repeat = TRUE;
- Unit = FUNIT_MM;
- DecimalDigits = 2;
+ Unit = FUNIT_POINT;
};
FixedText RID_RTS_OTHER_COMMENT_TXT
{