summaryrefslogtreecommitdiffstats
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/cellform.cxx6
-rw-r--r--sc/source/ui/view/output2.cxx6
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index 5fdd0d2f1035..93f71fbcb090 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -63,7 +63,7 @@ void ScCellFormat::GetString( ScBaseCell* pCell, sal_uLong nFormat, rtl::OUStrin
case CELLTYPE_STRING:
{
rtl::OUString aCellString = ((ScStringCell*)pCell)->GetString();
- rFormatter.GetOutputString( aCellString, nFormat, rString, ppColor );
+ rFormatter.GetOutputString( aCellString, nFormat, rString, ppColor, bUseStarFormat );
}
break;
case CELLTYPE_EDIT:
@@ -135,12 +135,12 @@ void ScCellFormat::GetString( ScBaseCell* pCell, sal_uLong nFormat, rtl::OUStrin
if ( !bNullVals && fValue == 0.0 )
rString = rtl::OUString();
else
- rFormatter.GetOutputString( fValue, nFormat, rString, ppColor );
+ rFormatter.GetOutputString( fValue, nFormat, rString, ppColor, bUseStarFormat );
}
else
{
rtl::OUString aCellString = pFCell->GetString();
- rFormatter.GetOutputString( aCellString, nFormat, rString, ppColor );
+ rFormatter.GetOutputString( aCellString, nFormat, rString, ppColor, bUseStarFormat );
}
}
}
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index d4f2f7e28e14..956bf686336a 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -508,8 +508,7 @@ sal_Bool ScDrawStringsVars::SetText( ScBaseCell* pCell )
nPos = aString.Search( 0x1B );
if ( nPos != STRING_NOTFOUND )
{
- nPos = nPos - 1;
- nChar = aString.GetChar( nPos );
+ nChar = aString.GetChar( nPos + 1 );
// delete placeholder and char to repeat
aString.Erase( nPos, 2 );
}
@@ -553,10 +552,11 @@ void ScDrawStringsVars::SetHashText()
void ScDrawStringsVars::RepeatToFill( long colWidth )
{
- if ( nPos == STRING_NOTFOUND || nPos >= aString.Len() )
+ if ( nPos == STRING_NOTFOUND || nPos > aString.Len() )
return;
long charWidth = pOutput->pFmtDevice->GetTextWidth(rtl::OUString(nChar));
+ if ( charWidth < 1) return;
if (bPixelToLogic)
colWidth = pOutput->mpRefDevice->PixelToLogic(Size(colWidth,0)).Width();
// Are there restrictions on the cell type we should filter out here ?