[Libreoffice-commits] core.git: 2 commits - canvas/source svtools/inc svtools/source

Caolán McNamara caolanm at redhat.com
Wed Feb 20 16:29:37 PST 2013


 canvas/source/directx/dx_canvas.cxx |    2 +-
 svtools/inc/svtools/calendar.hxx    |    6 +++---
 svtools/source/control/calendar.cxx |   13 ++++---------
 3 files changed, 8 insertions(+), 13 deletions(-)

New commits:
commit 0a967d4cb4468785ed3d302104642353b93232f2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 21 00:28:14 2013 +0000

    fix win build
    
    Change-Id: I42506c15f62329fb2f5733f0c34e4bb1b4d27f13

diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index 602224b..5a256e9 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -96,7 +96,7 @@ namespace dxcanvas
 
         const SystemGraphicsData* pSysData=reinterpret_cast<const SystemGraphicsData*>(aSeq.getConstArray());
         if( !pSysData || !pSysData->hDC )
-            throw lang::NoSupportException( "Passed SystemGraphicsData or HDC invalid!" ), NULL);
+            throw lang::NoSupportException("Passed SystemGraphicsData or HDC invalid!", NULL);
 
         // setup helper
         maDeviceHelper.init( pSysData->hDC,
commit 09e93552bef88d0842621a7c2e48684a10075df1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 21 00:24:19 2013 +0000

    XubString->OUString
    
    Change-Id: Ie110963f0b54bd2235d088a886db3f16e397bd86

diff --git a/svtools/inc/svtools/calendar.hxx b/svtools/inc/svtools/calendar.hxx
index 778f374..2c41ae7 100644
--- a/svtools/inc/svtools/calendar.hxx
+++ b/svtools/inc/svtools/calendar.hxx
@@ -162,9 +162,9 @@ private:
     IntDateSet*     mpSelectTable;
     IntDateSet*     mpOldSelectTable;
     IntDateSet*     mpRestoreSelectTable;
-    XubString*      mpDayText[31];
-    XubString       maDayText;
-    XubString       maWeekText;
+    OUString        maDayTexts[31];
+    OUString        maDayText;
+    OUString        maWeekText;
     CalendarWrapper maCalendarWrapper;
     Rectangle       maPrevRect;
     Rectangle       maNextRect;
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 83955ae..529029e 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -218,7 +218,7 @@ void Calendar::ImplInit( WinBits nWinStyle )
 
     // Tagestexte anlegen
     for (sal_Int32 i = 0; i < 31; ++i)
-        mpDayText[i] = new String(OUString::valueOf(i+1));
+        maDayTexts[i] = OUString::valueOf(i+1);
 
     maDragScrollTimer.SetTimeoutHdl( STATIC_LINK( this, Calendar, ScrollHdl ) );
     maDragScrollTimer.SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() );
@@ -264,13 +264,8 @@ Calendar::~Calendar()
     delete mpSundayColor;
 
     delete mpSelectTable;
-    if ( mpOldSelectTable )
-        delete mpOldSelectTable;
-    if ( mpRestoreSelectTable )
-        delete mpRestoreSelectTable;
-
-    for ( sal_uInt16 i = 0; i < 31; i++ )
-        delete mpDayText[i];
+    delete mpOldSelectTable;
+    delete mpRestoreSelectTable;
 }
 
 // -----------------------------------------------------------------------
@@ -715,7 +710,7 @@ void Calendar::ImplDrawDate( long nX, long nY,
                              sal_Bool bBack, sal_Bool bOther, sal_uLong nToday )
 {
     Color*          pTextColor = NULL;
-    const String&   rDay = *(mpDayText[nDay-1]);
+    const OUString& rDay = maDayTexts[nDay-1];
     Rectangle       aDateRect( nX, nY, nX+mnDayWidth-1, nY+mnDayHeight-1 );
 
     sal_Bool bSel = sal_False;


More information about the Libreoffice-commits mailing list