[Libreoffice-commits] .: 2 commits - svx/source sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Apr 2 13:00:53 PDT 2012


 svx/source/tbxctrls/linectrl.cxx |    4 ++--
 svx/source/tbxctrls/tbcontrl.cxx |    6 +++---
 sw/source/filter/ww8/ww8par.hxx  |    1 +
 sw/source/filter/ww8/ww8par6.cxx |   19 ++++++++++++++-----
 4 files changed, 20 insertions(+), 10 deletions(-)

New commits:
commit a482b89e4d9c41b6f7c1616d193ac6cde05a69a7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 2 20:57:02 2012 +0100

    Resolves: fdo#48096 torn off popups trigger keyboard focus problems

diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index c81177e..ccc047c 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -379,7 +379,7 @@ SvxLineEndWindow::SvxLineEndWindow(
     const String& rWndTitle ) :
     SfxPopupWindow( nSlotId,
                     rFrame,
-                    WinBits( WB_STDPOPUP ) ),
+                    WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
     aLineEndSet     ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
     nCols           ( 2 ),
     nLines          ( 12 ),
@@ -400,7 +400,7 @@ SvxLineEndWindow::SvxLineEndWindow(
     SfxPopupWindow( nSlotId,
                     rFrame,
                     pParentWindow,
-                    WinBits( WB_STDPOPUP ) ),
+                    WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
     aLineEndSet     ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
     nCols           ( 2 ),
     nLines          ( 12 ),
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index cb56fac..f9f25a8 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -822,7 +822,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
                                           Window*                    pParentWindow,
                                           const ::Color              rLastColor ) :
 
-    SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ),
+    SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
 
     theSlotId( nSlotId ),
     aColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) ),
@@ -1049,7 +1049,7 @@ void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co
 
 SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) :
 
-    SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ),
+    SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
     aFrameSet   ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
     bParagraphMode(sal_False)
 
@@ -1326,7 +1326,7 @@ Color lcl_mediumColor( Color aMain, Color /*aDefault*/ )
 
 SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) :
 
-    SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_AUTOSIZE ) ),
+    SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION | WB_AUTOSIZE ) ),
     m_aLineStyleLb( this )
 {
     try
commit b89e0c5b56e50ff62d0e5defdf9fe92620cc877a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 2 16:56:54 2012 +0100

    split out ContextualSpacing

diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index b86c5b6..7b4ec8e 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1588,6 +1588,7 @@ public:     // eigentlich private, geht aber leider nur public
     void Read_UL(               sal_uInt16 nId, const sal_uInt8*, short nLen );
     void Read_ParaAutoBefore(sal_uInt16 , const sal_uInt8 *pData, short nLen);
     void Read_ParaAutoAfter(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+    void Read_ParaContextualSpacing( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
     void Read_LineSpace(        sal_uInt16, const sal_uInt8*, short nLen );
     void Read_Justify(sal_uInt16, const sal_uInt8*, short nLen);
     void Read_IdctHint(sal_uInt16, const sal_uInt8*, short nLen);
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 65cea9d..33baeb7 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4177,7 +4177,7 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe
         pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_UL_SPACE );
         return;
     }
-    short nPara = ((nId == 0x246D) ? SVBT16ToShort( pData ) : (0 != *pData));
+    short nPara = SVBT16ToShort( pData );
     if( nPara < 0 )
         nPara = -nPara;
 
@@ -4195,9 +4195,6 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe
         case 0xA414:
             aUL.SetLower( nPara );
             break;
-        case 0x246D:
-            aUL.SetContextValue( nPara );
-            break;
         default:
             return;
     };
@@ -4205,6 +4202,18 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe
     NewAttr( aUL );
 }
 
+void SwWW8ImplReader::Read_ParaContextualSpacing( sal_uInt16, const sal_uInt8* pData, short nLen )
+{
+    if( nLen < 0 )
+    {
+        pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_UL_SPACE );
+        return;
+    }
+    SvxULSpaceItem aUL( *(const SvxULSpaceItem*)GetFmtAttr( RES_UL_SPACE ));
+    aUL.SetContextValue(*pData);
+    NewAttr( aUL );
+}
+
 void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short nLen )
 {
     if (nLen < 0)
@@ -6076,7 +6085,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
         {0x303C, 0},                                 //undocumented
         {0x245B, &SwWW8ImplReader::Read_ParaAutoBefore},//undocumented, para
         {0x245C, &SwWW8ImplReader::Read_ParaAutoAfter},//undocumented, para
-        {0x246D, &SwWW8ImplReader::Read_UL}          //"sprmPFContextualSpacing"
+        {0x246D, &SwWW8ImplReader::Read_ParaContextualSpacing} //"sprmPFContextualSpacing"
     };
 
     static wwSprmDispatcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms));


More information about the Libreoffice-commits mailing list