[Libreoffice-commits] core.git: 5 commits - basic/source oox/source sc/source slideshow/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Tue Feb 11 16:02:07 PST 2014


 basic/source/comp/token.cxx                                            |    6 ++
 oox/source/export/chartexport.cxx                                      |   17 +++---
 sc/source/filter/oox/sheetdatacontext.cxx                              |    5 +
 slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx |   26 +++++-----
 4 files changed, 32 insertions(+), 22 deletions(-)

New commits:
commit f0d232f7b78edc3a0acff6d2beee97ff8bb2bd94
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Wed Feb 12 00:39:13 2014 +0100

    prevent invalid OOXML chart files
    
    Change-Id: I2ccf988a26e5c69f4f14547cfea7cb4fb574b317

diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 72afb08..ed5ea8b 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2390,7 +2390,7 @@ void ChartExport::_exportAxis(
     }
 
     sal_Bool bDisplayUnits = sal_False;
-    if(GetProperty( xAxisProp, "DisplayUnits" ) )
+    if( nAxisType == XML_valAx && GetProperty( xAxisProp, "DisplayUnits" ) )
     {
         mAny >>= bDisplayUnits;
         if(bDisplayUnits)
commit a67f56f78c52161b3934d61848ab9388f75a57a1
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Wed Feb 12 00:32:34 2014 +0100

    until we support custUnit make sure that all files are valid
    
    Change-Id: I759a4cc97e2a2adf71322d2aa18fdb11873a538e

diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index dbbeb07..72afb08 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2396,22 +2396,23 @@ void ChartExport::_exportAxis(
         if(bDisplayUnits)
         {
             OUString aVal;
-            pFS->startElement( FSNS( XML_c, XML_dispUnits ),
-                FSEND );
             if(GetProperty( xAxisProp, "BuiltInUnit" ))
             {
                 mAny >>= aVal;
                 if(!aVal.isEmpty())
                 {
+                    pFS->startElement( FSNS( XML_c, XML_dispUnits ),
+                            FSEND );
+
                     OString aBuiltInUnit = OUStringToOString(aVal, RTL_TEXTENCODING_UTF8);
                     pFS->singleElement( FSNS( XML_c, XML_builtInUnit ),
-                        XML_val, aBuiltInUnit.getStr(),
-                        FSEND );
+                            XML_val, aBuiltInUnit.getStr(),
+                            FSEND );
+
+                    pFS->singleElement(FSNS( XML_c, XML_dispUnitsLbl ),FSEND);
+                    pFS->endElement( FSNS( XML_c, XML_dispUnits ) );
                 }
              }
-             pFS->singleElement(FSNS( XML_c, XML_dispUnitsLbl ),FSEND);
-             pFS->endElement( FSNS( XML_c, XML_dispUnits ) );
-
         }
     }
     // TODO: text properties
commit 171bde3d1e3fb5c7d3cd1fd25e6135e2f7272cb6
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Feb 11 21:55:41 2014 +0100

    glx 1.3 is already supported in out base line
    
    Change-Id: I4304368ebb5f40cb946290a717240143f845e0c9

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
index 33b39fb..52418cb 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
@@ -217,7 +217,7 @@ protected:
 
     bool createWindow( Window* pPWindow );
     void createTexture( unsigned int* texID,
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
             unx::GLXPixmap pixmap,
             bool usePixmap,
 #endif
@@ -255,7 +255,7 @@ private:
         unx::Display*           dpy;
         int                     screen;
         unx::Window             win;
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
         unx::GLXFBConfig        fbc;
 #endif
         unx::XVisualInfo*       vi;
@@ -295,7 +295,7 @@ private:
     */
     uno::Sequence<sal_Int8> LeavingBytes;
 
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
     unx::GLXPixmap LeavingPixmap;
     unx::GLXPixmap EnteringPixmap;
 #endif
@@ -460,7 +460,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
     GLWin.screen = XScreenNumberOfScreen( xattr.screen );
 
     unx::XVisualInfo* vi( NULL );
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
     unx::XVisualInfo* visinfo;
     unx::XVisualInfo* firstVisual( NULL );
 #endif
@@ -517,7 +517,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
     delete pWindow;
     pWindow=NULL;
 
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
     unx::GLXFBConfig* fbconfigs = NULL;
     int nfbconfigs = 0, value = 0, i = 0;
 #endif
@@ -530,7 +530,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
                                    *pAttributeTable );
 
         if( vi ) {
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
             if( !firstVisual )
                 firstVisual = vi;
             SAL_INFO("slideshow.opengl", "trying VisualID " << vi->visualid);
@@ -599,7 +599,7 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
         ++pAttributeTable;
     }
 
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
     if ( firstVisual && vi != firstVisual )
         XFree (firstVisual);
 #endif
@@ -816,7 +816,7 @@ void OGLTransitionerImpl::impl_prepareSlides()
     mbUseLeavingPixmap = false;
     mbUseEnteringPixmap = false;
 
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
 
     if( mnGLXVersion >= 1.2999 && mbTextureFromPixmap && xLeavingSet.is() && xEnteringSet.is() && mbHasTFPVisual ) {
         Sequence< Any > leaveArgs;
@@ -943,7 +943,7 @@ void OGLTransitionerImpl::setTransition( boost::shared_ptr<OGLTransitionImpl> co
 }
 
 void OGLTransitionerImpl::createTexture( unsigned int* texID,
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
                      unx::GLXPixmap pixmap,
                      bool usePixmap,
 #endif
@@ -957,7 +957,7 @@ void OGLTransitionerImpl::createTexture( unsigned int* texID,
     glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
     glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
 
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
     unx::PFNGLXBINDTEXIMAGEEXTPROC myglXBindTexImageEXT = (unx::PFNGLXBINDTEXIMAGEEXTPROC) unx::glXGetProcAddress( (const GLubyte*) "glXBindTexImageEXT" );
 
     if( usePixmap ) {
@@ -1546,7 +1546,7 @@ void OGLTransitionerImpl::GLInitSlides()
         pFormat = chooseFormats();
 
     createTexture( &GLleavingSlide,
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
            LeavingPixmap,
            mbUseLeavingPixmap,
 #endif
@@ -1555,7 +1555,7 @@ void OGLTransitionerImpl::GLInitSlides()
            pFormat );
 
     createTexture( &GLenteringSlide,
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
            EnteringPixmap,
            mbUseEnteringPixmap,
 #endif
@@ -1676,7 +1676,7 @@ void OGLTransitionerImpl::disposeTextures()
     glXMakeCurrent( GLWin.dpy, GLWin.win, GLWin.ctx );
 #endif
 
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
+#if defined( GLX_EXT_texture_from_pixmap )
     unx::PFNGLXRELEASETEXIMAGEEXTPROC myglXReleaseTexImageEXT = (unx::PFNGLXRELEASETEXIMAGEEXTPROC) unx::glXGetProcAddress( (const GLubyte*) "glXReleaseTexImageEXT" );
     if( mbUseLeavingPixmap ) {
         myglXReleaseTexImageEXT( GLWin.dpy, LeavingPixmap, GLX_FRONT_LEFT_EXT );
commit 8129a28dbe68bc08ca881b5521e7adc393dd6f80
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Feb 11 15:47:10 2014 +0100

    don't crash in mixed reference/no reference cases, related fdo#59853
    
    Change-Id: Iecb4841dae5f5df28c697e1ea9998251d9975b5d

diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index 9a0f7df..227c1d9 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -278,7 +278,10 @@ void SheetDataContext::importRow( const AttributeList& rAttribs )
     RowModel aModel;
     sal_Int32 nRow = rAttribs.getInteger( XML_r, -1 );
     if(nRow != -1)
-        aModel.mnRow          = nRow;
+    {
+        aModel.mnRow = nRow;
+        mnRow = nRow;
+    }
     else
         aModel.mnRow = ++mnRow;
     mnCol = -1;
commit 70b30060029c57780d92b652696514d6d4b5739c
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Feb 11 00:32:32 2014 +0100

    fix crash when importing unsupported macro content, related fdo#59374
    
    Change-Id: I960c8174454074fd9ddb27fb17244d782c4cb24c

diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index bc09744..3d5e048 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -365,6 +365,12 @@ SbiToken SbiTokenizer::Next()
     {
         return eCurTok = FIXSTRING;
     }
+    else if( aSym.isEmpty() )
+    {
+        //something went wrong
+        bEof = bEos = true;
+        return eCurTok = EOLN;
+    }
     // Special cases of characters that are between "Z" and "a". ICompare()
     // evaluates the position of these characters in different ways.
     else if( aSym[0] == '^' )


More information about the Libreoffice-commits mailing list