Kaydet (Commit) 69895a60 authored tarafından Philipp Weissenbacher's avatar Philipp Weissenbacher Kaydeden (comit) Tor Lillqvist

Translate German comments

Change-Id: I0c6f2fbd05b3a80826f3bed1b5ac2a1170d6ea5e
Reviewed-on: https://gerrit.libreoffice.org/5753Reviewed-by: 's avatarTor Lillqvist <tml@iki.fi>
Tested-by: 's avatarTor Lillqvist <tml@iki.fi>
üst 2f96e36c
...@@ -976,7 +976,7 @@ static SCROW lcl_GGT( SCROW a, SCROW b ) ...@@ -976,7 +976,7 @@ static SCROW lcl_GGT( SCROW a, SCROW b )
} }
// Lowest common multiple: a * b / GGT(a,b) // Lowest common multiple: a * b / GCD(a,b)
static SCROW lcl_KGV( SCROW a, SCROW b ) static SCROW lcl_KGV( SCROW a, SCROW b )
{ {
if ( a > b ) // Make overflow even less likely if ( a > b ) // Make overflow even less likely
...@@ -1107,7 +1107,7 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo ) ...@@ -1107,7 +1107,7 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo )
if ( ++nTableLevel > 1 ) if ( ++nTableLevel > 1 )
{ // Table in Table { // Table in Table
sal_uInt16 nTmpColOffset = nColOffset; // Will be changed in Colonize sal_uInt16 nTmpColOffset = nColOffset; // Will be changed in Colonize()
Colonize( pActEntry ); Colonize( pActEntry );
aTableStack.push( new ScHTMLTableStackEntry( aTableStack.push( new ScHTMLTableStackEntry(
pActEntry, xLockedList, pLocalColOffset, nFirstTableCell, pActEntry, xLockedList, pLocalColOffset, nFirstTableCell,
...@@ -1283,17 +1283,17 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) ...@@ -1283,17 +1283,17 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
(*pTab1)[ nRowKey ] = nRowsPerRow1; (*pTab1)[ nRowKey ] = nRowsPerRow1;
else if ( nRowsPerRow1 > nR ) else if ( nRowsPerRow1 > nR )
(*pTab1)[ nRowKey ] = nRowsPerRow1; (*pTab1)[ nRowKey ] = nRowsPerRow1;
//TODO: wie geht das noch besser? //TODO: How can we improve on this?
else if ( nRowsPerRow1 < nR && nRowSpan == 1 else if ( nRowsPerRow1 < nR && nRowSpan == 1
&& nTable == nMaxTable ) && nTable == nMaxTable )
{ // Platz uebrig, evtl. besser mergen { // Still some space left, merge in a better way (if possible)
SCROW nAdd = nRowsPerRow1 - (nR % nRowsPerRow1); SCROW nAdd = nRowsPerRow1 - (nR % nRowsPerRow1);
nR += nAdd; nR += nAdd;
if ( (nR % nRows) == 0 ) if ( (nR % nRows) == 0 )
{ // nur wenn abbildbar { // Only if representable
SCROW nR2 = (*pTab1)[ nRowKey+1 ]; SCROW nR2 = (*pTab1)[ nRowKey+1 ];
if ( nR2 > nAdd ) if ( nR2 > nAdd )
{ // nur wenn wirklich Platz { // Only if we really have enough space
(*pTab1)[ nRowKey ] = nR; (*pTab1)[ nRowKey ] = nR;
(*pTab1)[ nRowKey+1 ] = nR2 - nAdd; (*pTab1)[ nRowKey+1 ] = nR2 - nAdd;
nRowsPerRow2 = nR / nRows; nRowsPerRow2 = nR / nRows;
...@@ -1303,9 +1303,9 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) ...@@ -1303,9 +1303,9 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
} }
} }
if ( nRowsPerRow2 > 1 ) if ( nRowsPerRow2 > 1 )
{ // innen { // Inner
if ( !pTab2 ) if ( !pTab2 )
{ // nRowsPerRow2 kann erhoeht worden sein { // nRowsPerRow2 could be've been incremented
pTab2 = new InnerMap; pTab2 = new InnerMap;
(*pTables)[ nTable ] = pTab2; (*pTables)[ nTable ] = pTab2;
} }
...@@ -1349,9 +1349,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) ...@@ -1349,9 +1349,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
delete pLocalColOffset; delete pLocalColOffset;
pLocalColOffset = pS->pLocalColOffset; pLocalColOffset = pS->pLocalColOffset;
delete pActEntry; delete pActEntry;
// pActEntry bleibt erstmal erhalten falls da noch 'ne Table in // pActEntry is kept around if a table is started in the same row
// der gleichen Zelle aufgemacht werden sollte (in HTML ist ja // (anything's possible in HTML); will be deleted by CloseEntry
// alles moeglich..) und wird in CloseEntry deleted
pActEntry = pE; pActEntry = pE;
delete pS; delete pS;
} }
...@@ -1359,7 +1358,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) ...@@ -1359,7 +1358,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo )
bInCell = true; bInCell = true;
} }
else else
{ // einfache Table beendet { // Simple table finished
SetWidths(); SetWidths();
nMaxCol = 0; nMaxCol = 0;
nTable = 0; nTable = 0;
...@@ -1437,7 +1436,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) ...@@ -1437,7 +1436,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo )
*pGraphic, &rFilter, &nFormat ) ) *pGraphic, &rFilter, &nFormat ) )
{ {
delete pGraphic; delete pGraphic;
return ; // dumm gelaufen return ; // Bad luck
} }
if ( !pActEntry->bHasGraphic ) if ( !pActEntry->bHasGraphic )
{ // discard any ALT text in this cell if we have any image { // discard any ALT text in this cell if we have any image
...@@ -1495,19 +1494,19 @@ sal_uInt16 ScHTMLLayoutParser::GetWidthPixel( const HTMLOption& rOption ) ...@@ -1495,19 +1494,19 @@ sal_uInt16 ScHTMLLayoutParser::GetWidthPixel( const HTMLOption& rOption )
{ {
const String& rOptVal = rOption.GetString(); const String& rOptVal = rOption.GetString();
if ( rOptVal.Search('%') != STRING_NOTFOUND ) if ( rOptVal.Search('%') != STRING_NOTFOUND )
{ // Prozent { // Percent
sal_uInt16 nW = (nTableWidth ? nTableWidth : (sal_uInt16) aPageSize.Width()); sal_uInt16 nW = (nTableWidth ? nTableWidth : (sal_uInt16) aPageSize.Width());
return (sal_uInt16)((rOption.GetNumber() * nW) / 100); return (sal_uInt16)((rOption.GetNumber() * nW) / 100);
} }
else else
{ {
if ( rOptVal.Search('*') != STRING_NOTFOUND ) if ( rOptVal.Search('*') != STRING_NOTFOUND )
{ // relativ zu was?!? { // Relative to what?
//todo: ColArray aller relativen Werte sammeln und dann MakeCol // TODO: Collect all relative values in ColArray and then MakeCol
return 0; return 0;
} }
else else
return (sal_uInt16)rOption.GetNumber(); // Pixel return (sal_uInt16)rOption.GetNumber(); // Pixel
} }
} }
...@@ -1542,7 +1541,7 @@ bool ScHTMLLayoutParser::IsAtBeginningOfText( ImportInfo* pInfo ) ...@@ -1542,7 +1541,7 @@ bool ScHTMLLayoutParser::IsAtBeginningOfText( ImportInfo* pInfo )
void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo ) void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo )
{ {
if ( IsAtBeginningOfText( pInfo ) ) if ( IsAtBeginningOfText( pInfo ) )
{ // nur am Anfang des Textes, gilt dann fuer gesamte Zelle { // Only at the start of the text; applies to whole line
const HTMLOptions& rOptions = static_cast<HTMLParser*>(pInfo->pParser)->GetOptions(); const HTMLOptions& rOptions = static_cast<HTMLParser*>(pInfo->pParser)->GetOptions();
for (size_t i = 0, n = rOptions.size(); i < n; ++i) for (size_t i = 0, n = rOptions.size(); i < n; ++i)
{ {
...@@ -1556,7 +1555,8 @@ void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo ) ...@@ -1556,7 +1555,8 @@ void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo )
sal_Int32 nPos = 0; sal_Int32 nPos = 0;
while( nPos != -1 ) while( nPos != -1 )
{ {
// Fontliste, VCL: Semikolon als Separator, HTML: Komma // Font list, VCL uses the semicolon as separator
// HTML uses the comma
String aFName = rFace.GetToken( 0, ',', nPos ); String aFName = rFace.GetToken( 0, ',', nPos );
aFName = comphelper::string::strip(aFName, ' '); aFName = comphelper::string::strip(aFName, ' ');
if( aFontName.Len() ) if( aFontName.Len() )
...@@ -1618,7 +1618,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) ...@@ -1618,7 +1618,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
{ {
if ( bInTitle && !aString.isEmpty() ) if ( bInTitle && !aString.isEmpty() )
{ {
// Leerzeichen von Zeilenumbruechen raus // Remove blanks from line brakes
aString = aString.trim(); aString = aString.trim();
uno::Reference<document::XDocumentPropertiesSupplier> xDPS( uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
mpDoc->GetDocumentShell()->GetModel(), mpDoc->GetDocumentShell()->GetModel(),
...@@ -1638,31 +1638,31 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) ...@@ -1638,31 +1638,31 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
ColOn( pInfo ); ColOn( pInfo );
} }
break; break;
case HTML_TABLEHEADER_ON: // oeffnet Zelle case HTML_TABLEHEADER_ON: // Opens row
{ {
if ( bInCell ) if ( bInCell )
CloseEntry( pInfo ); CloseEntry( pInfo );
// bInCell nicht true setzen, das macht TableDataOn // Do not set bInCell to true, TableDataOn does that
pActEntry->aItemSet.Put( pActEntry->aItemSet.Put(
SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT) ); SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT) );
} // fall thru } // fall thru
case HTML_TABLEDATA_ON: // oeffnet Zelle case HTML_TABLEDATA_ON: // Opens cell
{ {
TableDataOn( pInfo ); TableDataOn( pInfo );
} }
break; break;
case HTML_TABLEHEADER_OFF: case HTML_TABLEHEADER_OFF:
case HTML_TABLEDATA_OFF: // schliesst Zelle case HTML_TABLEDATA_OFF: // Closes cell
{ {
TableDataOff( pInfo ); TableDataOff( pInfo );
} }
break; break;
case HTML_TABLEROW_ON: // vor erster Zelle in Row case HTML_TABLEROW_ON: // Before first cell in row
{ {
TableRowOn( pInfo ); TableRowOn( pInfo );
} }
break; break;
case HTML_TABLEROW_OFF: // nach letzter Zelle in Row case HTML_TABLEROW_OFF: // After last cell in row
{ {
TableRowOff( pInfo ); TableRowOff( pInfo );
} }
...@@ -1678,7 +1678,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) ...@@ -1678,7 +1678,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
} }
break; break;
case HTML_PARABREAK_OFF: case HTML_PARABREAK_OFF:
{ // nach einem Image geht es vertikal weiter { // We continue vertically after an image
if ( pActEntry->maImageList.size() > 0 ) if ( pActEntry->maImageList.size() > 0 )
pActEntry->maImageList.back().nDir = nVertical; pActEntry->maImageList.back().nDir = nVertical;
} }
...@@ -1695,7 +1695,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) ...@@ -1695,7 +1695,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
break; break;
case HTML_BIGPRINT_ON : case HTML_BIGPRINT_ON :
{ {
//tpdo: aktuelle Fontgroesse merken und einen groesser // TODO: Remember current font size and increase by 1
if ( IsAtBeginningOfText( pInfo ) ) if ( IsAtBeginningOfText( pInfo ) )
pActEntry->aItemSet.Put( SvxFontHeightItem( pActEntry->aItemSet.Put( SvxFontHeightItem(
maFontHeights[3], 100, ATTR_FONT_HEIGHT ) ); maFontHeights[3], 100, ATTR_FONT_HEIGHT ) );
...@@ -1703,7 +1703,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) ...@@ -1703,7 +1703,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
break; break;
case HTML_SMALLPRINT_ON : case HTML_SMALLPRINT_ON :
{ {
//todo: aktuelle Fontgroesse merken und einen kleiner // TODO: Remember current font size and decrease by 1
if ( IsAtBeginningOfText( pInfo ) ) if ( IsAtBeginningOfText( pInfo ) )
pActEntry->aItemSet.Put( SvxFontHeightItem( pActEntry->aItemSet.Put( SvxFontHeightItem(
maFontHeights[0], 100, ATTR_FONT_HEIGHT ) ); maFontHeights[0], 100, ATTR_FONT_HEIGHT ) );
...@@ -1755,7 +1755,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) ...@@ -1755,7 +1755,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo )
} }
break; break;
default: default:
{ // nLastToken nicht setzen! { // Don't set nLastToken!
bSetLastToken = false; bSetLastToken = false;
} }
} }
...@@ -3199,7 +3199,7 @@ public: ...@@ -3199,7 +3199,7 @@ public:
void at_rule_name(const char* /*p*/, size_t /*n*/) void at_rule_name(const char* /*p*/, size_t /*n*/)
{ {
// For now, we ignore at-rule properties. // TODO: For now, we ignore at-rule properties.
} }
void selector_name(const char* p_elem, size_t n_elem, const char* p_class, size_t n_class) void selector_name(const char* p_elem, size_t n_elem, const char* p_class, size_t n_class)
...@@ -3263,7 +3263,7 @@ void ScHTMLQueryParser::ParseStyle(const OUString& rStrm) ...@@ -3263,7 +3263,7 @@ void ScHTMLQueryParser::ParseStyle(const OUString& rStrm)
} }
catch (const orcus::css_parse_error&) catch (const orcus::css_parse_error&)
{ {
// Parsing of CSS failed. Do nothing for now. // TODO: Parsing of CSS failed. Do nothing for now.
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment