summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-03-24 20:34:33 +0100
committerPetr Mladek <pmladek@suse.cz>2013-03-28 13:48:02 +0000
commit91c1161dd9e1fc73c91608f1320197daadd5ea2e (patch)
tree4774d79f10a377e1be958deecc69c96abd211613 /basctl
parent9c06d2bd253ad6a50141a5b51409dbdffcfd9e6d (diff)
Use OUString and sal_Int32 in GetTextWidth()
Change-Id: I0b3cdbe8576300d098027cc98d7dff841d148f18 Reviewed-on: https://gerrit.libreoffice.org/3097 Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx2
-rw-r--r--basctl/source/basicide/linenumberwindow.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index f8962c5f7c31..f8690cc77c4f 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -888,7 +888,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
// nLinepPage is not correct if there's a line break
sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height()/nLineHeight);
- sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ) );
+ sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pPrinter->GetTextWidth( "X" ) );
sal_uLong nParas = GetEditEngine()->GetParagraphCount();
sal_uInt16 nPages = (sal_uInt16) (nParas/nLinespPage+1 );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index bb81726502f5..bc683f65e23f 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -786,7 +786,7 @@ void EditorWindow::InitScrollBars()
{
rModulWindow.GetHScrollBar()->SetVisibleSize( aOutSz.Width() );
rModulWindow.GetHScrollBar()->SetPageSize( aOutSz.Width() * 8 / 10 );
- rModulWindow.GetHScrollBar()->SetLineSize( GetTextWidth( OUString('x') ) );
+ rModulWindow.GetHScrollBar()->SetLineSize( GetTextWidth( "x" ) );
rModulWindow.GetHScrollBar()->SetThumbPos( pEditView->GetStartDocPos().X() );
rModulWindow.GetHScrollBar()->Show();
}
diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx
index 2bd4dbef1351..56d01cfb8a4b 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -41,7 +41,7 @@ LineNumberWindow::LineNumberWindow (Window* pParent, ModulWindow* pModulWindow)
m_nCurYOffset(0)
{
SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor()));
- m_nBaseWidth = GetTextWidth('8');
+ m_nBaseWidth = GetTextWidth("8");
m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
}
@@ -79,7 +79,7 @@ void LineNumberWindow::Paint( const Rectangle& )
// FIXME: it would be best if we could get notified of a font change
// rather than doing that re-calculation at each Paint event
- m_nBaseWidth = GetTextWidth(OUString('8'));
+ m_nBaseWidth = GetTextWidth("8");
// reserve enough for 3 sigit minimum, with a bit to spare for confort
m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;