summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/output2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/output2.cxx')
-rw-r--r--sc/source/ui/view/output2.cxx570
1 files changed, 285 insertions, 285 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index e744023568da..3e8d9a66c2d9 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -81,10 +81,10 @@
#include <math.h>
-//! Autofilter-Breite mit column.cxx zusammenfassen
+//! Autofilter-Breite mit column.cxx zusammenfassen
#define DROPDOWN_BITMAP_SIZE 18
-#define DRAWTEXT_MAX 32767
+#define DRAWTEXT_MAX 32767
const USHORT SC_SHRINKAGAIN_MAX = 7;
@@ -95,82 +95,82 @@ const USHORT SC_SHRINKAGAIN_MAX = 7;
class ScDrawStringsVars
{
- ScOutputData* pOutput; // Verbindung
+ ScOutputData* pOutput; // Verbindung
- const ScPatternAttr* pPattern; // Attribute
- const SfxItemSet* pCondSet; // aus bedingter Formatierung
+ const ScPatternAttr* pPattern; // Attribute
+ const SfxItemSet* pCondSet; // aus bedingter Formatierung
- Font aFont; // aus Attributen erzeugt
- FontMetric aMetric;
- long nAscentPixel; // always pixels
- SvxCellOrientation eAttrOrient;
- SvxCellHorJustify eAttrHorJust;
- SvxCellVerJustify eAttrVerJust;
+ Font aFont; // aus Attributen erzeugt
+ FontMetric aMetric;
+ long nAscentPixel; // always pixels
+ SvxCellOrientation eAttrOrient;
+ SvxCellHorJustify eAttrHorJust;
+ SvxCellVerJustify eAttrVerJust;
SvxCellJustifyMethod eAttrHorJustMethod;
SvxCellJustifyMethod eAttrVerJustMethod;
const SvxMarginItem* pMargin;
- USHORT nIndent;
- BOOL bRotated;
+ USHORT nIndent;
+ BOOL bRotated;
- String aString; // Inhalte
- Size aTextSize;
- long nOriginalWidth;
+ String aString; // Inhalte
+ Size aTextSize;
+ long nOriginalWidth;
long nMaxDigitWidth;
long nSignWidth;
long nDotWidth;
long nExpWidth;
- ScBaseCell* pLastCell;
- ULONG nValueFormat;
- BOOL bLineBreak;
+ ScBaseCell* pLastCell;
+ ULONG nValueFormat;
+ BOOL bLineBreak;
BOOL bRepeat;
BOOL bShrink;
- BOOL bPixelToLogic;
- BOOL bCellContrast;
+ BOOL bPixelToLogic;
+ BOOL bCellContrast;
- Color aBackConfigColor; // used for ScPatternAttr::GetFont calls
- Color aTextConfigColor;
+ Color aBackConfigColor; // used for ScPatternAttr::GetFont calls
+ Color aTextConfigColor;
public:
ScDrawStringsVars(ScOutputData* pData, BOOL bPTL);
~ScDrawStringsVars();
- // SetPattern = ex-SetVars
- // SetPatternSimple: ohne Font
+ // SetPattern = ex-SetVars
+ // SetPatternSimple: ohne Font
- void SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, ScBaseCell* pCell, BYTE nScript );
- void SetPatternSimple( const ScPatternAttr* pNew, const SfxItemSet* pSet );
+ void SetPattern( const ScPatternAttr* pNew, const SfxItemSet* pSet, ScBaseCell* pCell, BYTE nScript );
+ void SetPatternSimple( const ScPatternAttr* pNew, const SfxItemSet* pSet );
- BOOL SetText( ScBaseCell* pCell ); // TRUE -> pOldPattern vergessen
+ BOOL SetText( ScBaseCell* pCell ); // TRUE -> pOldPattern vergessen
void SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth );
- void SetAutoText( const String& rAutoText );
+ void SetAutoText( const String& rAutoText );
- const ScPatternAttr* GetPattern() const { return pPattern; }
- SvxCellOrientation GetOrient() const { return eAttrOrient; }
- SvxCellHorJustify GetHorJust() const { return eAttrHorJust; }
- SvxCellVerJustify GetVerJust() const { return eAttrVerJust; }
+ const ScPatternAttr* GetPattern() const { return pPattern; }
+ SvxCellOrientation GetOrient() const { return eAttrOrient; }
+ SvxCellHorJustify GetHorJust() const { return eAttrHorJust; }
+ SvxCellVerJustify GetVerJust() const { return eAttrVerJust; }
SvxCellJustifyMethod GetHorJustMethod() const { return eAttrHorJustMethod; }
SvxCellJustifyMethod GetVerJustMethod() const { return eAttrVerJustMethod; }
- const SvxMarginItem* GetMargin() const { return pMargin; }
+ const SvxMarginItem* GetMargin() const { return pMargin; }
- USHORT GetLeftTotal() const { return pMargin->GetLeftMargin() + nIndent; }
+ USHORT GetLeftTotal() const { return pMargin->GetLeftMargin() + nIndent; }
- const String& GetString() const { return aString; }
- const Size& GetTextSize() const { return aTextSize; }
- long GetOriginalWidth() const { return nOriginalWidth; }
+ const String& GetString() const { return aString; }
+ const Size& GetTextSize() const { return aTextSize; }
+ long GetOriginalWidth() const { return nOriginalWidth; }
- ULONG GetValueFormat() const { return nValueFormat; }
- BOOL GetLineBreak() const { return bLineBreak; }
+ ULONG GetValueFormat() const { return nValueFormat; }
+ BOOL GetLineBreak() const { return bLineBreak; }
BOOL IsRepeat() const { return bRepeat; }
BOOL IsShrink() const { return bShrink; }
- long GetAscent() const { return nAscentPixel; }
- BOOL IsRotated() const { return bRotated; }
+ long GetAscent() const { return nAscentPixel; }
+ BOOL IsRotated() const { return bRotated; }
void SetShrinkScale( long nScale, BYTE nScript );
- BOOL HasCondHeight() const { return pCondSet && SFX_ITEM_SET ==
+ BOOL HasCondHeight() const { return pCondSet && SFX_ITEM_SET ==
pCondSet->GetItemState( ATTR_FONT_HEIGHT, TRUE ); }
BOOL HasEditCharacters() const;
@@ -187,31 +187,31 @@ private:
//==================================================================
ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) :
- pOutput ( pData ),
- pPattern ( NULL ),
- pCondSet ( NULL ),
- eAttrOrient ( SVX_ORIENTATION_STANDARD ),
+ pOutput ( pData ),
+ pPattern ( NULL ),
+ pCondSet ( NULL ),
+ eAttrOrient ( SVX_ORIENTATION_STANDARD ),
eAttrHorJust( SVX_HOR_JUSTIFY_STANDARD ),
eAttrVerJust( SVX_VER_JUSTIFY_BOTTOM ),
eAttrHorJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
eAttrVerJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
- pMargin ( NULL ),
- nIndent ( 0 ),
- bRotated ( FALSE ),
+ pMargin ( NULL ),
+ nIndent ( 0 ),
+ bRotated ( FALSE ),
nOriginalWidth( 0 ),
nMaxDigitWidth( 0 ),
nSignWidth( 0 ),
nDotWidth( 0 ),
nExpWidth( 0 ),
- pLastCell ( NULL ),
+ pLastCell ( NULL ),
nValueFormat( 0 ),
- bLineBreak ( FALSE ),
+ bLineBreak ( FALSE ),
bRepeat ( FALSE ),
bShrink ( FALSE ),
bPixelToLogic( bPTL )
{
ScModule* pScMod = SC_MOD();
- // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
+ // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
bCellContrast = pOutput->bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
@@ -293,13 +293,13 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
pPattern = pNew;
pCondSet = pSet;
- // pPattern auswerten
+ // pPattern auswerten
OutputDevice* pDev = pOutput->pDev;
OutputDevice* pRefDevice = pOutput->pRefDevice;
OutputDevice* pFmtDevice = pOutput->pFmtDevice;
- // Font
+ // Font
ScAutoFontColorMode eColorMode;
if ( pOutput->bUseStyleColor )
@@ -320,11 +320,11 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
&aBackConfigColor, &aTextConfigColor );
aFont.SetAlign(ALIGN_BASELINE);
- // Orientierung
+ // Orientierung
eAttrOrient = pPattern->GetCellOrientation( pCondSet );
- // alignment
+ // alignment
eAttrHorJust = (SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->GetItem( ATTR_HOR_JUSTIFY, pCondSet )).GetValue();
@@ -337,7 +337,7 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
eAttrHorJustMethod = lcl_GetValue<SvxJustifyMethodItem, SvxCellJustifyMethod>(*pPattern, ATTR_HOR_JUSTIFY_METHOD, pCondSet);
eAttrVerJustMethod = lcl_GetValue<SvxJustifyMethodItem, SvxCellJustifyMethod>(*pPattern, ATTR_VER_JUSTIFY_METHOD, pCondSet);
- // line break
+ // line break
bLineBreak = ((const SfxBoolItem&)pPattern->GetItem( ATTR_LINEBREAK, pCondSet )).GetValue();
@@ -382,7 +382,7 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
}
aFont.SetOrientation( nRot );
- // Syntax-Modus
+ // Syntax-Modus
if (pOutput->bSyntaxMode)
pOutput->SetSyntaxColor( &aFont, pCell );
@@ -394,8 +394,8 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
aMetric = pFmtDevice->GetFontMetric();
//
- // Wenn auf dem Drucker das Leading 0 ist, gibt es Probleme
- // -> Metric vom Bildschirm nehmen (wie EditEngine!)
+ // Wenn auf dem Drucker das Leading 0 ist, gibt es Probleme
+ // -> Metric vom Bildschirm nehmen (wie EditEngine!)
//
if ( pFmtDevice->GetOutDevType() == OUTDEV_PRINTER && aMetric.GetIntLeading() == 0 )
@@ -417,16 +417,16 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
Color aOLineColor( ((const SvxOverlineItem&)pPattern->GetItem( ATTR_FONT_OVERLINE, pCondSet )).GetColor() );
pDev->SetOverlineColor( aOLineColor );
- // Zahlenformat
+ // Zahlenformat
// ULONG nOld = nValueFormat;
nValueFormat = pPattern->GetNumberFormat( pOutput->pDoc->GetFormatTable(), pCondSet );
-/* s.u.
+/* s.u.
if (nValueFormat != nOld)
- pLastCell = NULL; // immer neu formatieren
+ pLastCell = NULL; // immer neu formatieren
*/
- // Raender
+ // Raender
pMargin = (const SvxMarginItem*)&pPattern->GetItem( ATTR_MARGIN, pCondSet );
if ( eAttrHorJust == SVX_HOR_JUSTIFY_LEFT )
@@ -438,8 +438,8 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet*
bShrink = static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue();
- // zumindest die Text-Groesse muss neu geholt werden
- //! unterscheiden, und den Text nicht neu vom Numberformatter holen?
+ // zumindest die Text-Groesse muss neu geholt werden
+ //! unterscheiden, und den Text nicht neu vom Numberformatter holen?
pLastCell = NULL;
}
@@ -450,15 +450,15 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
nSignWidth = 0;
nDotWidth = 0;
nExpWidth = 0;
- // wird gerufen, wenn sich die Font-Variablen nicht aendern (!StringDiffer)
+ // wird gerufen, wenn sich die Font-Variablen nicht aendern (!StringDiffer)
pPattern = pNew;
- pCondSet = pSet; //! noetig ???
+ pCondSet = pSet; //! noetig ???
- // Zahlenformat
+ // Zahlenformat
ULONG nOld = nValueFormat;
-// nValueFormat = pPattern->GetNumberFormat( pFormatter );
+// nValueFormat = pPattern->GetNumberFormat( pFormatter );
const SfxPoolItem* pFormItem;
if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,TRUE,&pFormItem) != SFX_ITEM_SET )
pFormItem = &pPattern->GetItem(ATTR_VALUE_FORMAT);
@@ -470,9 +470,9 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
((SvxLanguageItem*)pLangItem)->GetLanguage() );
if (nValueFormat != nOld)
- pLastCell = NULL; // immer neu formatieren
+ pLastCell = NULL; // immer neu formatieren
- // Raender
+ // Raender
pMargin = (const SvxMarginItem*)&pPattern->GetItem( ATTR_MARGIN, pCondSet );
@@ -486,7 +486,7 @@ void ScDrawStringsVars::SetPatternSimple( const ScPatternAttr* pNew, const SfxIt
bShrink = static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_SHRINKTOFIT, pCondSet )).GetValue();
}
-inline BOOL SameValue( ScBaseCell* pCell, ScBaseCell* pOldCell ) // pCell ist != 0
+inline BOOL SameValue( ScBaseCell* pCell, ScBaseCell* pOldCell ) // pCell ist != 0
{
return pOldCell && pOldCell->GetCellType() == CELLTYPE_VALUE &&
pCell->GetCellType() == CELLTYPE_VALUE &&
@@ -501,7 +501,7 @@ BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell )
{
if ( !SameValue( pCell, pLastCell ) )
{
- pLastCell = pCell; // Zelle merken
+ pLastCell = pCell; // Zelle merken
Color* pColor;
ULONG nFormat = GetValueFormat();
@@ -519,14 +519,14 @@ BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell )
{
OutputDevice* pDev = pOutput->pDev;
aFont.SetColor(*pColor);
- pDev->SetFont( aFont ); // nur fuer Ausgabe
+ pDev->SetFont( aFont ); // nur fuer Ausgabe
bChanged = TRUE;
- pLastCell = NULL; // naechstes Mal wieder hierherkommen
+ pLastCell = NULL; // naechstes Mal wieder hierherkommen
}
TextChanged();
}
- // sonst String/Groesse behalten
+ // sonst String/Groesse behalten
}
else
{
@@ -579,7 +579,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
return;
}
- double fVal = (eType == CELLTYPE_VALUE) ?
+ double fVal = (eType == CELLTYPE_VALUE) ?
static_cast<ScValueCell*>(pCell)->GetValue() : static_cast<ScFormulaCell*>(pCell)->GetValue();
const SvNumberformat* pNumFormat = pOutput->pDoc->GetFormatTable()->GetEntry(nFormat);
@@ -622,7 +622,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScBaseCell* pCell, long nWidth )
if (nDecimalCount || nSignCount || nExpCount)
{
// Re-calculate.
- nNumDigits = static_cast<sal_uInt16>(nWidth / nMaxDigit);
+ nNumDigits = static_cast<sal_uInt16>(nWidth / nMaxDigit);
if (!pNumFormat->GetOutputString(fVal, nNumDigits, aString))
// Failed to get output string. Bail out.
return;
@@ -667,7 +667,7 @@ void ScDrawStringsVars::SetAutoText( const String& rAutoText )
if ( bPixelToLogic )
aTextSize = pRefDevice->LogicToPixel( aTextSize );
- pLastCell = NULL; // derselbe Text kann in der naechsten Zelle wieder passen
+ pLastCell = NULL; // derselbe Text kann in der naechsten Zelle wieder passen
}
long ScDrawStringsVars::GetMaxDigitWidth()
@@ -678,7 +678,7 @@ long ScDrawStringsVars::GetMaxDigitWidth()
sal_Char cZero = '0';
for (sal_Char i = 0; i < 10; ++i)
{
- sal_Char cDigit = cZero + i;
+ sal_Char cDigit = cZero + i;
long n = pOutput->pFmtDevice->GetTextWidth(String(cDigit));
nMaxDigitWidth = ::std::max(nMaxDigitWidth, n);
}
@@ -754,10 +754,10 @@ double ScOutputData::GetStretch()
{
if ( pRefDevice->IsMapMode() )
{
- // #95920# If a non-trivial MapMode is set, its scale is now already
- // taken into account in the OutputDevice's font handling
- // (OutputDevice::ImplNewFont, see #95414#).
- // The old handling below is only needed for pixel output.
+ // #95920# If a non-trivial MapMode is set, its scale is now already
+ // taken into account in the OutputDevice's font handling
+ // (OutputDevice::ImplNewFont, see #95414#).
+ // The old handling below is only needed for pixel output.
return 1.0;
}
@@ -779,7 +779,7 @@ double ScOutputData::GetStretch()
//==================================================================
//
-// output strings
+// output strings
//
void lcl_DoHyperlinkResult( OutputDevice* pDev, const Rectangle& rRect, ScBaseCell* pCell )
@@ -879,7 +879,7 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
bDoMerge = bIsTop;
// weiter solange versteckt
-/* if (!bDoMerge)
+/* if (!bDoMerge)
return FALSE;
*/
@@ -889,7 +889,7 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
BOOL bVOver = pInfo->bVOverlapped;
BOOL bHidden;
- while (bHOver) // nY konstant
+ while (bHOver) // nY konstant
{
--rOverX;
bHidden = pDoc->ColHidden(rOverX, nTab);
@@ -898,14 +898,14 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
if (rOverX >= nX1 && !bHidden)
{
-// rVirtPosX -= pRowInfo[0].pCellInfo[rOverX+1].nWidth;
+// rVirtPosX -= pRowInfo[0].pCellInfo[rOverX+1].nWidth;
bHOver = pRowInfo[nArrY].pCellInfo[rOverX+1].bHOverlapped;
bVOver = pRowInfo[nArrY].pCellInfo[rOverX+1].bVOverlapped;
}
else
{
-// if (!bClipVirt)
-// rVirtPosX -= (long) (pDoc->GetColWidth( rOverX, nTab ) * nPPTX);
+// if (!bClipVirt)
+// rVirtPosX -= (long) (pDoc->GetColWidth( rOverX, nTab ) * nPPTX);
USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
@@ -921,21 +921,21 @@ BOOL ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
return FALSE;
if (nArrY>0)
- --nArrY; // lokale Kopie !
+ --nArrY; // lokale Kopie !
if (rOverX >= nX1 && rOverY >= nY1 &&
!pDoc->ColHidden(rOverX, nTab) &&
!pDoc->RowHidden(rOverY, nTab) &&
pRowInfo[nArrY].nRowNo == rOverY)
{
-// rVirtPosY -= pRowInfo[nArrY].nHeight;
+// rVirtPosY -= pRowInfo[nArrY].nHeight;
bHOver = pRowInfo[nArrY].pCellInfo[rOverX+1].bHOverlapped;
bVOver = pRowInfo[nArrY].pCellInfo[rOverX+1].bVOverlapped;
}
else
{
-// if (!bClipVirt)
-// rVirtPosY -= (long) (pDoc->GetRowHeight( rOverY, nTab ) * nPPTY);
+// if (!bClipVirt)
+// rVirtPosY -= (long) (pDoc->GetRowHeight( rOverY, nTab ) * nPPTY);
USHORT nOverlap = ((ScMergeFlagAttr*)pDoc->GetAttr(
rOverX, rOverY, nTab, ATTR_MERGE_FLAG ))->GetValue();
bHOver = ((nOverlap & SC_MF_HOR) != 0);
@@ -1015,7 +1015,7 @@ inline BOOL StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAtt
else if ( &rpNewPattern->GetItem( ATTR_FONT_RELIEF ) != &rpOldPattern->GetItem( ATTR_FONT_RELIEF ) )
return TRUE;
else if ( &rpNewPattern->GetItem( ATTR_BACKGROUND ) != &rpOldPattern->GetItem( ATTR_BACKGROUND ) )
- return TRUE; // needed with automatic text color
+ return TRUE; // needed with automatic text color
else
{
rpOldPattern = rpNewPattern;
@@ -1059,8 +1059,8 @@ BOOL ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
if ( !bEmpty && ( nX < nX1 || nX > nX2 || !pThisRowInfo ) )
{
- // for the range nX1..nX2 in RowInfo, cell protection attribute is already evaluated
- // into bEmptyCellText in ScDocument::FillInfo / lcl_HidePrint (printfun)
+ // for the range nX1..nX2 in RowInfo, cell protection attribute is already evaluated
+ // into bEmptyCellText in ScDocument::FillInfo / lcl_HidePrint (printfun)
BOOL bIsPrint = ( eType == OUTTYPE_PRINTER );
@@ -1095,9 +1095,9 @@ void ScOutputData::GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTabP, ScBaseCe
BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
{
- // apply the same logic here as in DrawStrings/DrawEdit:
- // Stop at non-empty or merged or overlapped cell,
- // where a note is empty as well as a cell that's hidden by protection settings
+ // apply the same logic here as in DrawStrings/DrawEdit:
+ // Stop at non-empty or merged or overlapped cell,
+ // where a note is empty as well as a cell that's hidden by protection settings
const ScBaseCell* pCell = pDoc->GetCell( ScAddress( nX, nY, nTab ) );
if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE && !IsEmptyCellText( NULL, nX, nY ) )
@@ -1115,15 +1115,15 @@ BOOL ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
return TRUE;
}
-// nX, nArrY: loop variables from DrawStrings / DrawEdit
-// nPosX, nPosY: corresponding positions for nX, nArrY
-// nCellX, nCellY: position of the cell that contains the text
-// nNeeded: Text width, including margin
-// rPattern: cell format at nCellX, nCellY
-// nHorJustify: horizontal alignment (visual) to determine which cells to use for long strings
-// bCellIsValue: if set, don't extend into empty cells
-// bBreak: if set, don't extend, and don't set clip marks (but rLeftClip/rRightClip is set)
-// bOverwrite: if set, also extend into non-empty cells (for rotated text)
+// nX, nArrY: loop variables from DrawStrings / DrawEdit
+// nPosX, nPosY: corresponding positions for nX, nArrY
+// nCellX, nCellY: position of the cell that contains the text
+// nNeeded: Text width, including margin
+// rPattern: cell format at nCellX, nCellY
+// nHorJustify: horizontal alignment (visual) to determine which cells to use for long strings
+// bCellIsValue: if set, don't extend into empty cells
+// bBreak: if set, don't extend, and don't set clip marks (but rLeftClip/rRightClip is set)
+// bOverwrite: if set, also extend into non-empty cells (for rotated text)
// rParam output: various area parameters.
void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY,
@@ -1352,7 +1352,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
BOOL bWasIdleDisabled = pDoc->IsIdleDisabled();
pDoc->DisableIdle( TRUE );
- Size aMinSize = pRefDevice->PixelToLogic(Size(0,100)); // erst darueber wird ausgegeben
+ Size aMinSize = pRefDevice->PixelToLogic(Size(0,100)); // erst darueber wird ausgegeben
// UINT32 nMinHeight = aMinSize.Height() / 200; // 1/2 Pixel
ScDrawStringsVars aVars( this, bPixelToLogic );
@@ -1361,7 +1361,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
long nInitPosX = nScrX;
if ( bLayoutRTL )
- nInitPosX += nMirrorW - 1; // pixels
+ nInitPosX += nMirrorW - 1; // pixels
long nLayoutSign = bLayoutRTL ? -1 : 1;
SCCOL nLastContentCol = MAXCOL;
@@ -1370,7 +1370,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
nLastContentCol - pDoc->GetEmptyLinesInBlock( nX2+1, nY1, nTab, MAXCOL, nY2, nTab, DIR_RIGHT ) );
SCCOL nLoopStartX = nX1;
if ( nX1 > 0 )
- --nLoopStartX; // start before nX1 for rest of long text to the left
+ --nLoopStartX; // start before nX1 for rest of long text to the left
// variables for GetOutputArea
OutputAreaParam aAreaParam;
@@ -1383,7 +1383,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
const SfxItemSet* pOldCondSet = NULL;
BYTE nOldScript = 0;
- // alternative pattern instances in case we need to modify the pattern
+ // alternative pattern instances in case we need to modify the pattern
// before processing the cell value.
::boost::ptr_vector<ScPatternAttr> aAltPatterns;
@@ -1404,13 +1404,13 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
BOOL bEmpty = nX < nX1 || pInfo->bEmptyCellText;
- SCCOL nCellX = nX; // position where the cell really starts
+ SCCOL nCellX = nX; // position where the cell really starts
SCROW nCellY = nY;
BOOL bDoCell = FALSE;
BOOL bNeedEdit = FALSE;
//
- // Part of a merged cell?
+ // Part of a merged cell?
//
BOOL bOverlapped = ( pInfo->bHOverlapped || pInfo->bVOverlapped );
@@ -1418,7 +1418,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
{
bEmpty = TRUE;
- SCCOL nOverX; // start of the merged cells
+ SCCOL nOverX; // start of the merged cells
SCROW nOverY;
BOOL bVisChanged = !pRowInfo[nArrY-1].bChanged;
if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, bVisChanged ))
@@ -1432,7 +1432,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
//
- // Rest of a long text further to the left?
+ // Rest of a long text further to the left?
//
if ( bEmpty && !bMergeEmpty && nX < nX1 && !bOverlapped )
@@ -1451,12 +1451,12 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
//
- // Rest of a long text further to the right?
+ // Rest of a long text further to the right?
//
if ( bEmpty && !bMergeEmpty && nX == nX2 && !bOverlapped )
{
- // don't have to look further than nLastContentCol
+ // don't have to look further than nLastContentCol
SCCOL nTempX=nX;
while (nTempX < nLastContentCol && IsEmptyCellText( pThisRowInfo, nTempX, nY ))
@@ -1472,21 +1472,21 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
//
- // normal visible cell
+ // normal visible cell
//
if (!bEmpty)
bDoCell = TRUE;
//
- // don't output the cell that's being edited
+ // don't output the cell that's being edited
//
if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
bDoCell = FALSE;
//
- // output the cell text
+ // output the cell text
//
ScBaseCell* pCell = NULL;
@@ -1495,7 +1495,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( nCellY == nY && nCellX == nX && nCellX >= nX1 && nCellX <= nX2 )
pCell = pThisRowInfo->pCellInfo[nCellX+1].pCell;
else
- GetVisibleCell( nCellX, nCellY, nTab, pCell ); // get from document
+ GetVisibleCell( nCellX, nCellY, nTab, pCell ); // get from document
if ( !pCell )
bDoCell = FALSE;
else if ( pCell->GetCellType() == CELLTYPE_EDIT )
@@ -1517,13 +1517,13 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
pCondSet = pDoc->GetCondResult( nCellX, nCellY, nTab );
}
}
- else // get from document
+ else // get from document
{
pPattern = pDoc->GetPattern( nCellX, nCellY, nTab );
pCondSet = pDoc->GetCondResult( nCellX, nCellY, nTab );
}
- if (pCell->HasValueData() &&
+ if (pCell->HasValueData() &&
static_cast<const SfxBoolItem&>(
pPattern->GetItem(ATTR_LINEBREAK, pCondSet)).GetValue())
{
@@ -1550,7 +1550,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
nOldScript = nScript;
}
- // use edit engine for rotated, stacked or mixed-script text
+ // use edit engine for rotated, stacked or mixed-script text
if ( aVars.GetOrient() == SVX_ORIENTATION_STACKED ||
aVars.IsRotated() || IsAmbiguousScript(nScript) )
bNeedEdit = TRUE;
@@ -1563,7 +1563,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( aVars.SetText(pCell) )
pOldPattern = NULL;
bNeedEdit = aVars.HasEditCharacters() ||
- (bFormulaCell && ((ScFormulaCell*)pCell)->IsMultilineResult());
+ (bFormulaCell && ((ScFormulaCell*)pCell)->IsMultilineResult());
}
long nTotalMargin = 0;
if (bDoCell && !bNeedEdit)
@@ -1581,14 +1581,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
( bCellIsValue ? SVX_HOR_JUSTIFY_RIGHT : SVX_HOR_JUSTIFY_LEFT );
if ( eOutHorJust == SVX_HOR_JUSTIFY_BLOCK || eOutHorJust == SVX_HOR_JUSTIFY_REPEAT )
- eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented
+ eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented
BOOL bBreak = ( aVars.GetLineBreak() || aVars.GetHorJust() == SVX_HOR_JUSTIFY_BLOCK );
BOOL bRepeat = aVars.IsRepeat() && !bBreak;
BOOL bShrink = aVars.IsShrink() && !bBreak && !bRepeat;
- nTotalMargin =
- static_cast<long>(aVars.GetLeftTotal() * nPPTX) +
+ nTotalMargin =
+ static_cast<long>(aVars.GetLeftTotal() * nPPTX) +
static_cast<long>(aVars.GetMargin()->GetRightMargin() * nPPTX);
nNeededWidth = aVars.GetTextSize().Width() + nTotalMargin;
@@ -1662,7 +1662,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
}
- // use edit engine if automatic line breaks are needed
+ // use edit engine if automatic line breaks are needed
if ( bBreak )
{
if ( aVars.GetOrient() == SVX_ORIENTATION_STANDARD )
@@ -1684,13 +1684,13 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
if (bNeedEdit)
{
- // mark the cell in CellInfo to be drawn in DrawEdit:
- // Cells to the left are marked directly, cells to the
- // right are handled by the flag for nX2
+ // mark the cell in CellInfo to be drawn in DrawEdit:
+ // Cells to the left are marked directly, cells to the
+ // right are handled by the flag for nX2
SCCOL nMarkX = ( nCellX <= nX2 ) ? nCellX : nX2;
RowInfo* pMarkRowInfo = ( nCellY == nY ) ? pThisRowInfo : &pRowInfo[0];
pMarkRowInfo->pCellInfo[nMarkX+1].bEditEngine = TRUE;
- bDoCell = FALSE; // don't draw here
+ bDoCell = FALSE; // don't draw here
}
if ( bDoCell )
{
@@ -1704,12 +1704,12 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( nNeededWidth <= aAreaParam.maClipRect.GetWidth() )
aAreaParam.mbLeftClip = aAreaParam.mbRightClip = FALSE;
- // If the "###" replacement doesn't fit into the cells, no clip marks
- // are shown, as the "###" already denotes too little space.
- // The rectangles from the first GetOutputArea call remain valid.
+ // If the "###" replacement doesn't fit into the cells, no clip marks
+ // are shown, as the "###" already denotes too little space.
+ // The rectangles from the first GetOutputArea call remain valid.
}
- long nJustPosX = aAreaParam.maAlignRect.Left(); // "justified" - effect of alignment will be added
+ long nJustPosX = aAreaParam.maAlignRect.Left(); // "justified" - effect of alignment will be added
long nJustPosY = aAreaParam.maAlignRect.Top();
long nAvailWidth = aAreaParam.maAlignRect.GetWidth();
long nOutHeight = aAreaParam.maAlignRect.GetHeight();
@@ -1722,7 +1722,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
if ( aAreaParam.maClipRect.Right() > nScrX + nScrW )
{
- aAreaParam.maClipRect.Right() = nScrX + nScrW; //! minus one?
+ aAreaParam.maClipRect.Right() = nScrX + nScrW; //! minus one?
aAreaParam.mbRightClip = TRUE;
}
@@ -1741,10 +1741,10 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
}
//
- // horizontalen Platz testen
+ // horizontalen Platz testen
//
- BOOL bRightAdjusted = FALSE; // to correct text width calculation later
+ BOOL bRightAdjusted = FALSE; // to correct text width calculation later
BOOL bNeedEditEngine = FALSE;
if ( !bNeedEditEngine && !bOutside )
{
@@ -1804,8 +1804,8 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( nTestClipHeight > nOutHeight )
{
- // kein vertikales Clipping beim Drucken von Zellen mit
- // optimaler Hoehe, ausser bei Groesse in bedingter Formatierung
+ // kein vertikales Clipping beim Drucken von Zellen mit
+ // optimaler Hoehe, ausser bei Groesse in bedingter Formatierung
if ( eType != OUTTYPE_PRINTER ||
( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
( aVars.HasCondHeight() ) )
@@ -1814,9 +1814,9 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
if ( bHClip || bVClip )
{
- // nur die betroffene Dimension clippen,
- // damit bei nicht-proportionalem Resize nicht alle
- // rechtsbuendigen Zahlen abgeschnitten werden:
+ // nur die betroffene Dimension clippen,
+ // damit bei nicht-proportionalem Resize nicht alle
+ // rechtsbuendigen Zahlen abgeschnitten werden:
if (!bHClip)
{
@@ -1829,8 +1829,8 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
aAreaParam.maClipRect.Bottom() = nScrY+nScrH;
}
- // aClipRect is not used after SetClipRegion/IntersectClipRegion,
- // so it can be modified here
+ // aClipRect is not used after SetClipRegion/IntersectClipRegion,
+ // so it can be modified here
if (bPixelToLogic)
aAreaParam.maClipRect = pRefDevice->PixelToLogic( aAreaParam.maClipRect );
@@ -1869,19 +1869,19 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
Point aDrawTextPos( nJustPosX, nJustPosY );
if ( bPixelToLogic )
{
- // undo text width adjustment in pixels
+ // undo text width adjustment in pixels
if (bRightAdjusted)
aDrawTextPos.X() += aVars.GetTextSize().Width();
aDrawTextPos = pRefDevice->PixelToLogic( aDrawTextPos );
- // redo text width adjustment in logic units
+ // redo text width adjustment in logic units
if (bRightAdjusted)
aDrawTextPos.X() -= aVars.GetOriginalWidth();
}
- // in Metafiles immer DrawTextArray, damit die Positionen mit
- // aufgezeichnet werden (fuer nicht-proportionales Resize):
+ // in Metafiles immer DrawTextArray, damit die Positionen mit
+ // aufgezeichnet werden (fuer nicht-proportionales Resize):
String aString = aVars.GetString();
if (bMetaFile || pFmtDevice != pDev || aZoomX != aZoomY)
@@ -1932,14 +1932,14 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
pDoc->DisableIdle( bWasIdleDisabled );
}
-// -------------------------------------------------------------------------------
+// -------------------------------------------------------------------------------
-void lcl_ClearEdit( EditEngine& rEngine ) // Text und Attribute
+void lcl_ClearEdit( EditEngine& rEngine ) // Text und Attribute
{
rEngine.SetUpdateMode( FALSE );
rEngine.SetText(EMPTY_STRING);
- // keine Para-Attribute uebrigbehalten...
+ // keine Para-Attribute uebrigbehalten...
const SfxItemSet& rPara = rEngine.GetParaAttribs(0);
if (rPara.Count())
rEngine.SetParaAttribs( 0,
@@ -2026,7 +2026,7 @@ long lcl_GetEditSize( EditEngine& rEngine, BOOL bWidth, BOOL bSwap, long nAttrRo
// assuming standard mode, otherwise width isn't used
- double nRealOrient = nAttrRotate * F_PI18000; // 1/100th degrees
+ double nRealOrient = nAttrRotate * F_PI18000; // 1/100th degrees
double nAbsCos = fabs( cos( nRealOrient ) );
double nAbsSin = fabs( sin( nRealOrient ) );
if ( bWidth )
@@ -2283,9 +2283,9 @@ void EditAlignmentParam::setAlignmentItems(ScFieldEditEngine* pEngine, ScBaseCel
}
else
{
- // horizontal alignment now may depend on cell content
- // (for values with number formats with mixed script types)
- // -> always set adjustment
+ // horizontal alignment now may depend on cell content
+ // (for values with number formats with mixed script types)
+ // -> always set adjustment
SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
if (meOrient == SVX_ORIENTATION_STACKED)
@@ -2299,7 +2299,7 @@ void EditAlignmentParam::setAlignmentItems(ScFieldEditEngine* pEngine, ScBaseCel
eSvxAdjust = mbCellIsValue ? SVX_ADJUST_RIGHT : SVX_ADJUST_LEFT;
break;
case SVX_HOR_JUSTIFY_LEFT:
- case SVX_HOR_JUSTIFY_REPEAT: // nicht implementiert
+ case SVX_HOR_JUSTIFY_REPEAT: // nicht implementiert
eSvxAdjust = SVX_ADJUST_LEFT;
break;
case SVX_HOR_JUSTIFY_RIGHT:
@@ -2381,19 +2381,19 @@ bool EditAlignmentParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
- Size aMinSize = pRefDevice->PixelToLogic(Size(0,100)); // erst darueber wird ausgegeben
+ Size aMinSize = pRefDevice->PixelToLogic(Size(0,100)); // erst darueber wird ausgegeben
// UINT32 nMinHeight = aMinSize.Height() / 200; // 1/2 Pixel
ScModule* pScMod = SC_MOD();
sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
- // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
+ // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
BOOL bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ScFieldEditEngine* pEngine = NULL;
BOOL bHyphenatorSet = FALSE;
const ScPatternAttr* pOldPattern = NULL;
- const SfxItemSet* pOldCondSet = NULL;
+ const SfxItemSet* pOldCondSet = NULL;
ScBaseCell* pCell = NULL;
Size aRefOne = pRefDevice->PixelToLogic(Size(1,1));
@@ -2405,32 +2405,32 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
long nLayoutSign = bLayoutRTL ? -1 : 1;
- //! store nLastContentCol as member!
+ //! store nLastContentCol as member!
SCCOL nLastContentCol = MAXCOL;
if ( nX2 < MAXCOL )
nLastContentCol = sal::static_int_cast<SCCOL>(
nLastContentCol - pDoc->GetEmptyLinesInBlock( nX2+1, nY1, nTab, MAXCOL, nY2, nTab, DIR_RIGHT ) );
long nRowPosY = nScrY;
- for (SCSIZE nArrY=0; nArrY+1<nArrCount; nArrY++) // 0 fuer Reste von zusammengefassten
+ for (SCSIZE nArrY=0; nArrY+1<nArrCount; nArrY++) // 0 fuer Reste von zusammengefassten
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
// long nCellHeight = (long) pThisRowInfo->nHeight;
- if (nArrY==1) nRowPosY = nScrY; // vorher wird einzeln berechnet
+ if (nArrY==1) nRowPosY = nScrY; // vorher wird einzeln berechnet
if ( pThisRowInfo->bChanged || nArrY==0 )
{
long nPosX = 0;
- for (SCCOL nX=0; nX<=nX2; nX++) // wegen Ueberhaengen
+ for (SCCOL nX=0; nX<=nX2; nX++) // wegen Ueberhaengen
{
- if (nX==nX1) nPosX = nInitPosX; // positions before nX1 are calculated individually
+ if (nX==nX1) nPosX = nInitPosX; // positions before nX1 are calculated individually
- CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
+ CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
if (pInfo->bEditEngine)
{
SCROW nY = pThisRowInfo->nRowNo;
- SCCOL nCellX = nX; // position where the cell really starts
+ SCCOL nCellX = nX; // position where the cell really starts
SCROW nCellY = nY;
BOOL bDoCell = FALSE;
@@ -2439,7 +2439,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
nPosY = nScrY;
nY = pRowInfo[1].nRowNo;
- SCCOL nOverX; // start of the merged cells
+ SCCOL nOverX; // start of the merged cells
SCROW nOverY;
if (GetMergeOrigin( nX,nY, 1, nOverX,nOverY, TRUE ))
{
@@ -2450,7 +2450,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
else if ( nX == nX2 && !pThisRowInfo->pCellInfo[nX+1].pCell )
{
- // Rest of a long text further to the right?
+ // Rest of a long text further to the right?
SCCOL nTempX=nX;
while (nTempX < nLastContentCol && IsEmptyCellText( pThisRowInfo, nTempX, nY ))
@@ -2484,7 +2484,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
pCondSet = rCellInfo.pConditionSet;
pCell = rCellInfo.pCell;
}
- else // get from document
+ else // get from document
{
pPattern = pDoc->GetPattern( nCellX, nCellY, nTab );
pCondSet = pDoc->GetCondResult( nCellX, nCellY, nTab );
@@ -2498,16 +2498,16 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
BOOL bHidden = FALSE;
//
- // Create EditEngine
+ // Create EditEngine
//
if (!pEngine)
{
- // Ein RefDevice muss auf jeden Fall gesetzt werden,
- // sonst legt sich die EditEngine ein VirtualDevice an!
+ // Ein RefDevice muss auf jeden Fall gesetzt werden,
+ // sonst legt sich die EditEngine ein VirtualDevice an!
pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() );
pEngine->SetUpdateMode( FALSE );
- pEngine->SetRefDevice( pFmtDevice ); // always set
+ pEngine->SetRefDevice( pFmtDevice ); // always set
ULONG nCtrl = pEngine->GetControlWord();
if ( bShowSpellErrors )
nCtrl |= EE_CNTRL_ONLINESPELLING;
@@ -2522,7 +2522,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
(EEHorizontalTextDirection)pDoc->GetEditTextDirection( nTab ) );
}
else
- lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE)
+ lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE)
EditAlignmentParam aAlignParam(pPattern, pCondSet, lcl_SafeIsValue(pCell));
@@ -2543,9 +2543,9 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
if ( aAlignParam.meOrient==SVX_ORIENTATION_STANDARD && nAttrRotate )
{
- //! Flag setzen, um die Zelle in DrawRotated wiederzufinden ?
- //! (oder Flag schon bei DrawBackground, dann hier keine Abfrage)
- bHidden = TRUE; // gedreht wird getrennt ausgegeben
+ //! Flag setzen, um die Zelle in DrawRotated wiederzufinden ?
+ //! (oder Flag schon bei DrawBackground, dann hier keine Abfrage)
+ bHidden = TRUE; // gedreht wird getrennt ausgegeben
}
aAlignParam.mbAsianVertical = (aAlignParam.meOrient == SVX_ORIENTATION_STACKED) &&
@@ -2565,12 +2565,12 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
( aAlignParam.mbCellIsValue ? SVX_HOR_JUSTIFY_RIGHT : SVX_HOR_JUSTIFY_LEFT );
if ( eOutHorJust == SVX_HOR_JUSTIFY_BLOCK || eOutHorJust == SVX_HOR_JUSTIFY_REPEAT )
- eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented
+ eOutHorJust = SVX_HOR_JUSTIFY_LEFT; // repeat is not yet implemented
if (!bHidden)
{
- //! mirror margin values for RTL?
- //! move margin down to after final GetOutputArea call
+ //! mirror margin values for RTL?
+ //! move margin down to after final GetOutputArea call
long nTopM, nLeftM, nBottomM, nRightM;
aAlignParam.calcMargins(nTopM, nLeftM, nBottomM, nRightM, nPPTX, nPPTY);
@@ -2590,15 +2590,15 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
OutputAreaParam aAreaParam;
//
- // Initial page size - large for normal text, cell size for automatic line breaks
+ // Initial page size - large for normal text, cell size for automatic line breaks
//
Size aPaperSize = Size( 1000000, 1000000 );
if (aAlignParam.hasLineBreak())
{
- // call GetOutputArea with nNeeded=0, to get only the cell width
+ // call GetOutputArea with nNeeded=0, to get only the cell width
- //! handle nArrY == 0
+ //! handle nArrY == 0
GetOutputArea( nXForPos, nArrYForPos, nPosX, nPosY, nCellX, nCellY, 0,
*pPattern, sal::static_int_cast<USHORT>(eOutHorJust),
aAlignParam.mbCellIsValue, true, false, aAreaParam );
@@ -2625,7 +2625,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
pEngine->SetPaperSize(aPaperSize);
//
- // Fill the EditEngine (cell attributes and text)
+ // Fill the EditEngine (cell attributes and text)
//
// default alignment for asian vertical mode is top-right
@@ -2652,7 +2652,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( !bHyphenatorSet && ((const SfxBoolItem&)pSet->Get(EE_PARA_HYPHENATE)).GetValue() )
{
- // set hyphenator the first time it is needed
+ // set hyphenator the first time it is needed
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
bHyphenatorSet = TRUE;
@@ -2667,7 +2667,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
aAlignParam.setAlignmentItems(pEngine, pCell);
- // Read content from cell
+ // Read content from cell
BOOL bWrapFields = FALSE;
if (pCell)
@@ -2683,13 +2683,13 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( aAlignParam.mbBreak && !aAlignParam.mbAsianVertical && pData->HasField() )
{
- // Fields aren't wrapped, so clipping is enabled to prevent
- // a field from being drawn beyond the cell size
+ // Fields aren't wrapped, so clipping is enabled to prevent
+ // a field from being drawn beyond the cell size
bWrapFields = TRUE;
}
}
- else
+ else
{
DBG_ERROR("pData == 0");
}
@@ -2715,17 +2715,17 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( bSyntaxMode )
SetEditSyntaxColor( *pEngine, pCell );
else if ( bUseStyleColor && bForceAutoColor )
- lcl_SetEditColor( *pEngine, COL_AUTO ); //! or have a flag at EditEngine
+ lcl_SetEditColor( *pEngine, COL_AUTO ); //! or have a flag at EditEngine
}
else
{
DBG_ERROR("pCell == NULL");
}
- pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight
+ pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight
//
- // Get final output area using the calculated width
+ // Get final output area using the calculated width
//
long nEngineWidth, nEngineHeight;
@@ -2802,7 +2802,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
nNeededPixel = nEngineWidth;
nNeededPixel += nLeftM + nRightM;
- // No clip marks if "###" doesn't fit (same as in DrawStrings)
+ // No clip marks if "###" doesn't fit (same as in DrawStrings)
}
if ( eOutHorJust != SVX_HOR_JUSTIFY_LEFT && aAlignParam.meOrient == SVX_ORIENTATION_STANDARD )
@@ -2823,9 +2823,9 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( aAlignParam.mbBreak || aAlignParam.meOrient != SVX_ORIENTATION_STANDARD || aAlignParam.mbAsianVertical )
{
- // text with automatic breaks is aligned only within the
- // edit engine's paper size, the output of the whole area
- // is always left-aligned
+ // text with automatic breaks is aligned only within the
+ // edit engine's paper size, the output of the whole area
+ // is always left-aligned
nStartX += nLeftM;
if (aAlignParam.meOrient == SVX_ORIENTATION_TOPBOTTOM && aAlignParam.meHorJust == SVX_HOR_JUSTIFY_BLOCK)
@@ -2849,7 +2849,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
}
if ( aAreaParam.maClipRect.Right() > nScrX + nScrW )
{
- aAreaParam.maClipRect.Right() = nScrX + nScrW; //! minus one?
+ aAreaParam.maClipRect.Right() = nScrX + nScrW; //! minus one?
aAreaParam.mbRightClip = true;
}
@@ -2860,7 +2860,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( bWrapFields )
{
- // Fields in a cell with automatic breaks: clip to cell width
+ // Fields in a cell with automatic breaks: clip to cell width
bClip = TRUE;
}
@@ -2875,7 +2875,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
bClip = TRUE;
}
- Size aCellSize; // output area, excluding margins, in logical units
+ Size aCellSize; // output area, excluding margins, in logical units
if (bPixelToLogic)
aCellSize = pRefDevice->PixelToLogic( Size( nOutWidth, nOutHeight ) );
else
@@ -2887,9 +2887,9 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
(ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
- // Don't clip for text height when printing rows with optimal height,
- // except when font size is from conditional formatting.
- //! Allow clipping when vertically merged?
+ // Don't clip for text height when printing rows with optimal height,
+ // except when font size is from conditional formatting.
+ //! Allow clipping when vertically merged?
if ( eType != OUTTYPE_PRINTER ||
( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
( pCondSet && SFX_ITEM_SET ==
@@ -2898,12 +2898,12 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
else
bSimClip = TRUE;
- // Show clip marks if height is at least 5pt too small and
- // there are several lines of text.
- // Not for asian vertical text, because that would interfere
- // with the default right position of the text.
- // Only with automatic line breaks, to avoid having to find
- // the cells with the horizontal end of the text again.
+ // Show clip marks if height is at least 5pt too small and
+ // there are several lines of text.
+ // Not for asian vertical text, because that would interfere
+ // with the default right position of the text.
+ // Only with automatic line breaks, to avoid having to find
+ // the cells with the horizontal end of the text again.
if ( nEngineHeight - aCellSize.Height() > 100 &&
( aAlignParam.mbBreak || aAlignParam.meOrient == SVX_ORIENTATION_STACKED ) &&
!aAlignParam.mbAsianVertical && bMarkClipped &&
@@ -2912,14 +2912,14 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
CellInfo* pClipMarkCell = NULL;
if ( bMerged )
{
- // anywhere in the merged area...
+ // anywhere in the merged area...
SCCOL nClipX = ( nX < nX1 ) ? nX1 : nX;
pClipMarkCell = &pRowInfo[(nArrY != 0) ? nArrY : 1].pCellInfo[nClipX+1];
}
else
pClipMarkCell = &pThisRowInfo->pCellInfo[nX+1];
- pClipMarkCell->nClipMark |= SC_CLIPMARK_RIGHT; //! also allow left?
+ pClipMarkCell->nClipMark |= SC_CLIPMARK_RIGHT; //! also allow left?
bAnyClipped = TRUE;
long nMarkPixel = (long)( SC_CLIPMARK_SIZE * nPPTX );
@@ -2938,7 +2938,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
else
aLogicClip = aAreaParam.maClipRect;
- if (bClip) // bei bSimClip nur aClipRect initialisieren
+ if (bClip) // bei bSimClip nur aClipRect initialisieren
{
if (bMetaFile)
{
@@ -2960,7 +2960,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
long nAvailWidth = aCellSize.Width();
// space for AutoFilter is already handled in GetOutputArea
- // horizontal alignment
+ // horizontal alignment
if (aAlignParam.meOrient==SVX_ORIENTATION_STANDARD && !aAlignParam.mbAsianVertical)
{
@@ -2998,7 +2998,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if (aAlignParam.meVerJust==SVX_VER_JUSTIFY_BOTTOM ||
aAlignParam.meVerJust==SVX_VER_JUSTIFY_STANDARD)
{
- //! if pRefDevice != pFmtDevice, keep heights in logic units,
+ //! if pRefDevice != pFmtDevice, keep heights in logic units,
//! only converting margin?
if (bPixelToLogic)
@@ -3019,7 +3019,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
else
aLogicStart.Y() += nTopM + (aCellSize.Height() - nEngineHeight) / 2;
}
- else // top
+ else // top
{
if (bPixelToLogic)
aLogicStart.Y() += pRefDevice->PixelToLogic(Size(0,nTopM)).Height();
@@ -3095,9 +3095,9 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( pEngine->IsRightToLeft( 0 ) )
{
- // For right-to-left, EditEngine always calculates its lines
- // beginning from the right edge, but EditLine::nStartPosX is
- // of USHORT type, so the PaperSize must be limited to USHRT_MAX.
+ // For right-to-left, EditEngine always calculates its lines
+ // beginning from the right edge, but EditLine::nStartPosX is
+ // of USHORT type, so the PaperSize must be limited to USHRT_MAX.
Size aLogicPaper = pEngine->GetPaperSize();
if ( aLogicPaper.Width() > USHRT_MAX )
{
@@ -3111,8 +3111,8 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
if ( bSimClip && !nOriVal && !aAlignParam.mbAsianVertical )
{
- // kein hartes Clipping, aber nur die betroffenen
- // Zeilen ausgeben
+ // kein hartes Clipping, aber nur die betroffenen
+ // Zeilen ausgeben
Point aDocStart = aLogicClip.TopLeft();
aDocStart -= aLogicStart;
@@ -3122,8 +3122,8 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{
if (aAlignParam.mbAsianVertical)
{
- // with SetVertical, the start position is top left of
- // the whole output area, not the text itself
+ // with SetVertical, the start position is top left of
+ // the whole output area, not the text itself
aLogicStart.X() -= pEngine->GetPaperSize().Width();
}
pEngine->Draw( pDev, aLogicStart, nOriVal );
@@ -3173,14 +3173,14 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
delete pEngine;
if (bAnyRotated)
- DrawRotated(bPixelToLogic); //! von aussen rufen ?
+ DrawRotated(bPixelToLogic); //! von aussen rufen ?
}
-// -------------------------------------------------------------------------------
+// -------------------------------------------------------------------------------
void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
- //! nRotMax speichern
+ //! nRotMax speichern
SCCOL nRotMax = nX2;
for (SCSIZE nRotY=0; nRotY<nArrCount; nRotY++)
if (pRowInfo[nRotY].nRotMaxCol != SC_ROTMAX_NONE && pRowInfo[nRotY].nRotMaxCol > nRotMax)
@@ -3189,16 +3189,16 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
ScModule* pScMod = SC_MOD();
sal_Int32 nConfBackColor = pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
- // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
+ // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
BOOL bCellContrast = bUseStyleColor &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
ScFieldEditEngine* pEngine = NULL;
BOOL bHyphenatorSet = FALSE;
const ScPatternAttr* pPattern;
- const SfxItemSet* pCondSet;
+ const SfxItemSet* pCondSet;
const ScPatternAttr* pOldPattern = NULL;
- const SfxItemSet* pOldCondSet = NULL;
+ const SfxItemSet* pOldCondSet = NULL;
ScBaseCell* pCell = NULL;
long nInitPosX = nScrX;
@@ -3209,18 +3209,18 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
long nLayoutSign = bLayoutRTL ? -1 : 1;
long nRowPosY = nScrY;
- for (SCSIZE nArrY=0; nArrY+1<nArrCount; nArrY++) // 0 fuer Reste von zusammengefassten
+ for (SCSIZE nArrY=0; nArrY+1<nArrCount; nArrY++) // 0 fuer Reste von zusammengefassten
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
long nCellHeight = (long) pThisRowInfo->nHeight;
- if (nArrY==1) nRowPosY = nScrY; // vorher wird einzeln berechnet
+ if (nArrY==1) nRowPosY = nScrY; // vorher wird einzeln berechnet
if ( ( pThisRowInfo->bChanged || nArrY==0 ) && pThisRowInfo->nRotMaxCol != SC_ROTMAX_NONE )
{
long nPosX = 0;
for (SCCOL nX=0; nX<=nRotMax; nX++)
{
- if (nX==nX1) nPosX = nInitPosX; // positions before nX1 are calculated individually
+ if (nX==nX1) nPosX = nInitPosX; // positions before nX1 are calculated individually
CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+1];
if ( pInfo->nRotateDir != SC_ROTDIR_NONE )
@@ -3236,11 +3236,11 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
if (!pEngine)
{
- // Ein RefDevice muss auf jeden Fall gesetzt werden,
- // sonst legt sich die EditEngine ein VirtualDevice an!
+ // Ein RefDevice muss auf jeden Fall gesetzt werden,
+ // sonst legt sich die EditEngine ein VirtualDevice an!
pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() );
pEngine->SetUpdateMode( FALSE );
- pEngine->SetRefDevice( pFmtDevice ); // always set
+ pEngine->SetRefDevice( pFmtDevice ); // always set
ULONG nCtrl = pEngine->GetControlWord();
if ( bShowSpellErrors )
nCtrl |= EE_CNTRL_ONLINESPELLING;
@@ -3255,12 +3255,12 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
(EEHorizontalTextDirection)pDoc->GetEditTextDirection( nTab ) );
}
else
- lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE)
+ lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE)
long nPosY = nRowPosY;
BOOL bVisChanged = FALSE;
- //! Rest von zusammengefasster Zelle weiter oben funktioniert nicht!
+ //! Rest von zusammengefasster Zelle weiter oben funktioniert nicht!
BOOL bFromDoc = FALSE;
pPattern = pInfo->pPatternAttr;
@@ -3278,7 +3278,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
GetVisibleCell( nX, nY, nTab, pCell );
if ( !pCell || IsEmptyCellText( pThisRowInfo, nX, nY ) )
- bHidden = TRUE; // nRotateDir is also set without a cell
+ bHidden = TRUE; // nRotateDir is also set without a cell
long nCellWidth = (long) pRowInfo[0].pCellInfo[nX+1].nWidth;
@@ -3314,7 +3314,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
}
long nCellStartX = nStartX;
- // Ersatzdarstellung fuer zu kleinen Text weggelassen
+ // Ersatzdarstellung fuer zu kleinen Text weggelassen
if (!bHidden)
{
@@ -3325,7 +3325,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
else
nOutHeight = (long) ( pDoc->GetRowHeight(nY,nTab) * nPPTY );
- if ( bMerged ) // Zusammengefasst
+ if ( bMerged ) // Zusammengefasst
{
SCCOL nCountX = pMerge->GetColMerge();
for (SCCOL i=1; i<nCountX; i++)
@@ -3365,7 +3365,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if ( !bHyphenatorSet && ((const SfxBoolItem&)pSet->Get(EE_PARA_HYPHENATE)).GetValue() )
{
- // set hyphenator the first time it is needed
+ // set hyphenator the first time it is needed
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
bHyphenatorSet = TRUE;
@@ -3378,9 +3378,9 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
pEngine->SetBackgroundColor( aBackCol );
}
- // Raender
+ // Raender
- //! Position und Papersize auf EditUtil umstellen !!!
+ //! Position und Papersize auf EditUtil umstellen !!!
const SvxMarginItem* pMargin = (const SvxMarginItem*)
&pPattern->GetItem(ATTR_MARGIN, pCondSet);
@@ -3389,7 +3389,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
nIndent = ((const SfxUInt16Item&)pPattern->
GetItem(ATTR_INDENT, pCondSet)).GetValue();
- long nTotalHeight = nOutHeight; // ohne Rand abzuziehen
+ long nTotalHeight = nOutHeight; // ohne Rand abzuziehen
if ( bPixelToLogic )
nTotalHeight = pRefDevice->PixelToLogic(Size(0,nTotalHeight)).Height();
@@ -3402,7 +3402,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
nOutWidth -= nLeftM + nRightM;
nOutHeight -= nTopM + nBottomM;
- // Rotation schon hier, um bei Umbruch auch PaperSize anzupassen
+ // Rotation schon hier, um bei Umbruch auch PaperSize anzupassen
long nAttrRotate = 0;
double nSin = 0.0;
double nCos = 1.0;
@@ -3417,12 +3417,12 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet)).GetValue();
if ( nAttrRotate == 18000 )
- eRotMode = SVX_ROTATE_MODE_STANDARD; // keinen Ueberlauf
+ eRotMode = SVX_ROTATE_MODE_STANDARD; // keinen Ueberlauf
if ( bLayoutRTL )
nAttrRotate = -nAttrRotate;
- double nRealOrient = nAttrRotate * F_PI18000; // 1/100 Grad
+ double nRealOrient = nAttrRotate * F_PI18000; // 1/100 Grad
nCos = cos( nRealOrient );
nSin = sin( nRealOrient );
}
@@ -3430,15 +3430,15 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
Size aPaperSize = Size( 1000000, 1000000 );
if (eOrient==SVX_ORIENTATION_STACKED)
- aPaperSize.Width() = nOutWidth; // zum Zentrieren
+ aPaperSize.Width() = nOutWidth; // zum Zentrieren
else if (bBreak)
{
if (nAttrRotate)
{
- //! richtige PaperSize fuer Umbruch haengt von der Zeilenzahl
- //! ab, solange die Zeilen nicht einzeln versetzt ausgegeben
- //! werden koennen -> darum unbegrenzt, also kein Umbruch.
- //! Mit versetzten Zeilen waere das folgende richtig:
+ //! richtige PaperSize fuer Umbruch haengt von der Zeilenzahl
+ //! ab, solange die Zeilen nicht einzeln versetzt ausgegeben
+ //! werden koennen -> darum unbegrenzt, also kein Umbruch.
+ //! Mit versetzten Zeilen waere das folgende richtig:
aPaperSize.Width() = (long)(nOutHeight / fabs(nSin));
}
else if (eOrient == SVX_ORIENTATION_STANDARD)
@@ -3449,9 +3449,9 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if (bPixelToLogic)
pEngine->SetPaperSize(pRefDevice->PixelToLogic(aPaperSize));
else
- pEngine->SetPaperSize(aPaperSize); // Scale ist immer 1
+ pEngine->SetPaperSize(aPaperSize); // Scale ist immer 1
- // Daten aus Zelle lesen
+ // Daten aus Zelle lesen
if (pCell)
{
@@ -3488,14 +3488,14 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if ( bSyntaxMode )
SetEditSyntaxColor( *pEngine, pCell );
else if ( bUseStyleColor && bForceAutoColor )
- lcl_SetEditColor( *pEngine, COL_AUTO ); //! or have a flag at EditEngine
+ lcl_SetEditColor( *pEngine, COL_AUTO ); //! or have a flag at EditEngine
}
else
{
DBG_ERROR("pCell == NULL");
}
- pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight
+ pEngine->SetUpdateMode( TRUE ); // after SetText, before CalcTextWidth/GetTextHeight
long nEngineWidth = (long) pEngine->CalcTextWidth();
long nEngineHeight = pEngine->GetTextHeight();
@@ -3534,7 +3534,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if (bPixelToLogic)
pEngine->SetPaperSize(pRefDevice->PixelToLogic(aPaperSize));
else
- pEngine->SetPaperSize(aPaperSize); // Scale ist immer 1
+ pEngine->SetPaperSize(aPaperSize); // Scale ist immer 1
//pEngine->QuickFormatDoc( TRUE );
nEngineWidth = (long) pEngine->CalcTextWidth();
nEngineHeight = pEngine->GetTextHeight();
@@ -3545,7 +3545,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
long nRealWidth = nEngineWidth;
long nRealHeight = nEngineHeight;
- // wenn gedreht, Groesse anpassen
+ // wenn gedreht, Groesse anpassen
if (nAttrRotate)
{
double nAbsCos = fabs( nCos );
@@ -3556,29 +3556,29 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
nRealHeight * nAbsSin );
else
nEngineWidth = (long) ( nRealHeight / nAbsSin );
- //! begrenzen !!!
+ //! begrenzen !!!
nEngineHeight = (long) ( nRealHeight * nAbsCos +
nRealWidth * nAbsSin );
}
- if (!nAttrRotate) // hier nur gedrehter Text
- bHidden = TRUE; //! vorher abfragen !!!
+ if (!nAttrRotate) // hier nur gedrehter Text
+ bHidden = TRUE; //! vorher abfragen !!!
- //! weglassen, was nicht hereinragt
+ //! weglassen, was nicht hereinragt
if (!bHidden)
{
BOOL bClip = FALSE;
Size aClipSize = Size( nScrX+nScrW-nStartX, nScrY+nScrH-nStartY );
- // weiterschreiben
+ // weiterschreiben
Size aCellSize;
if (bPixelToLogic)
aCellSize = pRefDevice->PixelToLogic( Size( nOutWidth, nOutHeight ) );
else
- aCellSize = Size( nOutWidth, nOutHeight ); // Scale ist 1
+ aCellSize = Size( nOutWidth, nOutHeight ); // Scale ist 1
long nGridWidth = nEngineWidth;
BOOL bNegative = FALSE;
@@ -3600,7 +3600,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
SvxCellHorJustify eOutHorJust = eHorJust;
if ( eRotMode != SVX_ROTATE_MODE_STANDARD )
eOutHorJust = bNegative ? SVX_HOR_JUSTIFY_RIGHT : SVX_HOR_JUSTIFY_LEFT;
- long nNeededWidth = nGridWidth; // in pixel for GetOutputArea
+ long nNeededWidth = nGridWidth; // in pixel for GetOutputArea
if ( bPixelToLogic )
nNeededWidth = pRefDevice->LogicToPixel(Size(nNeededWidth,0)).Width();
@@ -3645,7 +3645,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
{
//! Clipping unnoetig, wenn links am Fenster
- bClip = TRUE; // nur Rest ausgeben!
+ bClip = TRUE; // nur Rest ausgeben!
if (nStartX<nScrX)
{
long nDif = nScrX - nStartX;
@@ -3666,15 +3666,15 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
}
}
- bClip = TRUE; // always clip at the window/page border
+ bClip = TRUE; // always clip at the window/page border
//Rectangle aClipRect;
if (bClip)
{
if ( nAttrRotate /* && eRotMode != SVX_ROTATE_MODE_STANDARD */ )
{
- // gedrehten, ausgerichteten Text nur an den
- // Seitengrenzen clippen
+ // gedrehten, ausgerichteten Text nur an den
+ // Seitengrenzen clippen
nClipStartX = nScrX;
aClipSize.Width() = nScrW;
}
@@ -3684,7 +3684,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
Point(nClipStartX,nClipStartY), aClipSize ) );
else
aAreaParam.maClipRect = Rectangle(Point(nClipStartX, nClipStartY),
- aClipSize ); // Scale = 1
+ aClipSize ); // Scale = 1
if (bMetaFile)
{
@@ -3716,7 +3716,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if (nAvailWidth<nComp) nAvailWidth=nComp;
}
- // horizontale Ausrichtung
+ // horizontale Ausrichtung
if (eOrient==SVX_ORIENTATION_STANDARD && !nAttrRotate)
{
@@ -3742,7 +3742,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
}
else
{
- // bei gedrehtem Text ist Standard zentriert
+ // bei gedrehtem Text ist Standard zentriert
if (eHorJust==SVX_HOR_JUSTIFY_RIGHT)
aLogicStart.X() += nAvailWidth - nEngineWidth;
else if (eHorJust==SVX_HOR_JUSTIFY_CENTER ||
@@ -3801,7 +3801,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
double nAddY = 0.0;
if ( nCos > 0.0 && eRotMode != SVX_ROTATE_MODE_STANDARD )
{
- //! begrenzen !!!
+ //! begrenzen !!!
double nH = nRealHeight * nCos;
nAddX += nH * ( nCos / fabs(nSin) );
}
@@ -3816,7 +3816,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if ( eRotMode != SVX_ROTATE_MODE_STANDARD )
{
- //! begrenzen !!!
+ //! begrenzen !!!
double nSkew = nTotalHeight * nCos / fabs(nSin);
if ( eRotMode == SVX_ROTATE_MODE_CENTER )
nAddX -= nSkew * 0.5;
@@ -3832,7 +3832,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
if ( nSin > 0.0 )
nUp = aCellSize.Height() - nEngineHeight;
}
- else // BOTTOM / STANDARD
+ else // BOTTOM / STANDARD
{
if ( nSin < 0.0 )
nUp = aCellSize.Height() - nEngineHeight;
@@ -3845,13 +3845,13 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic)
aLogicStart.Y() += (long) nAddY;
}
- // bSimClip is not used here (because nOriVal is set)
+ // bSimClip is not used here (because nOriVal is set)
if ( pEngine->IsRightToLeft( 0 ) )
{
- // For right-to-left, EditEngine always calculates its lines
- // beginning from the right edge, but EditLine::nStartPosX is
- // of USHORT type, so the PaperSize must be limited to USHRT_MAX.
+ // For right-to-left, EditEngine always calculates its lines
+ // beginning from the right edge, but EditLine::nStartPosX is
+ // of USHORT type, so the PaperSize must be limited to USHRT_MAX.
Size aLogicPaper = pEngine->GetPaperSize();
if ( aLogicPaper.Width() > USHRT_MAX )
{