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
232f2513
Kaydet (Commit)
232f2513
authored
Agu 14, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
correctly export background colors of cond formats to xlsx
Change-Id: I6d4b596ba3d611c8b795d48ca59378c4f4136611
üst
c319e625
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
13 deletions
+48
-13
xestyle.cxx
sc/source/filter/excel/xestyle.cxx
+37
-11
xestyle.hxx
sc/source/filter/inc/xestyle.hxx
+11
-2
No files found.
sc/source/filter/excel/xestyle.cxx
Dosyayı görüntüle @
232f2513
...
@@ -1885,6 +1885,33 @@ void XclExpCellArea::SaveXml( XclExpXmlStream& rStrm ) const
...
@@ -1885,6 +1885,33 @@ void XclExpCellArea::SaveXml( XclExpXmlStream& rStrm ) const
rStyleSheet
->
endElement
(
XML_fill
);
rStyleSheet
->
endElement
(
XML_fill
);
}
}
bool
XclExpColor
::
FillFromItemSet
(
const
SfxItemSet
&
rItemSet
)
{
if
(
!
ScfTools
::
CheckItem
(
rItemSet
,
ATTR_BACKGROUND
,
true
)
)
return
false
;
const
SvxBrushItem
&
rBrushItem
=
GETITEM
(
rItemSet
,
SvxBrushItem
,
ATTR_BACKGROUND
);
maColor
=
rBrushItem
.
GetColor
();
return
true
;
}
void
XclExpColor
::
SaveXml
(
XclExpXmlStream
&
rStrm
)
const
{
sax_fastparser
::
FSHelperPtr
&
rStyleSheet
=
rStrm
.
GetCurrentStream
();
rStyleSheet
->
startElement
(
XML_fill
,
FSEND
);
rStyleSheet
->
startElement
(
XML_patternFill
,
FSEND
);
rStyleSheet
->
singleElement
(
XML_bgColor
,
XML_rgb
,
XclXmlUtils
::
ToOString
(
maColor
).
getStr
(),
FSEND
);
rStyleSheet
->
endElement
(
XML_patternFill
);
rStyleSheet
->
endElement
(
XML_fill
);
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
XclExpXFId
::
XclExpXFId
()
:
XclExpXFId
::
XclExpXFId
()
:
...
@@ -2898,11 +2925,11 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
...
@@ -2898,11 +2925,11 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
pCellProt
=
NULL
;
pCellProt
=
NULL
;
}
}
XclExpC
ellArea
*
pCellArea
=
new
XclExpCellArea
;
XclExpC
olor
*
pColor
=
new
XclExpColor
()
;
if
(
!
pC
ellArea
->
FillFromItemSet
(
rSet
,
GetPalette
(),
GetBiff
()
))
if
(
!
pC
olor
->
FillFromItemSet
(
rSet
))
{
{
delete
pC
ellArea
;
delete
pC
olor
;
pC
ellArea
=
NULL
;
pC
olor
=
NULL
;
}
}
XclExpFont
*
pFont
=
NULL
;
XclExpFont
*
pFont
=
NULL
;
...
@@ -2923,7 +2950,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
...
@@ -2923,7 +2950,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
++
nNumFmtIndex
;
++
nNumFmtIndex
;
}
}
maDxf
.
push_back
(
new
XclExpDxf
(
rRoot
,
pAlign
,
pBorder
,
pFont
,
pNumFormat
,
pCellProt
,
pC
ellArea
));
maDxf
.
push_back
(
new
XclExpDxf
(
rRoot
,
pAlign
,
pBorder
,
pFont
,
pNumFormat
,
pCellProt
,
pC
olor
));
++
nIndex
;
++
nIndex
;
}
}
...
@@ -2962,16 +2989,15 @@ void XclExpDxfs::SaveXml( XclExpXmlStream& rStrm )
...
@@ -2962,16 +2989,15 @@ void XclExpDxfs::SaveXml( XclExpXmlStream& rStrm )
// ============================================================================
// ============================================================================
XclExpDxf
::
XclExpDxf
(
const
XclExpRoot
&
rRoot
,
XclExpCellAlign
*
pAlign
,
XclExpCellBorder
*
pBorder
,
XclExpDxf
::
XclExpDxf
(
const
XclExpRoot
&
rRoot
,
XclExpCellAlign
*
pAlign
,
XclExpCellBorder
*
pBorder
,
XclExpFont
*
pFont
,
XclExpNumFmt
*
pNumberFmt
,
XclExpCellProt
*
pProt
,
XclExpC
ellArea
*
pCellArea
)
XclExpFont
*
pFont
,
XclExpNumFmt
*
pNumberFmt
,
XclExpCellProt
*
pProt
,
XclExpC
olor
*
pColor
)
:
XclExpRoot
(
rRoot
),
:
XclExpRoot
(
rRoot
),
mpAlign
(
pAlign
),
mpAlign
(
pAlign
),
mpBorder
(
pBorder
),
mpBorder
(
pBorder
),
mpFont
(
pFont
),
mpFont
(
pFont
),
mpNumberFmt
(
pNumberFmt
),
mpNumberFmt
(
pNumberFmt
),
mpProt
(
pProt
),
mpProt
(
pProt
),
mpC
ellArea
(
pCellArea
)
mpC
olor
(
pColor
)
{
{
}
}
XclExpDxf
::~
XclExpDxf
()
XclExpDxf
::~
XclExpDxf
()
...
@@ -2981,7 +3007,7 @@ XclExpDxf::~XclExpDxf()
...
@@ -2981,7 +3007,7 @@ XclExpDxf::~XclExpDxf()
delete
mpFont
;
delete
mpFont
;
delete
mpNumberFmt
;
delete
mpNumberFmt
;
delete
mpProt
;
delete
mpProt
;
delete
mpC
ellArea
;
delete
mpC
olor
;
}
}
void
XclExpDxf
::
SaveXml
(
XclExpXmlStream
&
rStrm
)
void
XclExpDxf
::
SaveXml
(
XclExpXmlStream
&
rStrm
)
...
@@ -2999,8 +3025,8 @@ void XclExpDxf::SaveXml( XclExpXmlStream& rStrm )
...
@@ -2999,8 +3025,8 @@ void XclExpDxf::SaveXml( XclExpXmlStream& rStrm )
mpNumberFmt
->
SaveXml
(
rStrm
);
mpNumberFmt
->
SaveXml
(
rStrm
);
if
(
mpProt
)
if
(
mpProt
)
mpProt
->
SaveXml
(
rStrm
);
mpProt
->
SaveXml
(
rStrm
);
if
(
mpC
ellArea
)
if
(
mpC
olor
)
mpC
ellArea
->
SaveXml
(
rStrm
);
mpC
olor
->
SaveXml
(
rStrm
);
rStyleSheet
->
endElement
(
XML_dxf
);
rStyleSheet
->
endElement
(
XML_dxf
);
}
}
...
...
sc/source/filter/inc/xestyle.hxx
Dosyayı görüntüle @
232f2513
...
@@ -427,6 +427,15 @@ struct XclExpCellArea : public XclCellArea
...
@@ -427,6 +427,15 @@ struct XclExpCellArea : public XclCellArea
void
SaveXml
(
XclExpXmlStream
&
rStrm
)
const
;
void
SaveXml
(
XclExpXmlStream
&
rStrm
)
const
;
};
};
struct
XclExpColor
{
Color
maColor
;
bool
FillFromItemSet
(
const
SfxItemSet
&
rItemSet
);
void
SaveXml
(
XclExpXmlStream
&
rStrm
)
const
;
};
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
/** A combination of unique XF identifier with real Excel XF index. */
/** A combination of unique XF identifier with real Excel XF index. */
...
@@ -733,7 +742,7 @@ class XclExpDxf : public XclExpRecordBase, protected XclExpRoot
...
@@ -733,7 +742,7 @@ class XclExpDxf : public XclExpRecordBase, protected XclExpRoot
{
{
public
:
public
:
XclExpDxf
(
const
XclExpRoot
&
rRoot
,
XclExpCellAlign
*
pAlign
,
XclExpCellBorder
*
pBorder
,
XclExpDxf
(
const
XclExpRoot
&
rRoot
,
XclExpCellAlign
*
pAlign
,
XclExpCellBorder
*
pBorder
,
XclExpFont
*
pFont
,
XclExpNumFmt
*
pNumberFmt
,
XclExpCellProt
*
pProt
,
XclExpC
ellArea
*
pCellArea
);
XclExpFont
*
pFont
,
XclExpNumFmt
*
pNumberFmt
,
XclExpCellProt
*
pProt
,
XclExpC
olor
*
pColor
);
virtual
~
XclExpDxf
();
virtual
~
XclExpDxf
();
virtual
void
SaveXml
(
XclExpXmlStream
&
rStrm
);
virtual
void
SaveXml
(
XclExpXmlStream
&
rStrm
);
...
@@ -744,7 +753,7 @@ private:
...
@@ -744,7 +753,7 @@ private:
XclExpFont
*
mpFont
;
XclExpFont
*
mpFont
;
XclExpNumFmt
*
mpNumberFmt
;
XclExpNumFmt
*
mpNumberFmt
;
XclExpCellProt
*
mpProt
;
XclExpCellProt
*
mpProt
;
XclExpC
ellArea
*
mpCellArea
;
XclExpC
olor
*
mpColor
;
};
};
class
XclExpDxfs
:
public
XclExpRecordBase
,
protected
XclExpRoot
class
XclExpDxfs
:
public
XclExpRecordBase
,
protected
XclExpRoot
...
...
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