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>
72#include <com/sun/star/task/XStatusIndicator.hpp>
79#define DEBUG_XL_ENCRYPTION 0
81using ::com::sun::star::uno::XInterface;
96 mbUseEncrypter( false ),
97 mnMaxRecSize( nMaxRecSize ),
119 OSL_ENSURE( !
mbInRec,
"XclExpStream::StartRecord - another record still open" );
131 OSL_ENSURE(
mbInRec,
"XclExpStream::EndRecord - no record open" );
226 std::size_t nRet = 0;
227 if(
pData && (nBytes > 0) )
232 std::size_t nBytesLeft = nBytes;
235 while( bValid && (nBytesLeft > 0) )
237 std::size_t nWriteLen = ::std::min< std::size_t >(
PrepareWrite(), nBytesLeft );
238 std::size_t nWriteRet = nWriteLen;
241 OSL_ENSURE(nWriteLen > 0,
"XclExpStream::Write: write length is 0!");
242 vector<sal_uInt8> aBytes(nWriteLen);
243 memcpy(aBytes.data(), pBuffer, nWriteLen);
250 bValid = (nWriteLen == nWriteRet);
251 OSL_ENSURE( bValid,
"XclExpStream::Write - stream write error" );
253 pBuffer += nWriteRet;
255 nBytesLeft -= nWriteRet;
269 std::size_t nBytesLeft = nBytes;
270 while( nBytesLeft > 0 )
272 std::size_t nWriteLen = ::std::min< std::size_t >(
PrepareWrite(), nBytesLeft );
274 nBytesLeft -= nWriteLen;
288 for (std::size_t
i = 0;
i < nBytes; ++
i)
295 sal_uInt64 nBytesLeft = ::std::min(nBytes, nRemaining);
296 if( nBytesLeft <= 0 )
299 const std::size_t nMaxBuffer = 4096;
300 std::unique_ptr<sal_uInt8[]> pBuffer(
301 new sal_uInt8[ ::std::min<std::size_t>(nBytesLeft, nMaxBuffer) ]);
304 while( bValid && (nBytesLeft > 0) )
306 std::size_t nWriteLen = ::std::min<std::size_t>(nBytesLeft, nMaxBuffer);
307 rInStrm.
ReadBytes(pBuffer.get(), nWriteLen);
308 std::size_t nWriteRet =
Write( pBuffer.get(), nWriteLen );
309 bValid = (nWriteLen == nWriteRet);
310 nBytesLeft -= nWriteRet;
318 sal_uInt16 nCharLen = nFlags ? 2 : 1;
320 for(
const auto& rItem : rBuffer )
330 operator<<( static_cast< sal_uInt8 >( rItem ) );
340 std::size_t nLen = ::std::min< std::size_t >( rString.getLength(), 0x00FF );
341 nLen = ::std::min< std::size_t >( nLen, 0xFF );
347 operator<<( static_cast< sal_uInt8 >( nLen ) );
348 Write( rString.getStr(), nLen );
354 Write( rBuffer.data(), rBuffer.size() );
379 OSL_ENSURE( !
mbInRec,
"XclExpStream::SetSvStreamPos - not allowed inside of a record" );
455 const sal_uInt32 nData = 0;
456 std::size_t nBytesLeft = nBytes;
457 while( nBytesLeft >=
sizeof( nData ) )
460 nBytesLeft -=
sizeof( nData );
471 if( !aEncryptionData.hasElements() )
474 Init( aEncryptionData );
501 vector<sal_uInt8> aByte { nData };
507 ::std::vector<sal_uInt8> pnBytes
509 o3tl::narrowing<sal_uInt8>(nData & 0xFF),
510 o3tl::narrowing<sal_uInt8>((nData >> 8) & 0xFF)
517 ::std::vector<sal_uInt8> pnBytes
519 o3tl::narrowing<sal_uInt8>(nData & 0xFF),
520 o3tl::narrowing<sal_uInt8>((nData >> 8) & 0xFF),
521 o3tl::narrowing<sal_uInt8>((nData >> 16) & 0xFF),
522 o3tl::narrowing<sal_uInt8>((nData >> 24) & 0xFF)
529 ::std::vector<sal_uInt8> pnBytes(4);
530 memcpy(pnBytes.data(), &fValue, 4);
536 ::std::vector<sal_uInt8> pnBytes(8);
537 memcpy(pnBytes.data(), &fValue, 8);
567 rtl_random_getBytes( aRandomPool,
mpnSalt, 16 );
568 rtl_random_destroyPool( aRandomPool );
597 SAL_INFO(
"sc.filter",
"XclExpBiff8Encrypter::EncryptBytes: stream pos = "
598 << nStrmPos <<
" offset in block = " << nBlockOffset
599 <<
" block pos = " << 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!" );
840 bHaveUnderline =
true;
848 default: bHaveUnderline =
false;
return "none";
854 bHaveAlignment =
true;
855 switch( eEscapement )
857 case SvxEscapement::Superscript:
return "superscript";
858 case SvxEscapement::Subscript:
return "subscript";
859 case SvxEscapement::Off:
860 default: bHaveAlignment =
false;
return "baseline";
866 bool bHaveUnderline, bHaveVertAlign;
871 pStream->singleElement(XML_b, XML_val, ToPsz(
true ));
873 pStream->singleElement(XML_i, XML_val, ToPsz(
true ));
875 pStream->singleElement(XML_strike, XML_val, ToPsz(
true ));
879 pStream->singleElement(XML_outline, XML_val, ToPsz(
true ));
881 pStream->singleElement(XML_shadow, XML_val, ToPsz(
true ));
883 pStream->singleElement(XML_u, XML_val, pUnderline);
885 pStream->singleElement(XML_vertAlign, XML_val, pVertAlign);
886 pStream->singleElement(XML_sz, XML_val, OString::number( rFontData.
mnHeight / 20.0 ));
889 if (rComplexColor.isValidSchemeType())
893 pStream->singleElement(XML_color,
894 XML_theme, OString::number(nTheme),
897 else if (rComplexColor.getFinalColor() !=
Color(
ColorAlpha, 0, 0xFF, 0xFF, 0xFF))
899 pStream->singleElement(XML_color,
902 pStream->singleElement(nFontId, XML_val, rFontData.
maName);
903 pStream->singleElement(XML_family, XML_val, OString::number( rFontData.
mnFamily ));
905 pStream->singleElement(XML_charset, XML_val, OString::number(rFontData.
mnCharSet));
911 : XmlFilterBase( rCC ),
913 mbExportVBA(bExportVBA),
914 mbExportTemplate(bExportTemplate)
920 assert(
maStreams.empty() &&
"Forgotten PopStream()?");
925 OSL_ENSURE( !
maStreams.empty(),
"XclExpXmlStream::GetCurrentStream - no current stream" );
936 OSL_ENSURE( !
maStreams.empty(),
"XclExpXmlStream::PopStream - stack is empty!" );
949 GetCurrentStream()->write(
" ")->writeId(nAttr)->write(
"=\"")->writeEscaped(sVal)->write(
"\"");
953 const OUString& sFullStream,
954 std::u16string_view sRelativeStream,
955 const uno::Reference< XOutputStream >& xParentRelation,
956 const char* sContentType,
957 std::u16string_view sRelationshipType,
958 OUString* pRelationshipId )
960 OUString sRelationshipId;
961 if (xParentRelation.is())
962 sRelationshipId =
addRelation( xParentRelation, OUString(sRelationshipType), sRelativeStream );
964 sRelationshipId =
addRelation( OUString(sRelationshipType), sRelativeStream );
966 if( pRelationshipId )
967 *pRelationshipId = sRelationshipId;
1020 const bool bValidateTabNames = officecfg::Office::Calc::Filter::Export::MS_Excel::TruncateLongSheetNames::get();
1021 std::vector<OUString> aOriginalTabNames;
1022 if (bValidateTabNames)
1029 if (xStatusIndicator.is())
1030 xStatusIndicator->start(
ScResId(STR_SAVE_DOC), 100);
1036 drawingml::DrawingML::ResetMlCounters();
1038 auto& rGraphicExportCache = drawingml::GraphicExportCache::get();
1040 rGraphicExportCache.push();
1048 aData.maMaxPos.SetCol( ::std::min(
aData.maScMaxPos.Col(),
aData.maXclMaxPos.Col() ) );
1049 aData.maMaxPos.SetRow( ::std::min(
aData.maScMaxPos.Row(),
aData.maXclMaxPos.Row() ) );
1050 aData.maMaxPos.SetTab( ::std::min(
aData.maScMaxPos.Tab(),
aData.maXclMaxPos.Tab() ) );
1051 aData.mpCompileFormulaCxt = std::make_shared<sc::CompileFormulaContext>(rDoc);
1054 aData.maBasePath = OUString(
"file:///" + aPath.
GetPath() +
"\\").replace(
'\\',
'/')
1056 .replaceFirst(
"file:////",
"file:///");
1070 if ( pTabViewShell )
1077 static constexpr OUStringLiteral workbook =
u"xl/workbook.xml";
1078 const char* pWorkbookContentType =
nullptr;
1083 pWorkbookContentType =
"application/vnd.ms-excel.template.macroEnabled.main+xml";
1087 pWorkbookContentType =
"application/vnd.ms-excel.sheet.macroEnabled.main+xml";
1094 pWorkbookContentType =
"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml";
1098 pWorkbookContentType =
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml";
1103 uno::Reference <XOutputStream>(),
1104 pWorkbookContentType,
1116 css::uno::Reference<css::io::XInputStream> xVBAStream(
1118 css::uno::Reference<css::io::XOutputStream> xVBAOutput =
1129 if (xStatusIndicator.is())
1130 xStatusIndicator->setValue(10);
1132 if (xStatusIndicator.is())
1133 xStatusIndicator->setValue(40);
1142 if (!entry.second.second)
1144 entry.second.second->endDocument();
1150 if (bValidateTabNames)
1155 if (xStatusIndicator.is())
1156 xStatusIndicator->end();
1159 rGraphicExportCache.pop();
1176 const int MAX_TAB_NAME_LENGTH = 31;
1185 rDoc.
GetName(nTab, aOriginalTabNames[nTab]);
1189 std::vector<OUString> aNewTabNames;
1195 const OUString& rOriginalName = aOriginalTabNames[nTab];
1196 if (rOriginalName.getLength() > MAX_TAB_NAME_LENGTH)
1201 if (aNewName.isEmpty())
1203 aNewName = rOriginalName.copy(0, MAX_TAB_NAME_LENGTH);
1204 if (aNewTabNames.end() != std::find(aNewTabNames.begin(), aNewTabNames.end(), aNewName) ||
1205 aOriginalTabNames.end() != std::find(aOriginalTabNames.begin(), aOriginalTabNames.end(), aNewName))
1213 for (
int digits=1; digits<10 && aNewName.isEmpty(); digits++)
1215 const int rangeStart = pow(10, digits - 1);
1216 const int rangeEnd = pow(10, digits);
1218 for (
int i=rangeStart;
i<rangeEnd && aNewName.isEmpty();
i++)
1220 aNewName = OUString::Concat(rOriginalName.subView(0, MAX_TAB_NAME_LENGTH - 1 - digits)) +
"-" + OUString::number(
i);
1221 if (aNewTabNames.end() != std::find(aNewTabNames.begin(), aNewTabNames.end(), aNewName) ||
1222 aOriginalTabNames.end() != std::find(aOriginalTabNames.begin(), aOriginalTabNames.end(), aNewName))
1230 if (!aNewName.isEmpty())
1234 aNewTabNames.push_back(aNewName);
1239 aNewTabNames.push_back(rOriginalName);
1245 aNewTabNames.push_back(rOriginalName);
1257 const OUString& rOriginalName = aOriginalTabNames[nTab];
1259 OUString rModifiedName;
1260 rDoc.
GetName(nTab, rModifiedName);
1262 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
#define SAL_INFO(area, stream)
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)
static double convertColorTransformsToTintOrShade(model::ComplexColor const &rComplexColor)
static sal_Int32 convertThemeColorTypeToExcelThemeNumber(model::ThemeColorType eType)
const char * UseIf(const char *s, bool bUse)
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.
sal_uInt8 mnCharSet
Windows font family.
sal_uInt16 mnHeight
String with styles (bold, italic).
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.
model::ComplexColor maComplexColor
true = Shadowed.
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 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