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
89bbc928
Kaydet (Commit)
89bbc928
authored
Nis 05, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Nis 05, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
export label names that are strings, fdo#64722, cp#1000058
Change-Id: Id72e9778c70db02b942326c6f8b5f448acb28b41
üst
2c59f12e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
4 deletions
+75
-4
xmltoken.hxx
include/xmloff/xmltoken.hxx
+1
-0
SchXMLImport.hxx
xmloff/inc/SchXMLImport.hxx
+1
-0
SchXMLExport.cxx
xmloff/source/chart/SchXMLExport.cxx
+24
-4
SchXMLImport.cxx
xmloff/source/chart/SchXMLImport.cxx
+1
-0
SchXMLSeries2Context.cxx
xmloff/source/chart/SchXMLSeries2Context.cxx
+10
-0
SchXMLTools.cxx
xmloff/source/chart/SchXMLTools.cxx
+32
-0
SchXMLTools.hxx
xmloff/source/chart/SchXMLTools.hxx
+5
-0
xmltoken.cxx
xmloff/source/core/xmltoken.cxx
+1
-0
No files found.
include/xmloff/xmltoken.hxx
Dosyayı görüntüle @
89bbc928
...
@@ -1066,6 +1066,7 @@ namespace xmloff { namespace token {
...
@@ -1066,6 +1066,7 @@ namespace xmloff { namespace token {
XML_LABEL_CELL_RANGE_ADDRESS
,
XML_LABEL_CELL_RANGE_ADDRESS
,
XML_LABEL_RANGE
,
XML_LABEL_RANGE
,
XML_LABEL_RANGES
,
XML_LABEL_RANGES
,
XML_LABEL_STRING
,
XML_LAMBDA
,
XML_LAMBDA
,
XML_LANDSCAPE
,
XML_LANDSCAPE
,
XML_LANGUAGE
,
XML_LANGUAGE
,
...
...
xmloff/inc/SchXMLImport.hxx
Dosyayı görüntüle @
89bbc928
...
@@ -140,6 +140,7 @@ enum SchXMLSeriesAttrMap
...
@@ -140,6 +140,7 @@ enum SchXMLSeriesAttrMap
{
{
XML_TOK_SERIES_CELL_RANGE
,
XML_TOK_SERIES_CELL_RANGE
,
XML_TOK_SERIES_LABEL_ADDRESS
,
XML_TOK_SERIES_LABEL_ADDRESS
,
XML_TOK_SERIES_LABEL_STRING
,
XML_TOK_SERIES_ATTACHED_AXIS
,
XML_TOK_SERIES_ATTACHED_AXIS
,
XML_TOK_SERIES_STYLE_NAME
,
XML_TOK_SERIES_STYLE_NAME
,
XML_TOK_SERIES_CHART_CLASS
XML_TOK_SERIES_CHART_CLASS
...
...
xmloff/source/chart/SchXMLExport.cxx
Dosyayı görüntüle @
89bbc928
...
@@ -2553,6 +2553,14 @@ namespace
...
@@ -2553,6 +2553,14 @@ namespace
//no doubles and no texts
//no doubles and no texts
return
false
;
return
false
;
}
}
bool
isString
(
const
OUString
&
rString
)
{
if
(
rString
.
startsWith
(
"
\"
"
)
&&
rString
.
endsWith
(
"
\"
"
))
return
true
;
return
false
;
}
}
}
void
SchXMLExportHelper_Impl
::
exportSeries
(
void
SchXMLExportHelper_Impl
::
exportSeries
(
...
@@ -2720,10 +2728,21 @@ void SchXMLExportHelper_Impl::exportSeries(
...
@@ -2720,10 +2728,21 @@ void SchXMLExportHelper_Impl::exportSeries(
modifyLabelRange
=
true
;
modifyLabelRange
=
true
;
if
(
modifyLabelRange
)
if
(
modifyLabelRange
)
aRange
=
"label "
+
OUString
::
number
(
aRange
.
copy
(
OUString
(
"label"
).
getLength
()).
toInt32
()
-
1
);
aRange
=
"label "
+
OUString
::
number
(
aRange
.
copy
(
OUString
(
"label"
).
getLength
()).
toInt32
()
-
1
);
mrExport
.
AddAttribute
(
XML_NAMESPACE_CHART
,
XML_LABEL_CELL_ADDRESS
,
lcl_ConvertRange
(
OUString
aXMLRange
=
lcl_ConvertRange
(
aRange
,
xNewDoc
);
aRange
,
if
(
aXMLRange
.
isEmpty
()
&&
!
aRange
.
isEmpty
())
xNewDoc
));
{
// might just be a string
bool
bIsString
=
isString
(
aRange
);
if
(
bIsString
)
{
mrExport
.
AddAttribute
(
XML_NAMESPACE_LO_EXT
,
XML_LABEL_STRING
,
aRange
);
}
}
else
mrExport
.
AddAttribute
(
XML_NAMESPACE_CHART
,
XML_LABEL_CELL_ADDRESS
,
aXMLRange
);
}
}
if
(
xLabelSeq
.
is
()
||
xValuesSeq
.
is
()
)
if
(
xLabelSeq
.
is
()
||
xValuesSeq
.
is
()
)
aSeriesLabelValuesPair
=
tLabelValuesDataPair
(
xLabelSeq
,
xValuesSeq
);
aSeriesLabelValuesPair
=
tLabelValuesDataPair
(
xLabelSeq
,
xValuesSeq
);
...
@@ -3138,6 +3157,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
...
@@ -3138,6 +3157,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries(
Reference
<
chart2
::
XChartDocument
>
xNewDoc
(
mrExport
.
GetModel
(),
uno
::
UNO_QUERY
);
Reference
<
chart2
::
XChartDocument
>
xNewDoc
(
mrExport
.
GetModel
(),
uno
::
UNO_QUERY
);
//@todo: export data points
//@todo: export data points
//TODO: moggi: same code three times
// open
// open
if
(
bJapaneseCandleSticks
)
if
(
bJapaneseCandleSticks
)
{
{
...
...
xmloff/source/chart/SchXMLImport.cxx
Dosyayı görüntüle @
89bbc928
...
@@ -339,6 +339,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesAttrTokenMap()
...
@@ -339,6 +339,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesAttrTokenMap()
{
{
{
XML_NAMESPACE_CHART
,
XML_VALUES_CELL_RANGE_ADDRESS
,
XML_TOK_SERIES_CELL_RANGE
},
{
XML_NAMESPACE_CHART
,
XML_VALUES_CELL_RANGE_ADDRESS
,
XML_TOK_SERIES_CELL_RANGE
},
{
XML_NAMESPACE_CHART
,
XML_LABEL_CELL_ADDRESS
,
XML_TOK_SERIES_LABEL_ADDRESS
},
{
XML_NAMESPACE_CHART
,
XML_LABEL_CELL_ADDRESS
,
XML_TOK_SERIES_LABEL_ADDRESS
},
{
XML_NAMESPACE_LO_EXT
,
XML_LABEL_STRING
,
XML_TOK_SERIES_LABEL_STRING
},
{
XML_NAMESPACE_CHART
,
XML_ATTACHED_AXIS
,
XML_TOK_SERIES_ATTACHED_AXIS
},
{
XML_NAMESPACE_CHART
,
XML_ATTACHED_AXIS
,
XML_TOK_SERIES_ATTACHED_AXIS
},
{
XML_NAMESPACE_CHART
,
XML_STYLE_NAME
,
XML_TOK_SERIES_STYLE_NAME
},
{
XML_NAMESPACE_CHART
,
XML_STYLE_NAME
,
XML_TOK_SERIES_STYLE_NAME
},
{
XML_NAMESPACE_CHART
,
XML_CLASS
,
XML_TOK_SERIES_CHART_CLASS
},
{
XML_NAMESPACE_CHART
,
XML_CLASS
,
XML_TOK_SERIES_CHART_CLASS
},
...
...
xmloff/source/chart/SchXMLSeries2Context.cxx
Dosyayı görüntüle @
89bbc928
...
@@ -308,6 +308,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
...
@@ -308,6 +308,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
bool
bHasRange
=
false
;
bool
bHasRange
=
false
;
OUString
aSeriesLabelRange
;
OUString
aSeriesLabelRange
;
OUString
aSeriesLabelString
;
for
(
sal_Int16
i
=
0
;
i
<
nAttrCount
;
i
++
)
for
(
sal_Int16
i
=
0
;
i
<
nAttrCount
;
i
++
)
{
{
...
@@ -325,6 +326,9 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
...
@@ -325,6 +326,9 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
case
XML_TOK_SERIES_LABEL_ADDRESS
:
case
XML_TOK_SERIES_LABEL_ADDRESS
:
aSeriesLabelRange
=
aValue
;
aSeriesLabelRange
=
aValue
;
break
;
break
;
case
XML_TOK_SERIES_LABEL_STRING
:
aSeriesLabelString
=
aValue
;
break
;
case
XML_TOK_SERIES_ATTACHED_AXIS
:
case
XML_TOK_SERIES_ATTACHED_AXIS
:
{
{
sal_Int32
nNumOfAxes
=
mrAxes
.
size
();
sal_Int32
nNumOfAxes
=
mrAxes
.
size
();
...
@@ -442,6 +446,12 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
...
@@ -442,6 +446,12 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
SchXMLTools
::
CreateDataSequence
(
aSeriesLabelRange
,
mxNewDoc
);
SchXMLTools
::
CreateDataSequence
(
aSeriesLabelRange
,
mxNewDoc
);
xLabeledSeq
->
setLabel
(
xLabelSequence
);
xLabeledSeq
->
setLabel
(
xLabelSequence
);
}
}
else
if
(
!
aSeriesLabelString
.
isEmpty
()
)
{
Reference
<
chart2
::
data
::
XDataSequence
>
xLabelSequence
=
SchXMLTools
::
CreateDataSequenceWithoutConvert
(
aSeriesLabelString
,
mxNewDoc
);
xLabeledSeq
->
setLabel
(
xLabelSequence
);
}
// Note: Even if we have no label, we have to register the label
// Note: Even if we have no label, we have to register the label
// for creation, because internal data always has labels. If
// for creation, because internal data always has labels. If
...
...
xmloff/source/chart/SchXMLTools.cxx
Dosyayı görüntüle @
89bbc928
...
@@ -424,6 +424,38 @@ Reference< chart2::data::XDataSequence > CreateDataSequence(
...
@@ -424,6 +424,38 @@ Reference< chart2::data::XDataSequence > CreateDataSequence(
return
xRet
;
return
xRet
;
}
}
Reference
<
chart2
::
data
::
XDataSequence
>
CreateDataSequenceWithoutConvert
(
const
OUString
&
rRange
,
const
Reference
<
chart2
::
XChartDocument
>&
xChartDoc
)
{
Reference
<
chart2
::
data
::
XDataSequence
>
xRet
;
if
(
!
xChartDoc
.
is
()
)
{
SAL_WARN
(
"xmloff.chart"
,
"need a chart document"
);
return
xRet
;
}
Reference
<
chart2
::
data
::
XDataProvider
>
xDataProvider
(
xChartDoc
->
getDataProvider
()
);
if
(
!
xDataProvider
.
is
()
)
{
SAL_WARN
(
"xmloff.chart"
,
"need a data provider"
);
return
xRet
;
}
try
{
xRet
.
set
(
xDataProvider
->
createDataSequenceByRangeRepresentation
(
rRange
)
);
SchXMLTools
::
setXMLRangePropertyAtDataSequence
(
xRet
,
rRange
);
}
catch
(
const
lang
::
IllegalArgumentException
&
)
{
SAL_WARN
(
"xmloff.chart"
,
"could not create data sequence"
);
}
return
xRet
;
}
void
CreateCategories
(
void
CreateCategories
(
const
uno
::
Reference
<
chart2
::
data
::
XDataProvider
>
&
xDataProvider
,
const
uno
::
Reference
<
chart2
::
data
::
XDataProvider
>
&
xDataProvider
,
const
uno
::
Reference
<
chart2
::
XChartDocument
>
&
xNewDoc
,
const
uno
::
Reference
<
chart2
::
XChartDocument
>
&
xNewDoc
,
...
...
xmloff/source/chart/SchXMLTools.hxx
Dosyayı görüntüle @
89bbc928
...
@@ -86,6 +86,11 @@ namespace SchXMLTools
...
@@ -86,6 +86,11 @@ namespace SchXMLTools
const
::
com
::
sun
::
star
::
uno
::
Reference
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XChartDocument
>&
xChartDoc
);
::
com
::
sun
::
star
::
chart2
::
XChartDocument
>&
xChartDoc
);
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
data
::
XDataSequence
>
CreateDataSequenceWithoutConvert
(
const
OUString
&
rRange
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XChartDocument
>&
xChartDoc
);
void
CreateCategories
(
void
CreateCategories
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
data
::
XDataProvider
>
&
xDataProvider
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
data
::
XDataProvider
>
&
xDataProvider
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XChartDocument
>
&
xNewDoc
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
chart2
::
XChartDocument
>
&
xNewDoc
,
...
...
xmloff/source/core/xmltoken.cxx
Dosyayı görüntüle @
89bbc928
...
@@ -1071,6 +1071,7 @@ namespace xmloff { namespace token {
...
@@ -1071,6 +1071,7 @@ namespace xmloff { namespace token {
TOKEN
(
"label-cell-range-address"
,
XML_LABEL_CELL_RANGE_ADDRESS
),
TOKEN
(
"label-cell-range-address"
,
XML_LABEL_CELL_RANGE_ADDRESS
),
TOKEN
(
"label-range"
,
XML_LABEL_RANGE
),
TOKEN
(
"label-range"
,
XML_LABEL_RANGE
),
TOKEN
(
"label-ranges"
,
XML_LABEL_RANGES
),
TOKEN
(
"label-ranges"
,
XML_LABEL_RANGES
),
TOKEN
(
"label-string"
,
XML_LABEL_STRING
),
TOKEN
(
"lambda"
,
XML_LAMBDA
),
TOKEN
(
"lambda"
,
XML_LAMBDA
),
TOKEN
(
"landscape"
,
XML_LANDSCAPE
),
TOKEN
(
"landscape"
,
XML_LANDSCAPE
),
TOKEN
(
"language"
,
XML_LANGUAGE
),
TOKEN
(
"language"
,
XML_LANGUAGE
),
...
...
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