[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - 2 commits - cui/source sw/qa vcl/source writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Oct 17 18:21:10 UTC 2017


 cui/source/options/optgdlg.cxx              |    4 --
 sw/qa/extras/rtfimport/data/tdf112211-2.rtf |   43 ++++++++++++++++++++++++++++
 sw/qa/extras/rtfimport/rtfimport.cxx        |    9 +++++
 vcl/source/app/IconThemeInfo.cxx            |    6 +++
 writerfilter/source/rtftok/rtfsprm.cxx      |    6 ---
 5 files changed, 58 insertions(+), 10 deletions(-)

New commits:
commit 8c71b0824c1f86d0966394b9e1ef4ebf7b6fa729
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Oct 10 07:58:26 2017 +0200

    tdf#112211 RTF import: fix unwanted direct formatting for other indents
    
    Commit 56a695fddb915bcba13b088b5b2b4e0841d4acbc (tdf#112211 RTF import:
    fix unwanted direct formatting for left indents, 2017-09-26) fixed left
    indents, and given that it was a regression fix, left the other indent
    types untouched.
    
    As it has been pointed out in the bug comment, the original bugdoc
    actually needs the other indent types removed as well, so let's do that.
    
    (cherry picked from commit 295cf49b81b8c008ec0ea2c92f7cf729d5523d4e)
    
    Conflicts:
            sw/qa/extras/rtfimport/rtfimport.cxx
    
    Change-Id: Ia4ea7e2214b7df27536f46b046f90bd703c107be
    Reviewed-on: https://gerrit.libreoffice.org/43448
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/qa/extras/rtfimport/data/tdf112211-2.rtf b/sw/qa/extras/rtfimport/data/tdf112211-2.rtf
new file mode 100644
index 000000000000..ed822e1f988b
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf112211-2.rtf
@@ -0,0 +1,43 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs1025
+{\fonttbl
+{\f0\fbidi \froman\fcharset0\fprq2 Times New Roman;}
+{\f3\fbidi \froman\fcharset2\fprq2 Symbol;}
+{\f39\fbidi \fswiss\fcharset0\fprq2 Verdana;}
+}
+\noqfpromote 
+{\stylesheet
+{\ql \li0\ri0\sl240\slmult0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f38\fs18\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 
+\snext0 \sqformat \spriority14 \styrsid11343869 Normal;}
+{\s59\ql \li720\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0\contextualspace \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f39\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 
+\sbasedon0 \snext59 \sqformat \spriority34 \styrsid12276622 List Paragraph;}
+}
+{\*\listtable
+{\list\listtemplateid1644085804\listhybrid
+{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0
+\levelstartat1\levelspace0\levelindent0
+{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}
+{\levelnumbers;}
+\f3\fbias0 \fi-360\li720\lin720 }
+{\listname ;}
+\listid2028170298}
+}
+{\*\listoverridetable
+{\listoverride\listid2028170298
+\listoverridecount0\ls24}
+}
+\paperw12240\paperh15840\margl1440\margr1440\margt1800\margb1440\gutter0\ltrsect 
+\facingp\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml1\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1
+\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace187\dgvspace187\dghorigin1440\dgvorigin1800\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\rsidroot15035986\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+\pard\plain AB{\b C}D{\b E}FGHIJKL\par
+\pard\plain \ltrpar\s59\ql \fi-360\li720\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls24\adjustright\rin0\lin720\pararsid7821880\contextualspace \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f39\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 
+{\rtlch\fcs1 \afs16 
+\ltrch\fcs0 \f39\fs16\insrsid16134103\charrsid16134103 Profile 1 \endash  }
+{\rtlch\fcs1 \afs16 \ltrch\fcs0 \f39\fs16\insrsid5270339 A1}
+{\rtlch\fcs1 \afs16 \ltrch\fcs0 \f39\fs16\insrsid16134103\charrsid16134103 
+\par 
+}
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index a69e8185fbeb..69390fbfae67 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -764,6 +764,15 @@ DECLARE_RTFIMPORT_TEST(testFdo36089, "fdo36089.rtf")
     CPPUNIT_ASSERT_EQUAL(sal_Int16(-50), getProperty<sal_Int16>(getRun(getParagraph(1), 2), "CharEscapement"));
 }
 
+DECLARE_RTFIMPORT_TEST(testTdf112211_2, "tdf112211-2.rtf")
+{
+    uno::Reference<beans::XPropertyState> xPropertyState(getParagraph(2), uno::UNO_QUERY);
+    beans::PropertyState ePropertyState = xPropertyState->getPropertyState("ParaLeftMargin");
+    // This was beans::PropertyState_DIRECT_VALUE -> direct formatting
+    // prevented inheritance from numbering definition.
+    CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE, ePropertyState);
+}
+
 DECLARE_RTFIMPORT_TEST(testFdo49892, "fdo49892.rtf")
 {
     uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx
index 5ff40c8cd9cc..f6301243de1a 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -163,12 +163,6 @@ static bool isSPRMDeduplicateBlacklist(Id nId)
     case NS_ooxml::LN_CT_TabStop_val:
     case NS_ooxml::LN_CT_TabStop_leader:
     case NS_ooxml::LN_CT_TabStop_pos:
-    // Erasing these just because they equal to the style one is
-    // problematic, as then the used value won't be from the style, but
-    // possibly from the numbering.
-    case NS_ooxml::LN_CT_Ind_right:
-    case NS_ooxml::LN_CT_Ind_firstLine:
-    case NS_ooxml::LN_CT_Ind_hanging:
     // \htmautsp arrives after the style table, so only the non-style value is
     // correct, keep these.
     case NS_ooxml::LN_CT_Spacing_beforeAutospacing:
commit d7b35fc5a86e398c3bb09a4f50ad2060dfcc6d83
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Wed Sep 20 13:12:27 2017 +0200

    Different take on tdf#108406: exclude helpimg from installed themes
    
    as it still might get selected as default theme under some circumstances
    and removing it from list in optgdlg.cxx leads to crash
    
    This reverts commit 60adba3fb904ed66251ff39c82fe20bec151ef0b but
    allegedly still crashes on Debian
    
    Change-Id: Ib853cc27058d8635482f19a8db26075d64103e1b
    Reviewed-on: https://gerrit.libreoffice.org/42545
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 7e7b9652f44f01fbaf5bc3fde454ba41ce0fe0f7)
    Reviewed-on: https://gerrit.libreoffice.org/42753
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 40cbe21b8747..07496d9e6c26 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -665,10 +665,6 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
     StyleSettings aStyleSettings = Application::GetSettings().GetStyleSettings();
     mInstalledIconThemes = aStyleSettings.GetInstalledIconThemes();
 
-    //Removing "Helpimg" from the list, as it is not a real iconset (see tdf#108406)
-    mInstalledIconThemes.erase(std::remove_if(mInstalledIconThemes.begin(), mInstalledIconThemes.end(),
-                                [](vcl::IconThemeInfo theme) { return theme.GetDisplayName() == "Helpimg";}), mInstalledIconThemes.end());
-
     // Start with the automatically chosen icon theme
     OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme();
     const vcl::IconThemeInfo& autoIconTheme = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, autoThemeId);
diff --git a/vcl/source/app/IconThemeInfo.cxx b/vcl/source/app/IconThemeInfo.cxx
index 6abae73f4826..5c70d1998b97 100644
--- a/vcl/source/app/IconThemeInfo.cxx
+++ b/vcl/source/app/IconThemeInfo.cxx
@@ -28,6 +28,8 @@ static const OUStringLiteral BREEZE_DARK_DISPLAY_NAME("Breeze Dark");
 static const OUStringLiteral SIFR_DARK_ID("sifr_dark");
 static const OUStringLiteral SIFR_DARK_DISPLAY_NAME("Sifr Dark");
 
+static const OUStringLiteral HELPIMG_FAKE_THEME("helpimg");
+
 OUString
 filename_from_url(const OUString& url)
 {
@@ -97,6 +99,10 @@ IconThemeInfo::UrlCanBeParsed(const OUString& url)
         return false;
     }
 
+    if (fname.indexOf(HELPIMG_FAKE_THEME) != -1 ) {
+        return false;
+    }
+
     return true;
 }
 


More information about the Libreoffice-commits mailing list