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
d668a44c
Kaydet (Commit)
d668a44c
authored
May 15, 2001
tarafından
Daniel Vogelheim
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#86546# automatic column width now supported
üst
6f2226f7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
16 deletions
+71
-16
XMLTextColumnsContext.hxx
xmloff/inc/XMLTextColumnsContext.hxx
+7
-2
XMLTextColumnsExport.hxx
xmloff/inc/XMLTextColumnsExport.hxx
+4
-2
xmlkywd.hxx
xmloff/inc/xmlkywd.hxx
+3
-2
XMLTextColumnsContext.cxx
xmloff/source/text/XMLTextColumnsContext.cxx
+32
-6
XMLTextColumnsExport.cxx
xmloff/source/text/XMLTextColumnsExport.cxx
+25
-4
No files found.
xmloff/inc/XMLTextColumnsContext.hxx
Dosyayı görüntüle @
d668a44c
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextColumnsContext.hxx,v $
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
* last change: $Author:
mib $ $Date: 2000-10-30 12:46
:46 $
* last change: $Author:
dvo $ $Date: 2001-05-15 12:37
:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -79,12 +79,17 @@ class XMLTextColumnsContext :public XMLElementPropertyContext
const
::
rtl
::
OUString
sSeparatorLineColor
;
const
::
rtl
::
OUString
sSeparatorLineRelativeHeight
;
const
::
rtl
::
OUString
sSeparatorLineVerticalAlignment
;
const
::
rtl
::
OUString
sIsAutomatic
;
const
::
rtl
::
OUString
sAutomaticDistance
;
XMLTextColumnsArray_Impl
*
pColumns
;
XMLTextColumnSepContext_Impl
*
pColumnSep
;
SvXMLTokenMap
*
pColumnAttrTokenMap
;
SvXMLTokenMap
*
pColumnSepAttrTokenMap
;
sal_Int16
nCount
;
sal_Bool
bAutomatic
;
sal_Int32
nAutomaticDistance
;
public
:
TYPEINFO
();
...
...
xmloff/inc/XMLTextColumnsExport.hxx
Dosyayı görüntüle @
d668a44c
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextColumnsExport.hxx,v $
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
* last change: $Author:
mib $ $Date: 2000-10-30 12:46
:46 $
* last change: $Author:
dvo $ $Date: 2001-05-15 12:37
:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -74,6 +74,8 @@ class XMLTextColumnsExport
const
::
rtl
::
OUString
sSeparatorLineColor
;
const
::
rtl
::
OUString
sSeparatorLineRelativeHeight
;
const
::
rtl
::
OUString
sSeparatorLineVerticalAlignment
;
const
::
rtl
::
OUString
sIsAutomatic
;
const
::
rtl
::
OUString
sAutomaticDistance
;
protected
:
...
...
xmloff/inc/xmlkywd.hxx
Dosyayı görüntüle @
d668a44c
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlkywd.hxx,v $
*
* $Revision: 1.15
5
$
* $Revision: 1.15
6
$
*
* last change: $Author:
bm $ $Date: 2001-05-11 13:54:44
$
* last change: $Author:
dvo $ $Date: 2001-05-15 12:37:45
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -400,6 +400,7 @@ XML_CONSTASCII_ACTION( sXML_color_inversion , "color-inversion" );
XML_CONSTASCII_ACTION
(
sXML_color_mode
,
"color-mode"
);
XML_CONSTASCII_ACTION
(
sXML_column
,
"column"
);
XML_CONSTASCII_ACTION
(
sXML_column_count
,
"column-count"
);
XML_CONSTASCII_ACTION
(
sXML_column_gap
,
"column-gap"
);
XML_CONSTASCII_ACTION
(
sXML_column_name
,
"column-name"
);
XML_CONSTASCII_ACTION
(
sXML_column_sep
,
"column-sep"
);
XML_CONSTASCII_ACTION
(
sXML_column_width
,
"column-width"
);
...
...
xmloff/source/text/XMLTextColumnsContext.cxx
Dosyayı görüntüle @
d668a44c
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextColumnsContext.cxx,v $
*
* $Revision: 1.
5
$
* $Revision: 1.
6
$
*
* last change: $Author:
mtg $ $Date: 2001-04-18 16:14:57
$
* last change: $Author:
dvo $ $Date: 2001-05-15 12:37:49
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -336,11 +336,15 @@ XMLTextColumnsContext::XMLTextColumnsContext(
pColumns
(
0
),
pColumnSep
(
0
),
nCount
(
0
),
bAutomatic
(
sal_False
),
nAutomaticDistance
(
0
),
sSeparatorLineIsOn
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineIsOn"
)),
sSeparatorLineWidth
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineWidth"
)),
sSeparatorLineColor
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineColor"
)),
sSeparatorLineRelativeHeight
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineRelativeHeight"
)),
sSeparatorLineVerticalAlignment
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineVerticalAlignment"
))
sSeparatorLineVerticalAlignment
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineVerticalAlignment"
)),
sIsAutomatic
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsAutomatic"
)),
sAutomaticDistance
(
RTL_CONSTASCII_USTRINGPARAM
(
"AutomaticDistance"
))
{
sal_Int16
nAttrCount
=
xAttrList
.
is
()
?
xAttrList
->
getLength
()
:
0
;
sal_Int32
nVal
;
...
...
@@ -352,14 +356,22 @@ XMLTextColumnsContext::XMLTextColumnsContext(
GetImport
().
GetNamespaceMap
().
GetKeyByAttrName
(
rAttrName
,
&
aLocalName
);
const
OUString
&
rValue
=
xAttrList
->
getValueByIndex
(
i
);
if
(
XML_NAMESPACE_FO
==
nPrefix
&&
aLocalName
.
equalsAsciiL
(
sXML_column_count
,
if
(
XML_NAMESPACE_FO
==
nPrefix
)
{
if
(
aLocalName
.
equalsAsciiL
(
sXML_column_count
,
sizeof
(
sXML_column_count
)
-
1
)
&&
GetImport
().
GetMM100UnitConverter
().
convertNumber
(
nVal
,
rValue
,
0
,
SHRT_MAX
)
)
{
nCount
=
(
sal_Int16
)
nVal
;
}
else
if
(
aLocalName
.
equalsAsciiL
(
sXML_column_gap
,
sizeof
(
sXML_column_gap
)
-
1
)
)
{
bAutomatic
=
GetImport
().
GetMM100UnitConverter
().
convertMeasure
(
nAutomaticDistance
,
rValue
);
}
}
}
}
...
...
@@ -443,8 +455,12 @@ void XMLTextColumnsContext::EndElement( )
// zero columns = no columns -> 1 column
xColumns
->
setColumnCount
(
1
);
}
else
if
(
pColumns
&&
pColumns
->
Count
()
==
(
sal_uInt16
)
nCount
)
else
if
(
!
bAutomatic
&&
pColumns
&&
pColumns
->
Count
()
==
(
sal_uInt16
)
nCount
)
{
// if we have column descriptions, one per column, and we don't use
// automatic width, then set the column widths
sal_Int32
nRelWidth
=
0
;
sal_uInt16
nColumnsWithWidth
=
0
;
for
(
sal_Int16
i
=
0
;
i
<
nCount
;
i
++
)
...
...
@@ -486,6 +502,9 @@ void XMLTextColumnsContext::EndElement( )
}
else
{
// only set column count (and let the columns be distributed
// automatically)
xColumns
->
setColumnCount
(
nCount
);
}
...
...
@@ -520,6 +539,13 @@ void XMLTextColumnsContext::EndElement( )
aAny
<<=
pColumnSep
->
GetVertAlign
();
xPropSet
->
setPropertyValue
(
sSeparatorLineVerticalAlignment
,
aAny
);
}
// handle 'automatic columns': column distance
if
(
bAutomatic
)
{
aAny
<<=
nAutomaticDistance
;
xPropSet
->
setPropertyValue
(
sAutomaticDistance
,
aAny
);
}
}
aProp
.
maValue
<<=
xColumns
;
...
...
xmloff/source/text/XMLTextColumnsExport.cxx
Dosyayı görüntüle @
d668a44c
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextColumnsExport.cxx,v $
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
* last change: $Author:
mib $ $Date: 2000-10-30 12:47:14
$
* last change: $Author:
dvo $ $Date: 2001-05-15 12:37:49
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -112,7 +112,9 @@ XMLTextColumnsExport::XMLTextColumnsExport( SvXMLExport& rExp ) :
sSeparatorLineWidth
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineWidth"
)),
sSeparatorLineColor
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineColor"
)),
sSeparatorLineRelativeHeight
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineRelativeHeight"
)),
sSeparatorLineVerticalAlignment
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineVerticalAlignment"
))
sSeparatorLineVerticalAlignment
(
RTL_CONSTASCII_USTRINGPARAM
(
"SeparatorLineVerticalAlignment"
)),
sIsAutomatic
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsAutomatic"
)),
sAutomaticDistance
(
RTL_CONSTASCII_USTRINGPARAM
(
"AutomaticDistance"
))
{
}
...
...
@@ -129,10 +131,29 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
GetExport
().
GetMM100UnitConverter
().
convertNumber
(
sValue
,
nCount
);
GetExport
().
AddAttribute
(
XML_NAMESPACE_FO
,
sXML_column_count
,
sValue
.
makeStringAndClear
()
);
// handle 'automatic' columns
Reference
<
XPropertySet
>
xPropSet
(
xColumns
,
UNO_QUERY
);
if
(
xPropSet
.
is
()
)
{
Any
aAny
=
xPropSet
->
getPropertyValue
(
sIsAutomatic
);
if
(
*
(
sal_Bool
*
)
aAny
.
getValue
()
)
{
aAny
=
xPropSet
->
getPropertyValue
(
sAutomaticDistance
);
sal_Int32
nDistance
=
0
;
aAny
>>=
nDistance
;
OUStringBuffer
aBuffer
;
GetExport
().
GetMM100UnitConverter
().
convertMeasure
(
aBuffer
,
nDistance
);
GetExport
().
AddAttribute
(
XML_NAMESPACE_FO
,
sXML_column_gap
,
aBuffer
.
makeStringAndClear
()
);
}
}
SvXMLElementExport
aElem
(
GetExport
(),
XML_NAMESPACE_STYLE
,
sXML_columns
,
sal_True
,
sal_True
);
Reference
<
XPropertySet
>
xPropSet
(
xColumns
,
UNO_QUERY
);
if
(
xPropSet
.
is
()
)
{
Any
aAny
=
xPropSet
->
getPropertyValue
(
sSeparatorLineIsOn
);
...
...
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