[Libreoffice-commits] core.git: 2 commits - vcl/inc vcl/win writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jan 13 10:06:18 UTC 2019


 vcl/inc/win/scoped_gdi.hxx                        |    6 +++---
 vcl/win/gdi/gdiimpl.cxx                           |    2 +-
 vcl/win/gdi/winlayout.cxx                         |    2 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   11 +++--------
 4 files changed, 8 insertions(+), 13 deletions(-)

New commits:
commit 60e308e60a623bd45b7a30aa7f538ee6ed3d42cb
Author:     Dmitriy Shilin <dshil at fastmail.com>
AuthorDate: Sat Jan 12 06:04:39 2019 -0800
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Jan 13 11:06:01 2019 +0100

    tdf#107792 vcl/win: move scoped_gdi.hxx to vcl/inc/win
    
    Change-Id: Id08a98d31673cfa9b701e7efdaefd94d24a93807
    Reviewed-on: https://gerrit.libreoffice.org/66214
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/vcl/win/gdi/scoped_gdi.hxx b/vcl/inc/win/scoped_gdi.hxx
similarity index 88%
rename from vcl/win/gdi/scoped_gdi.hxx
rename to vcl/inc/win/scoped_gdi.hxx
index b5a66d9d3698..80fbea8b4463 100644
--- a/vcl/win/gdi/scoped_gdi.hxx
+++ b/vcl/inc/win/scoped_gdi.hxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_VCL_WIN_GDI_SCOPED_GDI_HXX
-#define INCLUDED_VCL_WIN_GDI_SCOPED_GDI_HXX
+#ifndef INCLUDED_VCL_INC_WIN_SCOPED_GDI_HXX
+#define INCLUDED_VCL_INC_WIN_SCOPED_GDI_HXX
 
 #include <win/svsys.h>
 #include <win/wincomp.hxx>
@@ -37,6 +37,6 @@ using ScopedHBRUSH = std::unique_ptr<HBRUSH, HBRUSHDeleter>;
 using ScopedHRGN = std::unique_ptr<HRGN, HRGNDeleter>;
 using ScopedHDC = std::unique_ptr<HDC, HDCDeleter>;
 
-#endif // INCLUDED_VCL_WIN_GDI_SCOPED_GDI_HXX
+#endif // INCLUDED_VCL_INC_WIN_SCOPED_GDI_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 1bb39b84cd2e..ec7682b14899 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -20,7 +20,6 @@
 #include <svsys.h>
 
 #include "gdiimpl.hxx"
-#include "scoped_gdi.hxx"
 
 #include <string.h>
 #include <rtl/strbuf.hxx>
@@ -33,6 +32,7 @@
 #include <win/saldata.hxx>
 #include <win/salgdi.h>
 #include <win/salbmp.h>
+#include <win/scoped_gdi.hxx>
 #include <vcl/salbtype.hxx>
 #include <win/salframe.h>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index f5e2c025e965..ebaf2f1be2d6 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -35,10 +35,10 @@
 #include <outdev.h>
 
 #include <win/DWriteTextRenderer.hxx>
+#include <win/scoped_gdi.hxx>
 
 #include <sft.hxx>
 #include <sallayout.hxx>
-#include "scoped_gdi.hxx"
 
 #include <cstdio>
 #include <cstdlib>
commit cc2dbc14354b937ade02049ec69b07170bde765f
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Dec 30 15:54:08 2018 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Sun Jan 13 11:05:56 2019 +0100

    Avoid getToken index for single call
    
    Change-Id: Ibefd5b0737de7d29a47bab0709ed96901a5e028e
    Reviewed-on: https://gerrit.libreoffice.org/66227
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a0d79ac26554..1361782d9002 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2813,8 +2813,7 @@ static OUString lcl_ExctractVariableAndHint( const OUString& rCommand, OUString&
         ++nIndex;
     OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "
 
-    nIndex = 0;
-    sShortCommand = sShortCommand.getToken( 0, '\\', nIndex);
+    sShortCommand = sShortCommand.getToken(0, '\\');
     nIndex = 0;
     OUString sRet = sShortCommand.getToken( 0, ' ', nIndex);
     if( nIndex > 0)
@@ -3813,8 +3812,7 @@ void DomainMapper_Impl::handleToc
 //                  \t  Builds a table of contents by using style names other than the standard outline styles
     if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue ))
     {
-        sal_Int32 nPos = 0;
-        OUString sToken = sValue.getToken( 1, '"', nPos);
+        OUString sToken = sValue.getToken(1, '"');
         sTemplate = sToken.isEmpty() ? sValue : sToken;
     }
 //                  \u  Builds a table of contents by using the applied paragraph outline level
@@ -4339,12 +4337,9 @@ void DomainMapper_Impl::CloseFieldCommand()
                     }
                     break;
                     case FIELD_FILLIN       :
-                    {
-                        sal_Int32 nIndex = 0;
                         if (xFieldProperties.is())
                             xFieldProperties->setPropertyValue(
-                                    getPropertyName(PROP_HINT), uno::makeAny( pContext->GetCommand().getToken( 1, '\"', nIndex)));
-                    }
+                                    getPropertyName(PROP_HINT), uno::makeAny( pContext->GetCommand().getToken(1, '\"')));
                     break;
                     case FIELD_FILENAME:
                     {


More information about the Libreoffice-commits mailing list