[Libreoffice-commits] core.git: 3 commits - sw/source xmloff/source

Matteo Casalin matteo.casalin at yahoo.com
Tue Mar 25 01:09:39 PDT 2014


 sw/source/core/uibase/uno/unomailmerge.cxx |    5 ++---
 sw/source/ui/dbui/mmpreparemergepage.cxx   |    1 -
 xmloff/source/draw/shapeexport.cxx         |   17 +++--------------
 3 files changed, 5 insertions(+), 18 deletions(-)

New commits:
commit 05c1c60a8258caa7b088bc52e85c4b3d8e70f68a
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Tue Mar 25 08:04:41 2014 +0100

    Remove stray fprintf
    
    Change-Id: I9d85108b8c2659f1b167299840772f51f80b2e29

diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index 60f800f..af42dd3 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -67,7 +67,6 @@ IMPL_LINK_NOARG(SwMailMergePrepareMergePage, EditDocumentHdl_Impl)
 
 IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl)
 {
-    fprintf(stderr, "move\n");
     SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
     sal_Int32 nPos = rConfigItem.GetResultSetPosition();
     if (pCtrl == m_pFirstPB)
commit cd8c774030f9a8d3abbaf0eb43a5cdd228e643cf
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Mon Mar 24 23:57:38 2014 +0100

    Simplify by choosing shape kind in SvXMLElementExport constructor
    
    Change-Id: I6d8e1e3c78675b6096f354cace3ff060801cad9e

diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 9f119ac..f2f7c1b 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2096,21 +2096,10 @@ void XMLShapeExport::ImpExportEllipseShape(
 
         sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210#
 
-        // prepare name (with most used)
-        enum ::xmloff::token::XMLTokenEnum eName(XML_CIRCLE);
-
-        if(bCircle)
-        {
-            // name already set
-        }
-        else
-        {
-            // set name
-            eName = XML_ELLIPSE;
-        }
-
         // write ellipse or circle
-        SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, eName, bCreateNewline, sal_True);
+        SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW,
+                                bCircle ? XML_CIRCLE : XML_ELLIPSE,
+                                bCreateNewline, sal_True);
 
         ImpExportDescription( xShape ); // #i68101#
         ImpExportEvents( xShape );
commit 794d71c4e990a24539a8dad3d960169538a4b0d4
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Mon Mar 24 23:40:25 2014 +0100

    Use isEmpty and endsWith
    
    The isEmpty could be redundant, since the first test for length in
    the old code seemed to be just a pre-condition for evaluating the
    expressions in the second one.
    
    Change-Id: I0d1838d5eb143196a0d7be0cbadf9f0a59cff71b

diff --git a/sw/source/core/uibase/uno/unomailmerge.cxx b/sw/source/core/uibase/uno/unomailmerge.cxx
index 63d8199..e72c80a 100644
--- a/sw/source/core/uibase/uno/unomailmerge.cxx
+++ b/sw/source/core/uibase/uno/unomailmerge.cxx
@@ -723,9 +723,8 @@ uno::Any SAL_CALL SwXMailMerge::execute(
         aURLObj.SetSmartURL( aCurOutputURL );
         OUString aPath = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
 
-        OUString aDelim = OUString(INET_PATH_TOKEN);
-        if (aPath.getLength() >= aDelim.getLength() &&
-            aPath.copy( aPath.getLength() - aDelim.getLength() ) != aDelim)
+        const OUString aDelim = OUString(INET_PATH_TOKEN);
+        if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
             aPath += aDelim;
         if (bCurFileNameFromColumn)
             pMgr->SetEMailColumn( aCurFileNamePrefix );


More information about the Libreoffice-commits mailing list