summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/options/optfltr.cxx19
-rw-r--r--cui/source/options/optfltr.hxx3
-rw-r--r--cui/uiconfig/ui/optfltrembedpage.ui94
-rw-r--r--include/unotools/fltrcfg.hxx5
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs7
-rw-r--r--unotools/source/config/fltrcfg.cxx33
6 files changed, 158 insertions, 3 deletions
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 800f02886797..1f2fb44929db 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 d5e43d323ec0..38d280b52a46 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 c7439b145dc2..2b0cb04a5d78 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 c64ce01be72b..8ae33d17abd5 100644
--- a/include/unotools/fltrcfg.hxx
+++ b/include/unotools/fltrcfg.hxx
@@ -87,6 +87,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 6b010d7dd118..b613d3f4d176 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -4082,6 +4082,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 3139ce52d3d8..84806e4b8979 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
{
@@ -251,7 +252,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();
}
@@ -322,7 +324,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[] =
{
@@ -338,7 +340,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++)
@@ -365,6 +368,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");
}
@@ -634,4 +638,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: */