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