[Libreoffice-commits] .: 3 commits - cui/source svtools/inc svtools/source sw/source
Tor Lillqvist
tml at kemper.freedesktop.org
Fri Aug 26 07:24:54 PDT 2011
cui/source/options/opthtml.cxx | 19 +++++++------------
cui/source/options/opthtml.src | 1 -
svtools/inc/svtools/htmlcfg.hxx | 4 +---
svtools/source/config/htmlcfg.cxx | 10 +++-------
sw/source/ui/config/viewopt.cxx | 4 +---
sw/source/ui/shells/textsh.cxx | 4 ++--
6 files changed, 14 insertions(+), 28 deletions(-)
New commits:
commit 3f43b02433b970cd36ee4c9249e425d6b1bd9fbe
Author: Harri Pitkänen <hatapitk at iki.fi>
Date: Sat Aug 20 12:48:24 2011 +0300
Remove HTML 3.2 export option
diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 7c1c3ef..62dacb0 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -40,20 +40,17 @@
// Umwandlung der Modi zu den Positionen in der Listbox
const sal_uInt16 aPosToExportArr[] =
{
- HTML_CFG_HTML32,
HTML_CFG_MSIE,
HTML_CFG_NS40,
HTML_CFG_WRITER
};
-//#define DEPRECATED_ENTRY 0xFFFF
-
const sal_uInt16 aExportToPosArr[] =
{
- 0, //HTML 3.2
- 1, //MS Internet Explorer 4.0
- 3, //StarWriter
- 2 //Netscape Navigator 4.0
+ 1, //HTML 3.2 (removed, map to Netscape Navigator 4.0)
+ 0, //MS Internet Explorer 4.0
+ 2, //StarWriter
+ 1 //Netscape Navigator 4.0
};
// -----------------------------------------------------------------------
@@ -185,10 +182,8 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& )
aIgnoreFontNamesCB.Check(rHtmlOpt.IsIgnoreFontFamily());
sal_uInt16 nExport = rHtmlOpt.GetExportMode();
if( nExport >= SAL_N_ELEMENTS( aExportToPosArr ) )
- nExport = 4; // default for bad config entry is NS 4.0
+ nExport = 3; // default for bad config entry is NS 4.0
sal_uInt16 nPosArr = aExportToPosArr[ nExport ];
-// if( nPosArr == DEPRECATED_ENTRY )
-// nPosArr = aExportToPosArr[ 4 ]; // again: NS 4.0 is default
aExportLB.SelectEntryPos( nPosArr );
aExportLB.SaveValue();
diff --git a/cui/source/options/opthtml.src b/cui/source/options/opthtml.src
index 5de010b..4d8c0b5 100644
--- a/cui/source/options/opthtml.src
+++ b/cui/source/options/opthtml.src
@@ -249,7 +249,6 @@ TabPage RID_OFAPAGE_HTMLOPT
DropDown = TRUE ;
StringList =
{
- < "HTML 3.2" ; > ;
< "Microsoft Internet Explorer" ; > ;
< "Netscape Navigator"; > ;
< "%PRODUCTNAME Writer" ; > ;
diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx
index 4818208..c021637 100644
--- a/svtools/source/config/htmlcfg.cxx
+++ b/svtools/source/config/htmlcfg.cxx
@@ -162,7 +162,6 @@ void SvxHtmlOptions::Load( const Sequence< OUString >& aNames )
pValues[nProp] >>= nExpMode;
switch( nExpMode )
{
- case 0: nExpMode = HTML_CFG_HTML32; break;
case 1: nExpMode = HTML_CFG_MSIE; break;
case 3: nExpMode = HTML_CFG_WRITER; break;
case 4: nExpMode = HTML_CFG_NS40; break;
@@ -231,7 +230,6 @@ void SvxHtmlOptions::Commit()
switch( nExpMode )
{
- case HTML_CFG_HTML32: nExpMode = 0; break;
case HTML_CFG_MSIE: nExpMode = 1; break;
case HTML_CFG_WRITER: nExpMode = 3; break;
case HTML_CFG_NS40: nExpMode = 4; break;
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 9d40d70..4d50236 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -353,8 +353,6 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
HTMLMODE_BLINK|HTMLMODE_DROPCAPS|HTMLMODE_GRAPH_POS|
HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS;
break;
- case HTML_CFG_HTML32:
- break;
}
}
return nRet;
commit b4052c88e4240070623f13ab130f41a703cf7b7d
Author: Harri Pitkänen <hatapitk at iki.fi>
Date: Sat Aug 20 10:26:53 2011 +0300
Remove HTML_CFG_MSIE_40_OLD
This export format has not been available in the UI but there were still
a few references to it left in the source.
diff --git a/svtools/inc/svtools/htmlcfg.hxx b/svtools/inc/svtools/htmlcfg.hxx
index 26bb48a..e73a385 100644
--- a/svtools/inc/svtools/htmlcfg.hxx
+++ b/svtools/inc/svtools/htmlcfg.hxx
@@ -42,7 +42,6 @@
#define HTML_CFG_MSIE 1 // Internet Explorer
#define HTML_CFG_WRITER 2 // Writer
#define HTML_CFG_NS40 3 // Netscape 4.0
-#define HTML_CFG_MSIE_40_OLD 4 // Internet Explorer 4.0 - alter Wert
#define HTML_CFG_MAX HTML_CFG_NS40
diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx
index 5de4c38..4818208 100644
--- a/svtools/source/config/htmlcfg.cxx
+++ b/svtools/source/config/htmlcfg.cxx
@@ -166,7 +166,6 @@ void SvxHtmlOptions::Load( const Sequence< OUString >& aNames )
case 1: nExpMode = HTML_CFG_MSIE; break;
case 3: nExpMode = HTML_CFG_WRITER; break;
case 4: nExpMode = HTML_CFG_NS40; break;
- case 5: nExpMode = HTML_CFG_MSIE_40_OLD;break;
default: nExpMode = HTML_CFG_NS40; break;
}
@@ -236,7 +235,6 @@ void SvxHtmlOptions::Commit()
case HTML_CFG_MSIE: nExpMode = 1; break;
case HTML_CFG_WRITER: nExpMode = 3; break;
case HTML_CFG_NS40: nExpMode = 4; break;
- case HTML_CFG_MSIE_40_OLD: nExpMode = 5; break;
default: nExpMode = 4; break; // NS40
}
commit 92a985e7c6a94ee02fd9131c4b382611f326989b
Author: Harri Pitkänen <hatapitk at iki.fi>
Date: Sat Aug 13 13:40:46 2011 +0300
Remove extra #define
HTML_CFG_MSIE was an alias for HTML_CFG_MSIE_40, just use it everywhere
for clarity.
diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index a3016e6..7c1c3ef 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -41,7 +41,7 @@
const sal_uInt16 aPosToExportArr[] =
{
HTML_CFG_HTML32,
- HTML_CFG_MSIE_40,
+ HTML_CFG_MSIE,
HTML_CFG_NS40,
HTML_CFG_WRITER
};
@@ -225,7 +225,7 @@ IMPL_LINK(OfaHtmlTabPage, ExportHdl_Impl, ListBox*, pBox)
sal_uInt16 nExport = aPosToExportArr[ pBox->GetSelectEntryPos() ];
switch( nExport )
{
- case HTML_CFG_MSIE_40:
+ case HTML_CFG_MSIE:
case HTML_CFG_NS40 :
case HTML_CFG_WRITER :
aPrintExtensionCB.Enable(sal_True);
diff --git a/svtools/inc/svtools/htmlcfg.hxx b/svtools/inc/svtools/htmlcfg.hxx
index c668324..26bb48a 100644
--- a/svtools/inc/svtools/htmlcfg.hxx
+++ b/svtools/inc/svtools/htmlcfg.hxx
@@ -39,8 +39,7 @@
// !!!be aware!!!: the following defines are _not_ used as values in the configuration file
// this is because of compatibility reasons
#define HTML_CFG_HTML32 0 // Html 3.2
-#define HTML_CFG_MSIE_40 1 // Internet Explorer 4.0
-#define HTML_CFG_MSIE HTML_CFG_MSIE_40
+#define HTML_CFG_MSIE 1 // Internet Explorer
#define HTML_CFG_WRITER 2 // Writer
#define HTML_CFG_NS40 3 // Netscape 4.0
#define HTML_CFG_MSIE_40_OLD 4 // Internet Explorer 4.0 - alter Wert
diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx
index 4b4f342..5de4c38 100644
--- a/svtools/source/config/htmlcfg.cxx
+++ b/svtools/source/config/htmlcfg.cxx
@@ -163,7 +163,7 @@ void SvxHtmlOptions::Load( const Sequence< OUString >& aNames )
switch( nExpMode )
{
case 0: nExpMode = HTML_CFG_HTML32; break;
- case 1: nExpMode = HTML_CFG_MSIE_40; break;
+ case 1: nExpMode = HTML_CFG_MSIE; break;
case 3: nExpMode = HTML_CFG_WRITER; break;
case 4: nExpMode = HTML_CFG_NS40; break;
case 5: nExpMode = HTML_CFG_MSIE_40_OLD;break;
@@ -233,7 +233,7 @@ void SvxHtmlOptions::Commit()
switch( nExpMode )
{
case HTML_CFG_HTML32: nExpMode = 0; break;
- case HTML_CFG_MSIE_40: nExpMode = 1; break;
+ case HTML_CFG_MSIE: nExpMode = 1; break;
case HTML_CFG_WRITER: nExpMode = 3; break;
case HTML_CFG_NS40: nExpMode = 4; break;
case HTML_CFG_MSIE_40_OLD: nExpMode = 5; break;
@@ -388,7 +388,7 @@ sal_Bool SvxHtmlOptions::IsPrintLayoutExtension() const
sal_Bool bRet = 0 != (pImp->nFlags & HTMLCFG_PRINT_LAYOUT_EXTENSION);
switch( pImp->nExportMode )
{
- case HTML_CFG_MSIE_40:
+ case HTML_CFG_MSIE:
case HTML_CFG_NS40 :
case HTML_CFG_WRITER :
break;
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 2406518..9d40d70 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -338,7 +338,7 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
switch ( rHtmlOpt.GetExportMode() )
{
- case HTML_CFG_MSIE_40:
+ case HTML_CFG_MSIE:
nRet |= HTMLMODE_SMALL_CAPS|
HTMLMODE_FULL_STYLES|HTMLMODE_GRAPH_POS|
HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS;
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index b735310..e46d7d3 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -517,7 +517,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
sal_uInt16 nExport = rHtmlOpt.GetExportMode();
if( HTML_CFG_MSIE == nExport ||
HTML_CFG_HTML32 == nExport ||
- HTML_CFG_MSIE_40 == nExport ||
+ HTML_CFG_MSIE == nExport ||
HTML_CFG_HTML32 == nExport )
{
bSingleCol = sal_True;
@@ -801,7 +801,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
{
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
sal_uInt16 nExport = rHtmlOpt.GetExportMode();
- if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
+ if(HTML_CFG_MSIE != nExport && HTML_CFG_WRITER != nExport )
rSet.DisableItem(nWhich);
}
}
More information about the Libreoffice-commits
mailing list