[Libreoffice-commits] .: 2 commits - sfx2/inc sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Aug 10 11:08:48 PDT 2011


 sfx2/inc/sfx2/htmlmode.hxx      |    1 -
 sw/source/ui/chrdlg/pardlg.cxx  |   12 ++++--------
 sw/source/ui/config/viewopt.cxx |   11 ++++-------
 sw/source/ui/fmtui/tmpdlg.cxx   |    2 --
 4 files changed, 8 insertions(+), 18 deletions(-)

New commits:
commit 4a111eaece427ba898fe61d7ec9e4953c14d302e
Author: Harri Pitkänen <hatapitk at iki.fi>
Date:   Wed Aug 3 18:09:11 2011 +0300

    Enable export of basic CSS styles in HTML 3.2 mode
    
    Although "style" does not seem to be valid attribute in HTML 3.2
    it is harmless to export it. This simplifies the code and makes
    the exported HTML more useful in modern browsers.

diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 7f65e5e..581ed2a 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -333,24 +333,21 @@ sal_uInt16      GetHtmlMode(const SwDocShell* pShell)
     sal_uInt16 nRet = 0;
     if(!pShell || PTR_CAST(SwWebDocShell, pShell))
     {
-        nRet = HTMLMODE_ON;
+        nRet = HTMLMODE_ON | HTMLMODE_SOME_STYLES;
         SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
         switch ( rHtmlOpt.GetExportMode() )
         {
             case HTML_CFG_MSIE_40:
                 nRet |= HTMLMODE_SMALL_CAPS|
-                        HTMLMODE_SOME_STYLES|
                         HTMLMODE_FULL_STYLES|HTMLMODE_GRAPH_POS|
                         HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS;
             break;
             case HTML_CFG_NS40:
-                nRet |= HTMLMODE_SOME_STYLES|
-                        HTMLMODE_FRM_COLUMNS|HTMLMODE_BLINK|HTMLMODE_GRAPH_POS|
+                nRet |= HTMLMODE_FRM_COLUMNS|HTMLMODE_BLINK|HTMLMODE_GRAPH_POS|
                         HTMLMODE_SOME_ABS_POS;
             break;
             case HTML_CFG_WRITER:
                 nRet |= HTMLMODE_SMALL_CAPS|
-                        HTMLMODE_SOME_STYLES|
                         HTMLMODE_FRM_COLUMNS|HTMLMODE_FULL_STYLES|
                         HTMLMODE_BLINK|HTMLMODE_DROPCAPS|HTMLMODE_GRAPH_POS|
                         HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS;
commit 0153fc3c8893c56d6a330d6422b04bb5a61a4194
Author: Harri Pitkänen <hatapitk at iki.fi>
Date:   Mon Aug 1 22:12:21 2011 +0300

    Enable paragraph border settings in HTML editor for all HTML variants
    
    Previously border settings were not available in paragraph format dialog
    when HTML export format was "HTML 3.2". This was confusing since documents
    with borders could still be imported and you could even access the border
    dialog with suitably configured shortcut key.

diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx
index 5f3c36c..f4db27a 100644
--- a/sfx2/inc/sfx2/htmlmode.hxx
+++ b/sfx2/inc/sfx2/htmlmode.hxx
@@ -30,7 +30,6 @@
 
 
 #define HTMLMODE_ON                 0x0001
-#define HTMLMODE_PARA_BORDER        0x0002
 #define HTMLMODE_PARA_DISTANCE      0x0004
 #define HTMLMODE_SMALL_CAPS         0x0008
 #define HTMLMODE_FRM_COLUMNS        0x0010
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 5198c14..07a5b77 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -161,14 +161,10 @@ SwParaDlg::SwParaDlg(Window *pParent,
         {
             RemoveTabPage(TP_BACKGROUND);
         }
-        if(!bHtmlMode || (nHtmlMode & HTMLMODE_PARA_BORDER))
-        {
-            OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
-            OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
-            AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
-        }
-        else
-            RemoveTabPage(TP_BORDER);
+
+        OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
+        OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
+        AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
     }
 
     if (nDefPage)
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 637862c..7f65e5e 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -338,18 +338,18 @@ sal_uInt16      GetHtmlMode(const SwDocShell* pShell)
         switch ( rHtmlOpt.GetExportMode() )
         {
             case HTML_CFG_MSIE_40:
-                nRet |= HTMLMODE_PARA_BORDER|HTMLMODE_SMALL_CAPS|
+                nRet |= HTMLMODE_SMALL_CAPS|
                         HTMLMODE_SOME_STYLES|
                         HTMLMODE_FULL_STYLES|HTMLMODE_GRAPH_POS|
                         HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS;
             break;
             case HTML_CFG_NS40:
-                nRet |= HTMLMODE_PARA_BORDER|HTMLMODE_SOME_STYLES|
+                nRet |= HTMLMODE_SOME_STYLES|
                         HTMLMODE_FRM_COLUMNS|HTMLMODE_BLINK|HTMLMODE_GRAPH_POS|
                         HTMLMODE_SOME_ABS_POS;
             break;
             case HTML_CFG_WRITER:
-                nRet |= HTMLMODE_PARA_BORDER|HTMLMODE_SMALL_CAPS|
+                nRet |= HTMLMODE_SMALL_CAPS|
                         HTMLMODE_SOME_STYLES|
                         HTMLMODE_FRM_COLUMNS|HTMLMODE_FULL_STYLES|
                         HTMLMODE_BLINK|HTMLMODE_DROPCAPS|HTMLMODE_GRAPH_POS|
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 2843aa9..55cf1cc 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -218,8 +218,6 @@ SwTemplateDlg::SwTemplateDlg(Window*            pParent,
                     RemoveTabPage(TP_BACKGROUND);
                     RemoveTabPage(TP_DROPCAPS);
                 }
-                if(!(nHtmlMode & HTMLMODE_PARA_BORDER))
-                    RemoveTabPage(TP_BORDER);
             }
             else
             {


More information about the Libreoffice-commits mailing list