[Libreoffice-commits] core.git: 4 commits - starmath/source
Thomas Arnhold
thomas at arnhold.org
Wed May 28 05:41:44 PDT 2014
starmath/source/ElementsDockingWindow.cxx | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 3a45897d301c2eb356ef57df0542726afeb8a4ae
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed May 28 14:40:06 2014 +0200
starmath: remove hard-coded value
Change-Id: I58dad585c5de24ebd06ce9bcc64e49e8973850bb
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index aa872d7..97c66e5 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -622,7 +622,7 @@ SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, Sf
{
maElementsControl.SetBorderStyle( WINDOW_BORDER_MONO );
- maElementListBox.SetDropDownLineCount( 10 );
+ maElementListBox.SetDropDownLineCount( SAL_N_ELEMENTS(aCategories) );
for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS(aCategories) ; i++)
{
commit b521c754cba4ef96cf02e0d8913ffcf14fe168d4
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed May 28 14:32:14 2014 +0200
Related fdo#71616: Fix scrolling
Change-Id: I9c57de1179d7db19f1fa2b104017dd379f854749
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 2845b75..aa872d7 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -435,6 +435,7 @@ void SmElementsControl::DoScroll(long nDelta)
aRect.Right() -= mpScroll->GetSizePixel().Width();
Scroll( 0, -nDelta, aRect );
mpScroll->SetPosPixel(aNewPoint);
+ Invalidate();
}
void SmElementsControl::addSeparator()
commit 77594e0a2373da1374e71ddbd05d4919344440cf
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed May 28 13:52:45 2014 +0200
starmath: directly create utf8 OUString
This fixes:
warn:rtl.string:14867:1:sal/rtl/strtmpl.cxx:1269: rtl_uString_newFromLiteral - Found char > 127
Change-Id: I1f868406501c83918fc3c06dd0b68eb1f6604f26
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 2a268f0..2845b75 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -481,7 +481,7 @@ void SmElementsControl::addElements(const sal_uInt16 aElementsArray[][2], sal_uI
addSeparator();
} else {
if (aElementId == RID_NEWLINE)
- addElement(OStringToOUString( "\xe2\x86\xb5", RTL_TEXTENCODING_UTF8 ), SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
+ addElement(OUString( "\xe2\x86\xb5", 3, RTL_TEXTENCODING_UTF8 ), SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
else if (aElementId == RID_SBLANK)
addElement("\"`\"", SM_RESSTR(aElementId), SM_RESSTR(aElementIdHelp));
else if (aElementId == RID_BLANK)
commit 61328e692cf0f843631bdb2bd36daceb4883a948
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed May 28 10:54:36 2014 +0200
starmath: no need to set those on every paint event
Change-Id: Ife149baf15d6f38a2a316e124b78bdb7e1b64967
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 81e9d79..2a268f0 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -220,6 +220,11 @@ SmElementsControl::SmElementsControl(Window *pParent, const ResId& rResId)
, mbVerticalMode(true)
, mpScroll(new ScrollBar(this, WB_VERT))
{
+ SetMapMode( MapMode(MAP_100TH_MM) );
+ SetDrawMode( DRAWMODE_DEFAULT );
+ SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
+ SetDigitLanguage( LANGUAGE_ENGLISH );
+
maFormat.SetBaseSize(PixelToLogic(Size(0, SmPtsTo100th_mm(12))));
mpScroll->SetScrollHdl( LINK(this, SmElementsControl, ScrollHdl) );
@@ -240,11 +245,6 @@ void SmElementsControl::Paint(const Rectangle&)
{
Push();
- SetMapMode( MapMode(MAP_100TH_MM) );
- SetDrawMode( DRAWMODE_DEFAULT );
- SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- SetDigitLanguage( LANGUAGE_ENGLISH );
-
bool bOldVisibleState = mpScroll->IsVisible();
sal_Int32 nScrollbarWidth = bOldVisibleState ? GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
More information about the Libreoffice-commits
mailing list