[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - cui/source sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Jan 4 08:35:35 PST 2012


 cui/source/dialogs/SpellDialog.cxx          |    2 +-
 sw/source/core/layout/paintfrm.cxx          |   15 ++++++++-------
 sw/source/ui/docvw/FrameControlsManager.cxx |    8 ++++++++
 sw/source/ui/inc/FrameControlsManager.hxx   |    1 +
 4 files changed, 18 insertions(+), 8 deletions(-)

New commits:
commit fd399133ded7f5ec1eb8768eb7fd1d7b269b6e73
Author: László Németh <nemeth at numbertext.org>
Date:   Tue Dec 13 10:18:52 2011 +0100

    Fix always-false condition of FullCommentURL

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index fee3bdd..cb68f6b 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1233,7 +1233,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
                     beans::PropertyValues  aProperties = aStart->aGrammarError.aProperties;
                     rtl::OUString sFullCommentURL;
                     sal_Int32 i = 0;
-                    while ( !sFullCommentURL.isEmpty() && i < aProperties.getLength() )
+                    while ( sFullCommentURL.isEmpty() && i < aProperties.getLength() )
                     {
                         if ( aProperties[i].Name.equalsAscii( "FullCommentURL" ) )
                         {
commit 8005d9db022c83fdfd64f6bb203e489dad13a664
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Wed Jan 4 17:31:52 2012 +0100

    Page Break: fix remaining indicator in some cases
    
    When creating a new page without using a page break, before a page
    break, there was a remaining indicator. These are now checked and
    removed to avoid such cases.

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 387d8a3..55a2b71 100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3341,15 +3341,16 @@ void SwPageFrm::PaintBreak( ) const
             if ( pFirstFrm && pFirstFrm->IsTabFrm() )
                 pFlowFrm = static_cast< const SwTabFrm* >( pFirstFrm );
 
-            if ( pFlowFrm && pFlowFrm->IsPageBreak( sal_True ) )
+            SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell );
+            if ( pWrtSh )
             {
-                SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell );
-                if ( pWrtSh )
-                {
-                    SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
-                    SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
+                SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
+                SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
+
+                if ( pFlowFrm && pFlowFrm->IsPageBreak( sal_True ) )
                     rMngr.SetPageBreakControl( this );
-                }
+                else
+                    rMngr.RemoveControlsByType( PageBreak, this );
             }
         }
         SwLayoutFrm::PaintBreak( );
diff --git a/sw/source/ui/docvw/FrameControlsManager.cxx b/sw/source/ui/docvw/FrameControlsManager.cxx
index 6b00d56..40e461d 100644
--- a/sw/source/ui/docvw/FrameControlsManager.cxx
+++ b/sw/source/ui/docvw/FrameControlsManager.cxx
@@ -122,6 +122,14 @@ void SwFrameControlsManager::RemoveControls( const SwFrm* pFrm )
     }
 }
 
+void SwFrameControlsManager::RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm )
+{
+    vector< SwFrameControlPtr >& aVect = m_aControls[eType];
+    aVect.erase( remove_if( aVect.begin(),
+                            aVect.end(),
+                            FramePredicate( pFrm ) ), aVect.end() );
+}
+
 
 void SwFrameControlsManager::HideControls( FrameControlType eType )
 {
diff --git a/sw/source/ui/inc/FrameControlsManager.hxx b/sw/source/ui/inc/FrameControlsManager.hxx
index 453466e..c9e0aed 100644
--- a/sw/source/ui/inc/FrameControlsManager.hxx
+++ b/sw/source/ui/inc/FrameControlsManager.hxx
@@ -64,6 +64,7 @@ class SwFrameControlsManager
         std::vector< SwFrameControlPtr >& GetControls( FrameControlType eType );
         void AddControl( FrameControlType eType, SwFrameControlPtr pControl );
         void RemoveControls( const SwFrm* pFrm );
+        void RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm );
         void HideControls( FrameControlType eType );
         void SetReadonlyControls( bool bReadonly );
 


More information about the Libreoffice-commits mailing list