summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Freund <matti_lx@yahoo.de>2013-03-10 00:09:15 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-10 13:48:34 +0000
commitd718d02c1e9f518c393fd9dd5a5c841dffacc696 (patch)
tree9adaa778535ddd090ed85554b58931561c7f823c
parentd335638ea6a5ac4e3e276bfd9d704dc320bbd211 (diff)
Comment translation german-english in sw/source/ui/table/
Corrections... :-D Change-Id: I486a0caac11786c8edb4dd8b6099771db075a336 Reviewed-on: https://gerrit.libreoffice.org/2625 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
-rw-r--r--sw/source/ui/table/convert.cxx2
-rw-r--r--sw/source/ui/table/instable.cxx3
-rw-r--r--sw/source/ui/table/swtablerep.cxx8
-rw-r--r--sw/source/ui/table/tabledlg.cxx51
-rw-r--r--sw/source/ui/table/tablemgr.cxx27
-rw-r--r--sw/source/ui/table/tablepg.hxx5
-rw-r--r--sw/source/ui/table/tautofmt.cxx119
7 files changed, 59 insertions, 156 deletions
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 93e36241b291..d2ea4ca991dd 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -147,7 +147,7 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
}
else
{
- //Einfuege-Optionen verstecken
+ //hide insert options
mpOptions->Hide();
}
mpKeepColumn->SaveValue();
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 466acbca9305..440323b9ba28 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -70,9 +70,6 @@ void SwInsTableDlg::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol
rInsTblOpts.mnInsMode = nInsMode;
}
-// CTOR / DTOR -----------------------------------------------------------
-
-
SwInsTableDlg::SwInsTableDlg( SwView& rView )
: SfxModalDialog(rView.GetWindow(), "InsertTableDialog", "modules/swriter/ui/inserttable.ui")
, pShell(&rView.GetWrtShell())
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx
index 96944b2116d4..88d86a8447fb 100644
--- a/sw/source/ui/table/swtablerep.cxx
+++ b/sw/source/ui/table/swtablerep.cxx
@@ -110,8 +110,8 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
rTabCols.SetLeft(nLeft);
if(bSingleLine)
{
- // die unsichtbaren Trenner werden aus den alten TabCols genommen
- // die sichtbaren kommen aus pTColumns
+ // The invisible separators are taken from the old TabCols,
+ // the visible coming from pTColumns.
TColumn* pOldTColumns = new TColumn[nAllCols + 1];
SwTwips nStart = 0,
nEnd;
@@ -150,7 +150,7 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
break;
}
bFirst = false;
- // sie muessen sortiert eingefuegt werden
+ // They have to be inserted sorted.
bOld = nOld < nNew;
nPos = sal_uInt16(bOld ? nOld : nNew);
rTabCols[i] = nPos + nLeft;
@@ -172,7 +172,7 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
}
}
-// Rundungsfehler abfangen
+// intercept rounding errors
if(Abs((long)nOldLeft - (long)rTabCols.GetLeft()) < 3)
rTabCols.SetLeft(nOldLeft);
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 3efc6190b94e..bdc45f99268a 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -140,8 +140,6 @@ void SwFormatTablePage::Init()
m_pRelWidthCB->SetClickHdl(LINK( this, SwFormatTablePage, RelWidthClickHdl ));
}
-/*------------------------------------------------------------------------*/
-
IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
{
OSL_ENSURE(pTblData, "table data not available?");
@@ -157,7 +155,7 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
m_aWidthMF.SetRefValue(pTblData->GetSpace());
m_aLeftMF.SetRefValue(pTblData->GetSpace());
m_aRightMF.SetRefValue(pTblData->GetSpace());
- m_aLeftMF.SetMetricFieldMin(0); // wird vom Percentfield ueberschrieben
+ m_aLeftMF.SetMetricFieldMin(0); // will be overwritten by the Percentfield
m_aRightMF.SetMetricFieldMin(0); // -""-
m_aLeftMF.SetMetricFieldMax(99); //
m_aRightMF.SetMetricFieldMax(99); //
@@ -165,7 +163,7 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
m_aRightMF.SetPrcntValue(m_aRightMF.NormalizePercent(nRight ), FUNIT_TWIP );
}
else
- ModifyHdl(m_aLeftMF.get()); // Werte wieder korrigieren
+ ModifyHdl(m_aLeftMF.get()); // correct values again
if(m_pFreeBtn->IsChecked())
{
@@ -234,8 +232,8 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox )
if(bFull && bRestore)
{
- // nachdem auf autom. geschaltet wurde, wurde die Breite gemerkt,
- // um sie beim Zurueckschalten restaurieren zu koennen
+ // After being switched on automatic, the width was pinned
+ // in order to restore the width while switching back to.
bFull = sal_False;
m_aWidthMF.SetPrcntValue(m_aWidthMF.NormalizePercent(nSaveWidth ), FUNIT_TWIP );
}
@@ -244,7 +242,6 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox )
return 0;
}
-/*----------------------------------------------------------------------*/
void SwFormatTablePage::RightModify()
{
if(m_pFreeBtn->IsChecked())
@@ -286,13 +283,13 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit)
if( nCurWidth < MINLAY )
nCurWidth = MINLAY;
nDiff = nRight + nLeft + nCurWidth - pTblData->GetSpace() ;
- //rechtsbuendig nur linken Rand veraendern
+ //right aligned: only change the left margin
if(m_pRightBtn->IsChecked())
nLeft -= nDiff;
- //linksbuendig nur rechten Rand veraendern
+ //left aligned: only change the right margin
else if(m_pLeftBtn->IsChecked())
nRight -= nDiff;
- //linker Rand und Breite erlaubt - erst rechts - dann links
+ //left margin and width allowed - first right - then left
else if(m_pFromLeftBtn->IsChecked())
{
if( nRight >= nDiff )
@@ -312,7 +309,7 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit)
}
}
- //zentriert beide Seiten gleichmaessig veraendern
+ //centered: change both sides equally
else if(m_pCenterBtn->IsChecked())
{
if((nLeft != nRight))
@@ -327,7 +324,7 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit)
nRight -= nDiff/2;
}
}
- //freie Ausrichtung: beide Raender verkleinern
+ //free alignment: decrease both margins
else if(m_pFreeBtn->IsChecked())
{
nLeft -= nDiff/2;
@@ -359,8 +356,8 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit)
}
else
{
- //hier wird bei Aenderung an der linken Seite zuerst der
- //rechte Rand veraendert, dann die Breite
+ //Upon changes on the left side the right margin will be changed at first,
+ //thereafter the width.
nDiff = nRight + nLeft + nCurWidth - pTblData->GetSpace() ;
nRight -= nDiff;
@@ -384,7 +381,7 @@ SfxTabPage* SwFormatTablePage::Create( Window* pParent,
sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
{
- // Testen, ob eins der Control noch den Focus hat
+ // Test if one of the controls still has the focus.
if (m_aWidthMF.HasFocus())
ModifyHdl(m_aWidthMF.get());
else if (m_aLeftMF.HasFocus())
@@ -550,7 +547,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
}
- //Raender
+ //Margins
if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, sal_False,&pItem ))
{
m_pTopMF->SetValue(m_pTopMF->Normalize(
@@ -609,7 +606,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
// os: VCL sorgt nicht dafuer, dass das aktive Control im
// dialog bei OK den focus verliert
m_pNameED->GrabFocus();
- // Test des Tabellennamens auf Leerzeichen
+ // Test the table name for spaces
String sTblName = m_pNameED->GetText();
if(sTblName.Search(' ') != STRING_NOTFOUND)
{
@@ -719,9 +716,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
}
return sal_True;
}
-/*------------------------------------------------------------------------
- Beschreibung: Seite Spaltenkonfiguration
-------------------------------------------------------------------------*/
+//Description: Page column configuration
SwTableColumnPage::SwTableColumnPage(Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "TableColumnPage",
"modules/swriter/ui/tablecolumnpage.ui", rSet)
@@ -761,9 +756,7 @@ SwTableColumnPage::SwTableColumnPage(Window* pParent, const SfxItemSet& rSet)
&& ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON));
};
-/*------------------------------------------------------------------------
- Beschreibung: Seite Spaltenkonfiguration
-------------------------------------------------------------------------*/
+//Description: Page column configuration
SwTableColumnPage::~SwTableColumnPage()
{
};
@@ -851,7 +844,7 @@ void SwTableColumnPage::Init(sal_Bool bWeb)
IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
{
- //Anzeigefenster verschieben
+ //move display window
if(pBox == (CheckBox *)m_pDownBtn)
{
if(aValueTbl[0] > 0)
@@ -1034,8 +1027,8 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
}
else if(bModifyTable && !bProp)
{
-// Differenz wird ueber die Tabellenbreite ausgeglichen,
-// andere Spalten bleiben unveraendert
+// Difference is balanced by the width of the table,
+// other columns remain unchanged.
OSL_ENSURE(nDiff <= pTblData->GetSpace() - nTableWidth, "wrong maximum" );
SwTwips nActSpace = pTblData->GetSpace() - nTableWidth;
if(nDiff > nActSpace)
@@ -1050,8 +1043,8 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
}
else if(bModifyTable & bProp)
{
-// Alle Spalten werden proportional mitveraendert, die Tabellenbreite wird
-// entsprechend angepasst
+// All columns will be changed proportionally with,
+// the table width is adjusted accordingly.
OSL_ENSURE(nDiff * nNoOfVisibleCols <= pTblData->GetSpace() - nTableWidth, "wrong maximum" );
long nAdd = nDiff;
if(nDiff * nNoOfVisibleCols > pTblData->GetSpace() - nTableWidth)
@@ -1477,7 +1470,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
bool bFlowAllowed = !bHtmlMode || rHtmlOpt.IsPrintLayoutExtension();
if(bFlowAllowed)
{
- // Einfuegen der vorhandenen Seitenvorlagen in die Listbox
+ // Inserting of the existing page templates in the list box.
const sal_uInt16 nCount = pShell->GetPageDescCnt();
sal_uInt16 i;
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index 693e6fb6d54c..4f9be2656206 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -46,10 +46,7 @@
using namespace ::com::sun::star;
-/*------------------------------------------------------------------------
- Beschreibung: Zeilenhoehe einstellen (Dialog)
-------------------------------------------------------------------------*/
-
+// Adjust line height (dialogue)
void SwTableFUNC::ColWidthDlg( Window *pParent )
{
@@ -63,9 +60,7 @@ void SwTableFUNC::ColWidthDlg( Window *pParent )
delete pDlg;
}
-/*--------------------------------------------------------------------
- Beschreibung: Breite ermitteln
- --------------------------------------------------------------------*/
+// Determine the width
SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const
@@ -106,8 +101,8 @@ SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
if ( GetColCount() > 0 )
{
- // Die max. Breite ergibt sich aus der eigenen Breite und
- // der Breite der Nachbarzellen um je MINLAY verringert
+ // The maximum width arises from the own width and
+ // the width each of the neighbor cells reduced by MINLAY.
SwTwips nMax = nNum == 0 ?
GetColWidth(1) - MINLAY :
nNum == GetColCount() ?
@@ -124,8 +119,8 @@ SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
{
- // aktuelle Breite setzen
- // alle folgenden Verschieben
+ // set current width
+ // move all of the following
sal_Bool bCurrentOnly = sal_False;
if ( aCols.Count() > 0 )
@@ -176,7 +171,7 @@ SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt)
pSh(pShell),
bCopy(bCopyFmt)
{
- // gfs. das Format fuer die Bearbeitung kopieren
+ // if applicable copy the format for edit
if( pFmt && bCopy )
pFmt = new SwFrmFmt( *pFmt );
}
@@ -191,8 +186,8 @@ SwTableFUNC::~SwTableFUNC()
void SwTableFUNC::UpdateChart()
{
- //Update der Felder in der Tabelle vom User ausgeloesst, alle
- //Charts zu der Tabelle werden auf den neuesten Stand gebracht.
+ //Update of the fields triggered by the user, all Charts of
+ //the table will be brought up to date
SwFrmFmt *pFmt2 = pSh->GetTableFmt();
if ( pFmt2 && pSh->HasOLEObj( pFmt2->GetName() ) )
{
@@ -266,8 +261,8 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
pSh->SetCheckForOLEInCaption( sal_True );
}
pSh->CalcAndSetScale( aEmbObjRef );
- //#50270# Error brauchen wir nicht handeln, das erledigt das
- //DoVerb in der SfxViewShell
+ //#50270# We don't need to handle errors,
+ //this does the DoVerb in the SfxViewShell.
ErrCode nErr = pClient->DoVerb( SVVERB_SHOW );
(void) nErr;
}
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index e65a574cbbd5..84703bd5e2f4 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -89,9 +89,8 @@ public:
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
};
-/*-------------------------------------------------------
- TabPage Format/Table/Columns
---------------------------------------------------------- */
+// TabPage Format/Table/Columns
+
#define MET_FIELDS 6 //Number of the used MetricFields
class SwTableColumnPage : public SfxTabPage
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 57545a0b4bdf..aa93c35611f2 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -41,8 +41,6 @@ using namespace com::sun::star;
#define FRAME_OFFSET 4
-//========================================================================
-
class AutoFmtPreview : public Window
{
public:
@@ -80,7 +78,6 @@ private:
uno::Reference< i18n::XBreakIterator > m_xBreak;
- //-------------------------------------------
void Init ();
void DoPaint ( const Rectangle& rRect );
void CalcCellArray ( sal_Bool bFitWidth );
@@ -98,8 +95,6 @@ private:
String MakeNumberString( String cellString, sal_Bool bAddDec );
};
-//========================================================================
-
class SwStringInputDlg : public ModalDialog
{
public:
@@ -112,7 +107,7 @@ public:
void GetInputString( String& rString ) const;
private:
- Edit* m_pEdInput; // Edit erhaelt so den Focus
+ Edit* m_pEdInput; // Edit obtains the focus.
};
@@ -127,8 +122,6 @@ SwStringInputDlg::SwStringInputDlg(Window* pParent, const String& rTitle,
m_pEdInput->SetText(rDefault);
}
-//------------------------------------------------------------------------
-
void SwStringInputDlg::GetInputString( String& rString ) const
{
rString = m_pEdInput->GetText();
@@ -139,9 +132,7 @@ SwStringInputDlg::~SwStringInputDlg()
{
}
-//========================================================================
-// AutoFormat-Dialog:
-
+// AutoFormat-Dialogue:
SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
sal_Bool bSetAutoFormat, const SwTableAutoFmt* pSelFmt )
@@ -181,9 +172,6 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
Init(pSelFmt);
}
-//------------------------------------------------------------------------
-
-
SwAutoFormatDlg::~SwAutoFormatDlg()
{
if (bCoreDataChanged)
@@ -191,9 +179,6 @@ SwAutoFormatDlg::~SwAutoFormatDlg()
delete pTableTbl;
}
-//------------------------------------------------------------------------
-
-
void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
{
Link aLk( LINK( this, SwAutoFormatDlg, CheckHdl ) );
@@ -214,7 +199,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
nIndex = 0;
if( !bSetAutoFmt )
{
- // dann muss die Liste um den Eintrag <Keins> erweitert werden.
+ // Then the list to be expanded by the entry "- none -".
m_pLbFormat->InsertEntry( ViewShell::GetShellRes()->aStrNone );
nDfltStylePos = 1;
nIndex = 255;
@@ -233,9 +218,6 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
SelFmtHdl( 0 );
}
-//------------------------------------------------------------------------
-
-
void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, sal_Bool bEnable )
{
m_pBtnNumFormat->Enable( bEnable );
@@ -268,10 +250,7 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
}
-/*------------------------------------------------------------------------
- Handler:
- ---------*/
-
+// Handler:
IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
{
@@ -304,9 +283,6 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
return 0;
}
-/*------------------------------------------------------------------------*/
-
-
IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl)
{
bool bOk = false, bFmtInserted = false;
@@ -330,13 +306,12 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl)
if( n >= pTableTbl->size() )
{
- // Format mit dem Namen noch nicht vorhanden, also
- // aufnehmen
+ // Format with the name does not already exist, so take up.
SwTableAutoFmt* pNewData = new
SwTableAutoFmt( aFormatName );
pShell->GetTableAutoFmt( *pNewData );
- // Sortiert einfuegen!!
+ // Insert sorted!!
for( n = 1; n < pTableTbl->size(); ++n )
if( (*pTableTbl)[ n ].GetName() > aFormatName )
break;
@@ -372,8 +347,6 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl)
return 0;
}
-//------------------------------------------------------------------------
-
IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl)
{
String aMessage = aStrDelMsg ;
@@ -479,8 +452,6 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl)
return 0;
}
-//------------------------------------------------------------------------
-
IMPL_LINK_NOARG(SwAutoFormatDlg, SelFmtHdl)
{
sal_Bool bBtnEnable = sal_False;
@@ -514,7 +485,6 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, SelFmtHdl)
return 0;
}
-//------------------------------------------------------------------------
IMPL_LINK_NOARG_INLINE_START(SwAutoFormatDlg, OkHdl)
{
@@ -525,11 +495,8 @@ IMPL_LINK_NOARG_INLINE_START(SwAutoFormatDlg, OkHdl)
}
IMPL_LINK_NOARG_INLINE_END(SwAutoFormatDlg, OkHdl)
-//========================================================================
// AutoFmtPreview
-//------------------------------------------------------------------------
-
AutoFmtPreview::AutoFmtPreview(Window* pParent) :
Window ( pParent ),
aCurData ( aEmptyStr ),
@@ -575,15 +542,11 @@ void AutoFmtPreview::DetectRTL(SwWrtShell* pWrtShell)
mbRTL = pWrtShell->IsTableRightToLeft();
}
-//------------------------------------------------------------------------
-
AutoFmtPreview::~AutoFmtPreview()
{
delete pNumFmt;
}
-//------------------------------------------------------------------------
-
static void lcl_SetFontProperties(
Font& rFont,
const SvxFontItem& rFontItem,
@@ -625,8 +588,6 @@ void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, F
SETONALLFONTS( SetTransparent, sal_True );
}
-//------------------------------------------------------------------------
-
sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
{
static const sal_uInt8 pnFmtMap[] =
@@ -645,13 +606,9 @@ const SvxBoxItem& AutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const
return aCurData.GetBoxFmt( GetFormatIndex( nCol, nRow ) ).GetBox();
}
-//------------------------------------------------------------------------
-
void AutoFmtPreview::DrawString( size_t nCol, size_t nRow )
{
- //------------------------
- // Ausgabe des Zelltextes:
- //------------------------
+ // Output of the cell text:
sal_uLong nNum;
double nVal;
String cellString;
@@ -736,9 +693,9 @@ MAKENUMSTR:
if( aCurData.IsFont() &&
theMaxStrSize.Height() < aStrSize.Height() )
{
- // wenn der String in diesem Font nicht
- // in die Zelle passt, wird wieder der
- // Standard-Font genommen:
+ // If the string in this font does not
+ // fit into the cell, the standard font
+ // is taken again:
aScriptedText.SetDefaultFont();
aStrSize = aScriptedText.GetTextSize();
}
@@ -755,14 +712,10 @@ MAKENUMSTR:
- aStrSize.Width()
- FRAME_OFFSET );
- //-----------------------------
- // vertikal (immer zentrieren):
- //-----------------------------
+ // vertical (always centering):
aPos.Y() += (nRowHeight - (sal_uInt16)aStrSize.Height()) / 2;
- //-----------
// horizontal
- //-----------
if( mbRTL )
aPos.X() += nRightX;
else if (aCurData.IsJustify())
@@ -785,31 +738,25 @@ MAKENUMSTR:
}
else
{
- //---------------------
- // Standardausrichtung:
- //---------------------
+ // Standard align:
if ( (nCol == 0) || (nIndex == 4) )
{
- // Text-Label links oder Summe linksbuendig
+ // Text-Label left or sum left aligned
aPos.X() += FRAME_OFFSET;
}
else
{
- // Zahlen/Datum rechtsbuendig
+ // numbers/dates right aligned
aPos.X() += nRightX;
}
}
- //-------------------------------
aScriptedText.DrawText( aPos );
- //-------------------------------
}
}
#undef FRAME_OFFSET
-//------------------------------------------------------------------------
-
void AutoFmtPreview::DrawStrings()
{
for( size_t nRow = 0; nRow < 5; ++nRow )
@@ -817,9 +764,6 @@ void AutoFmtPreview::DrawStrings()
DrawString( nCol, nRow );
}
-//------------------------------------------------------------------------
-
-
void AutoFmtPreview::DrawBackground()
{
for( size_t nRow = 0; nRow < 5; ++nRow )
@@ -837,9 +781,6 @@ void AutoFmtPreview::DrawBackground()
}
}
-//------------------------------------------------------------------------
-
-
void AutoFmtPreview::PaintCells()
{
// 1) background
@@ -854,9 +795,6 @@ void AutoFmtPreview::PaintCells()
maArray.DrawArray( aVD );
}
-//------------------------------------------------------------------------
-
-
void AutoFmtPreview::Init()
{
SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO );
@@ -866,9 +804,6 @@ void AutoFmtPreview::Init()
CalcLineMap();
}
-//------------------------------------------------------------------------
-
-
void AutoFmtPreview::CalcCellArray( sal_Bool _bFitWidth )
{
maArray.SetXOffset( 2 );
@@ -883,8 +818,6 @@ void AutoFmtPreview::CalcCellArray( sal_Bool _bFitWidth )
aPrvSize.Height() = maArray.GetHeight() + 4;
}
-//------------------------------------------------------------------------
-
inline void lclSetStyleFromBorder( svx::frame::Style& rStyle, const ::editeng::SvxBorderLine* pBorder )
{
rStyle.Set( pBorder, 0.05, 5 );
@@ -917,9 +850,6 @@ void AutoFmtPreview::CalcLineMap()
}
}
-//------------------------------------------------------------------------
-
-
void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData )
{
aCurData = rNewData;
@@ -929,9 +859,6 @@ void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData )
DoPaint( Rectangle( Point(0,0), GetSizePixel() ) );
}
-//------------------------------------------------------------------------
-
-
void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
{
sal_uInt32 nOldDrawMode = aVD.GetDrawMode();
@@ -954,17 +881,13 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
aVD.SetFillColor ( rWinColor );
aVD.SetOutputSizePixel ( aPrvSize );
- //--------------------------------
- // Zellen auf virtual Device malen
- // und Ergebnis sichern
- //--------------------------------
+ // Draw cells on virtual device
+ // and save the result
PaintCells();
thePreview = aVD.GetBitmap( Point(0,0), aPrvSize );
- //--------------------------------------
- // Rahmen malen und Vorschau zentrieren:
- // (virtual Device fuer Fensterausgabe)
- //--------------------------------------
+ // Draw the Frame and center the preview:
+ // (virtual Device for window output)
aVD.SetOutputSizePixel( theWndSize );
oldColor = aVD.GetLineColor();
aVD.SetLineColor();
@@ -974,16 +897,12 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
(theWndSize.Height() - aPrvSize.Height()) / 2 );
aVD.DrawBitmap( aCenterPos, thePreview );
- //----------------------------
- // Ausgabe im Vorschaufenster:
- //----------------------------
+ // Output in the preview window:
DrawBitmap( Point(0,0), aVD.GetBitmap( Point(0,0), theWndSize ) );
aVD.SetDrawMode( nOldDrawMode );
}
-//------------------------------------------------------------------------
-
void AutoFmtPreview::Paint( const Rectangle& rRect )
{
DoPaint( rRect );