[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - 5 commits - editeng/source sw/source vcl/unx writerfilter/source

Michael Stahl mstahl at redhat.com
Tue Jul 9 03:49:58 PDT 2013


 editeng/source/editeng/impedit3.cxx            |    8 ++
 sw/source/core/unocore/unosett.cxx             |    6 --
 sw/source/core/view/viewsh.cxx                 |   74 +++++++++++++------------
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx       |    8 ++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    4 +
 5 files changed, 59 insertions(+), 41 deletions(-)

New commits:
commit b059b034753ecaf611ed761591a0d6c5ea16fef1
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jul 1 23:48:59 2013 +0200

    fdo#65650: fix Writer ODF import of list style with bullets and color
    
    For such lists xmloff tries to set a BulletColor property but
    SwXNumberingRules::SetNumberingRuleByIndex() throws a RuntimeException
    and does not set any of the list properties on the NumRule.
    
    (regression from abf18610998aa8330f8330f1d769508e47ef5b20)
    
    Change-Id: Id3e80ee1ed67497786258a1096bc5c8dec90ce21
    (cherry picked from commit 0520eaf9e661abddadf9a21cfbeab37b0b85dd68)
    Reviewed-on: https://gerrit.libreoffice.org/4666
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Miklos Vajna <vmiklos at suse.cz>
    Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 2b312a3..ed7a5c9 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1670,8 +1670,6 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
     const sal_uInt16 NotInChapterLast = 23;
     const sal_uInt16 InChapterFirst = 24;
     const sal_uInt16 InChapterLast = 24;
-    const sal_uInt16 IgnoredFirst = 25;
-    const sal_uInt16 IgnoredLast = 26;
 
     const beans::PropertyValue* pPropArray = rProperties.getConstArray();
     PropValDataArr aPropertyValues;
@@ -1682,8 +1680,6 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
         bExcept = sal_True;
         for(sal_uInt16 j = 0; j < SAL_N_ELEMENTS( aNumPropertyNames ); j++)
         {
-            if( j >= IgnoredFirst && j <= IgnoredLast )
-                continue;
             if( pDocShell && j >= NotInChapterFirst && j <= NotInChapterLast )
                 continue;
             if( !pDocShell && j >= InChapterFirst && j <= InChapterLast )
@@ -2102,7 +2098,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
                 break;
                 case 25: // BulletRelSize - unsupported - only available in Impress
                 break;
-                case 26: // ignored too
+                case 26: // BulletColor - ignored too
                 break;
             }
         }
commit 27fc11754c9dc24e4b695a2b53bcd4f010c2be65
Author: Abdulaziz A Alayed <aalayed at kacst.edu.sa>
Date:   Fri May 24 13:11:31 2013 +0300

    fdo#63254 UI:Horizontal scroll bar isn't displayed when RTL tab
    
    opened with LTR UI.
    
    Reviewed-on: https://gerrit.libreoffice.org/4024
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 898a3e84807bccbb876e3f5583728f6d24e05e9a)
    
    Conflicts:
    	vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
    
    Change-Id: Iff6899539fe0b1788df7b09f91f850b91bcdb811
    Reviewed-on: https://gerrit.libreoffice.org/4540
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Lior Kaplan <kaplanlior at gmail.com>
    Reviewed-by: Faisal al-otaibi <fmalotaibi at kacst.edu.sa>
    Tested-by: Faisal al-otaibi <fmalotaibi at kacst.edu.sa>
    Reviewed-by: Lior Kaplan <kaplanlior at gmail.com>
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
old mode 100644
new mode 100755
index 9623555..c0d9740
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1027,7 +1027,13 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  ControlType nType,
             rNativeContentRegion.Right() = rNativeContentRegion.Left() + 1;
         if (!rNativeContentRegion.GetHeight())
             rNativeContentRegion.Bottom() = rNativeContentRegion.Top() + 1;
-        returnVal = sal_True;
+        //fdo#63254 horizontal scrool bar isn't displayed in RTL tab
+        // with LTR UI in calc
+        returnVal =Application::GetSettings().GetLayoutRTL();
+
+        //See fdo#44582, Horizontal scrollbar in navigator window is broken
+        if ((nPart==PART_BUTTON_LEFT || nPart==PART_BUTTON_RIGHT) && Application::GetSettings().GetLayoutRTL())
+            returnVal = false;
     }
     if( (nType == CTRL_MENUBAR) && (nPart == PART_ENTIRE_CONTROL) )
     {
commit 29a2c9e208facd1956fa2dd03d66c7ad8ae5deee
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Sat Feb 2 15:29:24 2013 +0100

    fdo#58646 fix import of RTF_PAGE in cont section when having titlepg
    
    (cherry picked from commit 3974e9952102dbfb4f004872768b1096133bd9a5)
    
    Conflicts:
    	sw/qa/extras/rtfimport/rtfimport.cxx
    
    Change-Id: Ia632edb24869ddfb76a029fdb460bcf24d9a2059
    Reviewed-on: https://gerrit.libreoffice.org/1968
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/4539
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 8deabf7..e62c0eb 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1644,7 +1644,9 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
             {
                 // If we're inside a continous section, we should send a section break, not a page one.
                 RTFValue::Pointer_t pBreak = m_aStates.top().aSectionSprms.find(NS_sprm::LN_SBkc);
-                if (pBreak.get() && !pBreak->getInt())
+                // Unless we're on a title page.
+                RTFValue::Pointer_t pTitlePg = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_titlePg);
+                if ((pBreak.get() && !pBreak->getInt()) && !(pTitlePg.get() && pTitlePg->getInt()))
                 {
                     if (m_bWasInFrame)
                     {
commit 74d1e8ae14a6d4a3df6beaa432a1d5b51c1ffbfa
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 24 18:09:35 2013 +0200

    fdo#43765, fdo#57884, fdo#58052, fdo#63949: disappearing form controls
    
    Transparent form controls in Writer may not be painted properly, if
    painted from ViewShell::ImplUnlockPaint(true), called from
    SwLayIdle::SwLayIdle.
    
    The problem is that SdrPaintWindow::OutputPreRenderDevice will paint
    the background of the transparent form controls (thus over-painting the
    controls), so it has to be followed by painting the controls themselves.
    
    (cherry picked from commit cfa994ccbd6ee681f5ab3648ce068c4881b495f5)
    
    Conflicts:
    	sw/source/core/view/viewsh.cxx
    
    Change-Id: Icda4ad835a398bbd50139be32ff5014a34f23bd5
    Reviewed-on: https://gerrit.libreoffice.org/4492
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index a7dccd7..f32597a 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -122,6 +122,44 @@ void ViewShell::ToggleHeaderFooterEdit()
 }
 
 //////////////////////////////////////////////////////////////////////////////
+
+static void
+lcl_PaintTransparentFormControls(ViewShell & rShell, SwRect const& rRect)
+{
+    // Direct paint has been performed: the background of transparent child
+    // windows has been painted, so need to paint the child windows now.
+    if (rShell.GetWin())
+    {
+        Window& rWindow = *(rShell.GetWin());
+        if (rWindow.IsChildTransparentModeEnabled())
+        {
+            Window * pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD );
+            if (pCandidate)
+            {
+                const Rectangle aRectanglePixel(
+                            rWindow.LogicToPixel(rRect.SVRect()));
+                while (pCandidate)
+                {
+                    if (pCandidate->IsPaintTransparent())
+                    {
+                        const Rectangle aCandidatePosSizePixel(
+                                        pCandidate->GetPosPixel(),
+                                        pCandidate->GetSizePixel());
+
+                        if (aCandidatePosSizePixel.IsOver(aRectanglePixel))
+                        {
+                            pCandidate->Invalidate(
+                                INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN );
+                            pCandidate->Update();
+                        }
+                    }
+                    pCandidate = pCandidate->GetWindow( WINDOW_NEXT );
+                }
+            }
+        }
+    }
+}
+
 // #i72754# 2nd set of Pre/PostPaints
 // This time it uses the lock counter (mPrePostPaintRegions empty/non-empty) to allow only one activation
 // and deactivation and mpPrePostOutDev to remember the OutDev from the BeginDrawLayers
@@ -390,39 +428,7 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
                         DLPostPaint2(true);
                     }
 
-                    // #i107365#
-                    // Direct paint has been performed. Thus, take care of
-                    // transparent child windows.
-                    if ( GetWin() )
-                    {
-                        Window& rWindow = *(GetWin());
-                        if (rWindow.IsChildTransparentModeEnabled())
-                        {
-                            Window* pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD );
-                            if (pCandidate)
-                            {
-                                const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect()));
-
-                                while (pCandidate)
-                                {
-                                    if ( pCandidate->IsPaintTransparent() )
-                                    {
-                                        const Rectangle aCandidatePosSizePixel(
-                                                        pCandidate->GetPosPixel(),
-                                                        pCandidate->GetSizePixel());
-
-                                        if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) )
-                                        {
-                                            pCandidate->Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN );
-                                            pCandidate->Update();
-                                        }
-                                    }
-
-                                    pCandidate = pCandidate->GetWindow( WINDOW_NEXT );
-                                }
-                            }
-                        }
-                    }
+                    lcl_PaintTransparentFormControls(*this, aRect); // i#107365
                 }
 
                 delete pVout;
@@ -526,6 +532,8 @@ void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
 
                 // #i72754# end Pre/PostPaint encapsulation when pOut is back and content is painted
                 DLPostPaint2(true);
+
+                lcl_PaintTransparentFormControls(*this, VisArea()); // fdo#63949
             }
             else
             {
commit abf00b58df6a3665c626c626a8b3671b55a5909c
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Mon Feb 25 14:46:21 2013 +0100

    fdo#55931, fdo#57956: Fix both autofit and stretched width.
    
    This rewrites commit fa694a21b806ed7837c1337ec49a4b299c478393 (fix of
    fdo#55931), and fixes it a better way.
    
    Change-Id: I9ac0c78294e6a9c510c12b22547564b736416131
    Reviewed-on: https://gerrit.libreoffice.org/4538
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Reviewed-by: Thorsten Behrens <tbehrens at suse.com>
    Tested-by: Thorsten Behrens <tbehrens at suse.com>

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 9f1a955..21c4420 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2647,7 +2647,13 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
         // ugly on the screen!
         OutputDevice* pDev = pOut ? pOut : GetRefDevice();
         rFont.SetPhysFont( pDev );
-        Size aRealSz( rFont.GetSize().Width(), rFont.GetSize().Height() );
+        FontMetric aMetric( pDev->GetFontMetric() );
+
+        // Set the font as we want it to look like & reset the Propr attribute
+        // so that it is not counted twice.
+        Size aRealSz( aMetric.GetSize() );
+        rFont.SetPropr( 100 );
+
         if ( aStatus.DoStretch() )
         {
             if ( nStretchY != 100 )


More information about the Libreoffice-commits mailing list