[Libreoffice-commits] core.git: 6 commits - config_host.mk.in configure.ac framework/source scp2/source sfx2/uiconfig sw/source tools/source vcl/Package_fontunxppds.mk vcl/unx xmloff/source

Caolán McNamara caolanm at redhat.com
Thu Oct 23 06:55:22 PDT 2014


 config_host.mk.in                                       |    1 
 configure.ac                                            |   21 ---------
 framework/source/layoutmanager/toolbarlayoutmanager.cxx |    5 --
 scp2/source/ooo/file_extra_ooo.scp                      |    2 
 sfx2/uiconfig/ui/startcenter.ui                         |    3 -
 sw/source/uibase/wrtsh/wrtsh1.cxx                       |   10 ++++
 tools/source/generic/poly.cxx                           |   36 ++++++++--------
 vcl/Package_fontunxppds.mk                              |    1 
 vcl/unx/generic/printer/configuration/ppds/SGENT42.PS   |   24 ----------
 xmloff/source/style/PageMasterImportContext.cxx         |   12 +----
 10 files changed, 36 insertions(+), 79 deletions(-)

New commits:
commit e87a0ca94b173272f90242c2929b2a0d141acf40
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 23 11:33:25 2014 +0100

    Related: fdo#83003 Jay wants equal space above and below this button
    
    Change-Id: I9babf256eabfd8a168097e28d0a9ffae0e281403

diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui
index 18660ce..3cb7425 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Generated with glade 3.16.1 -->
 <interface>
-  <requires lib="gtk+" version="3.0"/>
   <!-- interface-requires LibreOffice 1.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkImage" id="calc_all_image">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -143,7 +143,6 @@
                     <property name="receives_default">True</property>
                     <property name="margin_left">6</property>
                     <property name="margin_right">6</property>
-                    <property name="margin_top">6</property>
                     <property name="image">open_all_image1</property>
                     <property name="relief">none</property>
                     <property name="use_underline">True</property>
commit 2076a520b280e3aaef020869f005619075789103
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 23 11:21:51 2014 +0100

    remove --without-ppds option now
    
    This was intended for the time we had a huge bunch of third
    party ppds, those are now long gone.
    
    SGENT42.PS is now the same as SGENPRT.PS since
    
    commit 871d8e0f278dab646e1877a505577edc730a26cf
    Date:   Mon Nov 25 14:13:40 2013 +0000
        Resolves: rhbz#188467 default to Type42
    
    so get rid of that one, leaving just the single SGENPRT.PS
    fallback ppd
    
    Change-Id: I851f25b2789b8aa101acd18193cd01e8cded4d09

diff --git a/config_host.mk.in b/config_host.mk.in
index 395274d..1631593 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -607,7 +607,6 @@ export WINDOWS_SDK_VERSION=@WINDOWS_SDK_VERSION@
 export WINDOWS_SDK_WILANGID=@WINDOWS_SDK_WILANGID@
 export WINDRES=@WINDRES@
 export WINEGCC=@WINEGCC@
-export WITHOUT_PPDS=@WITHOUT_PPDS@
 export WITH_COMPAT_OOWRAPPERS=@WITH_COMPAT_OOWRAPPERS@
 export WITH_EXTENSION_INTEGRATION=@WITH_EXTENSION_INTEGRATION@
 export WITH_EXTRA_EXTENSIONS=@WITH_EXTRA_EXTENSIONS@
diff --git a/configure.ac b/configure.ac
index 07eb557..99eaf4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1523,13 +1523,6 @@ AC_ARG_WITH(fonts,
          known to be available on the system then you should use this option.]),
 ,)
 
-AC_ARG_WITH(ppds,
-    AS_HELP_STRING([--without-ppds],
-        [Removes Postscript Printer definition files from LibreOffice
-         installation set, for people building for specific distributions where
-         PPDs are known to be already available (every recent distro with CUPS backend).]),
-,)
-
 AC_ARG_WITH(epm,
     AS_HELP_STRING([--with-epm],
         [Decides which epm to use. Default is to use the one from the system if
@@ -11569,20 +11562,6 @@ AC_SUBST(WITH_FONTS)
 AC_DEFINE_UNQUOTED([TEST_FONTS_MISSING], $TEST_FONTS_MISSING)
 
 dnl ===================================================================
-dnl Test whether to include ppds
-dnl ===================================================================
-AC_MSG_CHECKING([whether to include PPDs])
-if test "$with_ppds" != "no"; then
-    AC_MSG_RESULT([yes])
-    WITHOUT_PPDS=
-else
-    AC_MSG_RESULT([no])
-    WITHOUT_PPDS=TRUE
-    SCPDEFS="$SCPDEFS -DWITHOUT_PPDS"
-fi
-AC_SUBST(WITHOUT_PPDS)
-
-dnl ===================================================================
 dnl Test whether to include extra galleries
 dnl ===================================================================
 AC_MSG_CHECKING([whether to include extra galleries])
diff --git a/scp2/source/ooo/file_extra_ooo.scp b/scp2/source/ooo/file_extra_ooo.scp
index 43cf3bb..e4d5e88 100644
--- a/scp2/source/ooo/file_extra_ooo.scp
+++ b/scp2/source/ooo/file_extra_ooo.scp
@@ -76,14 +76,12 @@ End
 
 #ifdef GUIBASE_UNX
 
-#ifndef WITHOUT_PPDS
 File gid_File_Extra_Fontunxppds
     Dir = FILELIST_DIR;
     TXT_FILE_BODY;
     Styles = (FILELIST);
     Name = "vcl_fontunxppds.filelist";
 End
-#endif
 
 File gid_File_Extra_Fontunxpsprint
     Dir = FILELIST_DIR;
diff --git a/vcl/Package_fontunxppds.mk b/vcl/Package_fontunxppds.mk
index 2d9ea46..0902bcb 100644
--- a/vcl/Package_fontunxppds.mk
+++ b/vcl/Package_fontunxppds.mk
@@ -20,7 +20,6 @@ $(eval $(call gb_Package_Package,vcl_fontunxppds,$(SRCDIR)/vcl/unx/generic/print
 
 $(eval $(call gb_Package_add_files,vcl_fontunxppds,$(LIBO_SHARE_FOLDER)/psprint/driver,\
 	SGENPRT.PS \
-	SGENT42.PS \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/unx/generic/printer/configuration/ppds/SGENT42.PS b/vcl/unx/generic/printer/configuration/ppds/SGENT42.PS
deleted file mode 100644
index 1225ea5..0000000
--- a/vcl/unx/generic/printer/configuration/ppds/SGENT42.PS
+++ /dev/null
@@ -1,24 +0,0 @@
-*PPD-Adobe: "4.0"
-*%
-*% This file is part of the LibreOffice project.
-*%
-*% This Source Code Form is subject to the terms of the Mozilla Public
-*% License, v. 2.0. If a copy of the MPL was not distributed with this
-*% file, You can obtain one at http://mozilla.org/MPL/2.0/.
-*%
-*% This file incorporates work covered by the following license notice:
-*%
-*%   Licensed to the Apache Software Foundation (ASF) under one or more
-*%   contributor license agreements. See the NOTICE file distributed
-*%   with this work for additional information regarding copyright
-*%   ownership. The ASF licenses this file to you under the Apache
-*%   License, Version 2.0 (the "License")*% you may not use this file
-*%   except in compliance with the License. You may obtain a copy of
-*%   the License at http://www.apache.org/licenses/LICENSE-2.0 .
-*%
-
-*Product: "(Generic Printer T42)"
-*ModelName: "Generic Printer (T42 enabled)"
-*NickName: "Generic Printer (T42 enabled)"
-*TTRasterizer: Type42
-*Include: "./SGENPRT.PS"
commit cf33ce966752a9e222a53705604c4bf87525a444
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 23 14:18:25 2014 +0100

    coverity#736876 Negative array index read
    
    Change-Id: I5e0f2e4633286b320abfb6735232b57aedd3a5b3

diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 1c3dd05..0811d5f 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -2243,14 +2243,13 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D
 void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingArea, const ::Size& aUIElementSize, awt::Point& rVirtualPos, ::Point& rPixelPos )
 {
     SolarMutexClearableGuard aReadLock;
+    if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT ))
+        DockingArea = ui::DockingArea_DOCKINGAREA_TOP;
     uno::Reference< awt::XWindow > xDockingWindow( m_xDockAreaWindows[DockingArea] );
     ::Size                         aDockingWinSize;
     vcl::Window*                        pDockingWindow( 0 );
     aReadLock.clear();
 
-    if (( DockingArea < ui::DockingArea_DOCKINGAREA_TOP ) || ( DockingArea > ui::DockingArea_DOCKINGAREA_RIGHT ))
-        DockingArea = ui::DockingArea_DOCKINGAREA_TOP;
-
     {
         // Retrieve output size from container Window
         SolarMutexGuard aGuard;
commit 5be04f59c9d9505a03239347de7ab4c0fdb452e7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 23 14:09:52 2014 +0100

    coverity#440777 Resource leak in object
    
    rework to avoid the warning
    
    Change-Id: Id104c01b04e07ffaaf503a842c978acbc8a22a19

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index ce9aa91..a588719 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -34,6 +34,7 @@
 #include <basegfx/polygon/b2dpolygontools.hxx>
 #include <basegfx/curve/b2dcubicbezier.hxx>
 
+#include <memory>
 #include <vector>
 #include <iterator>
 #include <algorithm>
@@ -1094,37 +1095,40 @@ protected:
 
 class ImplPolygonPointFilter : public ImplPointFilter
 {
-public:
-    ImplPolygon*    mpPoly;     // Don't remove, assigned by polygon
+    std::unique_ptr<ImplPolygon> mxPoly;
     sal_uInt16      mnSize;
+public:
+    ImplPolygonPointFilter(sal_uInt16 nDestSize)
+        : mxPoly(new ImplPolygon(nDestSize))
+        , mnSize(0)
+    {
+    }
 
-                    ImplPolygonPointFilter( sal_uInt16 nDestSize ) :
-                        mnSize( 0 )
-                    {
-                        mpPoly = new ImplPolygon( nDestSize );
-                    }
-
-    virtual         ~ImplPolygonPointFilter() {}
+    virtual ~ImplPolygonPointFilter()
+    {
+    }
 
     virtual void    LastPoint() SAL_OVERRIDE;
     virtual void    Input( const Point& rPoint ) SAL_OVERRIDE;
+
+    ImplPolygon*    release() { return mxPoly.release(); }
 };
 
 void ImplPolygonPointFilter::Input( const Point& rPoint )
 {
-    if ( !mnSize || (rPoint != mpPoly->mpPointAry[mnSize-1]) )
+    if ( !mnSize || (rPoint != mxPoly->mpPointAry[mnSize-1]) )
     {
         mnSize++;
-        if ( mnSize > mpPoly->mnPoints )
-            mpPoly->ImplSetSize( mnSize );
-        mpPoly->mpPointAry[mnSize-1] = rPoint;
+        if ( mnSize > mxPoly->mnPoints )
+            mxPoly->ImplSetSize( mnSize );
+        mxPoly->mpPointAry[mnSize-1] = rPoint;
     }
 }
 
 void ImplPolygonPointFilter::LastPoint()
 {
-    if ( mnSize < mpPoly->mnPoints )
-        mpPoly->ImplSetSize( mnSize );
+    if ( mnSize < mxPoly->mnPoints )
+        mxPoly->ImplSetSize( mnSize );
 };
 
 class ImplEdgePointFilter : public ImplPointFilter
@@ -1311,7 +1315,7 @@ void Polygon::Clip( const Rectangle& rRect, bool bPolygon )
         else
             delete mpImplPolygon;
     }
-    mpImplPolygon = aPolygon.mpPoly;
+    mpImplPolygon = aPolygon.release();
 }
 
 Rectangle Polygon::GetBoundRect() const
commit 15037b018f81d6e5d5bb21921845a11922c301ca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 23 13:58:24 2014 +0100

    coverity#705781 Resource leak
    
    Change-Id: Ia802df9c36b59a0130931436be7f5dbea07c0c8c

diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx
index 283075c..42c40e7 100644
--- a/xmloff/source/style/PageMasterImportContext.cxx
+++ b/xmloff/source/style/PageMasterImportContext.cxx
@@ -78,8 +78,6 @@ SvXMLImportContext *PageStyleContext::CreateChildContext(
         const OUString& rLocalName,
         const uno::Reference< xml::sax::XAttributeList > & xAttrList )
 {
-    SvXMLImportContext *pContext = NULL;
-
     if( XML_NAMESPACE_STYLE == nPrefix &&
         ((IsXMLToken(rLocalName, XML_HEADER_STYLE )) ||
          (IsXMLToken(rLocalName, XML_FOOTER_STYLE )) ) )
@@ -119,10 +117,11 @@ SvXMLImportContext *PageStyleContext::CreateChildContext(
             }
             if (!bEnd)
                 nEndIndex = nIndex;
-            pContext = new PageHeaderFooterContext(GetImport(), nPrefix, rLocalName,
+            return new PageHeaderFooterContext(GetImport(), nPrefix, rLocalName,
                             xAttrList, GetProperties(), xImpPrMap, nStartIndex, nEndIndex, bHeader);
         }
     }
+
     if( XML_NAMESPACE_STYLE == nPrefix &&
         IsXMLToken(rLocalName, XML_PAGE_LAYOUT_PROPERTIES) )
     {
@@ -148,7 +147,7 @@ SvXMLImportContext *PageStyleContext::CreateChildContext(
             if (!bEnd)
                 nEndIndex = nIndex;
             PageContextType aType = Page;
-            pContext = new PagePropertySetContext( GetImport(), nPrefix,
+            return new PagePropertySetContext( GetImport(), nPrefix,
                                                     rLocalName, xAttrList,
                                                     XML_TYPE_PROP_PAGE_LAYOUT,
                                                     GetProperties(),
@@ -156,10 +155,7 @@ SvXMLImportContext *PageStyleContext::CreateChildContext(
         }
     }
 
-    if (!pContext)
-        pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName,
-                                                           xAttrList );
-    return pContext;
+    return XMLPropStyleContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
 }
 
 void PageStyleContext::FillPropertySet(const uno::Reference<beans::XPropertySet > & rPropSet)
commit 2bb0bd5a4a80ae5eaf2d9025ba1a300ba720d3b3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 23 13:54:19 2014 +0100

    coverity#736214 Out-of-bounds access
    
    Change-Id: I8d525813eb26f2fafbfc7386d394be4e749b8d70

diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 4322b99..472f8aa 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1417,7 +1417,15 @@ SelectionType SwWrtShell::GetSelectionType() const
 
         if ( pTxtNd && pTxtNd->IsInList() )
         {
-            const SwNumFmt& rFmt = pNumRule->Get(sal::static_int_cast< sal_uInt8, sal_Int32>(pTxtNd->GetActualListLevel()));
+            int nLevel = pTxtNd->GetActualListLevel();
+
+            if (nLevel < 0)
+                nLevel = 0;
+
+            if (nLevel >= MAXLEVEL)
+                nLevel = MAXLEVEL - 1;
+
+            const SwNumFmt& rFmt = pNumRule->Get(nLevel);
             if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() )
                 nCnt |= nsSelectionType::SEL_NUM;
         }


More information about the Libreoffice-commits mailing list