[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann sbergman at redhat.com
Fri Oct 23 09:04:55 PDT 2015


 vcl/source/gdi/pdfwriter_impl.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 232a98b1aa771d557385aaac75df67240fa365e2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Oct 23 18:04:15 2015 +0200

    nSetGoToRMode wants to be bool
    
    Change-Id: Ib174a3809dd5433c29efbe08a2c4b9f9b6eda804

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index e9ab3b6..fcd04b4 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4497,7 +4497,7 @@ we check in the following sequence:
 // extract target file type
             INetURLObject aDocumentURL( m_aContext.BaseURL );
             INetURLObject aTargetURL( rLink.m_aURL );
-            sal_Int32   nSetGoToRMode = 0;
+            bool bSetGoToRMode = false;
             bool    bTargetHasPDFExtension = false;
             INetProtocol eTargetProtocol = aTargetURL.GetProtocol();
             bool    bIsUNCPath = false;
@@ -4554,7 +4554,7 @@ we check in the following sequence:
                 //check if extension is pdf, see if GoToR should be forced
                 bTargetHasPDFExtension = aTargetURL.GetFileExtension().equalsIgnoreAsciiCase( "pdf" );
                 if( m_aContext.ForcePDFAction && bTargetHasPDFExtension )
-                    nSetGoToRMode++;
+                    bSetGoToRMode = true;
             }
             //prepare the URL, if relative or not
             INetProtocol eBaseProtocol = aDocumentURL.GetProtocol();
@@ -4576,7 +4576,7 @@ we check in the following sequence:
                     bSetRelative = true;
 
                 OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is,
-                if( nSetGoToRMode == 0 )
+                if( !bSetGoToRMode )
                 {
                     switch( m_aContext.DefaultLinkAction )
                     {
@@ -4608,7 +4608,7 @@ we check in the following sequence:
                 }
 
                 //fragment are encoded in the same way as in the named destination processing
-                if( nSetGoToRMode )
+                if( bSetGoToRMode )
                 {
                     //add the fragment
                     OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET );


More information about the Libreoffice-commits mailing list