Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
80a72c4c
Kaydet (Commit)
80a72c4c
authored
Şub 08, 2012
tarafından
Winfried Donkers
Kaydeden (comit)
Jan Holesovsky
Şub 13, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#44516: Improved label/BC wizard - set paper size
üst
765c6d99
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
238 additions
and
90 deletions
+238
-90
Labels.xcu
officecfg/registry/data/org/openoffice/Office/Labels.xcu
+0
-0
Writer.xcs
officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+18
-0
envelp.hrc
sw/inc/envelp.hrc
+10
-11
applab.cxx
sw/source/ui/app/applab.cxx
+44
-40
label1.cxx
sw/source/ui/envelp/label1.cxx
+4
-0
labelcfg.cxx
sw/source/ui/envelp/labelcfg.cxx
+20
-7
labfmt.cxx
sw/source/ui/envelp/labfmt.cxx
+51
-10
labfmt.hrc
sw/source/ui/envelp/labfmt.hrc
+11
-5
labfmt.hxx
sw/source/ui/envelp/labfmt.hxx
+9
-0
labfmt.src
sw/source/ui/envelp/labfmt.src
+67
-17
labimg.cxx
sw/source/ui/envelp/labimg.cxx
+0
-0
labimp.hxx
sw/source/ui/envelp/labimp.hxx
+2
-0
labimg.hxx
sw/source/ui/inc/labimg.hxx
+2
-0
No files found.
officecfg/registry/data/org/openoffice/Office/Labels.xcu
Dosyayı görüntüle @
80a72c4c
This diff is collapsed.
Click to expand it.
officecfg/registry/schema/org/openoffice/Office/Writer.xcs
Dosyayı görüntüle @
80a72c4c
...
@@ -5068,6 +5068,24 @@
...
@@ -5068,6 +5068,24 @@
</info>
</info>
<value>
0
</value>
<value>
0
</value>
</prop>
</prop>
<prop
oor:name=
"PageWidth"
oor:type=
"xs:int"
>
<!-- UIHints: File New Labels Format -->
<info>
<author>
Winfried
</author>
<desc>
Specifies the page width of the label sheet [UNIT=1/100 mm].
</desc>
<label>
Page Width
</label>
</info>
<value>
10000
</value>
</prop>
<prop
oor:name=
"PageHeight"
oor:type=
"xs:int"
>
<!-- UIHints: File New Labels Format -->
<info>
<author>
Winfried
</author>
<desc>
Specifies the page height of the label sheet [UNIT=1/100 mm].
</desc>
<label>
Page Height
</label>
</info>
<value>
10000
</value>
</prop>
</group>
</group>
<group
oor:name=
"Option"
>
<group
oor:name=
"Option"
>
<info>
<info>
...
...
sw/inc/envelp.hrc
Dosyayı görüntüle @
80a72c4c
...
@@ -63,22 +63,21 @@
...
@@ -63,22 +63,21 @@
#define RC_LABEL_END (RC_ENVELP_BEGIN + 49)
#define RC_LABEL_END (RC_ENVELP_BEGIN + 49)
#define RC_LABFMT_BEGIN (RC_ENVELP_BEGIN + 50)
#define RC_LABFMT_BEGIN (RC_ENVELP_BEGIN + 50)
#define RC_LABFMT_END (RC_ENVELP_BEGIN +
59
)
#define RC_LABFMT_END (RC_ENVELP_BEGIN +
62
)
#define RC_LABPRT_BEGIN (RC_ENVELP_BEGIN + 6
0
)
#define RC_LABPRT_BEGIN (RC_ENVELP_BEGIN + 6
3
)
#define RC_LABPRT_END (RC_ENVELP_BEGIN +
69
)
#define RC_LABPRT_END (RC_ENVELP_BEGIN +
72
)
// Strings --------------------------------------------------------------------
// Strings --------------------------------------------------------------------
#define STR_DATABASE_NOT_OPENED (RC_ENVLOP_BEGIN + 60)
#define STR_DATABASE_NOT_OPENED (RC_ENVLOP_BEGIN + 63)
#define STR_NO_DRIVERS (RC_ENVLOP_BEGIN + 61)
#define STR_NO_DRIVERS (RC_ENVLOP_BEGIN + 64)
#define DLG_MERGE_CREATE (RC_ENVLOP_BEGIN + 62)
#define DLG_MERGE_CREATE (RC_ENVLOP_BEGIN + 65)
#define DLG_MERGE_FIELD_CONNECTIONS (RC_ENVLOP_BEGIN + 63)
#define DLG_MERGE_FIELD_CONNECTIONS (RC_ENVLOP_BEGIN + 66)
#define STR_BTN_NEW_DOC (RC_ENVLOP_BEGIN + 64)
#define STR_BTN_NEWDOC (RC_ENVLOP_BEGIN + 65)
#define STR_SENDER_TOKENS (RC_ENVLOP_BEGIN + 66)
#define STR_BTN_NEW_DOC (RC_ENVLOP_BEGIN + 67)
#define STR_BTN_NEWDOC (RC_ENVLOP_BEGIN + 68)
#define STR_SENDER_TOKENS (RC_ENVLOP_BEGIN + 69)
// Ueberlaufpruefung ----------------------------------------------------------
// Ueberlaufpruefung ----------------------------------------------------------
#define ENVELP_ACT_END STR_SENDER_TOKENS
#define ENVELP_ACT_END STR_SENDER_TOKENS
...
...
sw/source/ui/app/applab.cxx
Dosyayı görüntüle @
80a72c4c
...
@@ -250,8 +250,8 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
...
@@ -250,8 +250,8 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
SvxULSpaceItem
aULMargin
(
RES_UL_SPACE
);
SvxULSpaceItem
aULMargin
(
RES_UL_SPACE
);
aLRMargin
.
SetLeft
((
sal_uInt16
)
rItem
.
lLeft
);
aLRMargin
.
SetLeft
((
sal_uInt16
)
rItem
.
lLeft
);
aULMargin
.
SetUpper
((
sal_uInt16
)
rItem
.
lUpper
);
aULMargin
.
SetUpper
((
sal_uInt16
)
rItem
.
lUpper
);
aLRMargin
.
SetRight
(
MINLAY
/
2
);
aLRMargin
.
SetRight
(
0
);
aULMargin
.
SetLower
(
MINLAY
/
2
);
aULMargin
.
SetLower
(
0
);
rFmt
.
SetFmtAttr
(
aLRMargin
);
rFmt
.
SetFmtAttr
(
aLRMargin
);
rFmt
.
SetFmtAttr
(
aULMargin
);
rFmt
.
SetFmtAttr
(
aULMargin
);
...
@@ -264,15 +264,11 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
...
@@ -264,15 +264,11 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
aDesc
.
SetUseOn
(
nsUseOnPage
::
PD_ALL
);
// Site numbering
aDesc
.
SetUseOn
(
nsUseOnPage
::
PD_ALL
);
// Site numbering
// fix (fdo36874) revised page size calculation
// Set page size
// Set page size
long
lPgWidth
,
lPgHeight
;
long
lPgWidth
,
lPgHeight
;
lPgWidth
=
(((
rItem
.
lLeft
+
(
rItem
.
nCols
-
1
)
*
rItem
.
lHDist
+
rItem
.
lWidth
+
rItem
.
lLeft
)
>
MINLAY
)
?
lPgWidth
=
(
rItem
.
lPWidth
>
MINLAY
?
rItem
.
lPWidth
:
MINLAY
);
(
rItem
.
lLeft
+
(
rItem
.
nCols
-
1
)
*
rItem
.
lHDist
+
rItem
.
lWidth
+
rItem
.
lLeft
)
:
MINLAY
);
lPgHeight
=
(
rItem
.
lPHeight
>
MINLAY
?
rItem
.
lPHeight
:
MINLAY
);
lPgHeight
=
(((
rItem
.
lUpper
+
(
rItem
.
nRows
-
1
)
*
rItem
.
lVDist
+
rItem
.
lHeight
+
rItem
.
lUpper
)
>
MINLAY
)
?
(
rItem
.
lUpper
+
(
rItem
.
nRows
-
1
)
*
rItem
.
lVDist
+
rItem
.
lHeight
+
rItem
.
lUpper
)
:
MINLAY
);
rFmt
.
SetFmtAttr
(
SwFmtFrmSize
(
ATT_FIX_SIZE
,
lPgWidth
,
lPgHeight
));
rFmt
.
SetFmtAttr
(
SwFmtFrmSize
(
ATT_FIX_SIZE
,
lPgWidth
,
lPgHeight
));
// Numbering type
// Numbering type
SvxNumberType
aType
;
SvxNumberType
aType
;
aType
.
SetNumberingType
(
SVX_NUM_NUMBER_NONE
);
aType
.
SetNumberingType
(
SVX_NUM_NUMBER_NONE
);
...
@@ -287,10 +283,8 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
...
@@ -287,10 +283,8 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
aItem
.
SetValue
((
sal_Int8
)
pPrt
->
GetPaperBin
());
aItem
.
SetValue
((
sal_Int8
)
pPrt
->
GetPaperBin
());
rFmt
.
SetFmtAttr
(
aItem
);
rFmt
.
SetFmtAttr
(
aItem
);
// Determine orientation by calculating the width and height of the resulting page
// Determine orientation of the resulting page
const
int
nResultWidth
=
rItem
.
lHDist
*
(
rItem
.
nCols
-
1
)
+
rItem
.
lWidth
+
rItem
.
lLeft
;
aDesc
.
SetLandscape
(
rItem
.
lPWidth
>
rItem
.
lPHeight
);
const
int
nResultHeight
=
rItem
.
lVDist
*
(
rItem
.
nRows
-
1
)
+
rItem
.
lHeight
+
rItem
.
lUpper
;
aDesc
.
SetLandscape
(
nResultWidth
>
nResultHeight
);
pSh
->
ChgPageDesc
(
0
,
aDesc
);
pSh
->
ChgPageDesc
(
0
,
aDesc
);
...
@@ -298,37 +292,38 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
...
@@ -298,37 +292,38 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
SwFldMgr
*
pFldMgr
=
new
SwFldMgr
;
SwFldMgr
*
pFldMgr
=
new
SwFldMgr
;
pFldMgr
->
SetEvalExpFlds
(
sal_False
);
pFldMgr
->
SetEvalExpFlds
(
sal_False
);
//fix(24446): To avoid that labels end up in unprintable area, we set
//borders accordingly. To keep the handling as good as possible, we
//don't set any border as hard attribute at the current paragraph template
//(so that formating works, because of character-bound borders). Then
//we set the default paragraph template using the unprintable area.
const
long
nMin
=
pPrt
->
GetPageOffset
().
X
()
-
rItem
.
lLeft
;
if
(
nMin
>
0
)
{
SvxLRSpaceItem
aLR
(
RES_LR_SPACE
);
pSh
->
SetAttr
(
aLR
);
SwFmt
*
pStandard
=
pSh
->
GetTxtCollFromPool
(
RES_POOLCOLL_STANDARD
);
aLR
.
SetLeft
(
sal_uInt16
(
nMin
)
);
aLR
.
SetRight
(
sal_uInt16
(
nMin
)
);
pStandard
->
SetFmtAttr
(
aLR
);
}
// Prepare border template
// Prepare border template
SwFrmFmt
*
pFmt
=
pSh
->
GetFrmFmtFromPool
(
RES_POOLFRM_LABEL
);
SwFrmFmt
*
pFmt
=
pSh
->
GetFrmFmtFromPool
(
RES_POOLFRM_LABEL
);
SwFmtFrmSize
aFrmSize
(
ATT_FIX_SIZE
,
SwFrmFmt
*
pFmtEORow
=
pSh
->
GetFrmFmtFromPool
(
RES_POOLFRM_LABEL
);
//new SwFrmFmt (*pFmt);
rItem
.
lHDist
-
(
rItem
.
lHDist
-
rItem
.
lWidth
),
SwFrmFmt
*
pFmtEOCol
=
pSh
->
GetFrmFmtFromPool
(
RES_POOLFRM_LABEL
);
//new SwFrmFmt (*pFmt);
rItem
.
lVDist
-
(
rItem
.
lVDist
-
rItem
.
lHeight
));
SwFrmFmt
*
pFmtEOColEORow
=
pSh
->
GetFrmFmtFromPool
(
RES_POOLFRM_LABEL
);
//new SwFrmFmt (*pFmt);
pFmt
->
SetFmtAttr
(
aFrmSize
);
SvxLRSpaceItem
aFrmLRSpace
(
0
,
(
sal_uInt16
)(
rItem
.
lHDist
-
rItem
.
lWidth
),
sal_Int32
iResultWidth
=
rItem
.
lLeft
+
(
rItem
.
nCols
-
1
)
*
rItem
.
lHDist
+
rItem
.
lWidth
-
rItem
.
lPWidth
;
0
,
0
,
sal_Int32
iResultHeight
=
rItem
.
lUpper
+
(
rItem
.
nRows
-
1
)
*
rItem
.
lVDist
+
rItem
.
lHeight
-
rItem
.
lPHeight
;
RES_LR_SPACE
);
sal_Int32
iWidth
=
(
iResultWidth
>
0
?
rItem
.
lWidth
-
(
iResultWidth
/
rItem
.
nCols
)
-
1
:
rItem
.
lWidth
);
pFmt
->
SetFmtAttr
(
aFrmLRSpace
);
sal_Int32
iHeight
=
(
iResultHeight
>
0
?
rItem
.
lHeight
-
(
iResultHeight
/
rItem
.
nRows
)
-
1
:
rItem
.
lHeight
);
SwFmtFrmSize
aFrmSize
(
ATT_FIX_SIZE
,
iWidth
,
iHeight
);
SvxULSpaceItem
aFrmULSpace
(
0
,
(
sal_uInt16
)(
rItem
.
lVDist
-
rItem
.
lHeight
),
SvxULSpaceItem
aFrmULSpace
(
0
,
(
sal_uInt16
)(
rItem
.
lVDist
-
rItem
.
lHeight
),
RES_UL_SPACE
);
RES_UL_SPACE
);
SvxULSpaceItem
aFrmNoULSpace
(
0
,
0
,
RES_UL_SPACE
);
SvxLRSpaceItem
aFrmLRSpace
(
0
,
(
sal_uInt16
)(
rItem
.
lHDist
-
rItem
.
lWidth
),
0
,
0
,
RES_LR_SPACE
);
SvxLRSpaceItem
aFrmNoLRSpace
(
0
,
0
,
0
,
0
,
RES_LR_SPACE
);
pFmt
->
SetFmtAttr
(
aFrmSize
);
pFmt
->
SetFmtAttr
(
aFrmULSpace
);
pFmt
->
SetFmtAttr
(
aFrmULSpace
);
pFmt
->
SetFmtAttr
(
aFrmLRSpace
);
pFmtEORow
->
SetFmtAttr
(
aFrmSize
);
pFmtEORow
->
SetFmtAttr
(
aFrmULSpace
);
pFmtEORow
->
SetFmtAttr
(
aFrmNoLRSpace
);
pFmtEOCol
->
SetFmtAttr
(
aFrmSize
);
pFmtEOCol
->
SetFmtAttr
(
aFrmNoULSpace
);
pFmtEOCol
->
SetFmtAttr
(
aFrmLRSpace
);
pFmtEOColEORow
->
SetFmtAttr
(
aFrmSize
);
pFmtEOColEORow
->
SetFmtAttr
(
aFrmNoULSpace
);
pFmtEOColEORow
->
SetFmtAttr
(
aFrmNoLRSpace
);
const
SwFrmFmt
*
pFirstFlyFmt
=
0
;
const
SwFrmFmt
*
pFirstFlyFmt
=
0
;
if
(
rItem
.
bPage
)
if
(
rItem
.
bPage
)
...
@@ -336,18 +331,27 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
...
@@ -336,18 +331,27 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
SwFmtVertOrient
aFrmVertOrient
(
pFmt
->
GetVertOrient
()
);
SwFmtVertOrient
aFrmVertOrient
(
pFmt
->
GetVertOrient
()
);
aFrmVertOrient
.
SetVertOrient
(
text
::
VertOrientation
::
TOP
);
aFrmVertOrient
.
SetVertOrient
(
text
::
VertOrientation
::
TOP
);
pFmt
->
SetFmtAttr
(
aFrmVertOrient
);
pFmt
->
SetFmtAttr
(
aFrmVertOrient
);
pFmtEORow
->
SetFmtAttr
(
aFrmVertOrient
);
pFmtEOCol
->
SetFmtAttr
(
aFrmVertOrient
);
pFmtEOColEORow
->
SetFmtAttr
(
aFrmVertOrient
);
for
(
sal_uInt16
i
=
0
;
i
<
rItem
.
nRows
;
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
rItem
.
nRows
;
++
i
)
{
{
for
(
sal_uInt16
j
=
0
;
j
<
rItem
.
nCols
;
++
j
)
for
(
sal_uInt16
j
=
0
;
j
<
rItem
.
nCols
;
++
j
)
{
{
pSh
->
Push
();
pSh
->
Push
();
SwFrmFmt
*
pFrmFmt
;
if
(
j
==
rItem
.
nCols
-
1
)
pFrmFmt
=
(
i
==
rItem
.
nRows
-
1
?
pFmtEOColEORow
:
pFmtEORow
);
else
pFrmFmt
=
(
i
==
rItem
.
nRows
-
1
?
pFmtEOCol
:
pFmt
);
const
SwFrmFmt
*
pTmp
=
const
SwFrmFmt
*
pTmp
=
bLabel
?
bLabel
?
lcl_InsertLabText
(
*
pSh
,
rItem
,
*
pFmt
,
*
pFldMgr
,
j
,
i
,
lcl_InsertLabText
(
*
pSh
,
rItem
,
*
pF
rmF
mt
,
*
pFldMgr
,
j
,
i
,
i
==
rItem
.
nRows
-
1
&&
j
==
rItem
.
nCols
-
1
,
i
==
rItem
.
nRows
-
1
&&
j
==
rItem
.
nCols
-
1
,
sal_True
)
:
sal_True
)
:
lcl_InsertBCText
(
*
pSh
,
rItem
,
*
pFrmFmt
,
j
,
i
,
sal_True
);
lcl_InsertBCText
(
*
pSh
,
rItem
,
*
pFmt
,
j
,
i
,
sal_True
);
if
(
!
(
i
|
j
))
if
(
!
(
i
|
j
))
{
{
pFirstFlyFmt
=
pTmp
;
pFirstFlyFmt
=
pTmp
;
...
...
sw/source/ui/envelp/label1.cxx
Dosyayı görüntüle @
80a72c4c
...
@@ -64,6 +64,8 @@ void SwLabRec::SetFromItem( const SwLabItem& rItem )
...
@@ -64,6 +64,8 @@ void SwLabRec::SetFromItem( const SwLabItem& rItem )
lUpper
=
rItem
.
lUpper
;
lUpper
=
rItem
.
lUpper
;
nCols
=
rItem
.
nCols
;
nCols
=
rItem
.
nCols
;
nRows
=
rItem
.
nRows
;
nRows
=
rItem
.
nRows
;
lPWidth
=
rItem
.
lPWidth
;
lPHeight
=
rItem
.
lPHeight
;
bCont
=
rItem
.
bCont
;
bCont
=
rItem
.
bCont
;
}
}
...
@@ -76,6 +78,8 @@ void SwLabRec::FillItem( SwLabItem& rItem ) const
...
@@ -76,6 +78,8 @@ void SwLabRec::FillItem( SwLabItem& rItem ) const
rItem
.
lLeft
=
lLeft
;
rItem
.
lLeft
=
lLeft
;
rItem
.
lUpper
=
lUpper
;
rItem
.
lUpper
=
lUpper
;
rItem
.
nCols
=
nCols
;
rItem
.
nCols
=
nCols
;
rItem
.
lPWidth
=
lPWidth
;
rItem
.
lPHeight
=
lPHeight
;
rItem
.
nRows
=
nRows
;
rItem
.
nRows
=
nRows
;
}
}
...
...
sw/source/ui/envelp/labelcfg.cxx
Dosyayı görüntüle @
80a72c4c
...
@@ -77,6 +77,8 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
...
@@ -77,6 +77,8 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
const
Any
*
pValues
=
rValues
.
getConstArray
();
const
Any
*
pValues
=
rValues
.
getConstArray
();
OUString
sTmp
;
OUString
sTmp
;
pNewRec
->
aMake
=
rManufacturer
;
pNewRec
->
aMake
=
rManufacturer
;
pNewRec
->
lPWidth
=
0
;
pNewRec
->
lPHeight
=
0
;
for
(
sal_Int32
nProp
=
0
;
nProp
<
rValues
.
getLength
();
nProp
++
)
for
(
sal_Int32
nProp
=
0
;
nProp
<
rValues
.
getLength
();
nProp
++
)
{
{
if
(
pValues
[
nProp
].
hasValue
())
if
(
pValues
[
nProp
].
hasValue
())
...
@@ -98,14 +100,16 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
...
@@ -98,14 +100,16 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
switch
(
i
)
switch
(
i
)
{
{
case
0
:
pNewRec
->
bCont
=
sToken
.
GetChar
(
0
)
==
'C'
;
break
;
case
0
:
pNewRec
->
bCont
=
sToken
.
GetChar
(
0
)
==
'C'
;
break
;
case
1
:
pNewRec
->
lHDist
=
MM100_TO_TWIP
(
nVal
);
break
;
case
1
:
pNewRec
->
lHDist
=
MM100_TO_TWIP
(
nVal
);
break
;
case
2
:
pNewRec
->
lVDist
=
MM100_TO_TWIP
(
nVal
);
break
;
case
2
:
pNewRec
->
lVDist
=
MM100_TO_TWIP
(
nVal
);
break
;
case
3
:
pNewRec
->
lWidth
=
MM100_TO_TWIP
(
nVal
);
break
;
case
3
:
pNewRec
->
lWidth
=
MM100_TO_TWIP
(
nVal
);
break
;
case
4
:
pNewRec
->
lHeight
=
MM100_TO_TWIP
(
nVal
);
break
;
case
4
:
pNewRec
->
lHeight
=
MM100_TO_TWIP
(
nVal
);
break
;
case
5
:
pNewRec
->
lLeft
=
MM100_TO_TWIP
(
nVal
);
break
;
case
5
:
pNewRec
->
lLeft
=
MM100_TO_TWIP
(
nVal
);
break
;
case
6
:
pNewRec
->
lUpper
=
MM100_TO_TWIP
(
nVal
);
break
;
case
6
:
pNewRec
->
lUpper
=
MM100_TO_TWIP
(
nVal
);
break
;
case
7
:
pNewRec
->
nCols
=
nVal
;
break
;
case
7
:
pNewRec
->
nCols
=
nVal
;
break
;
case
8
:
pNewRec
->
nRows
=
nVal
;
break
;
case
8
:
pNewRec
->
nRows
=
nVal
;
break
;
case
9
:
pNewRec
->
lPWidth
=
MM100_TO_TWIP
(
nVal
);
break
;
case
10
:
pNewRec
->
lPHeight
=
MM100_TO_TWIP
(
nVal
);
break
;
}
}
}
}
}
}
...
@@ -113,6 +117,13 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
...
@@ -113,6 +117,13 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
}
}
}
}
}
}
// lines added for compatibility with custom label defintions saved before patch 44516
if
(
pNewRec
->
lPWidth
==
0
||
pNewRec
->
lPHeight
==
0
)
{
// old style definition (no paper dimensions), calculate probable values
pNewRec
->
lPWidth
=
2
*
pNewRec
->
lLeft
+
(
pNewRec
->
nCols
-
1
)
*
pNewRec
->
lHDist
+
pNewRec
->
lWidth
;
pNewRec
->
lPHeight
=
(
pNewRec
->
bCont
?
pNewRec
->
nRows
*
pNewRec
->
lVDist
:
2
*
pNewRec
->
lUpper
+
(
pNewRec
->
nRows
-
1
)
*
pNewRec
->
lVDist
+
pNewRec
->
lHeight
);
}
return
pNewRec
;
return
pNewRec
;
}
}
...
@@ -140,8 +151,10 @@ Sequence<PropertyValue> lcl_CreateProperties(
...
@@ -140,8 +151,10 @@ Sequence<PropertyValue> lcl_CreateProperties(
sTmp
+=
OUString
::
valueOf
(
TWIP_TO_MM100
(
rRec
.
lHeight
)
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
TWIP_TO_MM100
(
rRec
.
lHeight
)
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
TWIP_TO_MM100
(
rRec
.
lLeft
)
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
TWIP_TO_MM100
(
rRec
.
lLeft
)
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
TWIP_TO_MM100
(
rRec
.
lUpper
)
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
TWIP_TO_MM100
(
rRec
.
lUpper
)
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
rRec
.
nCols
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
rRec
.
nCols
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
rRec
.
nRows
);
sTmp
+=
OUString
::
valueOf
(
rRec
.
nRows
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
TWIP_TO_MM100
(
rRec
.
lPWidth
)
);
sTmp
+=
sColon
;
sTmp
+=
OUString
::
valueOf
(
TWIP_TO_MM100
(
rRec
.
lPHeight
)
);
pValues
[
nProp
].
Value
<<=
sTmp
;
pValues
[
nProp
].
Value
<<=
sTmp
;
}
}
break
;
break
;
...
...
sw/source/ui/envelp/labfmt.cxx
Dosyayı görüntüle @
80a72c4c
...
@@ -67,7 +67,9 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
...
@@ -67,7 +67,9 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
aLeftStr
(
SW_RES
(
STR_LEFT
)),
aLeftStr
(
SW_RES
(
STR_LEFT
)),
aUpperStr
(
SW_RES
(
STR_UPPER
)),
aUpperStr
(
SW_RES
(
STR_UPPER
)),
aColsStr
(
SW_RES
(
STR_COLS
)),
aColsStr
(
SW_RES
(
STR_COLS
)),
aRowsStr
(
SW_RES
(
STR_ROWS
))
aRowsStr
(
SW_RES
(
STR_ROWS
)),
aPWidthStr
(
SW_RES
(
STR_PWIDTH
)),
aPHeightStr
(
SW_RES
(
STR_PHEIGHT
))
{
{
SetMapMode
(
MAP_PIXEL
);
SetMapMode
(
MAP_PIXEL
);
...
@@ -92,7 +94,8 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
...
@@ -92,7 +94,8 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
lLeftWidth
=
GetTextWidth
(
aLeftStr
);
lLeftWidth
=
GetTextWidth
(
aLeftStr
);
lUpperWidth
=
GetTextWidth
(
aUpperStr
);
lUpperWidth
=
GetTextWidth
(
aUpperStr
);
lColsWidth
=
GetTextWidth
(
aColsStr
);
lColsWidth
=
GetTextWidth
(
aColsStr
);
lPWidthWidth
=
GetTextWidth
(
aPWidthStr
);
lPHeightWidth
=
GetTextWidth
(
aPHeightStr
);
lXHeight
=
GetTextHeight
();
lXHeight
=
GetTextHeight
();
lXWidth
=
GetTextWidth
(
'X'
);
lXWidth
=
GetTextWidth
(
'X'
);
...
@@ -170,7 +173,7 @@ void SwLabPreview::Paint(const Rectangle &)
...
@@ -170,7 +173,7 @@ void SwLabPreview::Paint(const Rectangle &)
// Labels
// Labels
SetClipRegion
(
Rectangle
(
Point
(
lX0
,
lY0
),
Size
(
lOutlineW
,
lOutlineH
)));
SetClipRegion
(
Rectangle
(
Point
(
lX0
,
lY0
),
Size
(
lOutlineW
,
lOutlineH
)));
SetFillColor
(
rWinColor
);
SetFillColor
(
Color
(
0xE0
,
0xE0
,
0xFF
)
);
for
(
sal_uInt16
nRow
=
0
;
nRow
<
Min
((
sal_uInt16
)
2
,
(
sal_uInt16
)
aItem
.
nRows
);
nRow
++
)
for
(
sal_uInt16
nRow
=
0
;
nRow
<
Min
((
sal_uInt16
)
2
,
(
sal_uInt16
)
aItem
.
nRows
);
nRow
++
)
for
(
sal_uInt16
nCol
=
0
;
nCol
<
Min
((
sal_uInt16
)
2
,
(
sal_uInt16
)
aItem
.
nCols
);
nCol
++
)
for
(
sal_uInt16
nCol
=
0
;
nCol
<
Min
((
sal_uInt16
)
2
,
(
sal_uInt16
)
aItem
.
nCols
);
nCol
++
)
DrawRect
(
Rectangle
(
DrawRect
(
Rectangle
(
...
@@ -321,6 +324,10 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
...
@@ -321,6 +324,10 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aColsField
(
this
,
SW_RES
(
FLD_COLUMNS
)),
aColsField
(
this
,
SW_RES
(
FLD_COLUMNS
)),
aRowsText
(
this
,
SW_RES
(
TXT_ROWS
)),
aRowsText
(
this
,
SW_RES
(
TXT_ROWS
)),
aRowsField
(
this
,
SW_RES
(
FLD_ROWS
)),
aRowsField
(
this
,
SW_RES
(
FLD_ROWS
)),
aPWidthText
(
this
,
SW_RES
(
TXT_PWIDTH
)),
aPWidthField
(
this
,
SW_RES
(
FLD_PWIDTH
)),
aPHeightText
(
this
,
SW_RES
(
TXT_PHEIGHT
)),
aPHeightField
(
this
,
SW_RES
(
FLD_PHEIGHT
)),
aSavePB
(
this
,
SW_RES
(
PB_SAVE
)),
aSavePB
(
this
,
SW_RES
(
PB_SAVE
)),
bModified
(
sal_False
),
bModified
(
sal_False
),
aItem
((
const
SwLabItem
&
)
rSet
.
Get
(
FN_LABEL
))
aItem
((
const
SwLabItem
&
)
rSet
.
Get
(
FN_LABEL
))
...
@@ -336,6 +343,8 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
...
@@ -336,6 +343,8 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
SetMetric
(
aHeightField
,
aMetric
);
SetMetric
(
aHeightField
,
aMetric
);
SetMetric
(
aLeftField
,
aMetric
);
SetMetric
(
aLeftField
,
aMetric
);
SetMetric
(
aUpperField
,
aMetric
);
SetMetric
(
aUpperField
,
aMetric
);
SetMetric
(
aPWidthField
,
aMetric
);
SetMetric
(
aPHeightField
,
aMetric
);
// Install handlers
// Install handlers
Link
aLk
=
LINK
(
this
,
SwLabFmtPage
,
ModifyHdl
);
Link
aLk
=
LINK
(
this
,
SwLabFmtPage
,
ModifyHdl
);
...
@@ -347,6 +356,8 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
...
@@ -347,6 +356,8 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aUpperField
.
SetModifyHdl
(
aLk
);
aUpperField
.
SetModifyHdl
(
aLk
);
aColsField
.
SetModifyHdl
(
aLk
);
aColsField
.
SetModifyHdl
(
aLk
);
aRowsField
.
SetModifyHdl
(
aLk
);
aRowsField
.
SetModifyHdl
(
aLk
);
aPWidthField
.
SetModifyHdl
(
aLk
);
aPHeightField
.
SetModifyHdl
(
aLk
);
aLk
=
LINK
(
this
,
SwLabFmtPage
,
LoseFocusHdl
);
aLk
=
LINK
(
this
,
SwLabFmtPage
,
LoseFocusHdl
);
aHDistField
.
SetLoseFocusHdl
(
aLk
);
aHDistField
.
SetLoseFocusHdl
(
aLk
);
...
@@ -357,6 +368,8 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
...
@@ -357,6 +368,8 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aUpperField
.
SetLoseFocusHdl
(
aLk
);
aUpperField
.
SetLoseFocusHdl
(
aLk
);
aColsField
.
SetLoseFocusHdl
(
aLk
);
aColsField
.
SetLoseFocusHdl
(
aLk
);
aRowsField
.
SetLoseFocusHdl
(
aLk
);
aRowsField
.
SetLoseFocusHdl
(
aLk
);
aPWidthField
.
SetLoseFocusHdl
(
aLk
);
aPHeightField
.
SetLoseFocusHdl
(
aLk
);
aSavePB
.
SetClickHdl
(
LINK
(
this
,
SwLabFmtPage
,
SaveHdl
));
aSavePB
.
SetClickHdl
(
LINK
(
this
,
SwLabFmtPage
,
SaveHdl
));
// Set timer
// Set timer
...
@@ -401,21 +414,26 @@ IMPL_LINK_INLINE_END( SwLabFmtPage, LoseFocusHdl, Control *, pControl )
...
@@ -401,21 +414,26 @@ IMPL_LINK_INLINE_END( SwLabFmtPage, LoseFocusHdl, Control *, pControl )
void
SwLabFmtPage
::
ChangeMinMax
()
void
SwLabFmtPage
::
ChangeMinMax
()
{
{
long
lMax
=
31748
;
// 56 cm
long
lMax
=
31748
;
// 56 cm
long
nMinSize
=
10
;
// 0,1cm
// Min and Max
// Min and Max
int
nCols
=
aColsField
.
GetValue
(),
nRows
=
aRowsField
.
GetValue
();
long
lLeft
=
static_cast
<
long
>
(
GETFLDVAL
(
aLeftField
)),
long
lLeft
=
static_cast
<
long
>
(
GETFLDVAL
(
aLeftField
)),
lUpper
=
static_cast
<
long
>
(
GETFLDVAL
(
aUpperField
)),
lUpper
=
static_cast
<
long
>
(
GETFLDVAL
(
aUpperField
)),
lHDist
=
static_cast
<
long
>
(
GETFLDVAL
(
aHDistField
)),
lHDist
=
static_cast
<
long
>
(
GETFLDVAL
(
aHDistField
)),
lVDist
=
static_cast
<
long
>
(
GETFLDVAL
(
aVDistField
));
lVDist
=
static_cast
<
long
>
(
GETFLDVAL
(
aVDistField
)),
lWidth
=
static_cast
<
long
>
(
GETFLDVAL
(
aWidthField
)),
long
nMinSize
=
10
;
// 0,1cm
lHeight
=
static_cast
<
long
>
(
GETFLDVAL
(
aHeightField
)),
lMinPWidth
=
lLeft
+
(
nCols
-
1
)
*
lHDist
+
lWidth
,
lMinPHeight
=
lUpper
+
(
nRows
-
1
)
*
lVDist
+
lHeight
;
aHDistField
.
SetMin
(
nMinSize
,
FUNIT_CM
);
aHDistField
.
SetMin
(
nMinSize
,
FUNIT_CM
);
aVDistField
.
SetMin
(
nMinSize
,
FUNIT_CM
);
aVDistField
.
SetMin
(
nMinSize
,
FUNIT_CM
);
aHDistField
.
SetMax
((
long
)
100
*
((
lMax
-
lLeft
)
/
Max
(
1L
,
(
long
)
aColsField
.
GetValue
()
)),
FUNIT_TWIP
);
aHDistField
.
SetMax
((
long
)
100
*
((
lMax
-
lLeft
)
/
Max
(
1L
,
(
long
)
nCols
)),
FUNIT_TWIP
);
aVDistField
.
SetMax
((
long
)
100
*
((
lMax
-
lUpper
)
/
Max
(
1L
,
(
long
)
aRowsField
.
GetValue
()
)),
FUNIT_TWIP
);
aVDistField
.
SetMax
((
long
)
100
*
((
lMax
-
lUpper
)
/
Max
(
1L
,
(
long
)
nRows
)),
FUNIT_TWIP
);
aWidthField
.
SetMin
(
nMinSize
,
FUNIT_CM
);
aWidthField
.
SetMin
(
nMinSize
,
FUNIT_CM
);
aHeightField
.
SetMin
(
nMinSize
,
FUNIT_CM
);
aHeightField
.
SetMin
(
nMinSize
,
FUNIT_CM
);
...
@@ -423,12 +441,19 @@ void SwLabFmtPage::ChangeMinMax()
...
@@ -423,12 +441,19 @@ void SwLabFmtPage::ChangeMinMax()
aWidthField
.
SetMax
((
long
)
100
*
(
lHDist
),
FUNIT_TWIP
);
aWidthField
.
SetMax
((
long
)
100
*
(
lHDist
),
FUNIT_TWIP
);
aHeightField
.
SetMax
((
long
)
100
*
(
lVDist
),
FUNIT_TWIP
);
aHeightField
.
SetMax
((
long
)
100
*
(
lVDist
),
FUNIT_TWIP
);
aLeftField
.
SetMax
((
long
)
100
*
(
lMax
-
(
long
)
aColsField
.
GetValue
()
*
GETFLDVAL
(
aHDistField
)),
FUNIT_TWIP
);
aLeftField
.
SetMax
((
long
)
100
*
(
lMax
-
nCols
*
lHDist
),
FUNIT_TWIP
);
aUpperField
.
SetMax
((
long
)
100
*
(
lMax
-
(
long
)
aRowsField
.
GetValue
()
*
GETFLDVAL
(
aVDistField
)),
FUNIT_TWIP
);
aUpperField
.
SetMax
((
long
)
100
*
(
lMax
-
nRows
*
lVDist
),
FUNIT_TWIP
);
aColsField
.
SetMin
(
1
);
aRowsField
.
SetMin
(
1
);
aColsField
.
SetMax
((
lMax
-
lLeft
)
/
Max
(
1L
,
lHDist
));
aColsField
.
SetMax
((
lMax
-
lLeft
)
/
Max
(
1L
,
lHDist
));
aRowsField
.
SetMax
((
lMax
-
lUpper
)
/
Max
(
1L
,
lVDist
));
aRowsField
.
SetMax
((
lMax
-
lUpper
)
/
Max
(
1L
,
lVDist
));
aPWidthField
.
SetMin
(
(
long
)
100
*
lMinPWidth
,
FUNIT_TWIP
);
aPHeightField
.
SetMin
(
(
long
)
100
*
lMinPHeight
,
FUNIT_TWIP
);
aPWidthField
.
SetMax
(
(
long
)
100
*
lMax
,
FUNIT_TWIP
);
aPHeightField
.
SetMax
(
(
long
)
100
*
lMax
,
FUNIT_TWIP
);
// First and Last
// First and Last
aHDistField
.
SetFirst
(
aHDistField
.
GetMin
());
aHDistField
.
SetFirst
(
aHDistField
.
GetMin
());
...
@@ -448,7 +473,11 @@ void SwLabFmtPage::ChangeMinMax()
...
@@ -448,7 +473,11 @@ void SwLabFmtPage::ChangeMinMax()
aColsField
.
SetLast
(
aColsField
.
GetMax
());
aColsField
.
SetLast
(
aColsField
.
GetMax
());
aRowsField
.
SetLast
(
aRowsField
.
GetMax
());
aRowsField
.
SetLast
(
aRowsField
.
GetMax
());
aPWidthField
.
SetFirst
(
aPWidthField
.
GetMin
());
aPHeightField
.
SetFirst
(
aPHeightField
.
GetMin
());
aPWidthField
.
SetLast
(
aPWidthField
.
GetMax
());
aPHeightField
.
SetLast
(
aPHeightField
.
GetMax
());
aHDistField
.
Reformat
();
aHDistField
.
Reformat
();
aVDistField
.
Reformat
();
aVDistField
.
Reformat
();
aWidthField
.
Reformat
();
aWidthField
.
Reformat
();
...
@@ -457,6 +486,8 @@ void SwLabFmtPage::ChangeMinMax()
...
@@ -457,6 +486,8 @@ void SwLabFmtPage::ChangeMinMax()
aUpperField
.
Reformat
();
aUpperField
.
Reformat
();
aColsField
.
Reformat
();
aColsField
.
Reformat
();
aRowsField
.
Reformat
();
aRowsField
.
Reformat
();
aPWidthField
.
Reformat
();
aPHeightField
.
Reformat
();
}
}
SfxTabPage
*
SwLabFmtPage
::
Create
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
)
SfxTabPage
*
SwLabFmtPage
::
Create
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
)
...
@@ -493,6 +524,8 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
...
@@ -493,6 +524,8 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
rItem
.
lUpper
=
rRec
.
lUpper
=
static_cast
<
long
>
(
GETFLDVAL
(
aUpperField
));
rItem
.
lUpper
=
rRec
.
lUpper
=
static_cast
<
long
>
(
GETFLDVAL
(
aUpperField
));
rItem
.
nCols
=
rRec
.
nCols
=
(
sal_uInt16
)
aColsField
.
GetValue
();
rItem
.
nCols
=
rRec
.
nCols
=
(
sal_uInt16
)
aColsField
.
GetValue
();
rItem
.
nRows
=
rRec
.
nRows
=
(
sal_uInt16
)
aRowsField
.
GetValue
();
rItem
.
nRows
=
rRec
.
nRows
=
(
sal_uInt16
)
aRowsField
.
GetValue
();
rItem
.
lPWidth
=
rRec
.
lPWidth
=
static_cast
<
long
>
(
GETFLDVAL
(
aPWidthField
));
rItem
.
lPHeight
=
rRec
.
lPHeight
=
static_cast
<
long
>
(
GETFLDVAL
(
aPHeightField
));
}
}
}
}
...
@@ -515,6 +548,8 @@ void SwLabFmtPage::Reset(const SfxItemSet& )
...
@@ -515,6 +548,8 @@ void SwLabFmtPage::Reset(const SfxItemSet& )
aHeightField
.
SetMax
(
100
*
aItem
.
lHeight
,
FUNIT_TWIP
);
aHeightField
.
SetMax
(
100
*
aItem
.
lHeight
,
FUNIT_TWIP
);
aLeftField
.
SetMax
(
100
*
aItem
.
lLeft
,
FUNIT_TWIP
);
aLeftField
.
SetMax
(
100
*
aItem
.
lLeft
,
FUNIT_TWIP
);
aUpperField
.
SetMax
(
100
*
aItem
.
lUpper
,
FUNIT_TWIP
);
aUpperField
.
SetMax
(
100
*
aItem
.
lUpper
,
FUNIT_TWIP
);
aPWidthField
.
SetMax
(
100
*
aItem
.
lPWidth
,
FUNIT_TWIP
);
aPHeightField
.
SetMax
(
100
*
aItem
.
lPHeight
,
FUNIT_TWIP
);
SETFLDVAL
(
aHDistField
,
aItem
.
lHDist
);
SETFLDVAL
(
aHDistField
,
aItem
.
lHDist
);
SETFLDVAL
(
aVDistField
,
aItem
.
lVDist
);
SETFLDVAL
(
aVDistField
,
aItem
.
lVDist
);
...
@@ -522,6 +557,8 @@ void SwLabFmtPage::Reset(const SfxItemSet& )
...
@@ -522,6 +557,8 @@ void SwLabFmtPage::Reset(const SfxItemSet& )
SETFLDVAL
(
aHeightField
,
aItem
.
lHeight
);
SETFLDVAL
(
aHeightField
,
aItem
.
lHeight
);
SETFLDVAL
(
aLeftField
,
aItem
.
lLeft
);
SETFLDVAL
(
aLeftField
,
aItem
.
lLeft
);
SETFLDVAL
(
aUpperField
,
aItem
.
lUpper
);
SETFLDVAL
(
aUpperField
,
aItem
.
lUpper
);
SETFLDVAL
(
aPWidthField
,
aItem
.
lPWidth
);
SETFLDVAL
(
aPHeightField
,
aItem
.
lPHeight
);
aColsField
.
SetMax
(
aItem
.
nCols
);
aColsField
.
SetMax
(
aItem
.
nCols
);
aRowsField
.
SetMax
(
aItem
.
nRows
);
aRowsField
.
SetMax
(
aItem
.
nRows
);
...
@@ -544,6 +581,8 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
...
@@ -544,6 +581,8 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
aRec
.
lUpper
=
static_cast
<
long
>
(
GETFLDVAL
(
aUpperField
));
aRec
.
lUpper
=
static_cast
<
long
>
(
GETFLDVAL
(
aUpperField
));
aRec
.
nCols
=
(
sal_uInt16
)
aColsField
.
GetValue
();
aRec
.
nCols
=
(
sal_uInt16
)
aColsField
.
GetValue
();
aRec
.
nRows
=
(
sal_uInt16
)
aRowsField
.
GetValue
();
aRec
.
nRows
=
(
sal_uInt16
)
aRowsField
.
GetValue
();
aRec
.
lPWidth
=
static_cast
<
long
>
(
GETFLDVAL
(
aPWidthField
));
aRec
.
lPHeight
=
static_cast
<
long
>
(
GETFLDVAL
(
aPHeightField
));
aRec
.
bCont
=
aItem
.
bCont
;
aRec
.
bCont
=
aItem
.
bCont
;
SwSaveLabelDlg
*
pSaveDlg
=
new
SwSaveLabelDlg
(
this
,
aRec
);
SwSaveLabelDlg
*
pSaveDlg
=
new
SwSaveLabelDlg
(
this
,
aRec
);
pSaveDlg
->
SetLabel
(
aItem
.
aLstMake
,
aItem
.
aLstType
);
pSaveDlg
->
SetLabel
(
aItem
.
aLstMake
,
aItem
.
aLstType
);
...
@@ -644,6 +683,8 @@ sal_Bool SwSaveLabelDlg::GetLabel(SwLabItem& rItem)
...
@@ -644,6 +683,8 @@ sal_Bool SwSaveLabelDlg::GetLabel(SwLabItem& rItem)
rItem
.
lUpper
=
rLabRec
.
lUpper
;
rItem
.
lUpper
=
rLabRec
.
lUpper
;
rItem
.
nCols
=
rLabRec
.
nCols
;
rItem
.
nCols
=
rLabRec
.
nCols
;
rItem
.
nRows
=
rLabRec
.
nRows
;
rItem
.
nRows
=
rLabRec
.
nRows
;
rItem
.
lPWidth
=
rLabRec
.
lPWidth
;
rItem
.
lPHeight
=
rLabRec
.
lPHeight
;
}
}
return
bSuccess
;
return
bSuccess
;
}
}
...
...
sw/source/ui/envelp/labfmt.hrc
Dosyayı görüntüle @
80a72c4c
...
@@ -49,10 +49,14 @@
...
@@ -49,10 +49,14 @@
#define FLD_COLUMNS 15
#define FLD_COLUMNS 15
#define TXT_ROWS 16
#define TXT_ROWS 16
#define FLD_ROWS 17
#define FLD_ROWS 17
#define FL_NONAME 18
#define TXT_PWIDTH 18
#define PB_SAVE 19
#define FLD_PWIDTH 19
#define FI_MAKE 20
#define TXT_PHEIGHT 20
#define FI_TYPE 21
#define FLD_PHEIGHT 21
#define FL_NONAME 22
#define PB_SAVE 23
#define FI_MAKE 24
#define FI_TYPE 25
#define FL_OPTIONS 1
#define FL_OPTIONS 1
#define FT_MAKE 2
#define FT_MAKE 2
...
@@ -74,10 +78,12 @@
...
@@ -74,10 +78,12 @@
#define STR_UPPER (RC_LABFMT_BEGIN + 6)
#define STR_UPPER (RC_LABFMT_BEGIN + 6)
#define STR_COLS (RC_LABFMT_BEGIN + 7)
#define STR_COLS (RC_LABFMT_BEGIN + 7)
#define STR_ROWS (RC_LABFMT_BEGIN + 8)
#define STR_ROWS (RC_LABFMT_BEGIN + 8)
#define STR_PWIDTH (RC_LABFMT_BEGIN + 9)
#define STR_PHEIGHT (RC_LABFMT_BEGIN + 10)
// overflow check ********************************************************
// overflow check ********************************************************
#define LABFMT_ACT_END STR_
ROWS
#define LABFMT_ACT_END STR_
PHEIGHT
#if LABFMT_ACT_END > RC_LABFMT_END
#if LABFMT_ACT_END > RC_LABFMT_END
#error Resource-Ueberlauf in #file, #line
#error Resource-Ueberlauf in #file, #line
...
...
sw/source/ui/envelp/labfmt.hxx
Dosyayı görüntüle @
80a72c4c
...
@@ -52,6 +52,8 @@ class SwLabPreview : public Window
...
@@ -52,6 +52,8 @@ class SwLabPreview : public Window
String
aUpperStr
;
String
aUpperStr
;
String
aColsStr
;
String
aColsStr
;
String
aRowsStr
;
String
aRowsStr
;
String
aPWidthStr
;
String
aPHeightStr
;
long
lHDistWidth
;
long
lHDistWidth
;
long
lVDistWidth
;
long
lVDistWidth
;
...
@@ -59,6 +61,9 @@ class SwLabPreview : public Window
...
@@ -59,6 +61,9 @@ class SwLabPreview : public Window
long
lLeftWidth
;
long
lLeftWidth
;
long
lUpperWidth
;
long
lUpperWidth
;
long
lColsWidth
;
long
lColsWidth
;
long
PRowsWidth
;
long
lPWidthWidth
;
long
lPHeightWidth
;
long
lXWidth
;
long
lXWidth
;
long
lXHeight
;
long
lXHeight
;
...
@@ -105,6 +110,10 @@ class SwLabFmtPage : public SfxTabPage
...
@@ -105,6 +110,10 @@ class SwLabFmtPage : public SfxTabPage
NumericField
aColsField
;
NumericField
aColsField
;
FixedText
aRowsText
;
FixedText
aRowsText
;
NumericField
aRowsField
;
NumericField
aRowsField
;
FixedText
aPWidthText
;
MetricField
aPWidthField
;
FixedText
aPHeightText
;
MetricField
aPHeightField
;
PushButton
aSavePB
;
PushButton
aSavePB
;
Timer
aPreviewTimer
;
Timer
aPreviewTimer
;
...
...
sw/source/ui/envelp/labfmt.src
Dosyayı görüntüle @
80a72c4c
...
@@ -51,7 +51,7 @@ TabPage TP_LAB_FMT
...
@@ -51,7 +51,7 @@ TabPage TP_LAB_FMT
};
};
FixedText TXT_HDIST
FixedText TXT_HDIST
{
{
Pos = MAP_APPFONT ( 6 ,
19
) ;
Pos = MAP_APPFONT ( 6 ,
6
) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "Hori~zontal pitch" ;
Text [ en-US ] = "Hori~zontal pitch" ;
Group = TRUE ;
Group = TRUE ;
...
@@ -61,7 +61,7 @@ TabPage TP_LAB_FMT
...
@@ -61,7 +61,7 @@ TabPage TP_LAB_FMT
{
{
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HDIST";
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HDIST";
Border = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 60 ,
17
) ;
Pos = MAP_APPFONT ( 60 ,
4
) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Left = TRUE ;
...
@@ -73,7 +73,7 @@ TabPage TP_LAB_FMT
...
@@ -73,7 +73,7 @@ TabPage TP_LAB_FMT
};
};
FixedText TXT_VDIST
FixedText TXT_VDIST
{
{
Pos = MAP_APPFONT ( 6 ,
35
) ;
Pos = MAP_APPFONT ( 6 ,
22
) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "~Vertical pitch" ;
Text [ en-US ] = "~Vertical pitch" ;
Left = TRUE ;
Left = TRUE ;
...
@@ -82,7 +82,7 @@ TabPage TP_LAB_FMT
...
@@ -82,7 +82,7 @@ TabPage TP_LAB_FMT
{
{
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_VDIST";
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_VDIST";
Border = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 60 ,
33
) ;
Pos = MAP_APPFONT ( 60 ,
20
) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Left = TRUE ;
...
@@ -94,7 +94,7 @@ TabPage TP_LAB_FMT
...
@@ -94,7 +94,7 @@ TabPage TP_LAB_FMT
};
};
FixedText TXT_WIDTH
FixedText TXT_WIDTH
{
{
Pos = MAP_APPFONT ( 6 ,
51
) ;
Pos = MAP_APPFONT ( 6 ,
38
) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "~Width" ;
Text [ en-US ] = "~Width" ;
Left = TRUE ;
Left = TRUE ;
...
@@ -103,7 +103,7 @@ TabPage TP_LAB_FMT
...
@@ -103,7 +103,7 @@ TabPage TP_LAB_FMT
{
{
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_WIDTH";
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_WIDTH";
Border = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 60 ,
49
) ;
Pos = MAP_APPFONT ( 60 ,
36
) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Left = TRUE ;
...
@@ -115,7 +115,7 @@ TabPage TP_LAB_FMT
...
@@ -115,7 +115,7 @@ TabPage TP_LAB_FMT
};
};
FixedText TXT_HEIGHT
FixedText TXT_HEIGHT
{
{
Pos = MAP_APPFONT ( 6 ,
67
) ;
Pos = MAP_APPFONT ( 6 ,
54
) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "~Height" ;
Text [ en-US ] = "~Height" ;
Left = TRUE ;
Left = TRUE ;
...
@@ -124,7 +124,7 @@ TabPage TP_LAB_FMT
...
@@ -124,7 +124,7 @@ TabPage TP_LAB_FMT
{
{
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HEIGHT";
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HEIGHT";
Border = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 60 ,
65
) ;
Pos = MAP_APPFONT ( 60 ,
52
) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Left = TRUE ;
...
@@ -136,7 +136,7 @@ TabPage TP_LAB_FMT
...
@@ -136,7 +136,7 @@ TabPage TP_LAB_FMT
};
};
FixedText TXT_LEFT
FixedText TXT_LEFT
{
{
Pos = MAP_APPFONT ( 6 ,
83
) ;
Pos = MAP_APPFONT ( 6 ,
70
) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "~Left margin" ;
Text [ en-US ] = "~Left margin" ;
Left = TRUE ;
Left = TRUE ;
...
@@ -145,7 +145,7 @@ TabPage TP_LAB_FMT
...
@@ -145,7 +145,7 @@ TabPage TP_LAB_FMT
{
{
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_LEFT";
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_LEFT";
Border = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 60 ,
81
) ;
Pos = MAP_APPFONT ( 60 ,
68
) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Left = TRUE ;
...
@@ -159,7 +159,7 @@ TabPage TP_LAB_FMT
...
@@ -159,7 +159,7 @@ TabPage TP_LAB_FMT
};
};
FixedText TXT_UPPER
FixedText TXT_UPPER
{
{
Pos = MAP_APPFONT ( 6 ,
99
) ;
Pos = MAP_APPFONT ( 6 ,
86
) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "~Top margin" ;
Text [ en-US ] = "~Top margin" ;
Left = TRUE ;
Left = TRUE ;
...
@@ -168,7 +168,7 @@ TabPage TP_LAB_FMT
...
@@ -168,7 +168,7 @@ TabPage TP_LAB_FMT
{
{
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_UPPER";
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_UPPER";
Border = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 60 ,
97
) ;
Pos = MAP_APPFONT ( 60 ,
84
) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Left = TRUE ;
...
@@ -182,7 +182,7 @@ TabPage TP_LAB_FMT
...
@@ -182,7 +182,7 @@ TabPage TP_LAB_FMT
};
};
FixedText TXT_COLUMNS
FixedText TXT_COLUMNS
{
{
Pos = MAP_APPFONT ( 6 , 1
15
) ;
Pos = MAP_APPFONT ( 6 , 1
02
) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "~Columns" ;
Text [ en-US ] = "~Columns" ;
Left = TRUE ;
Left = TRUE ;
...
@@ -191,7 +191,7 @@ TabPage TP_LAB_FMT
...
@@ -191,7 +191,7 @@ TabPage TP_LAB_FMT
{
{
HelpID = "sw:NumericField:TP_LAB_FMT:FLD_COLUMNS";
HelpID = "sw:NumericField:TP_LAB_FMT:FLD_COLUMNS";
Border = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 1
13
) ;
Pos = MAP_APPFONT ( 60 , 1
00
) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Left = TRUE ;
...
@@ -202,7 +202,7 @@ TabPage TP_LAB_FMT
...
@@ -202,7 +202,7 @@ TabPage TP_LAB_FMT
};
};
FixedText TXT_ROWS
FixedText TXT_ROWS
{
{
Pos = MAP_APPFONT ( 6 , 1
31
) ;
Pos = MAP_APPFONT ( 6 , 1
18
) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "R~ows" ;
Text [ en-US ] = "R~ows" ;
Left = TRUE ;
Left = TRUE ;
...
@@ -211,7 +211,7 @@ TabPage TP_LAB_FMT
...
@@ -211,7 +211,7 @@ TabPage TP_LAB_FMT
{
{
HelpID = "sw:NumericField:TP_LAB_FMT:FLD_ROWS";
HelpID = "sw:NumericField:TP_LAB_FMT:FLD_ROWS";
Border = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 1
29
) ;
Pos = MAP_APPFONT ( 60 , 1
16
) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Left = TRUE ;
...
@@ -220,10 +220,52 @@ TabPage TP_LAB_FMT
...
@@ -220,10 +220,52 @@ TabPage TP_LAB_FMT
Minimum = 1 ;
Minimum = 1 ;
First = 1 ;
First = 1 ;
};
};
FixedText TXT_PWIDTH
{
Pos = MAP_APPFONT ( 6 , 134 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "P~age Width" ;
Left = TRUE ;
};
MetricField FLD_PWIDTH
{
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_PWIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 132 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Spin = TRUE ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
Repeat = TRUE ;
SpinSize = 10 ;
};
FixedText TXT_PHEIGHT
{
Pos = MAP_APPFONT ( 6 , 150 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Text [ en-US ] = "Pa~ge Height" ;
Left = TRUE ;
};
MetricField FLD_PHEIGHT
{
HelpID = "sw:MetricField:TP_LAB_FMT:FLD_PHEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 148 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Spin = TRUE ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
Repeat = TRUE ;
SpinSize = 10 ;
};
PushButton PB_SAVE
PushButton PB_SAVE
{
{
HelpID = "sw:PushButton:TP_LAB_FMT:PB_SAVE";
HelpID = "sw:PushButton:TP_LAB_FMT:PB_SAVE";
Pos = MAP_APPFONT ( 50 , 1
48
) ;
Pos = MAP_APPFONT ( 50 , 1
67
) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Save...";
Text [ en-US ] = "~Save...";
};
};
...
@@ -261,6 +303,14 @@ String STR_ROWS
...
@@ -261,6 +303,14 @@ String STR_ROWS
{
{
Text [ en-US ] = "Rows" ;
Text [ en-US ] = "Rows" ;
};
};
String STR_PWIDTH
{
Text [ en-US ] = "Page Width" ;
};
String STR_PHEIGHT
{
Text [ en-US ] = "Page Height" ;
};
ModalDialog DLG_SAVE_LABEL
ModalDialog DLG_SAVE_LABEL
{
{
HelpID = HID_SAVE_LABEL_DLG ;
HelpID = HID_SAVE_LABEL_DLG ;
...
...
sw/source/ui/envelp/labimg.cxx
Dosyayı görüntüle @
80a72c4c
This diff is collapsed.
Click to expand it.
sw/source/ui/envelp/labimp.hxx
Dosyayı görüntüle @
80a72c4c
...
@@ -105,6 +105,8 @@ public:
...
@@ -105,6 +105,8 @@ public:
long
lHeight
;
long
lHeight
;
long
lLeft
;
long
lLeft
;
long
lUpper
;
long
lUpper
;
long
lPWidth
;
long
lPHeight
;
sal_Int32
nCols
;
sal_Int32
nCols
;
sal_Int32
nRows
;
sal_Int32
nRows
;
sal_Bool
bCont
;
sal_Bool
bCont
;
...
...
sw/source/ui/inc/labimg.hxx
Dosyayı görüntüle @
80a72c4c
...
@@ -68,6 +68,8 @@ public:
...
@@ -68,6 +68,8 @@ public:
sal_Int32
nRows
;
// number of rows (user)
sal_Int32
nRows
;
// number of rows (user)
sal_Int32
nCol
;
// column for single print
sal_Int32
nCol
;
// column for single print
sal_Int32
nRow
;
// row for single print
sal_Int32
nRow
;
// row for single print
sal_Int32
lPHeight
;
// paper height
sal_Int32
lPWidth
;
// paper width
sal_Bool
bAddr
;
// address as label?
sal_Bool
bAddr
;
// address as label?
sal_Bool
bCont
;
// continuous paper?
sal_Bool
bCont
;
// continuous paper?
sal_Bool
bPage
;
// whole page or single labels?
sal_Bool
bPage
;
// whole page or single labels?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment