Kaydet (Commit) b90a19ce authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

sc html export: cleanup htmlexp.hxx

Change-Id: Ia7dd944260b3de4085ff25597eef154fde256b54
üst 7ab34f41
......@@ -29,7 +29,6 @@
#include "expbase.hxx"
class ScDocument;
class SfxItemSet;
class SdrPage;
......@@ -50,17 +49,21 @@ struct ScHTMLStyle
sal_uInt8 nDefaultScriptType; // Font values are valid for the default script type
bool bInitialized;
ScHTMLStyle() : nFontHeight(0), nFontSizeNumber(2), nDefaultScriptType(0),
bInitialized(false) {}
ScHTMLStyle() :
nFontHeight(0),
nFontSizeNumber(2),
nDefaultScriptType(),
bInitialized(false)
{}
const ScHTMLStyle& operator=( const ScHTMLStyle& r )
const ScHTMLStyle& operator=( const ScHTMLStyle& rScHTMLStyle )
{
aBackgroundColor = r.aBackgroundColor;
aFontFamilyName = r.aFontFamilyName;
nFontHeight = r.nFontHeight;
nFontSizeNumber = r.nFontSizeNumber;
nDefaultScriptType = r.nDefaultScriptType;
bInitialized = r.bInitialized;
aBackgroundColor = rScHTMLStyle.aBackgroundColor;
aFontFamilyName = rScHTMLStyle.aFontFamilyName;
nFontHeight = rScHTMLStyle.nFontHeight;
nFontSizeNumber = rScHTMLStyle.nFontSizeNumber;
nDefaultScriptType = rScHTMLStyle.nDefaultScriptType;
bInitialized = rScHTMLStyle.bInitialized;
return *this;
}
};
......@@ -76,8 +79,13 @@ struct ScHTMLGraphEntry
ScHTMLGraphEntry( SdrObject* pObj, const ScRange& rRange,
const Size& rSize, bool bIn, const Size& rSpace ) :
aRange( rRange ), aSize( rSize ), aSpace( rSpace ),
pObject( pObj ), bInCell( bIn ), bWritten( false ) {}
aRange( rRange ),
aSize( rSize ),
aSpace( rSpace ),
pObject( pObj ),
bInCell( bIn ),
bWritten( false )
{}
};
......@@ -94,14 +102,17 @@ class ScHTMLExport : public ScExportBase
static const sal_uInt16 nCellSpacing;
static const sal_Char sIndentSource[];
boost::ptr_vector< ScHTMLGraphEntry > aGraphList;
typedef boost::scoped_ptr<std::map<OUString, OUString>> FileNameMapPtr;
typedef boost::ptr_vector< ScHTMLGraphEntry > GraphEntryList;
GraphEntryList aGraphList;
ScHTMLStyle aHTMLStyle;
OUString aBaseURL;
OUString aStreamPath;
OUString aFilterOptions;
OUString aCId; // Content-Id fuer Mail-Export
OutputDevice* pAppWin; // fuer Pixelei
boost::scoped_ptr< std::map<OUString, OUString> > pFileNameMap; // fuer CopyLocalFileToINet
FileNameMapPtr pFileNameMap; // fuer CopyLocalFileToINet
OUString aNonConvertibleChars; // collect nonconvertible characters
rtl_TextEncoding eDestEnc;
SCTAB nUsedTables;
......@@ -132,27 +143,35 @@ class ScHTMLExport : public ScExportBase
bool WriteFieldText( const EditTextObject* pData );
// kopiere ggfs. eine lokale Datei ins Internet
bool CopyLocalFileToINet( OUString& rFileNm,
const OUString& rTargetNm, bool bFileToFile = false );
bool HasCId() { return !aCId.isEmpty(); }
bool CopyLocalFileToINet( OUString& rFileNm, const OUString& rTargetNm, bool bFileToFile = false );
bool HasCId()
{
return !aCId.isEmpty();
}
void MakeCIdURL( OUString& rURL );
void PrepareGraphics( ScDrawLayer*, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow );
void FillGraphList( const SdrPage*, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow );
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 );
const sal_Char* GetIndentStr() { return sIndent; }
const sal_Char* GetIndentStr()
{
return sIndent;
}
public:
ScHTMLExport( SvStream&, const OUString&, ScDocument*, const ScRange&,
......@@ -160,7 +179,9 @@ public:
virtual ~ScHTMLExport();
sal_uLong Write();
const OUString& GetNonConvertibleChars() const
{ return aNonConvertibleChars; }
{
return aNonConvertibleChars;
}
};
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment