27#include <osl/diagnose.h>
28#include <rtl/ustring.hxx>
29#include <rtl/ustrbuf.hxx>
30#include <rtl/random.h>
37#include <officecfg/Office/Calc.hxx>
48#include <compiler.hxx>
50#include <tokenarray.hxx>
63#include <oox/token/tokens.hxx>
71#include <com/sun/star/task/XStatusIndicator.hpp>
78#define DEBUG_XL_ENCRYPTION 0
80using ::com::sun::star::uno::XInterface;
95 mbUseEncrypter( false ),
96 mnMaxRecSize( nMaxRecSize ),
118 OSL_ENSURE( !
mbInRec,
"XclExpStream::StartRecord - another record still open" );
130 OSL_ENSURE(
mbInRec,
"XclExpStream::EndRecord - no record open" );
225 std::size_t nRet = 0;
226 if(
pData && (nBytes > 0) )
231 std::size_t nBytesLeft = nBytes;
234 while( bValid && (nBytesLeft > 0) )
236 std::size_t nWriteLen = ::std::min< std::size_t >(
PrepareWrite(), nBytesLeft );
237 std::size_t nWriteRet = nWriteLen;
240 OSL_ENSURE(nWriteLen > 0,
"XclExpStream::Write: write length is 0!");
241 vector<sal_uInt8> aBytes(nWriteLen);
242 memcpy(aBytes.data(), pBuffer, nWriteLen);
249 bValid = (nWriteLen == nWriteRet);
250 OSL_ENSURE( bValid,
"XclExpStream::Write - stream write error" );
252 pBuffer += nWriteRet;
254 nBytesLeft -= nWriteRet;
268 std::size_t nBytesLeft = nBytes;
269 while( nBytesLeft > 0 )
271 std::size_t nWriteLen = ::std::min< std::size_t >(
PrepareWrite(), nBytesLeft );
273 nBytesLeft -= nWriteLen;
287 for (std::size_t
i = 0;
i < nBytes; ++
i)
294 sal_uInt64 nBytesLeft = ::std::min(nBytes, nRemaining);
295 if( nBytesLeft <= 0 )
298 const std::size_t nMaxBuffer = 4096;
299 std::unique_ptr<sal_uInt8[]> pBuffer(
300 new sal_uInt8[ ::std::min<std::size_t>(nBytesLeft, nMaxBuffer) ]);
303 while( bValid && (nBytesLeft > 0) )
305 std::size_t nWriteLen = ::std::min<std::size_t>(nBytesLeft, nMaxBuffer);
306 rInStrm.
ReadBytes(pBuffer.get(), nWriteLen);
307 std::size_t nWriteRet =
Write( pBuffer.get(), nWriteLen );
308 bValid = (nWriteLen == nWriteRet);
309 nBytesLeft -= nWriteRet;
317 sal_uInt16 nCharLen = nFlags ? 2 : 1;
319 for(
const auto& rItem : rBuffer )
329 operator<<( static_cast< sal_uInt8 >( rItem ) );
339 std::size_t nLen = ::std::min< std::size_t >( rString.getLength(), 0x00FF );
340 nLen = ::std::min< std::size_t >( nLen, 0xFF );
346 operator<<( static_cast< sal_uInt8 >( nLen ) );
347 Write( rString.getStr(), nLen );
353 Write( rBuffer.data(), rBuffer.size() );
378 OSL_ENSURE( !
mbInRec,
"XclExpStream::SetSvStreamPos - not allowed inside of a record" );
454 const sal_uInt32 nData = 0;
455 std::size_t nBytesLeft = nBytes;
456 while( nBytesLeft >=
sizeof( nData ) )
459 nBytesLeft -=
sizeof( nData );
470 if( !aEncryptionData.hasElements() )
473 Init( aEncryptionData );
500 vector<sal_uInt8> aByte { nData };
506 ::std::vector<sal_uInt8> pnBytes
508 o3tl::narrowing<sal_uInt8>(nData & 0xFF),
509 o3tl::narrowing<sal_uInt8>((nData >> 8) & 0xFF)
516 ::std::vector<sal_uInt8> pnBytes
518 o3tl::narrowing<sal_uInt8>(nData & 0xFF),
519 o3tl::narrowing<sal_uInt8>((nData >> 8) & 0xFF),
520 o3tl::narrowing<sal_uInt8>((nData >> 16) & 0xFF),
521 o3tl::narrowing<sal_uInt8>((nData >> 24) & 0xFF)
528 ::std::vector<sal_uInt8> pnBytes(4);
529 memcpy(pnBytes.data(), &fValue, 4);
535 ::std::vector<sal_uInt8> pnBytes(8);
536 memcpy(pnBytes.data(), &fValue, 8);
566 rtl_random_getBytes( aRandomPool,
mpnSalt, 16 );
567 rtl_random_destroyPool( aRandomPool );
596#if DEBUG_XL_ENCRYPTION
597 fprintf(stdout,
"XclExpBiff8Encrypter::EncryptBytes: stream pos = %ld offset in block = %d block pos = %ld\n",
598 nStrmPos, nBlockOffset, nBlockPos);
601 sal_uInt16 nSize =
static_cast< sal_uInt16
>( aBytes.size() );
605#if DEBUG_XL_ENCRYPTION
606 fprintf(stdout,
"RAW: ");
607 for (sal_uInt16
i = 0;
i < nSize; ++
i)
608 fprintf(stdout,
"%2.2X ", aBytes[
i]);
609 fprintf(stdout,
"\n");
617 if ( (nBlockPos != nOldBlockPos) || (nBlockOffset < nOldOffset) )
623 if (nBlockOffset > nOldOffset)
627 sal_uInt16 nBytesLeft = nSize;
629 while (nBytesLeft > 0)
632 sal_uInt16 nEncBytes = ::std::min(nBlockLeft, nBytesLeft);
635 OSL_ENSURE(bRet,
"XclExpBiff8Encrypter::EncryptBytes: encryption failed!!");
638 OSL_ENSURE(nRet == nEncBytes,
"XclExpBiff8Encrypter::EncryptBytes: fail to write to stream!!");
643 if (nBlockOffset == 0)
646 nBytesLeft -= nEncBytes;
655 switch( nXclErrCode )
664 default:
return "#N/A";
683 rsValue = OUString::number(aResValue.
mfValue);
692 rsType =
"inlineStr";
701 sBuf.appendAscii( sStreamDir );
706 sBuf.append(
".vml" );
708 sBuf.append(
".xml" );
709 return sBuf.makeStringAndClear();
731 const sal_uInt16* pBuffer = rBuffer.data();
733 reinterpret_cast<sal_Unicode const *
>(pBuffer), rBuffer.size(),
734 RTL_TEXTENCODING_UTF8);
741 bFullAddressNotation ) );
742 return sRange.toUtf8();
764 OSL_ENSURE( !s.
IsRich(),
"XclXmlUtils::ToOString(XclExpString): rich text string found!" );
781 for(
const auto& rRange : rRanges )
790 return OUString( s,
static_cast<sal_Int32
>(strlen( s )), RTL_TEXTENCODING_ASCII_US );
795 if(
nLength == -1 || (
nLength > (
static_cast<sal_Int32
>(rBuf.size()) - nStart) ) )
796 nLength = (rBuf.size() - nStart);
811 aCompiler.
SetGrammar(FormulaGrammar::GRAM_OOXML);
813 sal_Int32 nLen = pTokenArray->
GetLen();
814 OUStringBuffer
aBuffer( nLen ? (nLen * 5) : 8 );
819 if (nErrCode != FormulaError::NONE)
825 assert(!
"No code and no error.");
829 return aBuffer.makeStringAndClear();
834 OSL_ENSURE( !s.
IsRich(),
"XclXmlUtils::ToOString(XclExpString): rich text string found!" );
842 rStream->singleElement(nElement, XML_val, pValue);
847 bHaveUnderline =
true;
855 default: bHaveUnderline =
false;
return "none";
861 bHaveAlignment =
true;
862 switch( eEscapement )
864 case SvxEscapement::Superscript:
return "superscript";
865 case SvxEscapement::Subscript:
return "subscript";
866 case SvxEscapement::Off:
867 default: bHaveAlignment =
false;
return "baseline";
873 bool bHaveUnderline, bHaveVertAlign;
884 lcl_WriteValue( pStream, XML_u, bHaveUnderline ? pUnderline :
nullptr );
885 lcl_WriteValue( pStream, XML_vertAlign, bHaveVertAlign ? pVertAlign :
nullptr );
888 pStream->singleElement( XML_color,
903 : XmlFilterBase( rCC ),
905 mbExportVBA(bExportVBA),
906 mbExportTemplate(bExportTemplate)
912 assert(
maStreams.empty() &&
"Forgotten PopStream()?");
917 OSL_ENSURE( !
maStreams.empty(),
"XclExpXmlStream::GetCurrentStream - no current stream" );
928 OSL_ENSURE( !
maStreams.empty(),
"XclExpXmlStream::PopStream - stack is empty!" );
941 GetCurrentStream()->write(
" ")->writeId(nAttr)->write(
"=\"")->writeEscaped(sVal)->write(
"\"");
945 const OUString& sFullStream,
946 std::u16string_view sRelativeStream,
947 const uno::Reference< XOutputStream >& xParentRelation,
948 const char* sContentType,
949 std::u16string_view sRelationshipType,
950 OUString* pRelationshipId )
952 OUString sRelationshipId;
953 if (xParentRelation.is())
954 sRelationshipId =
addRelation( xParentRelation, OUString(sRelationshipType), sRelativeStream );
956 sRelationshipId =
addRelation( OUString(sRelationshipType), sRelativeStream );
958 if( pRelationshipId )
959 *pRelationshipId = sRelationshipId;
1012 const bool bValidateTabNames = officecfg::Office::Calc::Filter::Export::MS_Excel::TruncateLongSheetNames::get();
1013 std::vector<OUString> aOriginalTabNames;
1014 if (bValidateTabNames)
1021 if (xStatusIndicator.is())
1022 xStatusIndicator->start(
ScResId(STR_SAVE_DOC), 100);
1028 drawingml::DrawingML::ResetMlCounters();
1029 drawingml::DrawingML::PushExportGraphics();
1037 aData.maMaxPos.SetCol( ::std::min(
aData.maScMaxPos.Col(),
aData.maXclMaxPos.Col() ) );
1038 aData.maMaxPos.SetRow( ::std::min(
aData.maScMaxPos.Row(),
aData.maXclMaxPos.Row() ) );
1039 aData.maMaxPos.SetTab( ::std::min(
aData.maScMaxPos.Tab(),
aData.maXclMaxPos.Tab() ) );
1040 aData.mpCompileFormulaCxt = std::make_shared<sc::CompileFormulaContext>(rDoc);
1043 aData.maBasePath = OUString(
"file:///" + aPath.
GetPath() +
"\\").replace(
'\\',
'/')
1045 .replaceFirst(
"file:////",
"file:///");
1059 if ( pTabViewShell )
1066 OUString
const workbook =
"xl/workbook.xml";
1067 const char* pWorkbookContentType =
nullptr;
1072 pWorkbookContentType =
"application/vnd.ms-excel.template.macroEnabled.main+xml";
1076 pWorkbookContentType =
"application/vnd.ms-excel.sheet.macroEnabled.main+xml";
1083 pWorkbookContentType =
"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml";
1087 pWorkbookContentType =
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml";
1092 uno::Reference <XOutputStream>(),
1093 pWorkbookContentType,
1105 css::uno::Reference<css::io::XInputStream> xVBAStream(
1107 css::uno::Reference<css::io::XOutputStream> xVBAOutput =
1118 if (xStatusIndicator.is())
1119 xStatusIndicator->setValue(10);
1121 if (xStatusIndicator.is())
1122 xStatusIndicator->setValue(40);
1131 if (!entry.second.second)
1133 entry.second.second->endDocument();
1139 if (bValidateTabNames)
1144 if (xStatusIndicator.is())
1145 xStatusIndicator->end();
1148 drawingml::DrawingML::PopExportGraphics();
1165 const int MAX_TAB_NAME_LENGTH = 31;
1174 rDoc.
GetName(nTab, aOriginalTabNames[nTab]);
1178 std::vector<OUString> aNewTabNames;
1184 const OUString& rOriginalName = aOriginalTabNames[nTab];
1185 if (rOriginalName.getLength() > MAX_TAB_NAME_LENGTH)
1190 if (aNewName.isEmpty())
1192 aNewName = rOriginalName.copy(0, MAX_TAB_NAME_LENGTH);
1193 if (aNewTabNames.end() != std::find(aNewTabNames.begin(), aNewTabNames.end(), aNewName) ||
1194 aOriginalTabNames.end() != std::find(aOriginalTabNames.begin(), aOriginalTabNames.end(), aNewName))
1202 for (
int digits=1; digits<10 && aNewName.isEmpty(); digits++)
1204 const int rangeStart = pow(10, digits - 1);
1205 const int rangeEnd = pow(10, digits);
1207 for (
int i=rangeStart;
i<rangeEnd && aNewName.isEmpty();
i++)
1209 aNewName = OUString::Concat(rOriginalName.subView(0, MAX_TAB_NAME_LENGTH - 1 - digits)) +
"-" + OUString::number(
i);
1210 if (aNewTabNames.end() != std::find(aNewTabNames.begin(), aNewTabNames.end(), aNewName) ||
1211 aOriginalTabNames.end() != std::find(aOriginalTabNames.begin(), aOriginalTabNames.end(), aNewName))
1219 if (!aNewName.isEmpty())
1223 aNewTabNames.push_back(aNewName);
1228 aNewTabNames.push_back(rOriginalName);
1234 aNewTabNames.push_back(rOriginalName);
1246 const OUString& rOriginalName = aOriginalTabNames[nTab];
1248 OUString rModifiedName;
1249 rDoc.
GetName(nTab, rModifiedName);
1251 if (rOriginalName != rModifiedName)
SfxApplication * SfxGetpApp()
constexpr OUStringLiteral sStream
const LanguageTag & GetLanguageTag() const
static const AllSettings & GetSettings()
sal_uInt8 GetBlue() const
sal_uInt8 GetAlpha() const
sal_uInt8 GetGreen() const
void WriteXml(XclExpXmlStream &)
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
void SetGrammar(const formula::FormulaGrammar::Grammar eGrammar)
const ScDocument & GetDocument() const
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
static ScViewData * GetViewData()
bool IsIdleEnabled() const
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
void EnableIdle(bool bDo)
void SetAutoCalcShellDisabled(bool bNew)
bool IsAutoCalcShellDisabled() const
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
SC_DLLPUBLIC SCTAB GetTableCount() const
void disableSkipUnusedFileIds()
SfxObjectShell * GetEmbeddedObject() const
void Format(OUString &, ScRefFlags nFlags, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, sal_Unicode cDelimiter=0, bool bFullAddressNotation=false) const
void push_back(const ScRange &rRange)
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
ScViewData & GetViewData()
void WriteExtOptions(ScExtDocOptions &rOpt) const
SfxMedium * GetMedium() const
SvStream & WriteDouble(const double &rDouble)
SvStream & WriteInt32(sal_Int32 nInt32)
std::size_t WriteBytes(const void *pData, std::size_t nSize)
SvStream & WriteInt16(sal_Int16 nInt16)
SvStream & WriteUChar(unsigned char nChar)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
SvStream & WriteFloat(float nFloat)
sal_uInt64 Seek(sal_uInt64 nPos)
std::size_t ReadBytes(void *pData, std::size_t nSize)
SvStream & WriteSChar(signed char nChar)
sal_uInt64 remainingSize()
bool containsVBAProject()
void exportVBA(SotStorage *pRootStorage)
bool mbValid
Last known stream position.
static sal_uInt32 GetBlockPos(std::size_t nStrmPos)
XclExpBiff8Encrypter(const XclExpRoot &rRoot)
void Encrypt(SvStream &rStrm, sal_uInt8 nData)
void GetSaltDigest(sal_uInt8 pnSaltDigest[16]) const
void Init(const css::uno::Sequence< css::beans::NamedValue > &aEncryptionData)
void GetSalt(sal_uInt8 pnSalt[16]) const
::msfilter::MSCodec_Std97 maCodec
void GetDocId(sal_uInt8 pnDocId[16]) const
sal_uInt8 mpnSaltDigest[16]
static sal_uInt16 GetOffsetInBlock(std::size_t nStrmPos)
sal_uInt8 mpnDocId[16]
Crypto algorithm implementation.
void EncryptBytes(SvStream &rStrm, ::std::vector< sal_uInt8 > &aBytes)
Access to global data from other classes.
css::uno::Sequence< css::beans::NamedValue > GetEncryptionData() const
static css::uno::Sequence< css::beans::NamedValue > GenerateDefaultEncryptionData()
This class is used to export Excel record streams.
void StartContinue()
Writes CONTINUE header, internal setup.
void UpdateRecSize()
Rewrites correct record length, if different from calculated.
XclExpStream(SvStream &rOutStrm, const XclExpRoot &rRoot, sal_uInt16 nMaxRecSize=0)
Constructs the Excel record export stream.
void InitRecord(sal_uInt16 nRecId)
Writes header data, internal setup.
sal_uInt16 mnHeaderSize
Maximum size of data slices (parts that cannot be split).
void WriteCharBuffer(const ScfUInt8Vec &rBuffer)
Writes 8-bit character buffer.
std::size_t mnLastSizePos
Predicted size received from calling function.
void WriteRawZeroBytes(std::size_t nBytes)
Writes a raw sequence of zero bytes.
void WriteZeroBytes(std::size_t nBytes)
Writes a sequence of nBytes zero bytes (respects slice setting).
XclExpEncrypterRef mxEncrypter
sal_uInt16 mnMaxSliceSize
Current maximum, either mnMaxRecSize or mnMaxContSize.
void WriteZeroBytesToRecord(std::size_t nBytes)
sal_uInt16 mnCurrSize
Record size written in last record header.
sal_uInt16 mnCurrMaxSize
Maximum size of CONTINUE content.
void WriteUnicodeBuffer(const ScfUInt16Vec &rBuffer, sal_uInt8 nFlags)
Writes Unicode buffer as 8/16 bit, repeats nFlags at start of a CONTINUE record.
bool mbUseEncrypter
Filter root data.
sal_uInt16 PrepareWrite()
Creates CONTINUE record at end of record.
sal_uInt16 mnSliceSize
Count of bytes already written in current record.
void CopyFromStream(SvStream &rInStrm, sal_uInt64 nBytes=STREAM_SEEK_TO_END)
Copies nBytes bytes from current position of the stream rInStrm.
void EnableEncryption(bool bEnable=true)
void SetEncrypter(XclExpEncrypterRef const &xEncrypter)
bool mbInRec
Stream position of size field in current header.
void SetSliceSize(sal_uInt16 nSize)
Sets data slice length.
void UpdateSizeVars(std::size_t nSize)
Recalculates mnCurrSize and mnSliceSize.
bool HasValidEncrypter() const
void StartRecord(sal_uInt16 nRecId, std::size_t nRecSize)
Starts a new record: writes header data, stores calculated record size.
void WriteByteString(const OString &rString)
Writes string length field and OString buffer.
std::size_t Write(const void *pData, std::size_t nBytes)
Writes nBytes bytes from memory.
XclExpStream & operator<<(sal_Int8 nValue)
void SetSvStreamPos(sal_uInt64 nPos)
Sets position of system stream (only allowed outside of records).
void EndRecord()
Checks and corrects real record length.
const XclExpRoot & mrRoot
Reference to the system output stream.
sal_uInt16 mnMaxContSize
Maximum size of record content.
std::size_t mnPredictSize
Count of bytes already written in current slice.
This class stores an unformatted or formatted string for Excel export.
bool IsRich() const
Returns true, if the string contains formatting information.
const ScfUInt16Vec & GetUnicodeBuffer() const
sax_fastparser::FSHelperPtr GetStreamForPath(const OUString &rPath)
ScDocShell * getDocShell()
virtual ::oox::ole::VbaProject * implCreateVbaProject() const override
virtual oox::vml::Drawing * getVmlDrawing() override
void WriteAttribute(sal_Int32 nAttr, std::u16string_view sVal)
void validateTabNames(std::vector< OUString > &aOriginalTabNames)
const XclExpRoot * mpRoot
virtual oox::drawingml::table::TableStyleListPtr getTableStyles() override
virtual const oox::drawingml::Theme * getCurrentTheme() const override
sax_fastparser::FSHelperPtr & GetCurrentStream()
void renameTab(SCTAB aTab, OUString aNewName)
std::stack< sax_fastparser::FSHelperPtr > maStreams
virtual bool importDocument() noexcept override
XclExpXmlPathToStateMap maOpenedStreamMap
virtual oox::drawingml::chart::ChartConverter * getChartConverter() override
sax_fastparser::FSHelperPtr CreateOutputStream(const OUString &sFullStream, std::u16string_view sRelativeStream, const css::uno::Reference< css::io::XOutputStream > &xParentRelation, const char *sContentType, std::u16string_view sRelationshipType, OUString *pRelationshipId=nullptr)
virtual bool exportDocument() override
void PushStream(sax_fastparser::FSHelperPtr const &aStream)
virtual ~XclExpXmlStream() override
XclExpXmlStream(const css::uno::Reference< css::uno::XComponentContext > &rCC, bool bExportVBA, bool bExportTemplate)
virtual OUString SAL_CALL getImplementationName() override
void restoreTabNames(const std::vector< OUString > &aOriginalTabNames)
A 2D cell range address list with Excel column and row indexes.
ScExtDocOptions & GetExtDocOptions() const
Returns the extended document options.
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
RootData & GetOldRoot() const
Returns old RootData struct.
static OString ToOString(const Color &rColor)
static sax_fastparser::FSHelperPtr WriteFontData(sax_fastparser::FSHelperPtr pStream, const XclFontData &rFontData, sal_Int32 nNameId)
static void GetFormulaTypeAndValue(ScFormulaCell &rCell, const char *&sType, OUString &rValue)
static OUString ToOUString(const char *s)
static OUString GetStreamName(const char *sStreamDir, const char *sStream, sal_Int32 nId)
static void CopyInputToOutput(const css::uno::Reference< css::io::XInputStream > &xInput, const css::uno::Reference< css::io::XOutputStream > &xOutput)
bool Skip(std::size_t nDatLen)
bool Encode(const void *pData, std::size_t nDatLen, sal_uInt8 *pBuffer, std::size_t nBufLen)
bool VerifyKey(const sal_uInt8 *pSaltData, const sal_uInt8 *pSaltDigest)
void GetDocId(sal_uInt8 pDocId[16])
bool InitCodec(const css::uno::Sequence< css::beans::NamedValue > &aData)
void CreateSaltDigest(const sal_uInt8 nSaltData[16], sal_uInt8 nSaltDigest[16])
virtual bool InitCipher(sal_uInt32 nCounter) override
const OUString & getFileUrl() const
const css::uno::Reference< css::frame::XModel > & getModel() const
void commitStorage() const
const css::uno::Reference< css::task::XStatusIndicator > & getStatusIndicator() const
const css::uno::Reference< css::uno::XComponentContext > & getComponentContext() const
::sax_fastparser::FSHelperPtr openFragmentStreamWithSerializer(const OUString &rStreamName, const OUString &rMediaType)
OUString addRelation(const OUString &rType, std::u16string_view rTarget)
css::uno::Reference< css::io::XOutputStream > openFragmentStream(const OUString &rStreamName, const OUString &rMediaType)
const OUString & getString() const
std::unique_ptr< sal_Int32[]> pData
constexpr OUStringLiteral aData
rtl_TextEncoding getBestTextEncodingFromLocale(const css::lang::Locale &rLocale)
int sprintf(char(&s)[N], char const *format, T &&... arguments)
std::shared_ptr< TableStyleList > TableStyleListPtr
OUString getRelationship(Relationship eRelationship)
std::shared_ptr< FastSerializerHelper > FSHelperPtr
bool getOutputStream(ProgramOptions const &options, OString const &extension, std::ostream **ppOutputStream, OString &targetSourceFileName, OString &tmpSourceFileName)
OUString ScResId(TranslateId aId)
#define STREAM_SEEK_TO_END
A 2D cell address struct with Excel column and row indexes.
Stores global buffers and data needed for Excel export filter.
This struct helps reading and writing Excel fonts.
Color maColor
String with styles (bold, italic).
sal_uInt8 mnCharSet
Windows font family.
sal_uInt16 mnHeight
Font color.
bool mbOutline
true = Struck out.
sal_uInt16 mnWeight
Font height in twips (1/20 of a point).
bool mbItalic
Underline style.
FontLineStyle GetScUnderline() const
Returns the Calc font underline style.
bool mbStrikeout
true = Italic.
sal_uInt8 mnFamily
Escapement type.
bool mbShadow
true = Outlined.
SvxEscapement GetScEscapement() const
Returns the Calc escapement style.
A 2D cell range address struct with Excel column and row indexes.
Reference< XModel > xModel
std::unique_ptr< char[]> aBuffer
static const char * lcl_ToVerticalAlignmentRun(SvxEscapement eEscapement, bool &bHaveAlignment)
static ScAddress lcl_ToAddress(const XclAddress &rAddress)
static void lcl_WriteValue(const sax_fastparser::FSHelperPtr &rStream, sal_Int32 nElement, const char *pValue)
static const char * lcl_GetUnderlineStyle(FontLineStyle eUnderline, bool &bHaveUnderline)
static ScRange lcl_ToRange(const XclRange &rRange)
static const char * lcl_GetErrorString(FormulaError nScErrCode)
std::shared_ptr< XclExpBiff8Encrypter > XclExpEncrypterRef
const SCROW EXC_MAXROW_XML_2007
const sal_uInt8 EXC_ERR_NA
const sal_uInt8 EXC_ERR_REF
const SCTAB EXC_MAXTAB_XML_2007
const sal_uInt8 EXC_ERR_NAME
const sal_uInt8 EXC_ERR_NULL
DDE application-topic delimiter.
const sal_uInt8 EXC_ERR_VALUE
@ EXC_BIFF8
MS Excel 5.0, MS Excel 7.0 (95)
@ EXC_OUTPUT_XML_2007
MS Excel binary .xls.
const sal_uInt8 EXC_ERR_DIV0
const SCCOL EXC_MAXCOL_XML_2007
const sal_uInt8 EXC_ERR_NUM
const sal_uInt16 EXC_MAXRECSIZE_BIFF8
const sal_uInt16 EXC_MAXRECSIZE_BIFF5
const sal_uInt16 EXC_ENCR_BLOCKSIZE
const sal_uInt16 EXC_ID_CONT
const sal_uInt8 EXC_STRF_16BIT