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
b90a19ce
Kaydet (Commit)
b90a19ce
authored
Nis 22, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc html export: cleanup htmlexp.hxx
Change-Id: Ia7dd944260b3de4085ff25597eef154fde256b54
üst
7ab34f41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
73 deletions
+94
-73
htmlexp.hxx
sc/source/filter/inc/htmlexp.hxx
+94
-73
No files found.
sc/source/filter/inc/htmlexp.hxx
Dosyayı görüntüle @
b90a19ce
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "expbase.hxx"
#include "expbase.hxx"
class
ScDocument
;
class
ScDocument
;
class
SfxItemSet
;
class
SfxItemSet
;
class
SdrPage
;
class
SdrPage
;
...
@@ -50,19 +49,23 @@ struct ScHTMLStyle
...
@@ -50,19 +49,23 @@ struct ScHTMLStyle
sal_uInt8
nDefaultScriptType
;
// Font values are valid for the default script type
sal_uInt8
nDefaultScriptType
;
// Font values are valid for the default script type
bool
bInitialized
;
bool
bInitialized
;
ScHTMLStyle
()
:
nFontHeight
(
0
),
nFontSizeNumber
(
2
),
nDefaultScriptType
(
0
),
ScHTMLStyle
()
:
bInitialized
(
false
)
{}
nFontHeight
(
0
),
nFontSizeNumber
(
2
),
const
ScHTMLStyle
&
operator
=
(
const
ScHTMLStyle
&
r
)
nDefaultScriptType
(),
{
bInitialized
(
false
)
aBackgroundColor
=
r
.
aBackgroundColor
;
{}
aFontFamilyName
=
r
.
aFontFamilyName
;
nFontHeight
=
r
.
nFontHeight
;
const
ScHTMLStyle
&
operator
=
(
const
ScHTMLStyle
&
rScHTMLStyle
)
nFontSizeNumber
=
r
.
nFontSizeNumber
;
{
nDefaultScriptType
=
r
.
nDefaultScriptType
;
aBackgroundColor
=
rScHTMLStyle
.
aBackgroundColor
;
bInitialized
=
r
.
bInitialized
;
aFontFamilyName
=
rScHTMLStyle
.
aFontFamilyName
;
return
*
this
;
nFontHeight
=
rScHTMLStyle
.
nFontHeight
;
}
nFontSizeNumber
=
rScHTMLStyle
.
nFontSizeNumber
;
nDefaultScriptType
=
rScHTMLStyle
.
nDefaultScriptType
;
bInitialized
=
rScHTMLStyle
.
bInitialized
;
return
*
this
;
}
};
};
struct
ScHTMLGraphEntry
struct
ScHTMLGraphEntry
...
@@ -75,9 +78,14 @@ struct ScHTMLGraphEntry
...
@@ -75,9 +78,14 @@ struct ScHTMLGraphEntry
bool
bWritten
;
bool
bWritten
;
ScHTMLGraphEntry
(
SdrObject
*
pObj
,
const
ScRange
&
rRange
,
ScHTMLGraphEntry
(
SdrObject
*
pObj
,
const
ScRange
&
rRange
,
const
Size
&
rSize
,
bool
bIn
,
const
Size
&
rSpace
)
:
const
Size
&
rSize
,
bool
bIn
,
const
Size
&
rSpace
)
:
aRange
(
rRange
),
aSize
(
rSize
),
aSpace
(
rSpace
),
aRange
(
rRange
),
pObject
(
pObj
),
bInCell
(
bIn
),
bWritten
(
false
)
{}
aSize
(
rSize
),
aSpace
(
rSpace
),
pObject
(
pObj
),
bInCell
(
bIn
),
bWritten
(
false
)
{}
};
};
...
@@ -94,73 +102,86 @@ class ScHTMLExport : public ScExportBase
...
@@ -94,73 +102,86 @@ class ScHTMLExport : public ScExportBase
static
const
sal_uInt16
nCellSpacing
;
static
const
sal_uInt16
nCellSpacing
;
static
const
sal_Char
sIndentSource
[];
static
const
sal_Char
sIndentSource
[];
boost
::
ptr_vector
<
ScHTMLGraphEntry
>
aGraphList
;
typedef
boost
::
scoped_ptr
<
std
::
map
<
OUString
,
OUString
>>
FileNameMapPtr
;
ScHTMLStyle
aHTMLStyle
;
typedef
boost
::
ptr_vector
<
ScHTMLGraphEntry
>
GraphEntryList
;
OUString
aBaseURL
;
OUString
aStreamPath
;
GraphEntryList
aGraphList
;
OUString
aFilterOptions
;
ScHTMLStyle
aHTMLStyle
;
OUString
aCId
;
// Content-Id fuer Mail-Export
OUString
aBaseURL
;
OutputDevice
*
pAppWin
;
// fuer Pixelei
OUString
aStreamPath
;
boost
::
scoped_ptr
<
std
::
map
<
OUString
,
OUString
>
>
pFileNameMap
;
// fuer CopyLocalFileToINet
OUString
aFilterOptions
;
OUString
aNonConvertibleChars
;
// collect nonconvertible characters
OUString
aCId
;
// Content-Id fuer Mail-Export
rtl_TextEncoding
eDestEnc
;
OutputDevice
*
pAppWin
;
// fuer Pixelei
SCTAB
nUsedTables
;
FileNameMapPtr
pFileNameMap
;
// fuer CopyLocalFileToINet
short
nIndent
;
OUString
aNonConvertibleChars
;
// collect nonconvertible characters
sal_Char
sIndent
[
nIndentMax
+
1
];
rtl_TextEncoding
eDestEnc
;
bool
bAll
;
// ganzes Dokument
SCTAB
nUsedTables
;
bool
bTabHasGraphics
;
short
nIndent
;
bool
bTabAlignedLeft
;
sal_Char
sIndent
[
nIndentMax
+
1
];
bool
bCalcAsShown
;
bool
bAll
;
// ganzes Dokument
bool
bCopyLocalFileToINet
;
bool
bTabHasGraphics
;
bool
bTableDataWidth
;
bool
bTabAlignedLeft
;
bool
bTableDataHeight
;
bool
bCalcAsShown
;
bool
bCopyLocalFileToINet
;
const
SfxItemSet
&
PageDefaults
(
SCTAB
nTab
);
bool
bTableDataWidth
;
bool
bTableDataHeight
;
void
WriteBody
();
void
WriteHeader
();
const
SfxItemSet
&
PageDefaults
(
SCTAB
nTab
);
void
WriteOverview
();
void
WriteTables
();
void
WriteBody
();
void
WriteCell
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
);
void
WriteHeader
();
void
WriteGraphEntry
(
ScHTMLGraphEntry
*
);
void
WriteOverview
();
void
WriteImage
(
OUString
&
rLinkName
,
void
WriteTables
();
const
Graphic
&
,
const
OString
&
rImgOptions
,
void
WriteCell
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
);
sal_uLong
nXOutFlags
=
0
);
void
WriteGraphEntry
(
ScHTMLGraphEntry
*
);
// nXOutFlags fuer XOutBitmap::WriteGraphic
void
WriteImage
(
OUString
&
rLinkName
,
const
Graphic
&
,
const
OString
&
rImgOptions
,
// write to stream if and only if URL fields in edit cell
sal_uLong
nXOutFlags
=
0
);
// nXOutFlags fuer XOutBitmap::WriteGraphic
// write to stream if and only if URL fields in edit cell
bool
WriteFieldText
(
const
EditTextObject
*
pData
);
bool
WriteFieldText
(
const
EditTextObject
*
pData
);
// kopiere ggfs. eine lokale Datei ins Internet
// kopiere ggfs. eine lokale Datei ins Internet
bool
CopyLocalFileToINet
(
OUString
&
rFileNm
,
bool
CopyLocalFileToINet
(
OUString
&
rFileNm
,
const
OUString
&
rTargetNm
,
bool
bFileToFile
=
false
);
const
OUString
&
rTargetNm
,
bool
bFileToFile
=
false
);
bool
HasCId
()
bool
HasCId
()
{
return
!
aCId
.
isEmpty
();
}
{
void
MakeCIdURL
(
OUString
&
rURL
);
return
!
aCId
.
isEmpty
();
}
void
MakeCIdURL
(
OUString
&
rURL
);
void
PrepareGraphics
(
ScDrawLayer
*
,
SCTAB
nTab
,
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
);
void
PrepareGraphics
(
ScDrawLayer
*
,
SCTAB
nTab
,
void
FillGraphList
(
const
SdrPage
*
,
SCTAB
nTab
,
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
);
SCCOL
nEndCol
,
SCROW
nEndRow
);
void
FillGraphList
(
const
SdrPage
*
,
SCTAB
nTab
,
SCCOL
nStartCol
,
SCROW
nStartRow
,
SCCOL
nEndCol
,
SCROW
nEndRow
);
OString
BorderToStyle
(
const
char
*
pBorderName
,
OString
BorderToStyle
(
const
char
*
pBorderName
,
const
::
editeng
::
SvxBorderLine
*
pLine
,
bool
&
bInsertSemicolon
);
const
editeng
::
SvxBorderLine
*
pLine
,
bool
&
bInsertSemicolon
);
sal_uInt16
GetFontSizeNumber
(
sal_uInt16
nHeight
);
const
char
*
GetFontSizeCss
(
sal_uInt16
nHeight
);
sal_uInt16
ToPixel
(
sal_uInt16
nTwips
);
Size
MMToPixel
(
const
Size
&
r100thMMSize
);
void
IncIndent
(
short
nVal
);
sal_uInt16
GetFontSizeNumber
(
sal_uInt16
nHeight
);
const
sal_Char
*
GetIndentStr
()
const
char
*
GetFontSizeCss
(
sal_uInt16
nHeight
);
{
sal_uInt16
ToPixel
(
sal_uInt16
nTwips
);
return
sIndent
;
Size
MMToPixel
(
const
Size
&
r100thMMSize
);
}
void
IncIndent
(
short
nVal
);
const
sal_Char
*
GetIndentStr
()
{
return
sIndent
;
}
public
:
public
:
ScHTMLExport
(
SvStream
&
,
const
OUString
&
,
ScDocument
*
,
const
ScRange
&
,
ScHTMLExport
(
SvStream
&
,
const
OUString
&
,
ScDocument
*
,
const
ScRange
&
,
bool
bAll
,
const
OUString
&
aStreamPath
,
const
OUString
&
rFilterOptions
);
bool
bAll
,
const
OUString
&
aStreamPath
,
const
OUString
&
rFilterOptions
);
virtual
~
ScHTMLExport
();
virtual
~
ScHTMLExport
();
sal_uLong
Write
();
sal_uLong
Write
();
const
OUString
&
GetNonConvertibleChars
()
const
const
OUString
&
GetNonConvertibleChars
()
const
{
return
aNonConvertibleChars
;
}
{
return
aNonConvertibleChars
;
}
};
};
#endif
#endif
...
...
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