summaryrefslogtreecommitdiff
path: root/sc/source/filter/html
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-05-28 09:36:24 +0200
committerVladimir Glazunov <vg@openoffice.org>2010-05-28 09:36:24 +0200
commita24ed4a9d146127a698669b23635ba565c0f2e2f (patch)
tree52cd45990c2f8f4c9c17339db29852ea64388f93 /sc/source/filter/html
parentdd508f5004b7a26b085e6f6f51c8f4b4bc16c75c (diff)
parent284da3a62f12258617bcb998dde18e79213429db (diff)
CWS-TOOLING: integrate CWS calc53
Notes
Notes: split repo tag: calc_ooo/DEV300_m80
Diffstat (limited to 'sc/source/filter/html')
-rw-r--r--sc/source/filter/html/htmlexp.cxx28
-rw-r--r--sc/source/filter/html/htmlpars.cxx19
2 files changed, 14 insertions, 33 deletions
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index e8c71d20af11..0ab97170621e 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -148,8 +148,6 @@ const sal_Char __FAR_DATA ScHTMLExport::sIndentSource[nIndentMax+1] =
#define OUT_SP_CSTR_ASS( s ) rStrm << ' ' << s << '='
#define APPEND_SPACE( s ) s.AppendAscii(" ")
-extern BOOL bOderSo;
-
#define GLOBSTR(id) ScGlobal::GetRscString( id )
@@ -234,30 +232,6 @@ void lcl_AppendHTMLColorTripel( ByteString& rStr, const Color& rColor )
}
*/
-bool SC_DLLPUBLIC ScGetWriteTeamInfo();
-
-void lcl_WriteTeamInfo( SvStream& rStrm, rtl_TextEncoding eDestEnc )
-{
- if ( !ScGetWriteTeamInfo() ) return;
- lcl_OUT_LF();
- lcl_OUT_COMMENT( CREATE_STRING( "Sascha Ballach " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Michael Daeumling (aka Bitsau) " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Michael Hagen " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Roland Jakobs " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Andreas Krebs " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "John Marmion " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Niklas Nebel " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Jacques Nietsch " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Marcus Olk " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Eike Rathke " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Daniel Rentz " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Stephan Templin " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "Gunnar Timm " ) );
- lcl_OUT_COMMENT( CREATE_STRING( "*** Man kann nicht ALLES haben! ***" ) );
- lcl_OUT_LF();
-}
-
-
//////////////////////////////////////////////////////////////////////////////
ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument* pDocP,
@@ -416,8 +390,6 @@ void ScHTMLExport::WriteHeader()
OUT_COMMENT( aStrOut );
}
//----------------------------------------------------------
-
- lcl_WriteTeamInfo( rStrm, eDestEnc );
}
OUT_LF();
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 7b0652e7cce9..85e77fc3124b 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -2424,12 +2424,15 @@ void ScHTMLTable::InsertNewCell( const ScHTMLSize& rSpanSize )
{
ScRange* pRange;
- // find an unused cell
- while( (pRange = maVMergedCells.Find( maCurrCell.MakeAddr() )) != 0 )
+ /* Find an unused cell by skipping all merged ranges that cover the
+ current cell position stored in maCurrCell. */
+ while( ((pRange = maVMergedCells.Find( maCurrCell.MakeAddr() )) != 0) || ((pRange = maHMergedCells.Find( maCurrCell.MakeAddr() )) != 0) )
maCurrCell.mnCol = pRange->aEnd.Col() + 1;
mpCurrEntryList = &maEntryMap[ maCurrCell ];
- // try to find collisions, shrink existing ranges
+ /* If the new cell is merged horizontally, try to find collisions with
+ other vertically merged ranges. In this case, shrink existing
+ vertically merged ranges (do not shrink the new cell). */
SCCOL nColEnd = maCurrCell.mnCol + rSpanSize.mnCols;
for( ScAddress aAddr( maCurrCell.MakeAddr() ); aAddr.Col() < nColEnd; aAddr.IncCol() )
if( (pRange = maVMergedCells.Find( aAddr )) != 0 )
@@ -2438,14 +2441,19 @@ void ScHTMLTable::InsertNewCell( const ScHTMLSize& rSpanSize )
// insert the new range into the cell lists
ScRange aNewRange( maCurrCell.MakeAddr() );
aNewRange.aEnd.Move( rSpanSize.mnCols - 1, rSpanSize.mnRows - 1, 0 );
- if( rSpanSize.mnCols > 1 )
+ if( rSpanSize.mnRows > 1 )
{
maVMergedCells.Append( aNewRange );
+ /* Do not insert vertically merged ranges into maUsedCells yet,
+ because they may be shrunken (see above). The final vertically
+ merged ranges are inserted in FillEmptyCells(). */
}
else
{
- if( rSpanSize.mnRows > 1 )
+ if( rSpanSize.mnCols > 1 )
maHMergedCells.Append( aNewRange );
+ /* Insert horizontally merged ranges and single cells into
+ maUsedCells, they will not be changed anymore. */
maUsedCells.Join( aNewRange );
}
@@ -2592,6 +2600,7 @@ void ScHTMLTable::FillEmptyCells()
for( ScHTMLTableIterator aIter( mxNestedTables.get() ); aIter.is(); ++aIter )
aIter->FillEmptyCells();
+ // insert the final vertically merged ranges into maUsedCells
for( const ScRange* pRange = maVMergedCells.First(); pRange; pRange = maVMergedCells.Next() )
maUsedCells.Join( *pRange );