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

Noel Grandin noel at peralex.com
Mon Jan 18 01:45:38 PST 2016


 vcl/inc/win/salprn.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 023f17bccf0e6f99df5f8e2855ba562668b1349e
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jan 18 11:44:25 2016 +0200

    fix windows build
    
        ...after c88165dfb46c771eba6324ec061bf4455732194e "loplugin: unused return
        values in vcl/"
    
    Change-Id: Ie1b46d94e4e102770b1dfcb6138304299fe8f76d

diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index 1eed33a..6573045 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -101,7 +101,7 @@ public:
                                               ImplJobSetup* pSetupData ) override;
     virtual bool                    EndJob() override;
     virtual SalGraphics*            StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) override;
-    virtual bool                    EndPage() override;
+    virtual void                    EndPage() override;
     virtual sal_uIntPtr             GetErrorCode() override;
 
     void markInvalid();
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index b0aca3c..e7bdbb2 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1650,7 +1650,7 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, bool bNewJobDat
     return mpGraphics;
 }
 
-bool WinSalPrinter::EndPage()
+void WinSalPrinter::EndPage()
 {
     HDC hDC = mhDC;
     if ( hDC && mpGraphics )
@@ -1661,20 +1661,17 @@ bool WinSalPrinter::EndPage()
     }
 
     if( ! isValid() )
-        return FALSE;
+        return;
 
     volatile int nRet = 0;
     CATCH_DRIVER_EX_BEGIN;
     nRet = ::EndPage( hDC );
     CATCH_DRIVER_EX_END( "exception in EndPage", this );
 
-    if ( nRet > 0 )
-        return TRUE;
-    else
+    if ( nRet <= 0 )
     {
         GetLastError();
         mnError = SAL_PRINTER_ERROR_GENERALERROR;
-        return FALSE;
     }
 }
 
commit 0761c148dd4579cec69eaeaace260f6bcec2dbed
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jan 18 11:43:03 2016 +0200

    Revert "fix windows build"
    
    This reverts commit 36ec485c70cfd952426bc072e40fb07a7ee1172a.

diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index 90c7077..1eed33a 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -99,7 +99,7 @@ public:
                                               bool bCollate,
                                               bool bDirect,
                                               ImplJobSetup* pSetupData ) override;
-    virtual void                    EndJob() override;
+    virtual bool                    EndJob() override;
     virtual SalGraphics*            StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) override;
     virtual bool                    EndPage() override;
     virtual sal_uIntPtr             GetErrorCode() override;
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index e7bdbb2..b0aca3c 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1650,7 +1650,7 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, bool bNewJobDat
     return mpGraphics;
 }
 
-void WinSalPrinter::EndPage()
+bool WinSalPrinter::EndPage()
 {
     HDC hDC = mhDC;
     if ( hDC && mpGraphics )
@@ -1661,17 +1661,20 @@ void WinSalPrinter::EndPage()
     }
 
     if( ! isValid() )
-        return;
+        return FALSE;
 
     volatile int nRet = 0;
     CATCH_DRIVER_EX_BEGIN;
     nRet = ::EndPage( hDC );
     CATCH_DRIVER_EX_END( "exception in EndPage", this );
 
-    if ( nRet <= 0 )
+    if ( nRet > 0 )
+        return TRUE;
+    else
     {
         GetLastError();
         mnError = SAL_PRINTER_ERROR_GENERALERROR;
+        return FALSE;
     }
 }
 


More information about the Libreoffice-commits mailing list