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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 13 11:17:11 UTC 2019


 sw/qa/uitest/writer_tests5/tdf123378.py                     |   25 ++++++++++++
 sw/source/core/objectpositioning/anchoredobjectposition.cxx |   10 +++-
 sw/source/uibase/uno/unotxdoc.cxx                           |    3 -
 unoidl/source/legacyprovider.cxx                            |    1 
 unoidl/source/sourceprovider-parser-requires.hxx            |    2 
 unoidl/source/sourceprovider-parser.y                       |    1 
 unoidl/source/sourceprovider-scanner.l                      |    1 
 unoidl/source/sourcetreeprovider.cxx                        |    3 -
 unoidl/source/unoidl-read.cxx                               |    2 
 unoidl/source/unoidl-write.cxx                              |    1 
 10 files changed, 34 insertions(+), 15 deletions(-)

New commits:
commit 7f6a5b433988e80f7d404c67d6320116ecb28c06
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Sat Jan 26 09:54:59 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Feb 13 12:11:01 2019 +0100

    tdf#42949 Fix IWYU warnings in unoidl/
    
    Found with bin/find-unneeded-includes
    Only removal proposals are dealt with here.
    
    When rechecking make sure to add
    -I/$SRCDIR/workdir/YaccTarget/unoidl/source/
    to the IWYU cmd to get correct results
    
    Change-Id: Ie3c97d2152ebba80d7c84607bf82b9bed2790eae
    Reviewed-on: https://gerrit.libreoffice.org/67520
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/unoidl/source/legacyprovider.cxx b/unoidl/source/legacyprovider.cxx
index 5dc418196cfd..ac133319a63d 100644
--- a/unoidl/source/legacyprovider.cxx
+++ b/unoidl/source/legacyprovider.cxx
@@ -10,7 +10,6 @@
 #include <sal/config.h>
 
 #include <cassert>
-#include <cstring>
 #include <vector>
 
 #include <registry/reader.hxx>
diff --git a/unoidl/source/sourceprovider-parser-requires.hxx b/unoidl/source/sourceprovider-parser-requires.hxx
index 95a6052e0252..74b04d450d2b 100644
--- a/unoidl/source/sourceprovider-parser-requires.hxx
+++ b/unoidl/source/sourceprovider-parser-requires.hxx
@@ -14,10 +14,8 @@
 
 #include <vector>
 
-#include <rtl/string.hxx>
 #include <rtl/ustring.hxx>
 #include <sal/types.h>
-#include <unoidl/unoidl.hxx>
 
 #define YYLTYPE int
 
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index af8d0ec193bd..94573b1ea147 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -17,6 +17,7 @@
 #include <sal/config.h>
 
 #include <rtl/ustrbuf.hxx>
+#include <unoidl/unoidl.hxx>
 
 #include <algorithm>
 #include <cassert>
diff --git a/unoidl/source/sourceprovider-scanner.l b/unoidl/source/sourceprovider-scanner.l
index a4f636829784..014966a1c60e 100644
--- a/unoidl/source/sourceprovider-scanner.l
+++ b/unoidl/source/sourceprovider-scanner.l
@@ -35,6 +35,7 @@
 #include "rtl/ustring.hxx"
 #include "rtl/textenc.h"
 #include "sal/types.h"
+#include <unoidl/unoidl.hxx>
 
 #include "sourceprovider-parser-requires.hxx"
 #include "sourceprovider-parser.hxx"
diff --git a/unoidl/source/sourcetreeprovider.cxx b/unoidl/source/sourcetreeprovider.cxx
index 31294ba1ac06..0d88c8e0565a 100644
--- a/unoidl/source/sourcetreeprovider.cxx
+++ b/unoidl/source/sourcetreeprovider.cxx
@@ -12,7 +12,6 @@
 
 #include <map>
 #include <vector>
-#include <cstring>
 
 #include <osl/file.h>
 #include <osl/file.hxx>
@@ -22,8 +21,6 @@
 #include <rtl/ustring.hxx>
 #include <unoidl/unoidl.hxx>
 
-#include "sourceprovider-parser-requires.hxx"
-#include <sourceprovider-parser.hxx>
 #include "sourceprovider-scanner.hxx"
 #include "sourcetreeprovider.hxx"
 
diff --git a/unoidl/source/unoidl-read.cxx b/unoidl/source/unoidl-read.cxx
index 30eb7b4e5994..6414fb376a1c 100644
--- a/unoidl/source/unoidl-read.cxx
+++ b/unoidl/source/unoidl-read.cxx
@@ -10,7 +10,6 @@
 #include <sal/config.h>
 
 #include <cassert>
-#include <cstddef>
 #include <cstdlib>
 #include <iostream>
 #include <map>
@@ -18,7 +17,6 @@
 #include <utility>
 #include <vector>
 
-#include <osl/file.h>
 #include <osl/file.hxx>
 #include <osl/process.h>
 #include <rtl/process.h>
diff --git a/unoidl/source/unoidl-write.cxx b/unoidl/source/unoidl-write.cxx
index 1626dbe19ea5..ef3d888b66d6 100644
--- a/unoidl/source/unoidl-write.cxx
+++ b/unoidl/source/unoidl-write.cxx
@@ -11,7 +11,6 @@
 
 #include <algorithm>
 #include <cassert>
-#include <cstddef>
 #include <cstdlib>
 #include <iostream>
 #include <map>
commit 8e2d16b337fbd1602af26bd9b40d7e86cee5202e
Author:     Patrick Jaap <patrick.jaap at tu-dresden.de>
AuthorDate: Tue Jan 29 16:08:24 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Feb 13 12:09:21 2019 +0100

    tdf#123002 Disable off-page positioning for footer/header objects only
    
    We should restrict this to this case since the anchor of objects in the
    body may appear on another page when the object is moved around.
    
    In constrast, objects in header and footer should not appear on other pages,
    so we still disable the "off-page positioning" for them.
    
    Horizontal off-page positioning should be disabled in any case.
    
    See also
    tdf#112443 and tdf#120839
    
    Change-Id: I056c74526f38c302ba49297f9f84ec0e958d2cec
    Reviewed-on: https://gerrit.libreoffice.org/67088
    Tested-by: Jenkins
    Tested-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index d4d44e4ae199..c6724a34e0b4 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -484,10 +484,14 @@ SwTwips SwAnchoredObjectPosition::ImplAdjustVertRelPos( const SwTwips nTopOfAnch
     {
         // tdf#112443 if position is completely off-page
         // return the proposed position and do not adjust it...
-        // tdf#120839 .. unless anchored to char (anchor can jump on other page)
-        bool bDisablePositioning =  mpFrameFormat->getIDocumentSettingAccess().get(DocumentSettingId::DISABLE_OFF_PAGE_POSITIONING);
+        const bool bDisablePositioning =  mpFrameFormat->getIDocumentSettingAccess().get(DocumentSettingId::DISABLE_OFF_PAGE_POSITIONING);
 
-        if ( bDisablePositioning && !IsAnchoredToChar() && nTopOfAnch + nAdjustedRelPosY > aPgAlignArea.Bottom() )
+        // tdf#123002 disable the positioning in header and footer only
+        // we should limit this since anchors of body frames may appear on other pages
+        const bool bIsFooterOrHeader = GetAnchorFrame().GetUpper()
+                                     && (GetAnchorFrame().GetUpper()->IsFooterFrame() || GetAnchorFrame().GetUpper()->IsHeaderFrame() );
+
+        if ( bDisablePositioning && bIsFooterOrHeader && nTopOfAnch + nAdjustedRelPosY > aPgAlignArea.Bottom() )
         {
             return nProposedRelPosY;
         }
commit ac1b2c9e1ab2f84de3a8856772e00302d237e82f
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Feb 13 08:59:01 2019 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Feb 13 12:05:43 2019 +0100

    tdf#123378 Prevent modifying doc when printing
    
    Just remove this update fields call, they are updated anyway.
    
    Change-Id: Iaed1b6e7e1be8138ecb48e7557cc09ec0eeebda3
    Reviewed-on: https://gerrit.libreoffice.org/67754
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sw/qa/uitest/writer_tests5/tdf123378.py b/sw/qa/uitest/writer_tests5/tdf123378.py
new file mode 100644
index 000000000000..6c78e0ecf699
--- /dev/null
+++ b/sw/qa/uitest/writer_tests5/tdf123378.py
@@ -0,0 +1,25 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+
+from uitest.framework import UITestCase
+
+#Bug 123378 - Printing always sets "document modified" status
+
+class tdf123378(UITestCase):
+   def test_tdf123378_print_sets_modified(self):
+        self.ui_test.create_doc_in_start_center("writer")
+        document = self.ui_test.get_component()
+        xWriterDoc = self.xUITest.getTopFocusWindow()
+
+        self.xUITest.executeCommand(".uno:Print")
+        xDialog = self.xUITest.getTopFocusWindow()
+        xOK = xDialog.getChild("cancel")
+        self.ui_test.close_dialog_through_button(xOK)
+
+        self.assertEqual(document.isModified(), False)
+
+        self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 18da3684b4e1..8a4c1dd260d6 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2645,9 +2645,6 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
             pViewShell->Reformat();
             pViewShell->CalcPagesForPrint( pViewShell->GetPageCount() );
 
-            // #122919# Force field update before PDF export, but after layout init (tdf#121962)
-            pViewShell->SwViewShell::UpdateFields(true);
-
             pViewShell->SetPDFExportOption( false );
 
             // enable view again


More information about the Libreoffice-commits mailing list