LibreOffice Module sc (master) 1
htmlexp.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21
22#include <string_view>
23
24#include <scitems.hxx>
25#include <editeng/eeitem.hxx>
26
27#include <utility>
28#include <vcl/svapp.hxx>
29#include <editeng/boxitem.hxx>
30#include <editeng/brushitem.hxx>
31#include <editeng/colritem.hxx>
33#include <editeng/fhgtitem.hxx>
34#include <editeng/fontitem.hxx>
35#include <editeng/postitem.hxx>
36#include <editeng/udlnitem.hxx>
37#include <editeng/wghtitem.hxx>
39#include <svx/xoutbmp.hxx>
40#include <editeng/editeng.hxx>
41#include <svtools/htmlcfg.hxx>
42#include <sfx2/docfile.hxx>
43#include <sfx2/frmhtmlw.hxx>
44#include <sfx2/objsh.hxx>
45#include <svl/urihelper.hxx>
46#include <svtools/htmlkywd.hxx>
47#include <svtools/htmlout.hxx>
48#include <svtools/parhtml.hxx>
49#include <vcl/outdev.hxx>
50#include <stdio.h>
51#include <osl/diagnose.h>
53
54#include <htmlexp.hxx>
55#include <global.hxx>
56#include <postit.hxx>
57#include <document.hxx>
58#include <attrib.hxx>
59#include <patattr.hxx>
60#include <stlpool.hxx>
61#include <scresid.hxx>
62#include <formulacell.hxx>
63#include <cellform.hxx>
64#include <docoptio.hxx>
65#include <editutil.hxx>
66#include <ftools.hxx>
67#include <cellvalue.hxx>
68#include <mtvelements.hxx>
69
70#include <editeng/flditem.hxx>
72
73// Without strings.hrc: error C2679: binary '=' : no operator defined which takes a
74// right-hand operand of type 'const class String (__stdcall *)(class ScResId)'
75// at
76// const String aStrTable( ScResId( SCSTR_TABLE ) ); aStrOut = aStrTable;
77// ?!???
78#include <strings.hrc>
79#include <globstr.hrc>
80
81#include <com/sun/star/frame/XModel.hpp>
82#include <com/sun/star/uno/Reference.h>
83#include <com/sun/star/document/XDocumentProperties.hpp>
84#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
85#include <rtl/strbuf.hxx>
86#include <officecfg/Office/Common.hxx>
87
88using ::editeng::SvxBorderLine;
89using namespace ::com::sun::star;
90
91const char sMyBegComment[] = "<!-- ";
92const char sMyEndComment[] = " -->";
93const char sDisplay[] = "display:";
94const char sBorder[] = "border:";
95const char sBackground[] = "background:";
96
98{
101};
102
104
106{
107 "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"
108};
109
110const sal_uInt16 ScHTMLExport::nCellSpacing = 0;
112 "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
113
114// Macros for HTML export
115
116#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag )
117#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag, false )
118#define OUT_STR( str ) HTMLOutFuncs::Out_String( rStrm, str, &aNonConvertibleChars )
119#define OUT_LF() rStrm.WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() )
120#define TAG_ON_LF( tag ) (TAG_ON( tag ).WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() ))
121#define TAG_OFF_LF( tag ) (TAG_OFF( tag ).WriteCharPtr( SAL_NEWLINE_STRING ).WriteCharPtr( GetIndentStr() ))
122#define OUT_HR() TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_horzrule )
123#define OUT_COMMENT( comment ) (rStrm.WriteCharPtr( sMyBegComment ), OUT_STR( comment ) \
124 .WriteCharPtr( sMyEndComment ).WriteCharPtr( SAL_NEWLINE_STRING ) \
125 .WriteCharPtr( GetIndentStr() ))
126
127#define OUT_SP_CSTR_ASS( s ) rStrm.WriteChar( ' ').WriteCharPtr( s ).WriteChar( '=' )
128
129#define GLOBSTR(id) ScResId( id )
130
131void ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const OUString& rBaseURL, ScDocument* pDoc,
132 const ScRange& rRange, const rtl_TextEncoding /*eNach*/, bool bAll,
133 const OUString& rStreamPath, OUString& rNonConvertibleChars, const OUString& rFilterOptions )
134{
135 ScHTMLExport aEx( rStrm, rBaseURL, pDoc, rRange, bAll, rStreamPath, rFilterOptions );
136 aEx.Write();
137 rNonConvertibleChars = aEx.GetNonConvertibleChars();
138}
139
140static OString lcl_getColGroupString(sal_Int32 nSpan, sal_Int32 nWidth)
141{
142 OStringBuffer aByteStr(OOO_STRING_SVTOOLS_HTML_colgroup);
143 aByteStr.append(' ');
144 if( nSpan > 1 )
145 {
146 aByteStr.append(OOO_STRING_SVTOOLS_HTML_O_span);
147 aByteStr.append("=\"");
148 aByteStr.append(nSpan);
149 aByteStr.append("\" ");
150 }
151 aByteStr.append(OOO_STRING_SVTOOLS_HTML_O_width);
152 aByteStr.append("=\"");
153 aByteStr.append(nWidth);
154 aByteStr.append('"');
155 return aByteStr.makeStringAndClear();
156}
157
158static void lcl_AddStamp( OUString& rStr, std::u16string_view rName,
159 const css::util::DateTime& rDateTime,
160 const LocaleDataWrapper& rLoc )
161{
162 Date aD(rDateTime.Day, rDateTime.Month, rDateTime.Year);
163 tools::Time aT(rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds,
164 rDateTime.NanoSeconds);
165 DateTime aDateTime(aD,aT);
166
167 OUString aStrDate = rLoc.getDate( aDateTime );
168 OUString aStrTime = rLoc.getTime( aDateTime );
169
170 rStr += GLOBSTR( STR_BY ) + " ";
171 if (!rName.empty())
172 rStr += rName;
173 else
174 rStr += "???";
175 rStr += " " + GLOBSTR( STR_ON ) + " ";
176 if (!aStrDate.isEmpty())
177 rStr += aStrDate;
178 else
179 rStr += "???";
180 rStr += ", ";
181 if (!aStrTime.isEmpty())
182 rStr += aStrTime;
183 else
184 rStr += "???";
185}
186
187static OString lcl_makeHTMLColorTriplet(const Color& rColor)
188{
189 char buf[24];
190
191 // <font COLOR="#00FF40">hello</font>
192 snprintf( buf, 24, "\"#%02X%02X%02X\"", rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue() );
193
194 return OString(buf);
195}
196
197ScHTMLExport::ScHTMLExport( SvStream& rStrmP, OUString _aBaseURL, ScDocument* pDocP,
198 const ScRange& rRangeP, bool bAllP,
199 OUString aStreamPathP, std::u16string_view rFilterOptions ) :
200 ScExportBase( rStrmP, pDocP, rRangeP ),
201 aBaseURL(std::move( _aBaseURL )),
202 aStreamPath(std::move( aStreamPathP )),
203 pAppWin( Application::GetDefaultDevice() ),
204 nUsedTables( 0 ),
205 nIndent( 0 ),
206 bAll( bAllP ),
207 bTabHasGraphics( false ),
208 bTabAlignedLeft( false ),
209 bCalcAsShown( pDocP->GetDocOptions().IsCalcAsShown() ),
210 bTableDataHeight( true ),
211 mbSkipImages ( false ),
212 mbSkipHeaderFooter( false )
213{
214 strcpy( sIndent, sIndentSource );
215 sIndent[0] = 0;
216
217 // set HTML configuration
218 bCopyLocalFileToINet = officecfg::Office::Common::Filter::HTML::Export::LocalGraphic::get();
219
220 if (rFilterOptions == u"SkipImages")
221 {
222 mbSkipImages = true;
223 }
224 else if (rFilterOptions == u"SkipHeaderFooter")
225 {
226 mbSkipHeaderFooter = true;
227 }
228
229 for ( sal_uInt16 j=0; j < SC_HTML_FONTSIZES; j++ )
230 {
231 sal_uInt16 nSize = SvxHtmlOptions::GetFontSize( j );
232 // remember in Twips, like our SvxFontHeightItem
233 if ( nSize )
234 nFontSize[j] = nSize * 20;
235 else
236 nFontSize[j] = nDefaultFontSize[j] * 20;
237 }
238
239 const SCTAB nCount = pDoc->GetTableCount();
240 for ( SCTAB nTab = 0; nTab < nCount; nTab++ )
241 {
242 if ( !IsEmptyTable( nTab ) )
243 nUsedTables++;
244 }
245}
246
248{
249 aGraphList.clear();
250}
251
252sal_uInt16 ScHTMLExport::GetFontSizeNumber( sal_uInt16 nHeight )
253{
254 sal_uInt16 nSize = 1;
255 for ( sal_uInt16 j=SC_HTML_FONTSIZES-1; j>0; j-- )
256 {
257 if( nHeight > (nFontSize[j] + nFontSize[j-1]) / 2 )
258 { // The one next to it
259 nSize = j+1;
260 break;
261 }
262 }
263 return nSize;
264}
265
266const char* ScHTMLExport::GetFontSizeCss( sal_uInt16 nHeight )
267{
268 sal_uInt16 nSize = GetFontSizeNumber( nHeight );
269 return pFontSizeCss[ nSize-1 ];
270}
271
272sal_uInt16 ScHTMLExport::ToPixel( sal_uInt16 nVal )
273{
274 if( nVal )
275 {
276 nVal = static_cast<sal_uInt16>(pAppWin->LogicToPixel(
277 Size( nVal, nVal ), MapMode( MapUnit::MapTwip ) ).Width());
278 if( !nVal ) // If there's a Twip there should also be a Pixel
279 nVal = 1;
280 }
281 return nVal;
282}
283
285{
286 Size aSize = pAppWin->LogicToPixel( rSize, MapMode( MapUnit::Map100thMM ) );
287 // If there's something there should also be a Pixel
288 if ( !aSize.Width() && rSize.Width() )
289 aSize.setWidth( 1 );
290 if ( !aSize.Height() && rSize.Height() )
291 aSize.setHeight( 1 );
292 return aSize;
293}
294
296{
298 {
302 WriteHeader();
303 OUT_LF();
304 }
305 WriteBody();
306 OUT_LF();
309}
310
312{
314
315 if ( pDoc->IsClipOrUndo() )
316 { // no real DocInfo available, but some META information like charset needed
318 }
319 else
320 {
321 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
322 pDoc->GetDocumentShell()->GetModel(), uno::UNO_QUERY_THROW);
323 uno::Reference<document::XDocumentProperties> xDocProps
324 = xDPS->getDocumentProperties();
327 OUT_LF();
328
329 if (!xDocProps->getPrintedBy().isEmpty())
330 {
331 OUT_COMMENT( GLOBSTR( STR_DOC_INFO ) );
332 OUString aStrOut = GLOBSTR( STR_DOC_PRINTED ) + ": ";
333 lcl_AddStamp( aStrOut, xDocProps->getPrintedBy(),
334 xDocProps->getPrintDate(), ScGlobal::getLocaleData() );
335 OUT_COMMENT( aStrOut );
336 }
337
338 }
339 OUT_LF();
340
341 // CSS1 StyleSheet
342 PageDefaults( bAll ? 0 : aRange.aStart.Tab() );
343 IncIndent(1);
345
346 OUT_LF();
348 rStrm.WriteCharPtr(",");
350 rStrm.WriteCharPtr(",");
352 rStrm.WriteCharPtr(",");
354 rStrm.WriteCharPtr(",");
356 rStrm.WriteCharPtr(",");
358 rStrm.WriteCharPtr(",");
360 rStrm.WriteCharPtr(",");
362 rStrm.WriteCharPtr(",");
364 rStrm.WriteCharPtr(",");
366 rStrm.WriteCharPtr(" { ");
367 rStrm.WriteCharPtr("font-family:");
368
369 if (!aHTMLStyle.aFontFamilyName.isEmpty())
370 {
371 const OUString& rList = aHTMLStyle.aFontFamilyName;
372 for(sal_Int32 nPos {0};;)
373 {
374 rStrm.WriteChar( '\"' );
375 OUT_STR( rList.getToken( 0, ';', nPos ) );
376 rStrm.WriteChar( '\"' );
377 if (nPos<0)
378 break;
379 rStrm.WriteCharPtr( ", " );
380 }
381 }
382 rStrm.WriteCharPtr("; ");
383 rStrm.WriteCharPtr("font-size:");
384 rStrm.WriteCharPtr(GetFontSizeCss(static_cast<sal_uInt16>(aHTMLStyle.nFontHeight)));
385 rStrm.WriteCharPtr(" }");
386
387 OUT_LF();
388
389 // write the style for the comments to make them stand out from normal cell content
390 // this is done through only showing the cell contents when the custom indicator is hovered
392 rStrm.WriteCharPtr(".comment-indicator:hover");
393 rStrm.WriteCharPtr(" + ");
395 rStrm.WriteCharPtr(" { ");
397 rStrm.WriteCharPtr("#ffd");
398 rStrm.WriteCharPtr("; ");
399 rStrm.WriteCharPtr("position:");
400 rStrm.WriteCharPtr("absolute");
401 rStrm.WriteCharPtr("; ");
403 rStrm.WriteCharPtr("block");
404 rStrm.WriteCharPtr("; ");
406 rStrm.WriteCharPtr("1px solid black");
407 rStrm.WriteCharPtr("; ");
408 rStrm.WriteCharPtr("padding:");
409 rStrm.WriteCharPtr("0.5em");
410 rStrm.WriteCharPtr("; ");
411 rStrm.WriteCharPtr(" } ");
412
413 OUT_LF();
414
416 rStrm.WriteCharPtr(".comment-indicator");
417 rStrm.WriteCharPtr(" { ");
419 rStrm.WriteCharPtr("red");
420 rStrm.WriteCharPtr("; ");
422 rStrm.WriteCharPtr("inline-block");
423 rStrm.WriteCharPtr("; ");
425 rStrm.WriteCharPtr("1px solid black");
426 rStrm.WriteCharPtr("; ");
427 rStrm.WriteCharPtr("width:");
428 rStrm.WriteCharPtr("0.5em");
429 rStrm.WriteCharPtr("; ");
430 rStrm.WriteCharPtr("height:");
431 rStrm.WriteCharPtr("0.5em");
432 rStrm.WriteCharPtr("; ");
433 rStrm.WriteCharPtr(" } ");
434
435 OUT_LF();
436
438 rStrm.WriteCharPtr(" { ");
440 rStrm.WriteCharPtr("none");
441 rStrm.WriteCharPtr("; ");
442 rStrm.WriteCharPtr(" } ");
443
444
445 IncIndent(-1);
446 OUT_LF();
448
449 IncIndent(-1);
450 OUT_LF();
452}
453
455{
456 if ( nUsedTables <= 1 )
457 return;
458
459 IncIndent(1);
460 OUT_HR();
463 OUT_STR( ScResId( STR_OVERVIEW ) );
465
466 OUString aStr;
467
468 const SCTAB nCount = pDoc->GetTableCount();
469 for ( SCTAB nTab = 0; nTab < nCount; nTab++ )
470 {
471 if ( !IsEmptyTable( nTab ) )
472 {
473 pDoc->GetName( nTab, aStr );
474 rStrm.WriteCharPtr( "<A HREF=\"#table" )
475 .WriteOString( OString::number(nTab) )
476 .WriteCharPtr( "\">" );
477 OUT_STR( aStr );
478 rStrm.WriteCharPtr( "</A>" );
480 }
481 }
482
483 IncIndent(-1); OUT_LF();
485}
486
488{
490 SfxStyleSheetBase* pStyleSheet = nullptr;
491 OSL_ENSURE( pStylePool, "StylePool not found! :-(" );
492
493 // remember defaults for compare in WriteCell
495 {
496 pStyleSheet = pStylePool->Find(
497 ScResId(STR_STYLENAME_STANDARD),
498 SfxStyleFamily::Para );
499 OSL_ENSURE( pStyleSheet, "ParaStyle not found! :-(" );
500 if (!pStyleSheet)
501 pStyleSheet = pStylePool->First(SfxStyleFamily::Para);
502 const SfxItemSet& rSetPara = pStyleSheet->GetItemSet();
503
505 aHTMLStyle.aFontFamilyName = static_cast<const SvxFontItem&>((rSetPara.Get(
508 )))).GetFamilyName();
509 aHTMLStyle.nFontHeight = static_cast<const SvxFontHeightItem&>((rSetPara.Get(
512 )))).GetHeight();
513 aHTMLStyle.nFontSizeNumber = GetFontSizeNumber( static_cast< sal_uInt16 >( aHTMLStyle.nFontHeight ) );
514 }
515
516 // Page style sheet printer settings, e.g. for background graphics.
517 // There's only one background graphic in HTML!
518 pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SfxStyleFamily::Page );
519 OSL_ENSURE( pStyleSheet, "PageStyle not found! :-(" );
520 if (!pStyleSheet)
521 pStyleSheet = pStylePool->First(SfxStyleFamily::Page);
522 const SfxItemSet& rSet = pStyleSheet->GetItemSet();
524 {
525 const SvxBrushItem* pBrushItem = &rSet.Get( ATTR_BACKGROUND );
526 aHTMLStyle.aBackgroundColor = pBrushItem->GetColor();
528 }
529 return rSet;
530}
531
532OString ScHTMLExport::BorderToStyle(const char* pBorderName,
533 const SvxBorderLine* pLine, bool& bInsertSemicolon)
534{
535 OStringBuffer aOut;
536
537 if ( pLine )
538 {
539 if ( bInsertSemicolon )
540 aOut.append("; ");
541
542 // which border
543 aOut.append(OString::Concat("border-") + pBorderName + ": ");
544
545 // thickness
546 int nWidth = pLine->GetWidth();
547 int nPxWidth = (nWidth > 0) ?
548 std::max(o3tl::convert(nWidth, o3tl::Length::twip, o3tl::Length::px), sal_Int64(1)) : 0;
549 aOut.append(OString::number(nPxWidth) + "px ");
550 switch (pLine->GetBorderLineStyle())
551 {
552 case SvxBorderLineStyle::SOLID:
553 aOut.append("solid");
554 break;
555 case SvxBorderLineStyle::DOTTED:
556 aOut.append("dotted");
557 break;
558 case SvxBorderLineStyle::DASHED:
559 case SvxBorderLineStyle::DASH_DOT:
560 case SvxBorderLineStyle::DASH_DOT_DOT:
561 aOut.append("dashed");
562 break;
563 case SvxBorderLineStyle::DOUBLE:
564 case SvxBorderLineStyle::DOUBLE_THIN:
565 case SvxBorderLineStyle::THINTHICK_SMALLGAP:
566 case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
567 case SvxBorderLineStyle::THINTHICK_LARGEGAP:
568 case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
569 case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
570 case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
571 aOut.append("double");
572 break;
573 case SvxBorderLineStyle::EMBOSSED:
574 aOut.append("ridge");
575 break;
576 case SvxBorderLineStyle::ENGRAVED:
577 aOut.append("groove");
578 break;
579 case SvxBorderLineStyle::OUTSET:
580 aOut.append("outset");
581 break;
582 case SvxBorderLineStyle::INSET:
583 aOut.append("inset");
584 break;
585 default:
586 aOut.append("hidden");
587 }
588 aOut.append(" #");
589
590 // color
591 char hex[7];
592 snprintf( hex, 7, "%06" SAL_PRIxUINT32, static_cast<sal_uInt32>( pLine->GetColor().GetRGBColor() ) );
593 hex[6] = 0;
594
595 aOut.append(hex);
596
597 bInsertSemicolon = true;
598 }
599
600 return aOut.makeStringAndClear();
601}
602
604{
605 const SfxItemSet& rSet = PageDefaults( bAll ? 0 : aRange.aStart.Tab() );
606 const SvxBrushItem* pBrushItem = &rSet.Get( ATTR_BACKGROUND );
607
608 // default text color black
610 {
612
613 if (!mbSkipImages)
614 {
615 if ( bAll && GPOS_NONE != pBrushItem->GetGraphicPos() )
616 {
617 OUString aLink = pBrushItem->GetGraphicLink();
618 OUString aGrfNm;
619
620 // Embedded graphic -> write using WriteGraphic
621 if( aLink.isEmpty() )
622 {
623 const Graphic* pGrf = pBrushItem->GetGraphic();
624 if( pGrf )
625 {
626 // Save graphic as (JPG) file
627 aGrfNm = aStreamPath;
628 ErrCode nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm,
629 "JPG", XOutFlags::UseNativeIfPossible );
630 if( !nErr ) // Contains errors, as we have nothing to output
631 {
635 aLink = aGrfNm;
636 }
637 }
638 }
639 else
640 {
641 aGrfNm = aLink;
643 {
645 }
646 else
650 aLink = aGrfNm;
651 }
652 if( !aLink.isEmpty() )
653 {
656 aBaseURL,
657 aLink ) ).WriteChar( '\"' );
658 }
659 }
660 }
662 { // A transparent background color should always result in default
663 // background of the browser. Also, HTMLOutFuncs::Out_Color() writes
664 // black #000000 for COL_AUTO which is the same as white #ffffff with
665 // transparency set to 0xff, our default background.
668 }
669
670 rStrm.WriteChar( '>' ); OUT_LF();
671 }
672
673 if ( bAll )
675
676 WriteTables();
677
680}
681
683{
684 const SCTAB nTabCount = pDoc->GetTableCount();
685 const OUString aStrTable( ScResId( SCSTR_TABLE ) );
686 OUString aStr;
687 OUString aStrOut;
688 SCCOL nStartCol;
689 SCROW nStartRow;
690 SCTAB nStartTab;
691 SCCOL nEndCol;
692 SCROW nEndRow;
693 SCTAB nEndTab;
694 SCCOL nStartColFix = 0;
695 SCROW nStartRowFix = 0;
696 SCCOL nEndColFix = 0;
697 SCROW nEndRowFix = 0;
698 ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
699 if ( bAll )
700 {
701 nStartTab = 0;
702 nEndTab = nTabCount - 1;
703 }
704 else
705 {
706 nStartCol = nStartColFix = aRange.aStart.Col();
707 nStartRow = nStartRowFix = aRange.aStart.Row();
708 nStartTab = aRange.aStart.Tab();
709 nEndCol = nEndColFix = aRange.aEnd.Col();
710 nEndRow = nEndRowFix = aRange.aEnd.Row();
711 nEndTab = aRange.aEnd.Tab();
712 }
713 SCTAB nTableStrNum = 1;
714 for ( SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++ )
715 {
716 if ( !pDoc->IsVisible( nTab ) )
717 continue; // for
718
719 if ( bAll )
720 {
721 if ( !GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow ) )
722 continue; // for
723
724 if ( nUsedTables > 1 )
725 {
726 aStrOut = aStrTable + " " + OUString::number( nTableStrNum++ ) + ": ";
727
728 OUT_HR();
729
730 // Write anchor
731 rStrm.WriteCharPtr( "<A NAME=\"table" )
732 .WriteOString( OString::number(nTab) )
733 .WriteCharPtr( "\">" );
735 OUT_STR( aStrOut );
737
738 pDoc->GetName( nTab, aStr );
739 OUT_STR( aStr );
740
743 rStrm.WriteCharPtr( "</A>" ); OUT_LF();
744 }
745 }
746 else
747 {
748 nStartCol = nStartColFix;
749 nStartRow = nStartRowFix;
750 nEndCol = nEndColFix;
751 nEndRow = nEndRowFix;
752 if ( !TrimDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow ) )
753 continue; // for
754 }
755
756 // <TABLE ...>
757 OStringBuffer aByteStrOut(OOO_STRING_SVTOOLS_HTML_table);
758
760 if ( bAll && pDrawLayer )
761 PrepareGraphics( pDrawLayer, nTab, nStartCol, nStartRow,
762 nEndCol, nEndRow );
763
764 // more <TABLE ...>
765 if ( bTabAlignedLeft )
766 {
767 aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_align
768 "=\""
770 }
771 // ALIGN=LEFT allow text and graphics to flow around
772 // CELLSPACING
773 aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_cellspacing
774 "=\"" +
775 OString::number(nCellSpacing) + "\"");
776
777 // BORDER=0, we do the styling of the cells in <TD>
778 aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_border "=\"0\"");
779 IncIndent(1); TAG_ON_LF( aByteStrOut.makeStringAndClear().getStr() );
780
781 // --- <COLGROUP> ----
782 {
783 SCCOL nCol = nStartCol;
784 sal_Int32 nWidth = 0;
785 sal_Int32 nSpan = 0;
786 while( nCol <= nEndCol )
787 {
788 if( pDoc->ColHidden(nCol, nTab) )
789 {
790 ++nCol;
791 continue;
792 }
793
794 if( nWidth != ToPixel( pDoc->GetColWidth( nCol, nTab ) ) )
795 {
796 if( nSpan != 0 )
797 {
798 TAG_ON(lcl_getColGroupString(nSpan, nWidth).getStr());
800 }
801 nWidth = ToPixel( pDoc->GetColWidth( nCol, nTab ) );
802 nSpan = 1;
803 }
804 else
805 nSpan++;
806 nCol++;
807 }
808 if( nSpan )
809 {
810 TAG_ON(lcl_getColGroupString(nSpan, nWidth).getStr());
812 }
813 }
814
815 // <TBODY> // Re-enable only when THEAD and TFOOT are exported
816 // IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_tbody );
817 // At least old (3.x, 4.x?) Netscape doesn't follow <TABLE COLS=n> and
818 // <COL WIDTH=x> specified, but needs a width at every column.
819 bool bHasHiddenRows = pDoc->HasHiddenRows(nStartRow, nEndRow, nTab);
820 // We need to cache sc::ColumnBlockPosition per each column.
821 std::vector< sc::ColumnBlockPosition > blockPos( nEndCol - nStartCol + 1 );
822 for( SCCOL i = nStartCol; i <= nEndCol; ++i )
823 pDoc->InitColumnBlockPosition( blockPos[ i - nStartCol ], nTab, i );
824 for ( SCROW nRow=nStartRow; nRow<=nEndRow; nRow++ )
825 {
826 if ( bHasHiddenRows && pDoc->RowHidden(nRow, nTab) )
827 {
828 nRow = pDoc->FirstVisibleRow(nRow+1, nEndRow, nTab);
829 --nRow;
830 continue; // for
831 }
832
834 bTableDataHeight = true; // height at every first cell of each row
835 for ( SCCOL nCol2=nStartCol; nCol2<=nEndCol; nCol2++ )
836 {
837 if ( pDoc->ColHidden(nCol2, nTab) )
838 continue; // for
839
840 if ( nCol2 == nEndCol )
841 IncIndent(-1);
842 WriteCell( blockPos[ nCol2 - nStartCol ], nCol2, nRow, nTab );
843 bTableDataHeight = false;
844 }
845
846 if ( nRow == nEndRow )
847 IncIndent(-1);
849 }
850 // TODO: Uncomment later
851 // IncIndent(-1); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_tbody );
852
854
856 {
857 // the rest that is not in a cell
858 size_t ListSize = aGraphList.size();
859 for ( size_t i = 0; i < ListSize; ++i )
860 {
862 if ( !pE->bWritten )
864 }
865 aGraphList.clear();
866 if ( bTabAlignedLeft )
867 {
868 // clear <TABLE ALIGN=LEFT> with <BR CLEAR=LEFT>
869 aByteStrOut.append(OOO_STRING_SVTOOLS_HTML_linebreak);
870 aByteStrOut.append(' ').
871 append(OOO_STRING_SVTOOLS_HTML_O_clear).append('=').
873 TAG_ON_LF( aByteStrOut.makeStringAndClear().getStr() );
874 }
875 }
876
877 if ( bAll )
878 OUT_COMMENT( "**************************************************************************" );
879 }
880}
881
883{
884 ScAddress aPos( nCol, nRow, nTab );
885 ScRefCellValue aCell(*pDoc, aPos, rBlockPos);
886 const ScPatternAttr* pAttr = pDoc->GetPattern( nCol, nRow, nTab );
887 const SfxItemSet* pCondItemSet = pDoc->GetCondResult( nCol, nRow, nTab, &aCell );
888
889 const ScMergeFlagAttr& rMergeFlagAttr = pAttr->GetItem( ATTR_MERGE_FLAG, pCondItemSet );
890 if ( rMergeFlagAttr.IsOverlapped() )
891 return ;
892
893 ScHTMLGraphEntry* pGraphEntry = nullptr;
895 {
896 size_t ListSize = aGraphList.size();
897 for ( size_t i = 0; i < ListSize; ++i )
898 {
900 if ( pE->bInCell && pE->aRange.Contains( aPos ) )
901 {
902 if ( pE->aRange.aStart == aPos )
903 {
904 pGraphEntry = pE;
905 break; // for
906 }
907 else
908 return ; // Is a Col/RowSpan, Overlapped
909 }
910 }
911 }
912
913 sal_uInt32 nFormat = pAttr->GetNumberFormat( pFormatter );
914 bool bValueData = aCell.hasNumeric();
915 SvtScriptType nScriptType = SvtScriptType::NONE;
916 if (!aCell.isEmpty())
917 nScriptType = pDoc->GetScriptType(nCol, nRow, nTab, &aCell);
918
919 if ( nScriptType == SvtScriptType::NONE )
920 nScriptType = aHTMLStyle.nDefaultScriptType;
921
922 OStringBuffer aStrTD(OOO_STRING_SVTOOLS_HTML_tabledata);
923
924 // border of the cells
925 const SvxBoxItem* pBorder = pDoc->GetAttr( nCol, nRow, nTab, ATTR_BORDER );
926 if ( pBorder && (pBorder->GetTop() || pBorder->GetBottom() || pBorder->GetLeft() || pBorder->GetRight()) )
927 {
928 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_style "=\"");
929
930 bool bInsertSemicolon = false;
931 aStrTD.append(BorderToStyle("top", pBorder->GetTop(),
932 bInsertSemicolon));
933 aStrTD.append(BorderToStyle("bottom", pBorder->GetBottom(),
934 bInsertSemicolon));
935 aStrTD.append(BorderToStyle("left", pBorder->GetLeft(),
936 bInsertSemicolon));
937 aStrTD.append(BorderToStyle("right", pBorder->GetRight(),
938 bInsertSemicolon));
939
940 aStrTD.append('"');
941 }
942
943 const char* pChar;
944 sal_uInt16 nHeightPixel;
945
946 const ScMergeAttr& rMergeAttr = pAttr->GetItem( ATTR_MERGE, pCondItemSet );
947 if ( pGraphEntry || rMergeAttr.IsMerged() )
948 {
949 SCCOL nC, jC;
950 SCROW nR;
952 if ( pGraphEntry )
953 nC = std::max( SCCOL(pGraphEntry->aRange.aEnd.Col() - nCol + 1),
954 rMergeAttr.GetColMerge() );
955 else
956 nC = rMergeAttr.GetColMerge();
957 if ( nC > 1 )
958 {
959 aStrTD.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_colspan).
960 append('=').append(static_cast<sal_Int32>(nC));
961 nC = nC + nCol;
962 for ( jC=nCol, v=0; jC<nC; jC++ )
963 v += pDoc->GetColWidth( jC, nTab );
964 }
965
966 if ( pGraphEntry )
967 nR = std::max( SCROW(pGraphEntry->aRange.aEnd.Row() - nRow + 1),
968 rMergeAttr.GetRowMerge() );
969 else
970 nR = rMergeAttr.GetRowMerge();
971 if ( nR > 1 )
972 {
973 aStrTD.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_rowspan).
974 append('=').append(static_cast<sal_Int32>(nR));
975 nR += nRow;
976 v = pDoc->GetRowHeight( nRow, nR-1, nTab );
977 nHeightPixel = ToPixel( static_cast< sal_uInt16 >( v ) );
978 }
979 else
980 nHeightPixel = ToPixel( pDoc->GetRowHeight( nRow, nTab ) );
981 }
982 else
983 nHeightPixel = ToPixel( pDoc->GetRowHeight( nRow, nTab ) );
984
985 if ( bTableDataHeight )
986 {
987 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_height "=\"" +
988 OString::number(nHeightPixel) + "\"");
989 }
990
991 const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>( pAttr->GetItem(
993 pCondItemSet) );
994
995 const SvxFontHeightItem& rFontHeightItem = static_cast<const SvxFontHeightItem&>(
996 pAttr->GetItem( ScGlobal::GetScriptedWhichID( nScriptType,
997 ATTR_FONT_HEIGHT), pCondItemSet) );
998
999 const SvxWeightItem& rWeightItem = static_cast<const SvxWeightItem&>( pAttr->GetItem(
1001 pCondItemSet) );
1002
1003 const SvxPostureItem& rPostureItem = static_cast<const SvxPostureItem&>(
1004 pAttr->GetItem( ScGlobal::GetScriptedWhichID( nScriptType,
1005 ATTR_FONT_POSTURE), pCondItemSet) );
1006
1007 const SvxUnderlineItem& rUnderlineItem =
1008 pAttr->GetItem( ATTR_FONT_UNDERLINE, pCondItemSet );
1009
1010 const SvxCrossedOutItem& rCrossedOutItem =
1011 pAttr->GetItem( ATTR_FONT_CROSSEDOUT, pCondItemSet );
1012
1013 const SvxColorItem& rColorItem = pAttr->GetItem(
1014 ATTR_FONT_COLOR, pCondItemSet );
1015
1016 const SvxHorJustifyItem& rHorJustifyItem =
1017 pAttr->GetItem( ATTR_HOR_JUSTIFY, pCondItemSet );
1018
1019 const SvxVerJustifyItem& rVerJustifyItem =
1020 pAttr->GetItem( ATTR_VER_JUSTIFY, pCondItemSet );
1021
1022 const SvxBrushItem& rBrushItem = pAttr->GetItem(
1023 ATTR_BACKGROUND, pCondItemSet );
1024
1025 Color aBgColor;
1026 if ( rBrushItem.GetColor().GetAlpha() == 0 )
1027 aBgColor = aHTMLStyle.aBackgroundColor; // No unwanted background color
1028 else
1029 aBgColor = rBrushItem.GetColor();
1030
1031 bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() );
1032 bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
1033 bool bUnderline = ( LINESTYLE_NONE != rUnderlineItem.GetLineStyle() );
1034 bool bCrossedOut = ( STRIKEOUT_SINGLE <= rCrossedOutItem.GetStrikeout() );
1035 bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue() ); // default is AUTO now
1036 bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() );
1037 sal_uInt16 nSetFontSizeNumber = 0;
1038 sal_uInt32 nFontHeight = rFontHeightItem.GetHeight();
1039 if ( nFontHeight != aHTMLStyle.nFontHeight )
1040 {
1041 nSetFontSizeNumber = GetFontSizeNumber( static_cast<sal_uInt16>(nFontHeight) );
1042 if ( nSetFontSizeNumber == aHTMLStyle.nFontSizeNumber )
1043 nSetFontSizeNumber = 0; // no difference, don't set
1044 }
1045
1046 bool bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber);
1047
1051
1052 switch( rHorJustifyItem.GetValue() )
1053 {
1054 case SvxCellHorJustify::Standard:
1056 break;
1057 case SvxCellHorJustify::Center: pChar = OOO_STRING_SVTOOLS_HTML_AL_center; break;
1058 case SvxCellHorJustify::Block: pChar = OOO_STRING_SVTOOLS_HTML_AL_justify; break;
1059 case SvxCellHorJustify::Right: pChar = OOO_STRING_SVTOOLS_HTML_AL_right; break;
1060 case SvxCellHorJustify::Left:
1061 case SvxCellHorJustify::Repeat:
1062 default: pChar = OOO_STRING_SVTOOLS_HTML_AL_left; break;
1063 }
1064
1065 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_align "=\"" +
1066 OString::Concat(pChar) + "\"");
1067
1068 switch( rVerJustifyItem.GetValue() )
1069 {
1070 case SvxCellVerJustify::Top: pChar = OOO_STRING_SVTOOLS_HTML_VA_top; break;
1071 case SvxCellVerJustify::Center: pChar = OOO_STRING_SVTOOLS_HTML_VA_middle; break;
1072 case SvxCellVerJustify::Bottom: pChar = OOO_STRING_SVTOOLS_HTML_VA_bottom; break;
1073 case SvxCellVerJustify::Standard:
1074 default: pChar = nullptr;
1075 }
1076 if ( pChar )
1077 {
1078 aStrTD.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_valign).
1079 append('=').append(pChar);
1080 }
1081
1082 if ( aHTMLStyle.aBackgroundColor != aBgColor )
1083 {
1084 aStrTD.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_bgcolor).
1085 append('=');
1086 aStrTD.append(lcl_makeHTMLColorTriplet(aBgColor));
1087 }
1088
1089 double fVal = 0.0;
1090 if ( bValueData )
1091 {
1092 switch (aCell.getType())
1093 {
1094 case CELLTYPE_VALUE:
1095 fVal = aCell.getDouble();
1096 if ( bCalcAsShown && fVal != 0.0 )
1097 fVal = pDoc->RoundValueAsShown( fVal, nFormat );
1098 break;
1099 case CELLTYPE_FORMULA:
1100 fVal = aCell.getFormula()->GetValue();
1101 break;
1102 default:
1103 OSL_FAIL( "value data with unsupported cell type" );
1104 }
1105 }
1106
1107 aStrTD.append(HTMLOutFuncs::CreateTableDataOptionsValNum(bValueData, fVal,
1108 nFormat, *pFormatter, &aNonConvertibleChars));
1109
1110 TAG_ON(aStrTD.makeStringAndClear().getStr());
1111
1112 //write the note for this as the first thing in the tag
1113 ScPostIt* pNote = pDoc->HasNote(aPos) ? pDoc->GetNote(aPos) : nullptr;
1114 if (pNote)
1115 {
1116 //create the comment indicator
1118 OOO_STRING_SVTOOLS_HTML_O_class "=\"comment-indicator\"";
1119 TAG_ON(aStr.getStr());
1121 OUT_LF();
1122
1123 //create the element holding the contents
1124 //this is a bit naive, since it doesn't separate
1125 //lines into html breaklines yet
1127 OUT_STR( pNote->GetText() );
1129 OUT_LF();
1130 }
1131
1132 if ( bBold ) TAG_ON( OOO_STRING_SVTOOLS_HTML_bold );
1133 if ( bItalic ) TAG_ON( OOO_STRING_SVTOOLS_HTML_italic );
1134 if ( bUnderline ) TAG_ON( OOO_STRING_SVTOOLS_HTML_underline );
1135 if ( bCrossedOut ) TAG_ON( OOO_STRING_SVTOOLS_HTML_strikethrough );
1136
1137 if ( bSetFont )
1138 {
1139 OStringBuffer aStr(OOO_STRING_SVTOOLS_HTML_font);
1140 if ( bSetFontName )
1141 {
1142 aStr.append(" " OOO_STRING_SVTOOLS_HTML_O_face "=\"");
1143
1144 if (!rFontItem.GetFamilyName().isEmpty())
1145 {
1146 const OUString& rList = rFontItem.GetFamilyName();
1147 for (sal_Int32 nPos {0};;)
1148 {
1149 OString aTmpStr = HTMLOutFuncs::ConvertStringToHTML(
1150 rList.getToken( 0, ';', nPos ),
1152 aStr.append(aTmpStr);
1153 if (nPos<0)
1154 break;
1155 aStr.append(',');
1156 }
1157 }
1158
1159 aStr.append('\"');
1160 }
1161 if ( nSetFontSizeNumber )
1162 {
1163 aStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_size).
1164 append('=').append(static_cast<sal_Int32>(nSetFontSizeNumber));
1165 }
1166 if ( bSetFontColor )
1167 {
1168 Color aColor = rColorItem.GetValue();
1169
1170 // always export automatic text color as black
1171 if ( aColor == COL_AUTO )
1172 aColor = COL_BLACK;
1173
1174 aStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_color).
1175 append('=').append(lcl_makeHTMLColorTriplet(aColor));
1176 }
1177 TAG_ON(aStr.makeStringAndClear().getStr());
1178 }
1179
1180 OUString aURL;
1181 bool bWriteHyperLink(false);
1182 if (aCell.getType() == CELLTYPE_FORMULA)
1183 {
1184 ScFormulaCell* pFCell = aCell.getFormula();
1185 if (pFCell->IsHyperLinkCell())
1186 {
1187 OUString aCellText;
1188 pFCell->GetURLResult(aURL, aCellText);
1189 bWriteHyperLink = true;
1190 }
1191 }
1192
1193 if (bWriteHyperLink)
1194 {
1196 OString aStr = OOO_STRING_SVTOOLS_HTML_anchor " " OOO_STRING_SVTOOLS_HTML_O_href "=\"" + aURLStr + "\"";
1197 TAG_ON(aStr.getStr());
1198 }
1199
1200 OUString aStrOut;
1201 bool bFieldText = false;
1202
1203 const Color* pColor;
1204 switch (aCell.getType())
1205 {
1206 case CELLTYPE_EDIT :
1207 bFieldText = WriteFieldText(aCell.getEditText());
1208 if ( bFieldText )
1209 break;
1210 [[fallthrough]];
1211 default:
1212 aStrOut = ScCellFormat::GetString(aCell, nFormat, &pColor, *pFormatter, *pDoc);
1213 }
1214
1215 if ( !bFieldText )
1216 {
1217 if ( aStrOut.isEmpty() )
1218 {
1219 TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak ); // No completely empty line
1220 }
1221 else
1222 {
1223 sal_Int32 nPos = aStrOut.indexOf( '\n' );
1224 if ( nPos == -1 )
1225 {
1226 OUT_STR( aStrOut );
1227 }
1228 else
1229 {
1230 sal_Int32 nStartPos = 0;
1231 do
1232 {
1233 OUString aSingleLine = aStrOut.copy( nStartPos, nPos - nStartPos );
1234 OUT_STR( aSingleLine );
1236 nStartPos = nPos + 1;
1237 }
1238 while( ( nPos = aStrOut.indexOf( '\n', nStartPos ) ) != -1 );
1239 OUString aSingleLine = aStrOut.copy( nStartPos );
1240 OUT_STR( aSingleLine );
1241 }
1242 }
1243 }
1244 if ( pGraphEntry )
1245 WriteGraphEntry( pGraphEntry );
1246
1247 if (bWriteHyperLink) { TAG_OFF(OOO_STRING_SVTOOLS_HTML_anchor); }
1248
1249 if ( bSetFont ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_font );
1250 if ( bCrossedOut ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_strikethrough );
1251 if ( bUnderline ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_underline );
1252 if ( bItalic ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_italic );
1253 if ( bBold ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold );
1254
1256}
1257
1259{
1260 bool bFields = false;
1261 // text and anchor of URL fields, Doc-Engine is a ScFieldEditEngine
1262 EditEngine& rEngine = pDoc->GetEditEngine();
1263 rEngine.SetText( *pData );
1264 sal_Int32 nParas = rEngine.GetParagraphCount();
1265 if ( nParas )
1266 {
1267 ESelection aSel( 0, 0, nParas-1, rEngine.GetTextLen( nParas-1 ) );
1268 SfxItemSet aSet( rEngine.GetAttribs( aSel ) );
1269 SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false );
1270 if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET )
1271 bFields = true;
1272 }
1273 if ( bFields )
1274 {
1275 bool bOldUpdateMode = rEngine.SetUpdateLayout( true ); // no portions if not formatted
1276 for ( sal_Int32 nPar=0; nPar < nParas; nPar++ )
1277 {
1278 if ( nPar > 0 )
1280 std::vector<sal_Int32> aPortions;
1281 rEngine.GetPortions( nPar, aPortions );
1282 sal_Int32 nStart = 0;
1283 for ( const sal_Int32 nEnd : aPortions )
1284 {
1285 ESelection aSel( nPar, nStart, nPar, nEnd );
1286 bool bUrl = false;
1287 // fields are single characters
1288 if ( nEnd == nStart+1 )
1289 {
1290 SfxItemSet aSet = rEngine.GetAttribs( aSel );
1291 if ( const SvxFieldItem* pFieldItem = aSet.GetItemIfSet( EE_FEATURE_FIELD, false ) )
1292 {
1293 const SvxFieldData* pField = pFieldItem->GetField();
1294 if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(pField))
1295 {
1296 bUrl = true;
1298 OUT_STR( pURLField->GetURL() );
1299 rStrm.WriteCharPtr( "\">" );
1300 OUT_STR( pURLField->GetRepresentation() );
1302 }
1303 }
1304 }
1305 if ( !bUrl )
1306 OUT_STR( rEngine.GetText( aSel ) );
1307 nStart = nEnd;
1308 }
1309 }
1310 rEngine.SetUpdateLayout( bOldUpdateMode );
1311 }
1312 return bFields;
1313}
1314
1316 std::u16string_view rTargetNm )
1317{
1318 INetURLObject aFileUrl, aTargetUrl;
1319 aFileUrl.SetSmartURL( rFileNm );
1320 aTargetUrl.SetSmartURL( rTargetNm );
1321 if( !(INetProtocol::File == aFileUrl.GetProtocol() &&
1322 ( INetProtocol::File != aTargetUrl.GetProtocol() &&
1323 INetProtocol::Ftp <= aTargetUrl.GetProtocol() &&
1324 INetProtocol::Javascript >= aTargetUrl.GetProtocol())) )
1325 return;
1326
1327 if( pFileNameMap )
1328 {
1329 // Did we already move the file?
1330 std::map<OUString, OUString>::iterator it = pFileNameMap->find( rFileNm );
1331 if( it != pFileNameMap->end() )
1332 {
1333 rFileNm = it->second;
1334 return;
1335 }
1336 }
1337 else
1338 {
1339 pFileNameMap.reset( new std::map<OUString, OUString> );
1340 }
1341
1342 bool bRet = false;
1343 SvFileStream aTmp( aFileUrl.PathToFileName(), StreamMode::READ );
1344
1345 OUString aSrc = rFileNm;
1346 OUString aDest = aTargetUrl.GetPartBeforeLastName() + aFileUrl.GetLastName();
1347
1348 SfxMedium aMedium( aDest, StreamMode::WRITE | StreamMode::SHARE_DENYNONE );
1349
1350 {
1351 SvFileStream aCpy( aMedium.GetPhysicalName(), StreamMode::WRITE );
1352 aCpy.WriteStream( aTmp );
1353 }
1354
1355 // Take over
1356 aMedium.Close();
1357 aMedium.Commit();
1358
1359 bRet = ERRCODE_NONE == aMedium.GetError();
1360
1361 if( bRet )
1362 {
1363 pFileNameMap->insert( std::make_pair( aSrc, aDest ) );
1364 rFileNm = aDest;
1365 }
1366}
1367
1368void ScHTMLExport::IncIndent( short nVal )
1369{
1370 sIndent[nIndent] = '\t';
1371 nIndent = nIndent + nVal;
1372 if ( nIndent < 0 )
1373 nIndent = 0;
1374 else if ( nIndent > nIndentMax )
1376 sIndent[nIndent] = 0;
1377}
1378
1379/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
GPOS_NONE
sal_uInt8 GetBlue() const
sal_uInt8 GetAlpha() const
sal_uInt8 GetRed() const
bool IsTransparent() const
sal_uInt8 GetGreen() const
void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList)
OUString GetText(LineEnd eEnd=LINEEND_LF) const
void SetText(const OUString &rStr)
bool SetUpdateLayout(bool bUpdate, bool bRestoring=false)
sal_Int32 GetParagraphCount() const
SfxItemSet GetAttribs(sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags=GetAttribsFlags::ALL) const
sal_Int32 GetTextLen() const
bool SetSmartURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
OUString GetLastName(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
OUString GetPartBeforeLastName() const
OUString PathToFileName() const
INetProtocol GetProtocol() const
OUString getDate(const Date &rDate) const
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
SCTAB Tab() const
Definition: address.hxx:283
SCROW Row() const
Definition: address.hxx:274
SCCOL Col() const
Definition: address.hxx:279
static OUString GetString(const ScRefCellValue &rCell, sal_uInt32 nFormat, const Color **ppColor, SvNumberFormatter &rFormatter, const ScDocument &rDoc, bool bNullVals=true, bool bFormula=false, bool bUseStarFormat=false)
Definition: cellform.cxx:31
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4224
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4183
SC_DLLPUBLIC ScFieldEditEngine & GetEditEngine()
Definition: documen2.cxx:477
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Definition: document.cxx:6729
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
Definition: document.cxx:2662
SC_DLLPUBLIC double RoundValueAsShown(double fVal, sal_uInt32 nFormat, const ScInterpreterContext *pContext=nullptr) const
Definition: documen4.cxx:634
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6301
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1082
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4492
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6754
bool IsClipOrUndo() const
Definition: document.hxx:1590
SfxObjectShell * GetDocumentShell() const
Definition: document.hxx:1081
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6174
SC_DLLPUBLIC SvtScriptType GetScriptType(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScRefCellValue *pCell=nullptr)
Definition: documen6.cxx:132
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: document.cxx:4508
SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4500
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
Definition: document.cxx:919
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
Definition: document.cxx:216
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4777
SC_DLLPUBLIC const SfxItemSet * GetCondResult(SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue *pCell=nullptr) const
Definition: documen4.cxx:798
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4812
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4538
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:316
bool IsEmptyTable(SCTAB nTab) const
Definition: expbase.cxx:59
bool TrimDataArea(SCTAB nTab, SCCOL &nStartCol, SCROW &nStartRow, SCCOL &nEndCol, SCROW &nEndRow) const
Definition: expbase.cxx:46
SvStream & rStrm
Definition: expbase.hxx:33
ScDocument * pDoc
Definition: expbase.hxx:35
ScRange aRange
Definition: expbase.hxx:34
bool GetDataArea(SCTAB nTab, SCCOL &nStartCol, SCROW &nStartRow, SCCOL &nEndCol, SCROW &nEndRow) const
Definition: expbase.cxx:38
SvNumberFormatter * pFormatter
Definition: expbase.hxx:36
virtual void ScExportHTML(SvStream &, const OUString &rBaseURL, ScDocument *, const ScRange &rRange, const rtl_TextEncoding eDest, bool bAll, const OUString &rStreamPath, OUString &rNonConvertibleChars, const OUString &rFilterOptions) override
Definition: htmlexp.cxx:131
void GetURLResult(OUString &rURL, OUString &rCellText)
double GetValue()
bool IsHyperLinkCell() const
static SC_DLLPUBLIC sal_uInt16 GetScriptedWhichID(SvtScriptType nScriptType, sal_uInt16 nWhich)
Map ATTR_((CJK|CTL)_)?FONT_... to proper WhichIDs.
Definition: global.cxx:913
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
Definition: global.cxx:1053
static SC_DLLPUBLIC SvtScriptType GetDefaultScriptType()
Definition: global.cxx:898
bool bCopyLocalFileToINet
Definition: htmlexp.hxx:126
void WriteGraphEntry(ScHTMLGraphEntry *)
Definition: htmlexp2.cxx:112
OUString aStreamPath
Definition: htmlexp.hxx:115
bool mbSkipImages
Definition: htmlexp.hxx:128
SCTAB nUsedTables
Definition: htmlexp.hxx:119
bool bTabAlignedLeft
Definition: htmlexp.hxx:124
void Write()
Definition: htmlexp.cxx:295
void WriteCell(sc::ColumnBlockPosition &rBlockPos, SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: htmlexp.cxx:882
static const char * pFontSizeCss[SC_HTML_FONTSIZES]
Definition: htmlexp.hxx:105
static const char * GetFontSizeCss(sal_uInt16 nHeight)
Definition: htmlexp.cxx:266
void WriteOverview()
Definition: htmlexp.cxx:454
VclPtr< OutputDevice > pAppWin
Definition: htmlexp.hxx:116
bool bTableDataHeight
Definition: htmlexp.hxx:127
virtual ~ScHTMLExport() override
Definition: htmlexp.cxx:247
FileNameMapPtr pFileNameMap
Definition: htmlexp.hxx:117
static const sal_uInt16 nDefaultFontSize[SC_HTML_FONTSIZES]
Definition: htmlexp.hxx:102
void WriteHeader()
Definition: htmlexp.cxx:311
OUString aNonConvertibleChars
Definition: htmlexp.hxx:118
static sal_uInt16 nFontSize[SC_HTML_FONTSIZES]
Definition: htmlexp.hxx:104
char sIndent[nIndentMax+1]
Definition: htmlexp.hxx:121
Size MMToPixel(const Size &r100thMMSize)
Definition: htmlexp.cxx:284
bool bTabHasGraphics
Definition: htmlexp.hxx:123
static sal_uInt16 GetFontSizeNumber(sal_uInt16 nHeight)
Definition: htmlexp.cxx:252
GraphEntryList aGraphList
Definition: htmlexp.hxx:112
ScHTMLStyle aHTMLStyle
Definition: htmlexp.hxx:113
OUString aBaseURL
Definition: htmlexp.hxx:114
void IncIndent(short nVal)
Definition: htmlexp.cxx:1368
bool WriteFieldText(const EditTextObject *pData)
Definition: htmlexp.cxx:1258
const OUString & GetNonConvertibleChars() const
Definition: htmlexp.hxx:179
const SfxItemSet & PageDefaults(SCTAB nTab)
Definition: htmlexp.cxx:487
sal_uInt16 ToPixel(sal_uInt16 nTwips)
Definition: htmlexp.cxx:272
void WriteBody()
Definition: htmlexp.cxx:603
bool bCalcAsShown
Definition: htmlexp.hxx:125
static OString BorderToStyle(const char *pBorderName, const editeng::SvxBorderLine *pLine, bool &bInsertSemicolon)
Definition: htmlexp.cxx:532
void PrepareGraphics(ScDrawLayer *, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: htmlexp2.cxx:40
static const sal_uInt16 nCellSpacing
Definition: htmlexp.hxx:106
void CopyLocalFileToINet(OUString &rFileNm, std::u16string_view rTargetNm)
Definition: htmlexp.cxx:1315
short nIndent
Definition: htmlexp.hxx:120
bool mbSkipHeaderFooter
If HTML header and footer should be written as well, or just the content itself.
Definition: htmlexp.hxx:130
static const char sIndentSource[]
Definition: htmlexp.hxx:107
ScHTMLExport(SvStream &, OUString, ScDocument *, const ScRange &, bool bAll, OUString aStreamPath, std::u16string_view aFilterOptions)
Definition: htmlexp.cxx:197
void WriteTables()
Definition: htmlexp.cxx:682
SCCOL GetColMerge() const
Definition: attrib.hxx:68
bool IsMerged() const
Definition: attrib.hxx:71
SCROW GetRowMerge() const
Definition: attrib.hxx:69
bool IsOverlapped() const
Definition: attrib.hxx:101
sal_uInt32 GetNumberFormat(SvNumberFormatter *) const
Definition: patattr.cxx:1301
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
Definition: patattr.hxx:72
Additional class containing cell annotation data.
Definition: postit.hxx:58
OUString GetText() const
Returns the caption text of this note.
Definition: postit.cxx:551
ScAddress aEnd
Definition: address.hxx:498
ScAddress aStart
Definition: address.hxx:497
static void Out_DocInfo(SvStream &rStrm, const OUString &rBaseURL, const css::uno::Reference< css::document::XDocumentProperties > &, const char *pIndent, OUString *pNonConvertableChars=nullptr)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void Close(bool bInDestruction=false)
ErrCode GetError() const
bool Commit()
const OUString & GetPhysicalName() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All) const
virtual SfxItemSet & GetItemSet()
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
SvStream & WriteOString(std::string_view rStr)
SvStream & WriteChar(char nChar)
SvStream & WriteCharPtr(const char *pBuf)
SvStream & WriteStream(SvStream &rStream)
const editeng::SvxBorderLine * GetTop() const
const editeng::SvxBorderLine * GetRight() const
const editeng::SvxBorderLine * GetLeft() const
const editeng::SvxBorderLine * GetBottom() const
const Color & GetColor() const
const Graphic * GetGraphic(OUString const &referer=OUString()) const
const OUString & GetGraphicLink() const
SvxGraphicPosition GetGraphicPos() const
const Color & GetValue() const
FontStrikeout GetStrikeout() const
sal_uInt32 GetHeight() const
const OUString & GetFamilyName() const
FontItalic GetPosture() const
FontLineStyle GetLineStyle() const
FontWeight GetWeight() const
static ErrCode WriteGraphic(const Graphic &rGraphic, OUString &rFileName, const OUString &rFilterName, const XOutFlags nFlags, const Size *pMtfSize_100TH_MM=nullptr, const css::uno::Sequence< css::beans::PropertyValue > *pFilterData=nullptr)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define SAL_NEWLINE_STRING
int nCount
FormulaCommand pE
URL aURL
float v
float u
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
#define ERRCODE_NONE
LINESTYLE_NONE
STRIKEOUT_SINGLE
ITALIC_NONE
WEIGHT_BOLD
@ CELLTYPE_EDIT
Definition: global.hxx:276
@ CELLTYPE_FORMULA
Definition: global.hxx:275
@ CELLTYPE_VALUE
Definition: global.hxx:273
#define OUT_STR(str)
Definition: htmlexp.cxx:118
static void lcl_AddStamp(OUString &rStr, std::u16string_view rName, const css::util::DateTime &rDateTime, const LocaleDataWrapper &rLoc)
Definition: htmlexp.cxx:158
#define OUT_HR()
Definition: htmlexp.cxx:122
const char sMyEndComment[]
Definition: htmlexp.cxx:92
#define OUT_SP_CSTR_ASS(s)
Definition: htmlexp.cxx:127
const char sBorder[]
Definition: htmlexp.cxx:94
static OString lcl_getColGroupString(sal_Int32 nSpan, sal_Int32 nWidth)
Definition: htmlexp.cxx:140
const char sBackground[]
Definition: htmlexp.cxx:95
static OString lcl_makeHTMLColorTriplet(const Color &rColor)
Definition: htmlexp.cxx:187
const char sMyBegComment[]
Definition: htmlexp.cxx:91
const char sDisplay[]
Definition: htmlexp.cxx:93
#define OUT_LF()
Definition: htmlexp.cxx:119
#define GLOBSTR(id)
Definition: htmlexp.cxx:129
#define TAG_ON(tag)
Definition: htmlexp.cxx:116
#define TAG_ON_LF(tag)
Definition: htmlexp.cxx:120
#define OUT_COMMENT(comment)
Definition: htmlexp.cxx:123
#define TAG_OFF_LF(tag)
Definition: htmlexp.cxx:121
#define TAG_OFF(tag)
Definition: htmlexp.cxx:117
const short nIndentMax
Definition: htmlexp.hxx:97
#define OOO_STRING_SVTOOLS_HTML_O_height
#define OOO_STRING_SVTOOLS_HTML_head
#define OOO_STRING_SVTOOLS_HTML_parabreak
#define OOO_STRING_SVTOOLS_HTML_emphasis
#define OOO_STRING_SVTOOLS_HTML_body
#define OOO_STRING_SVTOOLS_HTML_O_clear
#define OOO_STRING_SVTOOLS_HTML_O_color
#define OOO_STRING_SVTOOLS_HTML_AL_left
#define OOO_STRING_SVTOOLS_HTML_head1
#define OOO_STRING_SVTOOLS_HTML_O_align
#define OOO_STRING_SVTOOLS_HTML_O_background
#define OOO_STRING_SVTOOLS_HTML_tabledata
#define OOO_STRING_SVTOOLS_HTML_tablerow
#define OOO_STRING_SVTOOLS_HTML_division
#define OOO_STRING_SVTOOLS_HTML_VA_middle
#define OOO_STRING_SVTOOLS_HTML_tableheader
#define OOO_STRING_SVTOOLS_HTML_style
#define OOO_STRING_SVTOOLS_HTML_O_colspan
#define OOO_STRING_SVTOOLS_HTML_html
#define OOO_STRING_SVTOOLS_HTML_O_size
#define OOO_STRING_SVTOOLS_HTML_anchor
#define OOO_STRING_SVTOOLS_HTML_VA_bottom
#define OOO_STRING_SVTOOLS_HTML_tfoot
#define OOO_STRING_SVTOOLS_HTML_comment2
#define OOO_STRING_SVTOOLS_HTML_bold
#define OOO_STRING_SVTOOLS_HTML_tbody
#define OOO_STRING_SVTOOLS_HTML_AL_center
#define OOO_STRING_SVTOOLS_HTML_center
#define OOO_STRING_SVTOOLS_HTML_O_rowspan
#define OOO_STRING_SVTOOLS_HTML_strikethrough
#define OOO_STRING_SVTOOLS_HTML_VA_top
#define OOO_STRING_SVTOOLS_HTML_O_cellspacing
#define OOO_STRING_SVTOOLS_HTML_O_class
#define OOO_STRING_SVTOOLS_HTML_O_href
#define OOO_STRING_SVTOOLS_HTML_doctype
#define OOO_STRING_SVTOOLS_HTML_AL_right
#define OOO_STRING_SVTOOLS_HTML_doctype5
#define OOO_STRING_SVTOOLS_HTML_O_border
#define OOO_STRING_SVTOOLS_HTML_underline
#define OOO_STRING_SVTOOLS_HTML_thead
#define OOO_STRING_SVTOOLS_HTML_O_type
#define OOO_STRING_SVTOOLS_HTML_AL_justify
#define OOO_STRING_SVTOOLS_HTML_O_bgcolor
#define OOO_STRING_SVTOOLS_HTML_table
#define OOO_STRING_SVTOOLS_HTML_colgroup
#define OOO_STRING_SVTOOLS_HTML_font
#define OOO_STRING_SVTOOLS_HTML_O_span
#define OOO_STRING_SVTOOLS_HTML_O_width
#define OOO_STRING_SVTOOLS_HTML_O_valign
#define OOO_STRING_SVTOOLS_HTML_linebreak
#define OOO_STRING_SVTOOLS_HTML_italic
#define OOO_STRING_SVTOOLS_HTML_O_face
const sal_uInt32 SC_HTML_FONTSIZES
Definition: htmlpars.hxx:35
SvtScriptType
sal_uInt16 nPos
aStr
std::unique_ptr< sal_Int32[]> pData
sal_uInt16 GetFontSize(sal_uInt16 nPos)
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
SVL_DLLPUBLIC OUString simpleNormalizedMakeRelative(OUString const &baseUriReference, OUString const &uriReference)
int i
void SvStream & rStrm
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
long Long
#define HTMLFONTSZ4_DFLT
#define HTMLFONTSZ3_DFLT
#define HTMLFONTSZ5_DFLT
#define HTMLFONTSZ6_DFLT
#define HTMLFONTSZ2_DFLT
#define HTMLFONTSZ1_DFLT
#define HTMLFONTSZ7_DFLT
SfxItemState
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
static SfxItemSet & rSet
static SVT_DLLPUBLIC OString CreateTableDataOptionsValNum(bool bValue, double fVal, sal_uInt32 nFormat, SvNumberFormatter &rFormatter, OUString *pNonConvertableChars=nullptr)
static SVT_DLLPUBLIC SvStream & Out_Color(SvStream &, const Color &, bool bXHTML=false)
static SVT_DLLPUBLIC OString ConvertStringToHTML(const OUString &sSrc, OUString *pNonConvertableChars=nullptr)
ScRange aRange
Definition: htmlexp.hxx:78
SvtScriptType nDefaultScriptType
Definition: htmlexp.hxx:54
bool bInitialized
Definition: htmlexp.hxx:55
sal_uInt32 nFontHeight
Definition: htmlexp.hxx:52
OUString aFontFamilyName
Definition: htmlexp.hxx:51
Color aBackgroundColor
Definition: htmlexp.hxx:50
sal_uInt16 nFontSizeNumber
Definition: htmlexp.hxx:53
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:108
ScFormulaCell * getFormula() const
Definition: cellvalue.hxx:137
const EditTextObject * getEditText() const
Definition: cellvalue.hxx:136
double getDouble() const
Definition: cellvalue.hxx:134
bool isEmpty() const
Definition: cellvalue.cxx:667
bool hasNumeric() const
Definition: cellvalue.cxx:619
CellType getType() const
Definition: cellvalue.hxx:133
Store position data for column array storage.
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
const char * pChar