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 <conditio.hxx>
69#include <colorscale.hxx>
70#include <mtvelements.hxx>
71
72#include <editeng/flditem.hxx>
74
75// Without strings.hrc: error C2679: binary '=' : no operator defined which takes a
76// right-hand operand of type 'const class String (__stdcall *)(class ScResId)'
77// at
78// const String aStrTable( ScResId( SCSTR_TABLE ) ); aStrOut = aStrTable;
79// ?!???
80#include <strings.hrc>
81#include <globstr.hrc>
82
83#include <com/sun/star/frame/XModel.hpp>
84#include <com/sun/star/uno/Reference.h>
85#include <com/sun/star/document/XDocumentProperties.hpp>
86#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
87#include <rtl/strbuf.hxx>
88#include <officecfg/Office/Common.hxx>
89
90using ::editeng::SvxBorderLine;
91using namespace ::com::sun::star;
92
93const char sMyBegComment[] = "<!-- ";
94const char sMyEndComment[] = " -->";
95const char sDisplay[] = "display:";
96const char sBorder[] = "border:";
97const char sBackground[] = "background:";
98
100{
103};
104
106
108{
109 "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"
110};
111
112const sal_uInt16 ScHTMLExport::nCellSpacing = 0;
114 "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
115
116// Macros for HTML export
117
118#define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag )
119#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag, false )
120#define OUT_STR( str ) HTMLOutFuncs::Out_String( rStrm, str, &aNonConvertibleChars )
121#define OUT_LF() rStrm.WriteOString( SAL_NEWLINE_STRING ).WriteOString( GetIndentStr() )
122#define TAG_ON_LF( tag ) (TAG_ON( tag ).WriteOString( SAL_NEWLINE_STRING ).WriteOString( GetIndentStr() ))
123#define TAG_OFF_LF( tag ) (TAG_OFF( tag ).WriteOString( SAL_NEWLINE_STRING ).WriteOString( GetIndentStr() ))
124#define OUT_HR() TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_horzrule )
125#define OUT_COMMENT( comment ) (rStrm.WriteOString( sMyBegComment ), OUT_STR( comment ) \
126 .WriteOString( sMyEndComment ).WriteOString( SAL_NEWLINE_STRING ) \
127 .WriteOString( GetIndentStr() ))
128
129#define OUT_SP_CSTR_ASS( s ) rStrm.WriteChar(' ').WriteOString( s ).WriteChar( '=' )
130
131#define GLOBSTR(id) ScResId( id )
132
133void ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const OUString& rBaseURL, ScDocument* pDoc,
134 const ScRange& rRange, const rtl_TextEncoding /*eNach*/, bool bAll,
135 const OUString& rStreamPath, OUString& rNonConvertibleChars, const OUString& rFilterOptions )
136{
137 ScHTMLExport aEx( rStrm, rBaseURL, pDoc, rRange, bAll, rStreamPath, rFilterOptions );
138 aEx.Write();
139 rNonConvertibleChars = aEx.GetNonConvertibleChars();
140}
141
142static OString lcl_getColGroupString(sal_Int32 nSpan, sal_Int32 nWidth)
143{
144 OStringBuffer aByteStr(OString::Concat(OOO_STRING_SVTOOLS_HTML_colgroup)
145 + " ");
146 if( nSpan > 1 )
147 {
148 aByteStr.append(OString::Concat(OOO_STRING_SVTOOLS_HTML_O_span)
149 + "=\""
150 + OString::number(nSpan)
151 + "\" ");
152 }
153 aByteStr.append(OString::Concat(OOO_STRING_SVTOOLS_HTML_O_width)
154 + "=\""
155 + OString::number(nWidth)
156 + "\"");
157 return aByteStr.makeStringAndClear();
158}
159
160static void lcl_AddStamp( OUString& rStr, std::u16string_view rName,
161 const css::util::DateTime& rDateTime,
162 const LocaleDataWrapper& rLoc )
163{
164 Date aD(rDateTime.Day, rDateTime.Month, rDateTime.Year);
165 tools::Time aT(rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds,
166 rDateTime.NanoSeconds);
167 DateTime aDateTime(aD,aT);
168
169 OUString aStrDate = rLoc.getDate( aDateTime );
170 OUString aStrTime = rLoc.getTime( aDateTime );
171
172 rStr += GLOBSTR( STR_BY ) + " ";
173 if (!rName.empty())
174 rStr += rName;
175 else
176 rStr += "???";
177 rStr += " " + GLOBSTR( STR_ON ) + " ";
178 if (!aStrDate.isEmpty())
179 rStr += aStrDate;
180 else
181 rStr += "???";
182 rStr += ", ";
183 if (!aStrTime.isEmpty())
184 rStr += aStrTime;
185 else
186 rStr += "???";
187}
188
189static OString lcl_makeHTMLColorTriplet(const Color& rColor)
190{
191 char buf[24];
192
193 // <font COLOR="#00FF40">hello</font>
194 snprintf( buf, 24, "\"#%02X%02X%02X\"", rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue() );
195
196 return buf;
197}
198
199ScHTMLExport::ScHTMLExport( SvStream& rStrmP, OUString _aBaseURL, ScDocument* pDocP,
200 const ScRange& rRangeP, bool bAllP,
201 OUString aStreamPathP, std::u16string_view rFilterOptions ) :
202 ScExportBase( rStrmP, pDocP, rRangeP ),
203 aBaseURL(std::move( _aBaseURL )),
204 aStreamPath(std::move( aStreamPathP )),
205 pAppWin( Application::GetDefaultDevice() ),
206 nUsedTables( 0 ),
207 nIndent( 0 ),
208 bAll( bAllP ),
209 bTabHasGraphics( false ),
210 bTabAlignedLeft( false ),
211 bCalcAsShown( pDocP->GetDocOptions().IsCalcAsShown() ),
212 bTableDataHeight( true ),
213 mbSkipImages ( false ),
214 mbSkipHeaderFooter( false )
215{
216 strcpy( sIndent, sIndentSource );
217 sIndent[0] = 0;
218
219 // set HTML configuration
220 bCopyLocalFileToINet = officecfg::Office::Common::Filter::HTML::Export::LocalGraphic::get();
221
222 if (rFilterOptions == u"SkipImages")
223 {
224 mbSkipImages = true;
225 }
226 else if (rFilterOptions == u"SkipHeaderFooter")
227 {
228 mbSkipHeaderFooter = true;
229 }
230
231 for ( sal_uInt16 j=0; j < SC_HTML_FONTSIZES; j++ )
232 {
233 sal_uInt16 nSize = SvxHtmlOptions::GetFontSize( j );
234 // remember in Twips, like our SvxFontHeightItem
235 if ( nSize )
236 nFontSize[j] = nSize * 20;
237 else
238 nFontSize[j] = nDefaultFontSize[j] * 20;
239 }
240
241 const SCTAB nCount = pDoc->GetTableCount();
242 for ( SCTAB nTab = 0; nTab < nCount; nTab++ )
243 {
244 if ( !IsEmptyTable( nTab ) )
245 nUsedTables++;
246 }
247}
248
250{
251 aGraphList.clear();
252}
253
254sal_uInt16 ScHTMLExport::GetFontSizeNumber( sal_uInt16 nHeight )
255{
256 sal_uInt16 nSize = 1;
257 for ( sal_uInt16 j=SC_HTML_FONTSIZES-1; j>0; j-- )
258 {
259 if( nHeight > (nFontSize[j] + nFontSize[j-1]) / 2 )
260 { // The one next to it
261 nSize = j+1;
262 break;
263 }
264 }
265 return nSize;
266}
267
268const char* ScHTMLExport::GetFontSizeCss( sal_uInt16 nHeight )
269{
270 sal_uInt16 nSize = GetFontSizeNumber( nHeight );
271 return pFontSizeCss[ nSize-1 ];
272}
273
274sal_uInt16 ScHTMLExport::ToPixel( sal_uInt16 nVal )
275{
276 if( nVal )
277 {
278 nVal = static_cast<sal_uInt16>(pAppWin->LogicToPixel(
279 Size( nVal, nVal ), MapMode( MapUnit::MapTwip ) ).Width());
280 if( !nVal ) // If there's a Twip there should also be a Pixel
281 nVal = 1;
282 }
283 return nVal;
284}
285
287{
288 Size aSize = pAppWin->LogicToPixel( rSize, MapMode( MapUnit::Map100thMM ) );
289 // If there's something there should also be a Pixel
290 if ( !aSize.Width() && rSize.Width() )
291 aSize.setWidth( 1 );
292 if ( !aSize.Height() && rSize.Height() )
293 aSize.setHeight( 1 );
294 return aSize;
295}
296
298{
300 {
304 WriteHeader();
305 OUT_LF();
306 }
307 WriteBody();
308 OUT_LF();
311}
312
314{
316
317 if ( pDoc->IsClipOrUndo() )
318 { // no real DocInfo available, but some META information like charset needed
320 }
321 else
322 {
323 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
324 pDoc->GetDocumentShell()->GetModel(), uno::UNO_QUERY_THROW);
325 uno::Reference<document::XDocumentProperties> xDocProps
326 = xDPS->getDocumentProperties();
329 OUT_LF();
330
331 if (!xDocProps->getPrintedBy().isEmpty())
332 {
333 OUT_COMMENT( GLOBSTR( STR_DOC_INFO ) );
334 OUString aStrOut = GLOBSTR( STR_DOC_PRINTED ) + ": ";
335 lcl_AddStamp( aStrOut, xDocProps->getPrintedBy(),
336 xDocProps->getPrintDate(), ScGlobal::getLocaleData() );
337 OUT_COMMENT( aStrOut );
338 }
339
340 }
341 OUT_LF();
342
343 // CSS1 StyleSheet
344 PageDefaults( bAll ? 0 : aRange.aStart.Tab() );
345 IncIndent(1);
347
348 OUT_LF();
350 rStrm.WriteOString(",");
352 rStrm.WriteOString(",");
354 rStrm.WriteOString(",");
356 rStrm.WriteOString(",");
358 rStrm.WriteOString(",");
360 rStrm.WriteOString(",");
362 rStrm.WriteOString(",");
364 rStrm.WriteOString(",");
366 rStrm.WriteOString(",");
368 rStrm.WriteOString(" { ");
369 rStrm.WriteOString("font-family:");
370
371 if (!aHTMLStyle.aFontFamilyName.isEmpty())
372 {
373 const OUString& rList = aHTMLStyle.aFontFamilyName;
374 for(sal_Int32 nPos {0};;)
375 {
376 rStrm.WriteChar( '\"' );
377 OUT_STR( rList.getToken( 0, ';', nPos ) );
378 rStrm.WriteChar( '\"' );
379 if (nPos<0)
380 break;
381 rStrm.WriteOString( ", " );
382 }
383 }
384 rStrm.WriteOString("; ");
385 rStrm.WriteOString("font-size:");
386 rStrm.WriteOString(GetFontSizeCss(static_cast<sal_uInt16>(aHTMLStyle.nFontHeight)));
387 rStrm.WriteOString(" }");
388
389 OUT_LF();
390
391 // write the style for the comments to make them stand out from normal cell content
392 // this is done through only showing the cell contents when the custom indicator is hovered
394 rStrm.WriteOString(".comment-indicator:hover");
395 rStrm.WriteOString(" + ");
397 rStrm.WriteOString(" { ");
399 rStrm.WriteOString("#ffd");
400 rStrm.WriteOString("; ");
401 rStrm.WriteOString("position:");
402 rStrm.WriteOString("absolute");
403 rStrm.WriteOString("; ");
405 rStrm.WriteOString("block");
406 rStrm.WriteOString("; ");
408 rStrm.WriteOString("1px solid black");
409 rStrm.WriteOString("; ");
410 rStrm.WriteOString("padding:");
411 rStrm.WriteOString("0.5em");
412 rStrm.WriteOString("; ");
413 rStrm.WriteOString(" } ");
414
415 OUT_LF();
416
418 rStrm.WriteOString(".comment-indicator");
419 rStrm.WriteOString(" { ");
421 rStrm.WriteOString("red");
422 rStrm.WriteOString("; ");
424 rStrm.WriteOString("inline-block");
425 rStrm.WriteOString("; ");
427 rStrm.WriteOString("1px solid black");
428 rStrm.WriteOString("; ");
429 rStrm.WriteOString("width:");
430 rStrm.WriteOString("0.5em");
431 rStrm.WriteOString("; ");
432 rStrm.WriteOString("height:");
433 rStrm.WriteOString("0.5em");
434 rStrm.WriteOString("; ");
435 rStrm.WriteOString(" } ");
436
437 OUT_LF();
438
440 rStrm.WriteOString(" { ");
442 rStrm.WriteOString("none");
443 rStrm.WriteOString("; ");
444 rStrm.WriteOString(" } ");
445
446
447 IncIndent(-1);
448 OUT_LF();
450
451 IncIndent(-1);
452 OUT_LF();
454}
455
457{
458 if ( nUsedTables <= 1 )
459 return;
460
461 IncIndent(1);
462 OUT_HR();
465 OUT_STR( ScResId( STR_OVERVIEW ) );
467
468 OUString aStr;
469
470 const SCTAB nCount = pDoc->GetTableCount();
471 for ( SCTAB nTab = 0; nTab < nCount; nTab++ )
472 {
473 if ( !IsEmptyTable( nTab ) )
474 {
475 pDoc->GetName( nTab, aStr );
476 rStrm.WriteOString( "<A HREF=\"#table" )
477 .WriteOString( OString::number(nTab) )
478 .WriteOString( "\">" );
479 OUT_STR( aStr );
480 rStrm.WriteOString( "</A>" );
482 }
483 }
484
485 IncIndent(-1); OUT_LF();
487}
488
490{
492 SfxStyleSheetBase* pStyleSheet = nullptr;
493 OSL_ENSURE( pStylePool, "StylePool not found! :-(" );
494
495 // remember defaults for compare in WriteCell
497 {
498 pStyleSheet = pStylePool->Find(
499 ScResId(STR_STYLENAME_STANDARD),
500 SfxStyleFamily::Para );
501 OSL_ENSURE( pStyleSheet, "ParaStyle not found! :-(" );
502 if (!pStyleSheet)
503 pStyleSheet = pStylePool->First(SfxStyleFamily::Para);
504 const SfxItemSet& rSetPara = pStyleSheet->GetItemSet();
505
507 aHTMLStyle.aFontFamilyName = static_cast<const SvxFontItem&>((rSetPara.Get(
510 )))).GetFamilyName();
511 aHTMLStyle.nFontHeight = static_cast<const SvxFontHeightItem&>((rSetPara.Get(
514 )))).GetHeight();
515 aHTMLStyle.nFontSizeNumber = GetFontSizeNumber( static_cast< sal_uInt16 >( aHTMLStyle.nFontHeight ) );
516 }
517
518 // Page style sheet printer settings, e.g. for background graphics.
519 // There's only one background graphic in HTML!
520 pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SfxStyleFamily::Page );
521 OSL_ENSURE( pStyleSheet, "PageStyle not found! :-(" );
522 if (!pStyleSheet)
523 pStyleSheet = pStylePool->First(SfxStyleFamily::Page);
524 const SfxItemSet& rSet = pStyleSheet->GetItemSet();
526 {
527 const SvxBrushItem* pBrushItem = &rSet.Get( ATTR_BACKGROUND );
528 aHTMLStyle.aBackgroundColor = pBrushItem->GetColor();
530 }
531 return rSet;
532}
533
534OString ScHTMLExport::BorderToStyle(const char* pBorderName,
535 const SvxBorderLine* pLine, bool& bInsertSemicolon)
536{
537 OStringBuffer aOut;
538
539 if ( pLine )
540 {
541 if ( bInsertSemicolon )
542 aOut.append("; ");
543
544 // which border
545 aOut.append(OString::Concat("border-") + pBorderName + ": ");
546
547 // thickness
548 int nWidth = pLine->GetWidth();
549 int nPxWidth = (nWidth > 0) ?
550 std::max(o3tl::convert(nWidth, o3tl::Length::twip, o3tl::Length::px), sal_Int64(1)) : 0;
551 aOut.append(OString::number(nPxWidth) + "px ");
552 switch (pLine->GetBorderLineStyle())
553 {
554 case SvxBorderLineStyle::SOLID:
555 aOut.append("solid");
556 break;
557 case SvxBorderLineStyle::DOTTED:
558 aOut.append("dotted");
559 break;
560 case SvxBorderLineStyle::DASHED:
561 case SvxBorderLineStyle::DASH_DOT:
562 case SvxBorderLineStyle::DASH_DOT_DOT:
563 aOut.append("dashed");
564 break;
565 case SvxBorderLineStyle::DOUBLE:
566 case SvxBorderLineStyle::DOUBLE_THIN:
567 case SvxBorderLineStyle::THINTHICK_SMALLGAP:
568 case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
569 case SvxBorderLineStyle::THINTHICK_LARGEGAP:
570 case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
571 case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
572 case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
573 aOut.append("double");
574 break;
575 case SvxBorderLineStyle::EMBOSSED:
576 aOut.append("ridge");
577 break;
578 case SvxBorderLineStyle::ENGRAVED:
579 aOut.append("groove");
580 break;
581 case SvxBorderLineStyle::OUTSET:
582 aOut.append("outset");
583 break;
584 case SvxBorderLineStyle::INSET:
585 aOut.append("inset");
586 break;
587 default:
588 aOut.append("hidden");
589 }
590 aOut.append(" #");
591
592 // color
593 char hex[7];
594 snprintf( hex, 7, "%06" SAL_PRIxUINT32, static_cast<sal_uInt32>( pLine->GetColor().GetRGBColor() ) );
595 hex[6] = 0;
596
597 aOut.append(hex);
598
599 bInsertSemicolon = true;
600 }
601
602 return aOut.makeStringAndClear();
603}
604
606{
607 const SfxItemSet& rSet = PageDefaults( bAll ? 0 : aRange.aStart.Tab() );
608 const SvxBrushItem* pBrushItem = &rSet.Get( ATTR_BACKGROUND );
609
610 // default text color black
612 {
614
615 if (!mbSkipImages)
616 {
617 if ( bAll && GPOS_NONE != pBrushItem->GetGraphicPos() )
618 {
619 OUString aLink = pBrushItem->GetGraphicLink();
620 OUString aGrfNm;
621
622 // Embedded graphic -> write using WriteGraphic
623 if( aLink.isEmpty() )
624 {
625 const Graphic* pGrf = pBrushItem->GetGraphic();
626 if( pGrf )
627 {
628 // Save graphic as (JPG) file
629 aGrfNm = aStreamPath;
630 ErrCode nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm,
631 "JPG", XOutFlags::UseNativeIfPossible );
632 if( !nErr ) // Contains errors, as we have nothing to output
633 {
637 aLink = aGrfNm;
638 }
639 }
640 }
641 else
642 {
643 aGrfNm = aLink;
645 {
647 }
648 else
652 aLink = aGrfNm;
653 }
654 if( !aLink.isEmpty() )
655 {
658 aBaseURL,
659 aLink ) ).WriteChar( '\"' );
660 }
661 }
662 }
664 { // A transparent background color should always result in default
665 // background of the browser. Also, HTMLOutFuncs::Out_Color() writes
666 // black #000000 for COL_AUTO which is the same as white #ffffff with
667 // transparency set to 0xff, our default background.
670 }
671
672 rStrm.WriteChar( '>' ); OUT_LF();
673 }
674
675 if ( bAll )
677
678 WriteTables();
679
682}
683
685{
686 const SCTAB nTabCount = pDoc->GetTableCount();
687 const OUString aStrTable( ScResId( SCSTR_TABLE ) );
688 OUString aStr;
689 OUString aStrOut;
690 SCCOL nStartCol;
691 SCROW nStartRow;
692 SCTAB nStartTab;
693 SCCOL nEndCol;
694 SCROW nEndRow;
695 SCTAB nEndTab;
696 SCCOL nStartColFix = 0;
697 SCROW nStartRowFix = 0;
698 SCCOL nEndColFix = 0;
699 SCROW nEndRowFix = 0;
700 ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
701 if ( bAll )
702 {
703 nStartTab = 0;
704 nEndTab = nTabCount - 1;
705 }
706 else
707 {
708 nStartCol = nStartColFix = aRange.aStart.Col();
709 nStartRow = nStartRowFix = aRange.aStart.Row();
710 nStartTab = aRange.aStart.Tab();
711 nEndCol = nEndColFix = aRange.aEnd.Col();
712 nEndRow = nEndRowFix = aRange.aEnd.Row();
713 nEndTab = aRange.aEnd.Tab();
714 }
715 SCTAB nTableStrNum = 1;
716 for ( SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++ )
717 {
718 if ( !pDoc->IsVisible( nTab ) )
719 continue; // for
720
721 if ( bAll )
722 {
723 if ( !GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow ) )
724 continue; // for
725
726 if ( nUsedTables > 1 )
727 {
728 aStrOut = aStrTable + " " + OUString::number( nTableStrNum++ ) + ": ";
729
730 OUT_HR();
731
732 // Write anchor
733 rStrm.WriteOString( "<A NAME=\"table" )
734 .WriteOString( OString::number(nTab) )
735 .WriteOString( "\">" );
737 OUT_STR( aStrOut );
739
740 pDoc->GetName( nTab, aStr );
741 OUT_STR( aStr );
742
745 rStrm.WriteOString( "</A>" ); OUT_LF();
746 }
747 }
748 else
749 {
750 nStartCol = nStartColFix;
751 nStartRow = nStartRowFix;
752 nEndCol = nEndColFix;
753 nEndRow = nEndRowFix;
754 if ( !TrimDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow ) )
755 continue; // for
756 }
757
758 // <TABLE ...>
759 OStringBuffer aByteStrOut(OOO_STRING_SVTOOLS_HTML_table);
760
762 if ( bAll && pDrawLayer )
763 PrepareGraphics( pDrawLayer, nTab, nStartCol, nStartRow,
764 nEndCol, nEndRow );
765
766 // more <TABLE ...>
767 if ( bTabAlignedLeft )
768 {
769 aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_align
770 "=\""
772 }
773 // ALIGN=LEFT allow text and graphics to flow around
774 // CELLSPACING
775 aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_cellspacing
776 "=\"" +
777 OString::number(nCellSpacing) + "\"");
778
779 // BORDER=0, we do the styling of the cells in <TD>
780 aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_border "=\"0\"");
781 IncIndent(1); TAG_ON_LF( aByteStrOut.makeStringAndClear() );
782
783 // --- <COLGROUP> ----
784 {
785 SCCOL nCol = nStartCol;
786 sal_Int32 nWidth = 0;
787 sal_Int32 nSpan = 0;
788 while( nCol <= nEndCol )
789 {
790 if( pDoc->ColHidden(nCol, nTab) )
791 {
792 ++nCol;
793 continue;
794 }
795
796 if( nWidth != ToPixel( pDoc->GetColWidth( nCol, nTab ) ) )
797 {
798 if( nSpan != 0 )
799 {
800 TAG_ON(lcl_getColGroupString(nSpan, nWidth));
802 }
803 nWidth = ToPixel( pDoc->GetColWidth( nCol, nTab ) );
804 nSpan = 1;
805 }
806 else
807 nSpan++;
808 nCol++;
809 }
810 if( nSpan )
811 {
812 TAG_ON(lcl_getColGroupString(nSpan, nWidth));
814 }
815 }
816
817 // <TBODY> // Re-enable only when THEAD and TFOOT are exported
818 // IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_tbody );
819 // At least old (3.x, 4.x?) Netscape doesn't follow <TABLE COLS=n> and
820 // <COL WIDTH=x> specified, but needs a width at every column.
821 bool bHasHiddenRows = pDoc->HasHiddenRows(nStartRow, nEndRow, nTab);
822 // We need to cache sc::ColumnBlockPosition per each column.
823 std::vector< sc::ColumnBlockPosition > blockPos( nEndCol - nStartCol + 1 );
824 for( SCCOL i = nStartCol; i <= nEndCol; ++i )
825 pDoc->InitColumnBlockPosition( blockPos[ i - nStartCol ], nTab, i );
826 for ( SCROW nRow=nStartRow; nRow<=nEndRow; nRow++ )
827 {
828 if ( bHasHiddenRows && pDoc->RowHidden(nRow, nTab) )
829 {
830 nRow = pDoc->FirstVisibleRow(nRow+1, nEndRow, nTab);
831 --nRow;
832 continue; // for
833 }
834
836 bTableDataHeight = true; // height at every first cell of each row
837 for ( SCCOL nCol2=nStartCol; nCol2<=nEndCol; nCol2++ )
838 {
839 if ( pDoc->ColHidden(nCol2, nTab) )
840 continue; // for
841
842 if ( nCol2 == nEndCol )
843 IncIndent(-1);
844 WriteCell( blockPos[ nCol2 - nStartCol ], nCol2, nRow, nTab );
845 bTableDataHeight = false;
846 }
847
848 if ( nRow == nEndRow )
849 IncIndent(-1);
851 }
852 // TODO: Uncomment later
853 // IncIndent(-1); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_tbody );
854
856
858 {
859 // the rest that is not in a cell
860 size_t ListSize = aGraphList.size();
861 for ( size_t i = 0; i < ListSize; ++i )
862 {
864 if ( !pE->bWritten )
866 }
867 aGraphList.clear();
868 if ( bTabAlignedLeft )
869 {
870 // clear <TABLE ALIGN=LEFT> with <BR CLEAR=LEFT>
871 aByteStrOut.append(
873 " "
876 TAG_ON_LF( aByteStrOut.makeStringAndClear() );
877 }
878 }
879
880 if ( bAll )
881 OUT_COMMENT( "**************************************************************************" );
882 }
883}
884
886{
887 std::optional<Color> aColorScale;
888 ScAddress aPos( nCol, nRow, nTab );
889 ScRefCellValue aCell(*pDoc, aPos, rBlockPos);
890 const ScPatternAttr* pAttr = pDoc->GetPattern( nCol, nRow, nTab );
891 const SfxItemSet* pCondItemSet = pDoc->GetCondResult( nCol, nRow, nTab, &aCell );
892 if (!pCondItemSet)
893 {
894 ScConditionalFormatList* pCondList = pDoc->GetCondFormList(nTab);
895 const ScCondFormatItem& rCondItem = pAttr->GetItem(ATTR_CONDITIONAL);
896 const ScCondFormatIndexes& rCondIndex = rCondItem.GetCondFormatData();
897 if (rCondIndex.size() > 0)
898 {
899 ScConditionalFormat* pCondFmt = pCondList->GetFormat(rCondIndex[0]);
900 if (pCondFmt)
901 {
902 const ScColorScaleFormat* pEntry = dynamic_cast<const ScColorScaleFormat*>(pCondFmt->GetEntry(0));
903 if (pEntry)
904 aColorScale = pEntry->GetColor(aPos);
905 }
906 }
907 }
908
909 const ScMergeFlagAttr& rMergeFlagAttr = pAttr->GetItem( ATTR_MERGE_FLAG, pCondItemSet );
910 if ( rMergeFlagAttr.IsOverlapped() )
911 return ;
912
913 ScHTMLGraphEntry* pGraphEntry = nullptr;
915 {
916 size_t ListSize = aGraphList.size();
917 for ( size_t i = 0; i < ListSize; ++i )
918 {
920 if ( pE->bInCell && pE->aRange.Contains( aPos ) )
921 {
922 if ( pE->aRange.aStart == aPos )
923 {
924 pGraphEntry = pE;
925 break; // for
926 }
927 else
928 return ; // Is a Col/RowSpan, Overlapped
929 }
930 }
931 }
932
933 sal_uInt32 nFormat = pAttr->GetNumberFormat( pFormatter );
934 bool bValueData = aCell.hasNumeric();
935 SvtScriptType nScriptType = SvtScriptType::NONE;
936 if (!aCell.isEmpty())
937 nScriptType = pDoc->GetScriptType(nCol, nRow, nTab, &aCell);
938
939 if ( nScriptType == SvtScriptType::NONE )
940 nScriptType = aHTMLStyle.nDefaultScriptType;
941
942 OStringBuffer aStrTD(OOO_STRING_SVTOOLS_HTML_tabledata);
943
944 // border of the cells
945 const SvxBoxItem* pBorder = pDoc->GetAttr( nCol, nRow, nTab, ATTR_BORDER );
946 if ( pBorder && (pBorder->GetTop() || pBorder->GetBottom() || pBorder->GetLeft() || pBorder->GetRight()) )
947 {
948 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_style "=\"");
949
950 bool bInsertSemicolon = false;
951 aStrTD.append(BorderToStyle("top", pBorder->GetTop(),
952 bInsertSemicolon));
953 aStrTD.append(BorderToStyle("bottom", pBorder->GetBottom(),
954 bInsertSemicolon));
955 aStrTD.append(BorderToStyle("left", pBorder->GetLeft(),
956 bInsertSemicolon));
957 aStrTD.append(BorderToStyle("right", pBorder->GetRight(),
958 bInsertSemicolon));
959
960 aStrTD.append('"');
961 }
962
963 const char* pChar;
964 sal_uInt16 nHeightPixel;
965
966 const ScMergeAttr& rMergeAttr = pAttr->GetItem( ATTR_MERGE, pCondItemSet );
967 if ( pGraphEntry || rMergeAttr.IsMerged() )
968 {
969 SCCOL nC, jC;
970 SCROW nR;
972 if ( pGraphEntry )
973 nC = std::max( SCCOL(pGraphEntry->aRange.aEnd.Col() - nCol + 1),
974 rMergeAttr.GetColMerge() );
975 else
976 nC = rMergeAttr.GetColMerge();
977 if ( nC > 1 )
978 {
979 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_colspan
980 "=" + OString::number(static_cast<sal_Int32>(nC)));
981 nC = nC + nCol;
982 for ( jC=nCol, v=0; jC<nC; jC++ )
983 v += pDoc->GetColWidth( jC, nTab );
984 }
985
986 if ( pGraphEntry )
987 nR = std::max( SCROW(pGraphEntry->aRange.aEnd.Row() - nRow + 1),
988 rMergeAttr.GetRowMerge() );
989 else
990 nR = rMergeAttr.GetRowMerge();
991 if ( nR > 1 )
992 {
993 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_rowspan
994 "=" + OString::number(static_cast<sal_Int32>(nR)));
995 nR += nRow;
996 v = pDoc->GetRowHeight( nRow, nR-1, nTab );
997 nHeightPixel = ToPixel( static_cast< sal_uInt16 >( v ) );
998 }
999 else
1000 nHeightPixel = ToPixel( pDoc->GetRowHeight( nRow, nTab ) );
1001 }
1002 else
1003 nHeightPixel = ToPixel( pDoc->GetRowHeight( nRow, nTab ) );
1004
1005 if ( bTableDataHeight )
1006 {
1007 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_height "=\"" +
1008 OString::number(nHeightPixel) + "\"");
1009 }
1010
1011 const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>( pAttr->GetItem(
1013 pCondItemSet) );
1014
1015 const SvxFontHeightItem& rFontHeightItem = static_cast<const SvxFontHeightItem&>(
1016 pAttr->GetItem( ScGlobal::GetScriptedWhichID( nScriptType,
1017 ATTR_FONT_HEIGHT), pCondItemSet) );
1018
1019 const SvxWeightItem& rWeightItem = static_cast<const SvxWeightItem&>( pAttr->GetItem(
1021 pCondItemSet) );
1022
1023 const SvxPostureItem& rPostureItem = static_cast<const SvxPostureItem&>(
1024 pAttr->GetItem( ScGlobal::GetScriptedWhichID( nScriptType,
1025 ATTR_FONT_POSTURE), pCondItemSet) );
1026
1027 const SvxUnderlineItem& rUnderlineItem =
1028 pAttr->GetItem( ATTR_FONT_UNDERLINE, pCondItemSet );
1029
1030 const SvxCrossedOutItem& rCrossedOutItem =
1031 pAttr->GetItem( ATTR_FONT_CROSSEDOUT, pCondItemSet );
1032
1033 const SvxColorItem& rColorItem = pAttr->GetItem(
1034 ATTR_FONT_COLOR, pCondItemSet );
1035
1036 const SvxHorJustifyItem& rHorJustifyItem =
1037 pAttr->GetItem( ATTR_HOR_JUSTIFY, pCondItemSet );
1038
1039 const SvxVerJustifyItem& rVerJustifyItem =
1040 pAttr->GetItem( ATTR_VER_JUSTIFY, pCondItemSet );
1041
1042 const SvxBrushItem& rBrushItem = pAttr->GetItem(
1043 ATTR_BACKGROUND, pCondItemSet );
1044
1045 Color aBgColor;
1046 if ( aColorScale )
1047 aBgColor = *aColorScale;
1048 else if ( rBrushItem.GetColor().GetAlpha() == 0 )
1049 aBgColor = aHTMLStyle.aBackgroundColor; // No unwanted background color
1050 else
1051 aBgColor = rBrushItem.GetColor();
1052
1053 bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() );
1054 bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
1055 bool bUnderline = ( LINESTYLE_NONE != rUnderlineItem.GetLineStyle() );
1056 bool bCrossedOut = ( STRIKEOUT_SINGLE <= rCrossedOutItem.GetStrikeout() );
1057 bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue() ); // default is AUTO now
1058 bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() );
1059 sal_uInt16 nSetFontSizeNumber = 0;
1060 sal_uInt32 nFontHeight = rFontHeightItem.GetHeight();
1061 if ( nFontHeight != aHTMLStyle.nFontHeight )
1062 {
1063 nSetFontSizeNumber = GetFontSizeNumber( static_cast<sal_uInt16>(nFontHeight) );
1064 if ( nSetFontSizeNumber == aHTMLStyle.nFontSizeNumber )
1065 nSetFontSizeNumber = 0; // no difference, don't set
1066 }
1067
1068 bool bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber);
1069
1073
1074 switch( rHorJustifyItem.GetValue() )
1075 {
1076 case SvxCellHorJustify::Standard:
1078 break;
1079 case SvxCellHorJustify::Center: pChar = OOO_STRING_SVTOOLS_HTML_AL_center; break;
1080 case SvxCellHorJustify::Block: pChar = OOO_STRING_SVTOOLS_HTML_AL_justify; break;
1081 case SvxCellHorJustify::Right: pChar = OOO_STRING_SVTOOLS_HTML_AL_right; break;
1082 case SvxCellHorJustify::Left:
1083 case SvxCellHorJustify::Repeat:
1084 default: pChar = OOO_STRING_SVTOOLS_HTML_AL_left; break;
1085 }
1086
1087 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_align "=\"" +
1088 OString::Concat(pChar) + "\"");
1089
1090 switch( rVerJustifyItem.GetValue() )
1091 {
1092 case SvxCellVerJustify::Top: pChar = OOO_STRING_SVTOOLS_HTML_VA_top; break;
1093 case SvxCellVerJustify::Center: pChar = OOO_STRING_SVTOOLS_HTML_VA_middle; break;
1094 case SvxCellVerJustify::Bottom: pChar = OOO_STRING_SVTOOLS_HTML_VA_bottom; break;
1095 case SvxCellVerJustify::Standard:
1096 default: pChar = nullptr;
1097 }
1098 if ( pChar )
1099 {
1100 aStrTD.append(OString::Concat(" " OOO_STRING_SVTOOLS_HTML_O_valign "=") + pChar);
1101 }
1102
1103 if ( aHTMLStyle.aBackgroundColor != aBgColor )
1104 {
1105 aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_bgcolor "="
1106 + lcl_makeHTMLColorTriplet(aBgColor));
1107 }
1108
1109 double fVal = 0.0;
1110 if ( bValueData )
1111 {
1112 switch (aCell.getType())
1113 {
1114 case CELLTYPE_VALUE:
1115 fVal = aCell.getDouble();
1116 if ( bCalcAsShown && fVal != 0.0 )
1117 fVal = pDoc->RoundValueAsShown( fVal, nFormat );
1118 break;
1119 case CELLTYPE_FORMULA:
1120 fVal = aCell.getFormula()->GetValue();
1121 break;
1122 default:
1123 OSL_FAIL( "value data with unsupported cell type" );
1124 }
1125 }
1126
1127 aStrTD.append(HTMLOutFuncs::CreateTableDataOptionsValNum(bValueData, fVal,
1128 nFormat, *pFormatter, &aNonConvertibleChars));
1129
1130 TAG_ON(aStrTD.makeStringAndClear());
1131
1132 //write the note for this as the first thing in the tag
1133 ScPostIt* pNote = pDoc->HasNote(aPos) ? pDoc->GetNote(aPos) : nullptr;
1134 if (pNote)
1135 {
1136 //create the comment indicator
1138 OOO_STRING_SVTOOLS_HTML_O_class "=\"comment-indicator\"";
1139 TAG_ON(aStr);
1141 OUT_LF();
1142
1143 //create the element holding the contents
1144 //this is a bit naive, since it doesn't separate
1145 //lines into html breaklines yet
1147 OUT_STR( pNote->GetText() );
1149 OUT_LF();
1150 }
1151
1152 if ( bBold ) TAG_ON( OOO_STRING_SVTOOLS_HTML_bold );
1153 if ( bItalic ) TAG_ON( OOO_STRING_SVTOOLS_HTML_italic );
1154 if ( bUnderline ) TAG_ON( OOO_STRING_SVTOOLS_HTML_underline );
1155 if ( bCrossedOut ) TAG_ON( OOO_STRING_SVTOOLS_HTML_strikethrough );
1156
1157 if ( bSetFont )
1158 {
1159 OStringBuffer aStr(OOO_STRING_SVTOOLS_HTML_font);
1160 if ( bSetFontName )
1161 {
1162 aStr.append(" " OOO_STRING_SVTOOLS_HTML_O_face "=\"");
1163
1164 if (!rFontItem.GetFamilyName().isEmpty())
1165 {
1166 const OUString& rList = rFontItem.GetFamilyName();
1167 for (sal_Int32 nPos {0};;)
1168 {
1169 OString aTmpStr = HTMLOutFuncs::ConvertStringToHTML(
1170 rList.getToken( 0, ';', nPos ),
1172 aStr.append(aTmpStr);
1173 if (nPos<0)
1174 break;
1175 aStr.append(',');
1176 }
1177 }
1178
1179 aStr.append('\"');
1180 }
1181 if ( nSetFontSizeNumber )
1182 {
1184 + OString::number(static_cast<sal_Int32>(nSetFontSizeNumber)));
1185 }
1186 if ( bSetFontColor )
1187 {
1188 Color aColor = rColorItem.GetValue();
1189
1190 // always export automatic text color as black
1191 if ( aColor == COL_AUTO )
1192 aColor = COL_BLACK;
1193
1195 + lcl_makeHTMLColorTriplet(aColor));
1196 }
1197 TAG_ON(aStr.makeStringAndClear());
1198 }
1199
1200 OUString aURL;
1201 bool bWriteHyperLink(false);
1202 if (aCell.getType() == CELLTYPE_FORMULA)
1203 {
1204 ScFormulaCell* pFCell = aCell.getFormula();
1205 if (pFCell->IsHyperLinkCell())
1206 {
1207 OUString aCellText;
1208 pFCell->GetURLResult(aURL, aCellText);
1209 bWriteHyperLink = true;
1210 }
1211 }
1212
1213 if (bWriteHyperLink)
1214 {
1216 OString aStr = OOO_STRING_SVTOOLS_HTML_anchor " " OOO_STRING_SVTOOLS_HTML_O_href "=\"" + aURLStr + "\"";
1217 TAG_ON(aStr);
1218 }
1219
1220 OUString aStrOut;
1221 bool bFieldText = false;
1222
1223 const Color* pColor;
1224 switch (aCell.getType())
1225 {
1226 case CELLTYPE_EDIT :
1227 bFieldText = WriteFieldText(aCell.getEditText());
1228 if ( bFieldText )
1229 break;
1230 [[fallthrough]];
1231 default:
1232 aStrOut = ScCellFormat::GetString(aCell, nFormat, &pColor, *pFormatter, *pDoc);
1233 }
1234
1235 if ( !bFieldText )
1236 {
1237 if ( aStrOut.isEmpty() )
1238 {
1239 TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak ); // No completely empty line
1240 }
1241 else
1242 {
1243 sal_Int32 nPos = aStrOut.indexOf( '\n' );
1244 if ( nPos == -1 )
1245 {
1246 OUT_STR( aStrOut );
1247 }
1248 else
1249 {
1250 sal_Int32 nStartPos = 0;
1251 do
1252 {
1253 OUString aSingleLine = aStrOut.copy( nStartPos, nPos - nStartPos );
1254 OUT_STR( aSingleLine );
1256 nStartPos = nPos + 1;
1257 }
1258 while( ( nPos = aStrOut.indexOf( '\n', nStartPos ) ) != -1 );
1259 OUString aSingleLine = aStrOut.copy( nStartPos );
1260 OUT_STR( aSingleLine );
1261 }
1262 }
1263 }
1264 if ( pGraphEntry )
1265 WriteGraphEntry( pGraphEntry );
1266
1267 if (bWriteHyperLink) { TAG_OFF(OOO_STRING_SVTOOLS_HTML_anchor); }
1268
1269 if ( bSetFont ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_font );
1270 if ( bCrossedOut ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_strikethrough );
1271 if ( bUnderline ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_underline );
1272 if ( bItalic ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_italic );
1273 if ( bBold ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold );
1274
1276}
1277
1279{
1280 bool bFields = false;
1281 // text and anchor of URL fields, Doc-Engine is a ScFieldEditEngine
1282 EditEngine& rEngine = pDoc->GetEditEngine();
1283 rEngine.SetText( *pData );
1284 sal_Int32 nParas = rEngine.GetParagraphCount();
1285 if ( nParas )
1286 {
1287 ESelection aSel( 0, 0, nParas-1, rEngine.GetTextLen( nParas-1 ) );
1288 SfxItemSet aSet( rEngine.GetAttribs( aSel ) );
1289 SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false );
1290 if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET )
1291 bFields = true;
1292 }
1293 if ( bFields )
1294 {
1295 bool bOldUpdateMode = rEngine.SetUpdateLayout( true ); // no portions if not formatted
1296 for ( sal_Int32 nPar=0; nPar < nParas; nPar++ )
1297 {
1298 if ( nPar > 0 )
1300 std::vector<sal_Int32> aPortions;
1301 rEngine.GetPortions( nPar, aPortions );
1302 sal_Int32 nStart = 0;
1303 for ( const sal_Int32 nEnd : aPortions )
1304 {
1305 ESelection aSel( nPar, nStart, nPar, nEnd );
1306 bool bUrl = false;
1307 // fields are single characters
1308 if ( nEnd == nStart+1 )
1309 {
1310 SfxItemSet aSet = rEngine.GetAttribs( aSel );
1311 if ( const SvxFieldItem* pFieldItem = aSet.GetItemIfSet( EE_FEATURE_FIELD, false ) )
1312 {
1313 const SvxFieldData* pField = pFieldItem->GetField();
1314 if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(pField))
1315 {
1316 bUrl = true;
1318 OUT_STR( pURLField->GetURL() );
1319 rStrm.WriteOString( "\">" );
1320 OUT_STR( pURLField->GetRepresentation() );
1322 }
1323 }
1324 }
1325 if ( !bUrl )
1326 OUT_STR( rEngine.GetText( aSel ) );
1327 nStart = nEnd;
1328 }
1329 }
1330 rEngine.SetUpdateLayout( bOldUpdateMode );
1331 }
1332 return bFields;
1333}
1334
1336 std::u16string_view rTargetNm )
1337{
1338 INetURLObject aFileUrl, aTargetUrl;
1339 aFileUrl.SetSmartURL( rFileNm );
1340 aTargetUrl.SetSmartURL( rTargetNm );
1341 if( !(INetProtocol::File == aFileUrl.GetProtocol() &&
1342 ( INetProtocol::File != aTargetUrl.GetProtocol() &&
1343 INetProtocol::Ftp <= aTargetUrl.GetProtocol() &&
1344 INetProtocol::Javascript >= aTargetUrl.GetProtocol())) )
1345 return;
1346
1347 if( pFileNameMap )
1348 {
1349 // Did we already move the file?
1350 std::map<OUString, OUString>::iterator it = pFileNameMap->find( rFileNm );
1351 if( it != pFileNameMap->end() )
1352 {
1353 rFileNm = it->second;
1354 return;
1355 }
1356 }
1357 else
1358 {
1359 pFileNameMap.reset( new std::map<OUString, OUString> );
1360 }
1361
1362 bool bRet = false;
1363 SvFileStream aTmp( aFileUrl.PathToFileName(), StreamMode::READ );
1364
1365 OUString aSrc = rFileNm;
1366 OUString aDest = aTargetUrl.GetPartBeforeLastName() + aFileUrl.GetLastName();
1367
1368 SfxMedium aMedium( aDest, StreamMode::WRITE | StreamMode::SHARE_DENYNONE );
1369
1370 {
1371 SvFileStream aCpy( aMedium.GetPhysicalName(), StreamMode::WRITE );
1372 aCpy.WriteStream( aTmp );
1373 }
1374
1375 // Take over
1376 aMedium.Close();
1377 aMedium.Commit();
1378
1379 bRet = ERRCODE_NONE == aMedium.GetError();
1380
1381 if( bRet )
1382 {
1383 pFileNameMap->insert( std::make_pair( aSrc, aDest ) );
1384 rFileNm = aDest;
1385 }
1386}
1387
1388void ScHTMLExport::IncIndent( short nVal )
1389{
1390 sIndent[nIndent] = '\t';
1391 nIndent = nIndent + nVal;
1392 if ( nIndent < 0 )
1393 nIndent = 0;
1394 else if ( nIndent > nIndentMax )
1396 sIndent[nIndent] = 0;
1397}
1398
1399/* 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
std::optional< Color > GetColor(const ScAddress &rAddr) const
Definition: colorscale.cxx:633
const ScCondFormatIndexes & GetCondFormatData() const
Definition: attrib.hxx:287
ScConditionalFormat * GetFormat(sal_uInt32 nKey)
Definition: conditio.cxx:2098
const ScFormatEntry * GetEntry(sal_uInt16 nPos) const
Definition: conditio.cxx:1802
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4161
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4122
SC_DLLPUBLIC ScFieldEditEngine & GetEditEngine()
Definition: documen2.cxx:483
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Definition: document.cxx:6587
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
Definition: document.cxx:2628
SC_DLLPUBLIC double RoundValueAsShown(double fVal, sal_uInt32 nFormat, const ScInterpreterContext *pContext=nullptr) const
Definition: documen4.cxx:627
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6176
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1084
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4416
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6618
bool IsClipOrUndo() const
Definition: document.hxx:1592
SfxObjectShell * GetDocumentShell() const
Definition: document.hxx:1083
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6055
SC_DLLPUBLIC SvtScriptType GetScriptType(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScRefCellValue *pCell=nullptr)
Definition: documen6.cxx:132
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
Definition: documen4.cxx:860
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: document.cxx:4430
SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4423
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
Definition: document.cxx:890
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
Definition: document.cxx:204
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4684
SC_DLLPUBLIC const SfxItemSet * GetCondResult(SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue *pCell=nullptr) const
Definition: documen4.cxx:791
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4719
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4454
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:297
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:133
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:915
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
Definition: global.cxx:1055
static SC_DLLPUBLIC SvtScriptType GetDefaultScriptType()
Definition: global.cxx:900
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:297
void WriteCell(sc::ColumnBlockPosition &rBlockPos, SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: htmlexp.cxx:885
static const char * pFontSizeCss[SC_HTML_FONTSIZES]
Definition: htmlexp.hxx:105
static const char * GetFontSizeCss(sal_uInt16 nHeight)
Definition: htmlexp.cxx:268
void WriteOverview()
Definition: htmlexp.cxx:456
VclPtr< OutputDevice > pAppWin
Definition: htmlexp.hxx:116
bool bTableDataHeight
Definition: htmlexp.hxx:127
virtual ~ScHTMLExport() override
Definition: htmlexp.cxx:249
FileNameMapPtr pFileNameMap
Definition: htmlexp.hxx:117
static const sal_uInt16 nDefaultFontSize[SC_HTML_FONTSIZES]
Definition: htmlexp.hxx:102
void WriteHeader()
Definition: htmlexp.cxx:313
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:286
bool bTabHasGraphics
Definition: htmlexp.hxx:123
static sal_uInt16 GetFontSizeNumber(sal_uInt16 nHeight)
Definition: htmlexp.cxx:254
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:1388
bool WriteFieldText(const EditTextObject *pData)
Definition: htmlexp.cxx:1278
const OUString & GetNonConvertibleChars() const
Definition: htmlexp.hxx:179
const SfxItemSet & PageDefaults(SCTAB nTab)
Definition: htmlexp.cxx:489
sal_uInt16 ToPixel(sal_uInt16 nTwips)
Definition: htmlexp.cxx:274
void WriteBody()
Definition: htmlexp.cxx:605
bool bCalcAsShown
Definition: htmlexp.hxx:125
static OString BorderToStyle(const char *pBorderName, const editeng::SvxBorderLine *pLine, bool &bInsertSemicolon)
Definition: htmlexp.cxx:534
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:1335
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:199
void WriteTables()
Definition: htmlexp.cxx:684
SCCOL GetColMerge() const
Definition: attrib.hxx:71
bool IsMerged() const
Definition: attrib.hxx:74
SCROW GetRowMerge() const
Definition: attrib.hxx:72
bool IsOverlapped() const
Definition: attrib.hxx:104
sal_uInt32 GetNumberFormat(SvNumberFormatter *) const
Definition: patattr.cxx:1398
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
Definition: patattr.hxx:73
Additional class containing cell annotation data.
Definition: postit.hxx:58
OUString GetText() const
Returns the caption text of this note.
Definition: postit.cxx:527
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)
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 & 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, OUString *pMediaType=nullptr)
size_type size() const
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:277
@ CELLTYPE_FORMULA
Definition: global.hxx:276
@ CELLTYPE_VALUE
Definition: global.hxx:274
#define OUT_STR(str)
Definition: htmlexp.cxx:120
static void lcl_AddStamp(OUString &rStr, std::u16string_view rName, const css::util::DateTime &rDateTime, const LocaleDataWrapper &rLoc)
Definition: htmlexp.cxx:160
#define OUT_HR()
Definition: htmlexp.cxx:124
const char sMyEndComment[]
Definition: htmlexp.cxx:94
#define OUT_SP_CSTR_ASS(s)
Definition: htmlexp.cxx:129
const char sBorder[]
Definition: htmlexp.cxx:96
static OString lcl_getColGroupString(sal_Int32 nSpan, sal_Int32 nWidth)
Definition: htmlexp.cxx:142
const char sBackground[]
Definition: htmlexp.cxx:97
static OString lcl_makeHTMLColorTriplet(const Color &rColor)
Definition: htmlexp.cxx:189
const char sMyBegComment[]
Definition: htmlexp.cxx:93
const char sDisplay[]
Definition: htmlexp.cxx:95
#define OUT_LF()
Definition: htmlexp.cxx:121
#define GLOBSTR(id)
Definition: htmlexp.cxx:131
#define TAG_ON(tag)
Definition: htmlexp.cxx:118
#define TAG_ON_LF(tag)
Definition: htmlexp.cxx:122
#define OUT_COMMENT(comment)
Definition: htmlexp.cxx:125
#define TAG_OFF_LF(tag)
Definition: htmlexp.cxx:123
#define TAG_OFF(tag)
Definition: htmlexp.cxx:119
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< ScCondFormatItem > ATTR_CONDITIONAL(154)
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