[Libreoffice-commits] core.git: Branch 'feature/highlighting' - 6 commits - cui/source cui/uiconfig include/sfx2 include/svl include/unotools officecfg/registry sc/source sd/source sfx2/source sw/qa sw/source unotools/source writerfilter/source

Zolnai Tamás zolnaitamas2000 at gmail.com
Sun Mar 15 02:49:01 PDT 2015


 cui/source/dialogs/iconcdlg.cxx                            |    8 -
 cui/source/inc/iconcdlg.hxx                                |    2 
 cui/source/options/optfltr.cxx                             |   19 ++
 cui/source/options/optfltr.hxx                             |    3 
 cui/uiconfig/ui/optfltrembedpage.ui                        |   96 +++++++++++++
 include/sfx2/styledlg.hxx                                  |    2 
 include/sfx2/tabdlg.hxx                                    |    4 
 include/svl/grabbagitem.hxx                                |    5 
 include/unotools/fltrcfg.hxx                               |    5 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    7 
 sc/source/ui/inc/styledlg.hxx                              |    2 
 sc/source/ui/styleui/styledlg.cxx                          |    3 
 sd/source/ui/dlg/tabtempl.cxx                              |    4 
 sd/source/ui/inc/tabtempl.hxx                              |    2 
 sfx2/source/dialog/styledlg.cxx                            |    5 
 sfx2/source/dialog/tabdlg.cxx                              |   19 +-
 sw/qa/extras/globalfilter/globalfilter.cxx                 |   16 ++
 sw/source/filter/ww8/attributeoutputbase.hxx               |    1 
 sw/source/filter/ww8/ww8atr.cxx                            |   29 +++
 sw/source/filter/ww8/ww8par6.cxx                           |   13 +
 sw/source/ui/envelp/envfmt.cxx                             |    2 
 sw/source/ui/fmtui/tmpdlg.cxx                              |    3 
 sw/source/uibase/app/docst.cxx                             |    4 
 sw/source/uibase/inc/tmpdlg.hxx                            |    2 
 sw/source/uibase/inc/uitool.hxx                            |    3 
 sw/source/uibase/shells/basesh.cxx                         |   36 ----
 sw/source/uibase/shells/textsh1.cxx                        |    2 
 sw/source/uibase/utlui/uitool.cxx                          |   22 ++
 unotools/source/config/fltrcfg.cxx                         |   33 ++++
 writerfilter/source/dmapper/DomainMapper.cxx               |    1 
 writerfilter/source/dmapper/PropertyIds.cxx                |    1 
 writerfilter/source/dmapper/PropertyIds.hxx                |    1 
 32 files changed, 273 insertions(+), 82 deletions(-)

New commits:
commit 858222a622bed10cf1d93130e8fdf391efd7564a
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Sun Mar 15 01:20:44 2015 +0100

    Char shading: add a marker to background imported from MSO shading
    
    Change-Id: I853b952f0395b33d36bb2934a6d910f2182cc1d9

diff --git a/include/svl/grabbagitem.hxx b/include/svl/grabbagitem.hxx
index c02edaa..6454d2c 100644
--- a/include/svl/grabbagitem.hxx
+++ b/include/svl/grabbagitem.hxx
@@ -35,6 +35,11 @@ public:
         return m_aMap;
     }
 
+    std::map<OUString, com::sun::star::uno::Any>& GetGrabBag()
+    {
+        return m_aMap;
+    }
+
     virtual bool operator==(const SfxPoolItem&) const SAL_OVERRIDE;
     virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
 
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index 13d1de9..288b89f 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -30,6 +30,7 @@ public:
     void testImageWithSpecialID();
     void testGraphicShape();
     void testCharHighlight();
+    void testCharHighlightBody();
 
     CPPUNIT_TEST_SUITE(Test);
     CPPUNIT_TEST(testSwappedOutImageExport);
@@ -353,7 +354,7 @@ void Test::testGraphicShape()
     }
 }
 
-void Test::testCharHighlight()
+void Test::testCharHighlightBody()
 {
     // MS Word has two kind of character background called character shading and highlight
     // MS filters handle these attributes separately, but ODF export merges them into one background attribute
@@ -365,9 +366,6 @@ void Test::testCharHighlight()
         "Office Open XML Text",
     };
 
-    SvtFilterOptions& rOpt = SvtFilterOptions::Get();
-    rOpt.SetCharBackground2Shading();
-
     for( size_t nFilter = 0; nFilter < SAL_N_ELEMENTS(aFilterNames); ++nFilter )
     {
         if (mxComponent.is())
@@ -453,6 +451,18 @@ void Test::testCharHighlight()
     }
 }
 
+void Test::testCharHighlight()
+{
+    SvtFilterOptions& rOpt = SvtFilterOptions::Get();
+    rOpt.SetCharBackground2Shading();
+
+    testCharHighlightBody();
+
+    rOpt.SetCharBackground2Highlighting();
+
+    testCharHighlightBody();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index f095817..4700e42 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5636,15 +5636,28 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTxt
 
 void AttributeOutputBase::CharBackgroundBase( const SvxBrushItem& rBrush )
 {
-    const SvtFilterOptions& rOpt = SvtFilterOptions::Get();
-    if( rOpt.IsCharBackground2Highlighting() )
+    bool bConvertToShading = SvtFilterOptions::Get().IsCharBackground2Shading();
+    bool bHasShadingMarker = false;
+
+    // Check shading marker
     {
-        CharHighlight(rBrush);
+        const SfxGrabBagItem& aGrabBag = static_cast< const SfxGrabBagItem& >( GetExport().GetItem( RES_CHRATR_GRABBAG ) );
+        const std::map<OUString, com::sun::star::uno::Any>& rMap = aGrabBag.GetGrabBag();
+        auto aIterator = rMap.find("CharShadingMarker");
+        if( aIterator != rMap.end() )
+        {
+            aIterator->second >>= bHasShadingMarker;
+        }
     }
-    else
+
+    if( bConvertToShading || bHasShadingMarker )
     {
         CharBackground(rBrush);
     }
+    else
+    {
+        CharHighlight(rBrush);
+    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 027e96a..e64ba0c 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -19,6 +19,7 @@
 
 #include <stdlib.h>
 #include <svl/itemiter.hxx>
+#include <svl/grabbagitem.hxx>
 #include <rtl/tencinfo.h>
 
 #include <hintids.hxx>
@@ -3799,6 +3800,12 @@ void SwWW8ImplReader::Read_CharShadow(  sal_uInt16, const sal_uInt8* pData, shor
         SwWW8Shade aSh( bVer67, aSHD );
 
         NewAttr( SvxBrushItem( aSh.aColor, RES_CHRATR_BACKGROUND ));
+
+        // Add a marker to the grabbag indicating that character background was imported from MS shading
+        SfxGrabBagItem aGrabBag = *(static_cast<const SfxGrabBagItem*>(GetFmtAttr(RES_CHRATR_GRABBAG)));
+        std::map<OUString, com::sun::star::uno::Any>& rMap = aGrabBag.GetGrabBag();
+        rMap.insert(std::pair<OUString, com::sun::star::uno::Any>("CharShadingMarker",uno::makeAny(true)));
+        NewAttr(aGrabBag);
     }
 }
 
@@ -3815,6 +3822,12 @@ void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, shor
             return;
         Color aColour(ExtractColour(pData, bVer67));
         NewAttr(SvxBrushItem(aColour, RES_CHRATR_BACKGROUND));
+
+        // Add a marker to the grabbag indicating that character background was imported from MS shading
+        SfxGrabBagItem aGrabBag = *(static_cast<const SfxGrabBagItem*>(GetFmtAttr(RES_CHRATR_GRABBAG)));
+        std::map<OUString, com::sun::star::uno::Any>& rMap = aGrabBag.GetGrabBag();
+        rMap.insert(std::pair<OUString, com::sun::star::uno::Any>("CharShadingMarker",uno::makeAny(true)));
+        NewAttr(aGrabBag);
     }
 }
 
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index ee77182..996a39d 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -265,7 +265,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
         if (pDlg->Execute() == RET_OK)
         {
             SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() );
-            ::ConvertAttrGenToChar(aOutputSet, CONV_ATTR_ENV);
+            ::ConvertAttrGenToChar(aOutputSet, aTmpSet, CONV_ATTR_ENV);
             pCollSet->Put(aOutputSet);
         }
     }
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 8eafb05..817d2cd 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -573,7 +573,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl)
         SfxItemSet aTmpSet( *m_pDlg->GetOutputItemSet() );
         if( SFX_STYLE_FAMILY_CHAR == m_nFamily )
         {
-            ::ConvertAttrGenToChar(aTmpSet, CONV_ATTR_STD);
+            ::ConvertAttrGenToChar(aTmpSet, m_xTmp->GetItemSet(), CONV_ATTR_STD);
         }
 
         m_xTmp->SetItemSet( aTmpSet );
@@ -823,7 +823,7 @@ sal_uInt16 SwDocShell::Edit(
             ::SfxToSwPageDescAttr( *GetWrtShell(), xTmp->GetItemSet() );
         else
         {
-            ::ConvertAttrGenToChar(xTmp->GetItemSet(), CONV_ATTR_STD);
+            ::ConvertAttrGenToChar(xTmp->GetItemSet(), xTmp->GetItemSet(), CONV_ATTR_STD);
         }
         if(SFX_STYLE_FAMILY_PAGE == nFamily)
             mpView->InvalidateRulerPos();
diff --git a/sw/source/uibase/inc/uitool.hxx b/sw/source/uibase/inc/uitool.hxx
index 765087f..fe7aebc 100644
--- a/sw/source/uibase/inc/uitool.hxx
+++ b/sw/source/uibase/inc/uitool.hxx
@@ -59,9 +59,10 @@ SW_DLLPUBLIC void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode);
  * This method is used after executed a character dialog.
  *
  * @param[in,out]   rSet    the set in which character attributes are stored
+ * @param[in]       rOrigSet    original itemset used as input for the dialog
  * @param[in]       nMode   specify the dialog which was called before
 **/
-SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode);
+SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet, const sal_uInt8 nMode);
 
 // SfxItemSets <-> PageDesc
 void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc );
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 0d3d360..3e58f54 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -202,7 +202,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
     if ( pSet)
     {
         SfxItemSet aTmpSet( *pSet );
-        ::ConvertAttrGenToChar(aTmpSet, CONV_ATTR_STD);
+        ::ConvertAttrGenToChar(aTmpSet, aCoreSet, CONV_ATTR_STD);
 
         const SfxPoolItem* pSelectionItem;
         bool bInsert = false;
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index ffa7ed4..d032d91 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -25,6 +25,7 @@
 #include <unotools/collatorwrapper.hxx>
 #include <svl/urihelper.hxx>
 #include <svl/stritem.hxx>
+#include <svl/grabbagitem.hxx>
 #include <unotools/syslocale.hxx>
 #include <sfx2/app.hxx>
 #include <IDocumentStylePoolAccess.hxx>
@@ -175,21 +176,34 @@ void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode)
     }
 }
 
-void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode)
+void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet, const sal_uInt8 nMode)
 {
     // Background / highlight
     {
         // Highlight is an MS specific thing, so remove it at the first time when LO modifies
         // this part of the imported document.
-        const SfxPoolItem *pTmpBrush;
-        if( SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pTmpBrush ) )
+        const SfxPoolItem *pTmpItem;
+        if( SfxItemState::SET == rSet.GetItemState( RES_BACKGROUND, false, &pTmpItem ) )
         {
-            SvxBrushItem aTmpBrush( *static_cast<const SvxBrushItem*>(pTmpBrush) );
+            SvxBrushItem aTmpBrush( *static_cast<const SvxBrushItem*>(pTmpItem) );
             aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
             rSet.Put( aTmpBrush );
 
             SvxBrushItem aTransparentBrush( RES_CHRATR_HIGHLIGHT );
             rSet.Put( aTransparentBrush );
+
+            // Remove shading marker
+            if( SfxItemState::SET == rOrigSet.GetItemState( RES_CHRATR_GRABBAG, false, &pTmpItem ) )
+            {
+                SfxGrabBagItem aGrabBag(*static_cast<const SfxGrabBagItem*>(pTmpItem));
+                std::map<OUString, com::sun::star::uno::Any>& rMap = aGrabBag.GetGrabBag();
+                auto aIterator = rMap.find("CharShadingMarker");
+                if( aIterator != rMap.end() )
+                {
+                    aIterator->second = uno::makeAny(false);
+                }
+                rSet.Put( aGrabBag );
+            }
         }
         rSet.ClearItem( RES_BACKGROUND );
     }
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 588b24c..580c035 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1662,6 +1662,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
                 pCellColorHandler->setOutputFormat( CellColorHandler::Character );
                 pProperties->resolve(*pCellColorHandler);
                 rContext->InsertProps(pCellColorHandler->getProperties());
+                m_pImpl->GetTopContext()->Insert(PROP_CHAR_SHADING_MARKER, uno::makeAny(true), true, CHAR_GRAB_BAG );
             }
             break;
         }
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index f380c45..53d101c 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -349,6 +349,7 @@ OUString PropertyNameSupplier::GetName( PropertyIds eId ) const
             case PROP_GRAPHIC_URL: sName = "GraphicURL"; break;
             case PROP_GRAPHIC_BITMAP: sName = "GraphicBitmap"; break;
             case PROP_CHAR_SHADING_VALUE: sName = "CharShadingValue"; break;
+            case PROP_CHAR_SHADING_MARKER: sName = "CharShadingMarker"; break;
             case PROP_LABEL_CATEGORY: sName = "LabelCategory"; break;
             case PROP_FIRST_IS_SHARED : sName = "FirstIsShared"; break;
             case PROP_MIRROR_INDENTS : sName = "MirrorIndents"; break;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index cd52d48..618d02d 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -320,6 +320,7 @@ enum PropertyIds
         ,PROP_GRAPHIC_URL
         ,PROP_GRAPHIC_BITMAP
         ,PROP_CHAR_SHADING_VALUE
+        ,PROP_CHAR_SHADING_MARKER
         ,PROP_FIRST_IS_SHARED
         ,PROP_MIRROR_INDENTS
         ,PROP_SURROUND_TEXT_WRAP_SMALL
commit 7826b92ba0deef5238542a5ea2ff0d271113a133
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Sun Mar 15 01:16:28 2015 +0100

    SfxTabDialog: avoid changing const input parameter
    
    * SfxTabDialog constructor has a const pointer parameter
    pointing  to the input set and also the corresponding member
    is a const pointer which indicateds this set is not changed by
    the dialog, but this is not true, const is casted away and
    the input set is changed.
    * So use a copy of the input set instead, pointed by
    a non-const member, so we can spare some const cast and
    missunderstandings.
    * GetRefreshedSet not behaves as a getter method, but changes
    the input set instead, so redeclare it accordingly.
    
    Change-Id: Ic63f9ae68c50e65d4498b20f597547c1c075b94e

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 45e8dcb..982ed6c 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -547,8 +547,7 @@ bool IconChoiceDialog::DeActivatePageImpl ()
 
         if ( nRet & IconChoicePage::REFRESH_SET )
         {
-            pSet = GetRefreshedSet();
-            DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" );
+            RefreshInputSet();
             // flag all pages to be newly initialized
             for ( size_t i = 0, nCount = maPageList.size(); i < nCount; ++i )
             {
@@ -723,10 +722,9 @@ void IconChoiceDialog::Start_Impl()
     ActivatePageImpl();
 }
 
-const SfxItemSet* IconChoiceDialog::GetRefreshedSet()
+void IconChoiceDialog::RefreshInputSet()
 {
-    SAL_WARN( "cui.dialogs", "GetRefreshedSet not implemented" );
-    return 0;
+    SAL_WARN( "cui.dialogs", "RefreshInputSet not implemented" );
 }
 
 /**********************************************************************
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 29317d3..0c89da1 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -170,7 +170,7 @@ protected :
     inline SfxItemSet*      GetInputSetImpl() { return (SfxItemSet*)pSet; }
     inline IconChoicePage*  GetTabPage( sal_uInt16 nPageId )
                                 { return ( GetPageData (nPageId)->pPage?GetPageData (nPageId)->pPage:NULL); }
-    const SfxItemSet*       GetRefreshedSet();
+    void                    RefreshInputSet();
 
     void                    ActivatePageImpl ();
     bool                    DeActivatePageImpl ();
diff --git a/include/sfx2/styledlg.hxx b/include/sfx2/styledlg.hxx
index f3b0448..9e9bef9 100644
--- a/include/sfx2/styledlg.hxx
+++ b/include/sfx2/styledlg.hxx
@@ -34,7 +34,7 @@ private:
     DECL_DLLPRIVATE_LINK( CancelHdl, Button * );
     sal_uInt16 m_nOrganizerId;
 protected:
-    virtual const SfxItemSet*   GetRefreshedSet() SAL_OVERRIDE;
+    virtual void   RefreshInputSet() SAL_OVERRIDE;
 
 public:
     SfxStyleDialog(vcl::Window* pParent, const OUString& rID,
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 252d728..2465321 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -81,7 +81,7 @@ friend class SfxTabDialogController;
     bool m_bOwnsResetBtn;
     bool m_bOwnsBaseFmtBtn;
 
-    const SfxItemSet*   pSet;
+    SfxItemSet*         pSet;
     SfxItemSet*         pOutSet;
     TabDlg_Impl*        pImpl;
     sal_uInt16*         pRanges;
@@ -103,7 +103,7 @@ protected:
     // Is deleted in Sfx!
     virtual SfxItemSet*         CreateInputItemSet( sal_uInt16 nId );
     // Is not deleted in Sfx!
-    virtual const SfxItemSet*   GetRefreshedSet();
+    virtual void                RefreshInputSet();
     virtual void                PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
 
     VclButtonBox*   m_pActionArea;
diff --git a/sc/source/ui/inc/styledlg.hxx b/sc/source/ui/inc/styledlg.hxx
index 04a70a1..b91572c 100644
--- a/sc/source/ui/inc/styledlg.hxx
+++ b/sc/source/ui/inc/styledlg.hxx
@@ -33,7 +33,7 @@ public:
 
 protected:
     virtual void                PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) SAL_OVERRIDE;
-    virtual const SfxItemSet*   GetRefreshedSet() SAL_OVERRIDE;
+    virtual void                RefreshInputSet() SAL_OVERRIDE;
 
 private:
     sal_uInt16 nDlgRsc;
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index 1c1dc17..fc72ca4 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -173,12 +173,11 @@ void ScStyleDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage )
     }
 }
 
-const SfxItemSet* ScStyleDlg::GetRefreshedSet()
+void ScStyleDlg::RefreshInputSet()
 {
     SfxItemSet* pItemSet = GetInputSetImpl();
     pItemSet->ClearItem();
     pItemSet->SetParent( GetStyleSheet().GetItemSet().GetParent() );
-    return pItemSet;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
index 2c875ef..a213c38 100644
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -172,7 +172,7 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
     }
 }
 
-const SfxItemSet* SdTabTemplateDlg::GetRefreshedSet()
+void SdTabTemplateDlg::RefreshInputSet()
 {
     SfxItemSet* pRet = GetInputSetImpl();
 
@@ -183,8 +183,6 @@ const SfxItemSet* SdTabTemplateDlg::GetRefreshedSet()
     }
     else
         pRet = new SfxItemSet( GetStyleSheet().GetItemSet() );
-
-    return pRet;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/tabtempl.hxx b/sd/source/ui/inc/tabtempl.hxx
index ed57b58..636ae6b 100644
--- a/sd/source/ui/inc/tabtempl.hxx
+++ b/sd/source/ui/inc/tabtempl.hxx
@@ -66,7 +66,7 @@ private:
     sal_uInt16 m_nAsianTypoId;
 
     virtual void                PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
-    virtual const SfxItemSet*   GetRefreshedSet() SAL_OVERRIDE;
+    virtual void                RefreshInputSet() SAL_OVERRIDE;
 
 public:
     SdTabTemplateDlg(vcl::Window* pParent,
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 99e9408..dc0d5f0 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -81,12 +81,11 @@ SfxStyleDialog::~SfxStyleDialog()
 {
     pExampleSet = 0;
     pStyle = 0;
-    delete GetInputSetImpl();
 }
 
 
 
-const SfxItemSet* SfxStyleDialog::GetRefreshedSet()
+void SfxStyleDialog::RefreshInputSet()
 
 /*  [Description]
 
@@ -95,7 +94,7 @@ const SfxItemSet* SfxStyleDialog::GetRefreshedSet()
 */
 
 {
-    return GetInputSetImpl();
+    SfxTabDialog::RefreshInputSet();
 }
 
 
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 2d5f88d..cdb6a1b 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -318,7 +318,7 @@ SfxTabDialog::SfxTabDialog
 )
     : TabDialog(pParent, rID, rUIXMLDescription)
     , pFrame(pViewFrame)
-    , pSet(pItemSet)
+    , pSet(pItemSet ? new SfxItemSet(*pItemSet) : 0)
     , pOutSet(0)
     , pRanges(0)
     , nAppPageId(USHRT_MAX)
@@ -347,7 +347,7 @@ SfxTabDialog::SfxTabDialog
 )
     : TabDialog(pParent, rID, rUIXMLDescription)
     , pFrame(0)
-    , pSet(pItemSet)
+    , pSet(pItemSet ? new SfxItemSet(*pItemSet) : 0)
     , pOutSet(0)
     , pRanges(0)
     , nAppPageId(USHRT_MAX)
@@ -397,6 +397,7 @@ SfxTabDialog::~SfxTabDialog()
     }
 
     delete pImpl;
+    delete pSet;
     delete pOutSet;
     delete pExampleSet;
     delete [] pRanges;
@@ -735,7 +736,7 @@ SfxItemSet* SfxTabDialog::GetInputSetImpl()
 */
 
 {
-    return (SfxItemSet*)pSet;
+    return pSet;
 }
 
 
@@ -856,7 +857,7 @@ SfxItemSet* SfxTabDialog::CreateInputItemSet( sal_uInt16 )
 
 
 
-const SfxItemSet* SfxTabDialog::GetRefreshedSet()
+void SfxTabDialog::RefreshInputSet()
 
 /*  [Description]
 
@@ -866,8 +867,7 @@ const SfxItemSet* SfxTabDialog::GetRefreshedSet()
 */
 
 {
-    SAL_INFO ( "sfx.dialog", "GetRefreshedSet not implemented" );
-    return 0;
+    SAL_INFO ( "sfx.dialog", "RefreshInputSet not implemented" );
 }
 
 
@@ -1240,8 +1240,7 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
 
     if ( nRet & SfxTabPage::REFRESH_SET )
     {
-        pSet = GetRefreshedSet();
-        DBG_ASSERT( pSet, "GetRefreshedSet() returns NULL" );
+        RefreshInputSet();
         // Flag all Pages as to be initialized as new
 
         for ( SfxTabDlgData_Impl::const_iterator it = pImpl->aData.begin(); it != pImpl->aData.end(); ++it )
@@ -1353,8 +1352,8 @@ void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
 
 {
     bool bSet = ( pSet != NULL );
-
-    pSet = pInSet;
+    delete pSet;
+    pSet = pInSet ? new SfxItemSet(*pInSet) : 0;
 
     if ( !bSet && !pExampleSet && !pOutSet )
     {
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 4ac9c0f..0fef7a5 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -363,12 +363,11 @@ short SwTemplateDlg::Ok()
     return nRet;
 }
 
-const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
+void SwTemplateDlg::RefreshInputSet()
 {
     SfxItemSet* pInSet = GetInputSetImpl();
     pInSet->ClearItem();
     pInSet->SetParent( &GetStyleSheet().GetItemSet() );
-    return pInSet;
 }
 
 void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
diff --git a/sw/source/uibase/inc/tmpdlg.hxx b/sw/source/uibase/inc/tmpdlg.hxx
index 75cab42..c92bde4 100644
--- a/sw/source/uibase/inc/tmpdlg.hxx
+++ b/sw/source/uibase/inc/tmpdlg.hxx
@@ -78,7 +78,7 @@ public:
                     SwWrtShell*         pActShell = 0,
                     bool                bNew = false );
 
-    const SfxItemSet* GetRefreshedSet() SAL_OVERRIDE;
+    virtual void RefreshInputSet() SAL_OVERRIDE;
 
     virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE;
     virtual short Ok() SAL_OVERRIDE;
commit f5947720568209dfc6702c30d0ef5b77893b7779
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Mon Mar 9 21:05:33 2015 +0100

    Char highlight: export character background based on settings
    
    Change-Id: Iaaf9e7ee5e61cfabb0d675b83fa71776dece87e2

diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index 83aec2a..13d1de9 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -18,6 +18,7 @@
 #include <doc.hxx>
 #include <ndgrf.hxx>
 #include <drawdoc.hxx>
+#include <unotools/fltrcfg.hxx>
 
 class Test : public SwModelTestBase
 {
@@ -364,6 +365,9 @@ void Test::testCharHighlight()
         "Office Open XML Text",
     };
 
+    SvtFilterOptions& rOpt = SvtFilterOptions::Get();
+    rOpt.SetCharBackground2Shading();
+
     for( size_t nFilter = 0; nFilter < SAL_N_ELEMENTS(aFilterNames); ++nFilter )
     {
         if (mxComponent.is())
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 1b3d555..14a99ff 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -414,6 +414,7 @@ protected:
     virtual void CharAnimatedText( const SvxBlinkItem& ) = 0;
 
     /// Sfx item RES_CHRATR_BACKGROUND
+    void CharBackgroundBase( const SvxBrushItem& );
     virtual void CharBackground( const SvxBrushItem& ) = 0;
 
     /// Sfx item RES_CHRATR_CJK_FONT
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index afcfd54..f095817 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -134,6 +134,7 @@
 #include "fields.hxx"
 #include <vcl/outdev.hxx>
 #include <i18nlangtag/languagetag.hxx>
+#include <unotools/fltrcfg.hxx>
 
 using ::editeng::SvxBorderLine;
 using namespace ::com::sun::star;
@@ -5310,7 +5311,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
             CharAnimatedText( static_cast< const SvxBlinkItem& >( rHt ) );
             break;
         case RES_CHRATR_BACKGROUND:
-            CharBackground( static_cast< const SvxBrushItem& >( rHt ) );
+            CharBackgroundBase( static_cast< const SvxBrushItem& >( rHt ) );
             break;
 
         case RES_CHRATR_CJK_FONT:
@@ -5633,4 +5634,17 @@ const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTxt
     return NULL;
 }
 
+void AttributeOutputBase::CharBackgroundBase( const SvxBrushItem& rBrush )
+{
+    const SvtFilterOptions& rOpt = SvtFilterOptions::Get();
+    if( rOpt.IsCharBackground2Highlighting() )
+    {
+        CharHighlight(rBrush);
+    }
+    else
+    {
+        CharBackground(rBrush);
+    }
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 4a2720101d9ea53be2eca4684926258b87d446f6
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Mon Mar 9 20:45:53 2015 +0100

    Char highlight: make optional how to export character background
    
    As highlighting or shading.
    
    Change-Id: Ib2a38e4cd0d49317288bb565383b690d4222c8ed

diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 800f028..1f2fb44 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -140,6 +140,10 @@ OfaMSFilterTabPage2::OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet
     pCheckButtonData(0)
 {
     get(m_pCheckLBContainer, "checklbcontainer");
+
+    get( aHighlightingRB, "highlighting");
+    get( aShadingRB,      "shading"     );
+
     Size aControlSize(248, 55);
     aControlSize = LogicToPixel(aControlSize, MAP_APPFONT);
     m_pCheckLBContainer->set_width_request(aControlSize.Width());
@@ -220,6 +224,14 @@ bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* )
         }
     }
 
+    if( aHighlightingRB->IsValueChangedFromSaved() )
+    {
+        if( aHighlightingRB->IsChecked() )
+            rOpt.SetCharBackground2Highlighting();
+        else
+            rOpt.SetCharBackground2Shading();
+    }
+
     return true;
 }
 
@@ -279,6 +291,13 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* )
         }
     }
     m_pCheckLB->SetUpdateMode( true );
+
+    if (rOpt.IsCharBackground2Highlighting())
+        aHighlightingRB->Check(true);
+    else
+        aShadingRB->Check(true);
+
+    aHighlightingRB->SaveValue();
 }
 
 void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType )
diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx
index d5e43d3..38d280b 100644
--- a/cui/source/options/optfltr.hxx
+++ b/cui/source/options/optfltr.hxx
@@ -83,6 +83,9 @@ class OfaMSFilterTabPage2 : public SfxTabPage
            sChgToFromSmartArt;
     SvLBoxButtonData*   pCheckButtonData;
 
+    RadioButton*    aHighlightingRB;
+    RadioButton*    aShadingRB;
+
     OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet& rSet );
     virtual ~OfaMSFilterTabPage2();
 
diff --git a/cui/uiconfig/ui/optfltrembedpage.ui b/cui/uiconfig/ui/optfltrembedpage.ui
index c7439b1..2b0cb04 100644
--- a/cui/uiconfig/ui/optfltrembedpage.ui
+++ b/cui/uiconfig/ui/optfltrembedpage.ui
@@ -92,5 +92,99 @@
         <property name="height">1</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkFrame" id="frame2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkBox" id="box2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">18</property>
+                <child>
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Export as:</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButtonBox" id="buttonbox1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="layout_style">start</property>
+                    <child>
+                      <object class="GtkRadioButton" id="highlighting">
+                        <property name="label" translatable="yes">Highlighting</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="xalign">0</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkRadioButton" id="shading">
+                        <property name="label" translatable="yes">Shading</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="xalign">0</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Character Background</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">1</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
   </object>
 </interface>
diff --git a/include/unotools/fltrcfg.hxx b/include/unotools/fltrcfg.hxx
index 5209597..22dec85 100644
--- a/include/unotools/fltrcfg.hxx
+++ b/include/unotools/fltrcfg.hxx
@@ -84,6 +84,11 @@ public:
     bool IsEnableCalcPreview() const;
     bool IsEnableWordPreview() const;
 
+    bool IsCharBackground2Highlighting() const;
+    bool IsCharBackground2Shading() const;
+    void SetCharBackground2Highlighting();
+    void SetCharBackground2Shading();
+
     static SvtFilterOptions& Get();
 };
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index d496c85..7eb8bc0 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -4070,6 +4070,13 @@
             </info>
             <value>false</value>
           </prop>
+          <prop oor:name="CharBackgroundToHighlighting" oor:type="xs:boolean" oor:nillable="false">
+            <info>
+              <desc>Specifies if character background is exported as highlighting
+              (and not as shading) when saving to Word document</desc>
+            </info>
+            <value>true</value>
+          </prop>
         </group>
       </group>
       <group oor:name="Graphic">
diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx
index 96b75f4..a0c46d8 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -51,6 +51,7 @@ using namespace com::sun::star::uno;
 #define FILTERCFG_USE_ENHANCED_FIELDS   0x100000
 #define FILTERCFG_WORD_WBCTBL           0x200000
 #define FILTERCFG_SMARTART_SHAPE_LOAD   0x400000
+#define FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING   0x8000000
 
 class SvtAppFilterOptions_Impl : public utl::ConfigItem
 {
@@ -242,7 +243,8 @@ struct SvtFilterOptions_Impl
             FILTERCFG_IMPRESS_LOAD |
             FILTERCFG_IMPRESS_SAVE |
             FILTERCFG_USE_ENHANCED_FIELDS |
-            FILTERCFG_SMARTART_SHAPE_LOAD;
+            FILTERCFG_SMARTART_SHAPE_LOAD |
+            FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING;
         Load();
     }
 
@@ -313,7 +315,7 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
     static Sequence<OUString> aNames;
     if(!aNames.getLength())
     {
-        int nCount = 13;
+        int nCount = 14;
         aNames.realloc(nCount);
         static const char* aPropNames[] =
         {
@@ -329,7 +331,8 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
             "Export/EnableExcelPreview",        //  9
             "Export/EnableWordPreview",         // 10
             "Import/ImportWWFieldsAsEnhancedFields", // 11
-            "Import/SmartArtToShapes"           // 12
+            "Import/SmartArtToShapes",          // 12
+            "Export/CharBackgroundToHighlighting"    // 13
         };
         OUString* pNames = aNames.getArray();
         for(int i = 0; i < nCount; i++)
@@ -356,6 +359,7 @@ static sal_uLong lcl_GetFlag(sal_Int32 nProp)
         case 10: nFlag = FILTERCFG_ENABLE_WORD_PREVIEW; break;
         case 11: nFlag = FILTERCFG_USE_ENHANCED_FIELDS; break;
         case 12: nFlag = FILTERCFG_SMARTART_SHAPE_LOAD; break;
+        case 13: nFlag = FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING; break;
 
         default: OSL_FAIL("illegal value");
     }
@@ -625,4 +629,27 @@ bool SvtFilterOptions::IsEnableWordPreview() const
     return pImp->IsFlag( FILTERCFG_ENABLE_WORD_PREVIEW );
 }
 
+
+bool SvtFilterOptions::IsCharBackground2Highlighting() const
+{
+    return pImp->IsFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING );
+}
+
+bool SvtFilterOptions::IsCharBackground2Shading() const
+{
+    return !pImp->IsFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING );
+}
+
+void SvtFilterOptions::SetCharBackground2Highlighting()
+{
+    pImp->SetFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING, true );
+    SetModified();
+}
+
+void SvtFilterOptions::SetCharBackground2Shading()
+{
+    pImp->SetFlag( FILTERCFG_CHAR_BACKGROUND_TO_HIGHLIGHTING, false );
+    SetModified();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit e9da2f3734fb8c73d10594b664a6a8364a58ea85
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Sat Mar 7 22:09:00 2015 +0100

    Revert "Char highlight: "Background Color" toolbar item"
    
    This reverts commit ef1a27657c9e1a394a5662a211bdb38153c4d0ba.

diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 09f4795..6813b0a 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2154,27 +2154,6 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
     {
         rSh.GetBoxBackground( aBrushItem );
     }
-    else if(nSelType & nsSelectionType::SEL_TXT && rSh.HasSelection())  // text range selected
-    {
-        SfxItemSet aCoreSet(GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END-1);
-
-        rSh.GetCurAttr(aCoreSet);
-
-        // Always use the visible background
-        const SfxPoolItem *pTmpBrush;
-        if( SfxItemState::SET == aCoreSet.GetItemState( RES_CHRATR_HIGHLIGHT, true, &pTmpBrush ) )
-        {
-            aBrushItem = *static_cast<const SvxBrushItem*>(pTmpBrush);
-        }
-        if( aBrushItem.GetColor() == COL_TRANSPARENT )
-        {
-            if( SfxItemState::SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, true, &pTmpBrush ) )
-            {
-                aBrushItem = *static_cast<const SvxBrushItem*>(pTmpBrush);
-            }
-        }
-        aBrushItem.SetWhich(RES_BACKGROUND);
-    }
     else
     {
         //UUUU Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
@@ -2234,10 +2213,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
     {
         rSh.GetBoxBackground( aBrushItem );
     }
-    else if(nSelType & nsSelectionType::SEL_TXT && rSh.HasSelection())  // text range selected
-    {
-        // This is really necessary to get the brush item before set it??
-    }
     else
     {
         //UUUU Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
@@ -2297,17 +2272,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
     {
         rSh.SetBoxBackground( aBrushItem );
     }
-    else if(nSelType & nsSelectionType::SEL_TXT && rSh.HasSelection())  // text range selected
-    {
-        SfxItemSet aCoreSet(GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END-1);
-
-        aBrushItem.SetWhich( RES_CHRATR_BACKGROUND );
-        aCoreSet.Put( aBrushItem );
-
-        SvxBrushItem aTransparentBrush( RES_CHRATR_HIGHLIGHT );
-        aCoreSet.Put( aTransparentBrush );
-        rSh.SetAttrSet(aCoreSet);
-    }
     else
     {
         //UUUU Adapt to new DrawingLayer FillStyle; use a parent which has XFILL_NONE set
commit fdabf0d34530cfee65c60e9600163c4632bec42d
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Sat Mar 7 21:12:12 2015 +0100

    Make "Embedded Objects" frame expendable to fill space better
    
    Change-Id: I9b9335464c774bca13013576583877895d673592

diff --git a/cui/uiconfig/ui/optfltrembedpage.ui b/cui/uiconfig/ui/optfltrembedpage.ui
index a3fe815..c7439b1 100644
--- a/cui/uiconfig/ui/optfltrembedpage.ui
+++ b/cui/uiconfig/ui/optfltrembedpage.ui
@@ -12,6 +12,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
         <property name="label_xalign">0</property>
         <property name="shadow_type">none</property>
         <child>
@@ -32,6 +33,7 @@
                   <object class="svtlo-SvSimpleTableContainer" id="checklbcontainer">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="vexpand">True</property>
                     <child internal-child="selection">
                       <object class="GtkTreeSelection" id="Simple Table Container-selection1"/>
                     </child>


More information about the Libreoffice-commits mailing list