[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 14 commits - chart2/source external/libmspub i18npool/source lotuswordpro/source scp2/inc sd/source svl/source svtools/source svx/source sw/qa sw/source vcl/source vcl/unx writerfilter/source

Jacobo Aragunde Pérez jaragunde at igalia.com
Fri Jul 4 02:32:17 PDT 2014


 chart2/source/controller/dialogs/DataBrowserModel.cxx                             |    4 -
 external/libmspub/0001-fdo-80661-clash-with-a-global-symbol-from-libreoffic.patch |   38 +++++++++
 external/libmspub/UnpackedTarball_libmspub.mk                                     |    6 +
 i18npool/source/collator/collator_unicode.cxx                                     |    5 +
 lotuswordpro/source/filter/tocread.cxx                                            |   10 ++
 scp2/inc/macros.inc                                                               |    4 -
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx                            |   13 +++
 sd/source/ui/view/outlnvs2.cxx                                                    |   11 ++
 svl/source/numbers/zforfind.cxx                                                   |   38 +++++++++
 svtools/source/svhtml/parhtml.cxx                                                 |   12 ++-
 svx/source/fmcomp/gridcell.cxx                                                    |    7 +
 sw/qa/core/data/rtf/pass/fdo54641.rtf                                             |   39 ++++++++++
 sw/qa/extras/rtfexport/data/fdo78758.rtf                                          |    9 ++
 sw/qa/extras/rtfexport/rtfexport.cxx                                              |   10 ++
 sw/source/filter/ww8/attributeoutputbase.hxx                                      |    2 
 sw/source/filter/ww8/docxattributeoutput.cxx                                      |    2 
 sw/source/filter/ww8/docxattributeoutput.hxx                                      |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx                                       |   37 ++++-----
 sw/source/filter/ww8/rtfattributeoutput.hxx                                       |    9 --
 sw/source/filter/ww8/wrtw8esh.cxx                                                 |    2 
 sw/source/filter/ww8/wrtw8nds.cxx                                                 |    4 -
 sw/source/filter/ww8/wrtww8gr.cxx                                                 |    2 
 sw/source/filter/ww8/ww8attributeoutput.hxx                                       |    2 
 sw/source/ui/frmdlg/frmpage.cxx                                                   |   10 +-
 vcl/source/gdi/outdev4.cxx                                                        |    2 
 vcl/unx/gtk/a11y/atkwrapper.cxx                                                   |   10 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                                 |    8 +-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx                                 |    2 
 28 files changed, 245 insertions(+), 55 deletions(-)

New commits:
commit eca34a44bf3a697b4e113467750b4777f0cf46a6
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Thu Jul 3 20:13:51 2014 +0200

    fdo#39944: Fix mapping for some a11y roles to ATK
    
    In particular, EDIT_BAR, EMBEDDED_OBJECT and HYPER_LINK were being
    mapped to custom roles when specific roles exist; fixed passing the
    proper name to registerRole.
    
    Besides, moved two roles that were in the section 'don't exist in ATK
    yet' because that's not the case now.
    
    Change-Id: I6818a0ac623f45053812b5c6dd5fc25c9abf4f65
    (cherry picked from commit 7c37cd7bb26b91bda5e57d7bd0cecdbc9d1ebb22)
    Reviewed-on: https://gerrit.libreoffice.org/10068
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index b93f6eb..5336f48 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -289,8 +289,8 @@ static AtkRole mapToAtkRole( sal_Int16 nRole )
     if( ! initialized )
     {
         // re-use strings from ATK library
-        roleMap[accessibility::AccessibleRole::EDIT_BAR] = registerRole("edit bar");
-        roleMap[accessibility::AccessibleRole::EMBEDDED_OBJECT] = registerRole("embedded component");
+        roleMap[accessibility::AccessibleRole::EDIT_BAR] = registerRole("editbar");
+        roleMap[accessibility::AccessibleRole::EMBEDDED_OBJECT] = registerRole("embedded");
         roleMap[accessibility::AccessibleRole::CHART] = registerRole("chart");
         roleMap[accessibility::AccessibleRole::CAPTION] = registerRole("caption");
         roleMap[accessibility::AccessibleRole::DOCUMENT] = registerRole("document frame");
@@ -300,16 +300,16 @@ static AtkRole mapToAtkRole( sal_Int16 nRole )
         roleMap[accessibility::AccessibleRole::FORM] = registerRole("form");
         roleMap[accessibility::AccessibleRole::GROUP_BOX] = registerRole("grouping");
         roleMap[accessibility::AccessibleRole::COMMENT] = registerRole("comment");
+        roleMap[accessibility::AccessibleRole::IMAGE_MAP] = registerRole("image map");
+        roleMap[accessibility::AccessibleRole::TREE_ITEM] = registerRole("tree item");
+        roleMap[accessibility::AccessibleRole::HYPER_LINK] = registerRole("link");
 
         // these don't exist in ATK yet
         roleMap[accessibility::AccessibleRole::END_NOTE] = registerRole("end note");
         roleMap[accessibility::AccessibleRole::FOOTNOTE] = registerRole("foot note");
-        roleMap[accessibility::AccessibleRole::HYPER_LINK] = registerRole("hyper link");
         roleMap[accessibility::AccessibleRole::SHAPE] = registerRole("shape");
         roleMap[accessibility::AccessibleRole::TEXT_FRAME] = registerRole("text frame");
-        roleMap[accessibility::AccessibleRole::IMAGE_MAP] = registerRole("image map");
         roleMap[accessibility::AccessibleRole::NOTE] = registerRole("note");
-        roleMap[accessibility::AccessibleRole::TREE_ITEM] = registerRole("tree item");
 
         initialized = true;
     }
commit 3c0872cb375b9e3587a1a8e995827d34202214ce
Author: Andras Timar <andras.timar at collabora.com>
Date:   Thu Jul 3 13:35:03 2014 +0200

    fdo#77057 quick fix: do not touch KindMap for alien file types
    
    (cherry picked from commit 57bf88d21cacb025e7bea40da78616bb4d165215)
    
    Conflicts:
    	scp2/inc/macros.inc
    
    Change-Id: Iffc24dc7ce12de07660eadcf8a525e77856593e1
    Reviewed-on: https://gerrit.libreoffice.org/10051
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index 6bab84d..d2514fb 100755
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -412,7 +412,6 @@ End
     REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
     REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
     REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
-    REGISTRY_ENTRY_KINDMAP(name, modid, key) \
 
 #define CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
     CONDITIONAL_MODULE_ENTRY(name,modid) \
@@ -427,9 +426,6 @@ End
     REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
     REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
     REGISTRY_ENTRY_TEMPLATE_CAPABILITIES(name,modid,key,doc_type) \
-    REGISTRY_ENTRY_KINDMAP(name, modid, key) \
-
-// ---------------------------------------
 
 #ifdef _MSC_VER
 
commit 5fb6bf9ea34468b2f5e1424886f4060b96886a1e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 3 11:17:37 2014 +0100

    coverity#1222240 Untrusted value as argument
    
    and
    
    coverity#1222239 Untrusted value as argument
    
    (cherry picked from commit 5e043613266113a873c55ad45ab0fb1ae14286e8)
    
    Change-Id: I48bacfd988a34d67ffa542edba7cba1bb9b0b3cc
    Reviewed-on: https://gerrit.libreoffice.org/10052
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index c27909c..8be2015 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -67,6 +67,16 @@ CBenTOCReader::ReadLabelAndTOC()
     if ((Err = ReadLabel(&TOCOffset, &cTOCSize)) != BenErr_OK)
         return Err;
 
+    unsigned long nLength;
+    if ((Err = cpContainer->GetSize(&nLength)) != BenErr_OK)
+        return Err;
+
+    if (TOCOffset > nLength)
+        return BenErr_ReadPastEndOfTOC;
+
+    if (cTOCSize > nLength - TOCOffset)
+        return BenErr_ReadPastEndOfTOC;
+
     if ((Err = cpContainer->SeekToPosition(TOCOffset)) != BenErr_OK)
         return Err;
 
commit 28d8ceba68e739303b40a1218af3bcea08b18196
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 2 12:35:11 2014 +0100

    allow build with icu 4.2
    
    Change-Id: I4bbcff7963520426d4c04e15d2239431aff65b56
    Reviewed-on: https://gerrit.libreoffice.org/10042
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index 42dfef3..35c237d 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -308,6 +308,10 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
             if (func && funclen) {
                 const sal_uInt8* ruleImage=func();
                 size_t ruleImageSize = funclen();
+
+#if (U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM <= 2)
+                uca_base = new RuleBasedCollator(static_cast<UChar*>(NULL), status);
+#else
                 // Not only changed ICU 53.1 the API behavior that a negative
                 // length (ruleImageSize) now leads to failure, but also that
                 // the base RuleBasedCollator passed as uca_base here needs to
@@ -319,6 +323,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
                 // NULL (default) locale does not.
                 uca_base = static_cast<RuleBasedCollator*>(icu::Collator::createInstance(
                             icu::Locale::getRoot(), status));
+#endif
                 if (! U_SUCCESS(status)) throw RuntimeException();
                 collator = new RuleBasedCollator(
                         reinterpret_cast<const uint8_t*>(ruleImage), ruleImageSize, uca_base, status);
commit 4f369500d316126d4d7a9a1856e9ea481e735254
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Jul 2 22:24:52 2014 +0200

    resolved fdo#80166 check input against date acceptance pattern plausibility
    
    ... to prevent confusion of #.### input with D.M that then later is
    discarded as invalid date input instead of accepted as valid numeric
    input.
    
    (cherry picked from commit 836e504c859a5b67f7ab7ba842785951d41058cd)
    
    work around nonsense -Werror=maybe-uninitialized, fdo#80166 follow-up
    
    (cherry picked from commit 397362d8532d7b0abe38f2024dd2cefe2482d6a3)
    
    0f9cf74550e43d174bf6ac75e70c51ab7f51ccf8
    
    Change-Id: I178e28b7ef3b26d04eecc73e5e5c61ee41f89e32
    Reviewed-on: https://gerrit.libreoffice.org/10037
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 2302540..5aee40d 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -1186,6 +1186,8 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt )
     }
     nDatePatternStart = nStartPatternAt; // remember start particle
 
+    const sal_Int32 nMonthsInYear = pFormatter->GetCalendar()->getNumberOfMonthsInYear();
+
     for (sal_Int32 nPattern=0; nPattern < sDateAcceptancePatterns.getLength(); ++nPattern)
     {
         sal_uInt16 nNext = nDatePatternStart;
@@ -1195,12 +1197,46 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt )
         sal_Int32 nPat = 0;
         for ( ; nPat < rPat.getLength() && bOk && nNext < nAnzStrings; ++nPat, ++nNext)
         {
-            switch (rPat[nPat])
+            const sal_Unicode c = rPat[nPat];
+            switch (c)
             {
             case 'Y':
             case 'M':
             case 'D':
                 bOk = IsNum[nNext];
+                if (bOk && (c == 'M' || c == 'D'))
+                {
+                    // Check the D and M cases for plausibility. This also
+                    // prevents recognition of date instead of number with a
+                    // numeric group input if date separator is identical to
+                    // group separator, for example with D.M as a pattern and
+                    // #.### as a group.
+                    sal_Int32 nMaxLen, nMaxVal;
+                    switch (c)
+                    {
+                        case 'M':
+                            nMaxLen = 2;
+                            nMaxVal = nMonthsInYear;
+                            break;
+                        case 'D':
+                            nMaxLen = 2;
+                            nMaxVal = 31;
+                            break;
+                        default:
+                            // This merely exists against
+                            // -Werror=maybe-uninitialized, which is nonsense
+                            // after the (c == 'M' || c == 'D') check above,
+                            // but ...
+                            nMaxLen = 2;
+                            nMaxVal = 31;
+                    }
+                    bOk = (sStrArray[nNext].getLength() <= nMaxLen);
+                    if (bOk)
+                    {
+                        sal_Int32 nNum = sStrArray[nNext].toInt32();
+                        bOk = (1 <= nNum && nNum <= nMaxVal);
+                    }
+                }
                 if (bOk)
                     ++nDatePatternNumbers;
                 break;
commit 377f7a8f6bbc661bf70bbbc1651ceb2b397a6b48
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 1 13:29:03 2014 +0100

    Resolves: fdo#42747 limits need to multiplied by num of decimal places
    
    NumericFormatter limits need to multiplied by num of decimal places because
    the arg is a long so to retain decimal places its got to be raised up by
    the num of places
    
    Change-Id: Idbc49a9b1dde5fe176e5170d3be605a998050da5
    (cherry picked from commit 63885c86f866411f01f1b6fceaa07f054a5a3550)
    Reviewed-on: https://gerrit.libreoffice.org/10015
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index b47d510..2ded750 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2090,6 +2090,13 @@ void DbCurrencyField::implAdjustGenericFieldSetting( const Reference< XPropertyS
         sal_Bool    bThousand   = getBOOL( _rxModel->getPropertyValue( FM_PROP_SHOWTHOUSANDSEP ) );
         OUString aStr( getString( _rxModel->getPropertyValue(FM_PROP_CURRENCYSYMBOL ) ) );
 
+        //fdo#42747 the min/max/first/last of vcl NumericFormatters needs to be
+        //multiplied by the no of decimal places. See also
+        //VclBuilder::mungeAdjustment
+        int nMul = rtl_math_pow10Exp(1, m_nScale);
+        nMin *= nMul;
+        nMax *= nMul;
+
         static_cast< LongCurrencyField* >( m_pWindow )->SetUseThousandSep( bThousand );
         static_cast< LongCurrencyField* >( m_pWindow )->SetDecimalDigits( m_nScale );
         static_cast< LongCurrencyField* >( m_pWindow )->SetCurrencySymbol( aStr );
commit c9c1c00910df32af8b9313ed6a9d2b0d2562b24c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jul 1 17:48:28 2014 +0200

    fdo#80014: vcl: fix drawing of linear gradients
    
    There is an off-by-one error in OutputDevice::ImplDrawLinearGradient()
    that causes the bottom line to remain black.
    
    (regression from 04d937c1ec36c2d9fa8c90604c81a37d30e97da6)
    
    (cherry picked from commit d51f53fedb8cd68b1b3122c7199c4ea2d3a6980f)
    
    Conflicts:
    	vcl/source/outdev/gradient.cxx
    
    Change-Id: I33948ec8065e446a9ec7efeab5e506c93fa2e9e8
    Reviewed-on: https://gerrit.libreoffice.org/10023
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index e817e57..00e05a9 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -303,7 +303,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
 
         // Polygon for this color step
         aRect.Top() = (long)( fGradientLine + ((double) i) * fScanInc );
-        aRect.Bottom() = (long)( fGradientLine + ( ((double) i) + 1.0 ) * fScanInc + fScanInc*.1 );
+        aRect.Bottom() = (long)( fGradientLine + ( ((double) i) + 1.0 ) * fScanInc);
         aPoly[0] = aRect.TopLeft();
         aPoly[1] = aRect.TopRight();
         aPoly[2] = aRect.BottomRight();
commit 1b0f344b5ff1172783c1b108326b91dfac0965dd
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jun 27 16:02:45 2014 +0200

    fdo#78758: sw: RTF export: don't export multiple \fldrst for one hyperlink
    
    Ensure that we export only one \fldresult per hyperlink by doing that in
    StartURL() and EndURL(); the TextINetFormat() is called once per text
    portion.  This shouldn't cause problems as there can't be anything
    between the end of the \field group and the start of \fldresult anyway.
    
    Replace the annoying call to EndURL() from EndRun() with a special case
    in EndURL() to store things in the right buffer (hopefully).
    
    (somehow this is regression from c4498251cb7181a9f272b0720f398597c0daef09)
    
    (cherry picked from commit b8907bf3d3b37c686a414ffbbd2d732348aab5b9)
    
    Conflicts:
    	sw/source/filter/ww8/docxattributeoutput.hxx
    	sw/source/filter/ww8/rtfattributeoutput.cxx
    	sw/source/filter/ww8/rtfattributeoutput.hxx
    	sw/source/filter/ww8/ww8attributeoutput.hxx
    
    Change-Id: I209ea7a384fb1cb5d1505a70ecc4a4536bbf26a2
    Reviewed-on: https://gerrit.libreoffice.org/10021
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/qa/extras/rtfexport/data/fdo78758.rtf b/sw/qa/extras/rtfexport/data/fdo78758.rtf
new file mode 100644
index 0000000..49c0502
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/fdo78758.rtf
@@ -0,0 +1,9 @@
+{\rtf1\ansi
+\par \pard\plain
+{{\field{\*\fldinst HYPERLINK "#__RefHeading___Toc264438068" }
+{\fldrslt {\langfe1024\rtlch \ltrch\loch\lang1024
+EE5E EeEEE5EE}{\scaps\langfe1024\rtlch \ltrch\loch\lang1024
+e}{\langfe1024\rtlch \ltrch\loch\lang1024
+\tab 46}}}}
+\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index a8db213..5b026c6 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -460,6 +460,16 @@ DECLARE_RTFEXPORT_TEST(testHyperlink, "hyperlink.rtf")
     CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(getRun(getParagraph(1), 3, "!"), "HyperLinkURL"));
 }
 
+DECLARE_RTFEXPORT_TEST(test78758, "fdo78758.rtf")
+{
+    CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc264438068"),
+        getProperty<OUString>(getRun(getParagraph(2), 1, "EE5E EeEEE5EE"), "HyperLinkURL"));
+    CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc264438068"),
+        getProperty<OUString>(getRun(getParagraph(2), 2, "e"), "HyperLinkURL"));
+    CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc264438068"),
+        getProperty<OUString>(getRun(getParagraph(2), 3, "\t46"), "HyperLinkURL"));
+}
+
 DECLARE_RTFEXPORT_TEST(testTextFrameBorders, "textframe-borders.rtf")
 {
     uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index b9cdb5e..a858308 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -208,7 +208,7 @@ public:
     virtual bool StartURL( const OUString& rUrl, const OUString& rTarget ) = 0;
 
     /// Output URL end.
-    virtual bool EndURL() = 0;
+    virtual bool EndURL(bool isAtEndOfParagraph) = 0;
 
     virtual void FieldVanish( const OUString& rTxt, ww::eField eType ) = 0;
 
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 054e946..2056863 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1437,7 +1437,7 @@ bool DocxAttributeOutput::StartURL( const OUString& rUrl, const OUString& rTarge
     return true;
 }
 
-bool DocxAttributeOutput::EndURL()
+bool DocxAttributeOutput::EndURL(bool const)
 {
     m_closeHyperlinkInThisRun = true;
     return true;
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 2099116..5da7715 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -162,7 +162,7 @@ public:
     virtual bool StartURL( const OUString& rUrl, const OUString& rTarget );
 
     /// Output URL end.
-    virtual bool EndURL();
+    virtual bool EndURL(bool) SAL_OVERRIDE;
 
     virtual void FieldVanish( const OUString& rTxt, ww::eField eType );
 
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 5844c0d..f73ab4d 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -413,8 +413,6 @@ void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool bSing
 void RtfAttributeOutput::EndRun()
 {
     SAL_INFO("sw.rtf", OSL_THIS_FUNC);
-    if (m_bInURL)
-        EndURL();
     m_aRun->append(SAL_NEWLINE_STRING);
     m_aRun.appendAndClear(m_aRunText);
     if (!m_bSingleEmptyRun && m_bInRun)
@@ -494,25 +492,32 @@ bool RtfAttributeOutput::StartURL( const OUString& rUrl, const OUString& rTarget
     }
 
     m_aStyles.append("}");
-    m_bHadFieldResult = false;
-    m_bInURL = true;
+    m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " {");
     return true;
 }
 
-bool RtfAttributeOutput::EndURL()
+bool RtfAttributeOutput::EndURL(bool const isAtEndOfParagraph)
 {
     SAL_INFO("sw.rtf", OSL_THIS_FUNC);
 
-    if (m_bInURL)
-        m_bInURL = false;
-    else
-        return true;
-
-    // close the fldrslt group
-    if (m_bHadFieldResult)
+    // UGLY: usually EndRun is called earlier, but there is an extra
+    // call to OutAttrWithRange() when at the end of the paragraph,
+    // so in that special case the output needs to be appended to the
+    // new run's text instead of the previous run
+    if (isAtEndOfParagraph)
+    {
+        // close the fldrslt group
+        m_aRunText->append("}}");
+        // close the field group
         m_aRunText->append('}');
-    // close the field group
-    m_aRunText->append('}');
+    }
+    else
+    {
+        // close the fldrslt group
+        m_aRun->append("}}");
+        // close the field group
+        m_aRun->append('}');
+    }
     return true;
 }
 
@@ -2395,8 +2400,6 @@ void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL )
         const SwCharFmt* pFmt;
         const SwTxtINetFmt* pTxtAtr = rURL.GetTxtINetFmt();
 
-        m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
-        m_bHadFieldResult = true;
         if( pTxtAtr && 0 != ( pFmt = pTxtAtr->GetCharFmt() ))
         {
             sal_uInt16 nStyle = m_rExport.GetId( *pFmt );
@@ -3249,13 +3252,11 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport )
     m_bBufferSectionHeaders( false ),
     m_bLastTable( true ),
     m_bWroteCellInfo( false ),
-    m_bHadFieldResult( false ),
     m_bTableRowEnded( false ),
     m_aCells(),
     m_bSingleEmptyRun(false),
     m_bInRun(false),
     m_nPostitFieldsMaxId(0),
-    m_bInURL(false),
     m_pFlyFrameSize(0),
     m_pPrevPageDesc(0)
 {
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index b5b19a9..fd9b6f7 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -95,7 +95,7 @@ public:
     virtual bool StartURL( const OUString& rUrl, const OUString& rTarget );
 
     /// Output URL end.
-    virtual bool EndURL();
+    virtual bool EndURL(bool isAtEndOfParagraph) SAL_OVERRIDE;
 
     virtual void FieldVanish( const OUString& rTxt, ww::eField eType );
 
@@ -557,11 +557,6 @@ private:
      */
     bool m_bWroteCellInfo;
 
-    /*
-     * If we had a field result in the URL.
-     */
-    bool m_bHadFieldResult;
-
     /// If we ended a table row without starting a new one.
     bool m_bTableRowEnded;
 
@@ -575,8 +570,6 @@ private:
 
     unsigned int m_nPostitFieldsMaxId;
 
-    bool m_bInURL;
-
     /// When exporting fly frames, this holds the real size of the frame.
     const Size* m_pFlyFrameSize;
 
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 8b31083..8199623 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1165,7 +1165,7 @@ void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt)
         const OUString &rStr = pURL->GetRepresentation();
         m_rExport.AttrOutput().RawText( rStr, true, GetNodeCharSet() ); // FIXME kendy: is the 'true' actually correct here?  It was here before, but... ;-)
 
-        m_rExport.AttrOutput().EndURL();
+        m_rExport.AttrOutput().EndURL(false);
         m_rExport.nTxtTyp = nOldTxtTyp;
     }
 }
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9670577..bc384df 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -999,7 +999,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget
     return true;
 }
 
-bool WW8AttributeOutput::EndURL()
+bool WW8AttributeOutput::EndURL(bool const)
 {
     // hyperlinks only in WW8
     if ( !m_rWW8Export.bWrtWW8 )
@@ -1141,7 +1141,7 @@ int SwWW8AttrIter::OutAttrWithRange(xub_StrLen nPos)
                     }
                     if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd )
                     {
-                        if ( m_rExport.AttrOutput().EndURL() )
+                        if (m_rExport.AttrOutput().EndURL(nPos == rNd.Len()))
                             --nRet;
                     }
                     break;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 92677df..61a8c17 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -512,7 +512,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
     //Added for i120568,the hyperlink info within a graphic whose anchor type is
     //"As character" will be exported to ensure the fidelity
     if( bURLStarted )
-        m_pAttrOutput->EndURL();
+        m_pAttrOutput->EndURL(false);
 }
 
 GraphicDetails& GraphicDetails::operator=(const GraphicDetails &rOther)
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index 2c84433..8ef2124 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -80,7 +80,7 @@ public:
     virtual bool StartURL( const OUString &rUrl, const OUString &rTarget );
 
     /// Output URL end.
-    virtual bool EndURL();
+    virtual bool EndURL(bool) SAL_OVERRIDE;
 
     virtual void FieldVanish( const OUString& rTxt, ww::eField eType );
 
commit b5e094c20af952602b7bec1ab913774ebb54375b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 1 12:50:45 2014 +0100

    fix detection of Salesforce html
    
    Change-Id: Ie777c253e221527cba8affaf766e2eddfc78c103
    Reviewed-on: https://gerrit.libreoffice.org/10012
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 54c1548..13a56c3 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1925,6 +1925,16 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
 
     sCmp = sCmp.toAsciiLowerCase();
 
+    sal_Char c;
+    sal_Int32 nPos;
+    for (nPos = 0; nPos < sCmp.getLength(); ++nPos)
+    {
+        c = sCmp[nPos];
+        if (c != ' ' && c != '\n' && c != '\t' && c != '\r' && c != '\f')
+            break;
+    }
+    sCmp = sCmp.copy(nPos);
+
     // A HTML document must have a '<' in the first line
     sal_Int32 nStart = sCmp.indexOf('<');
     if (nStart == -1)
@@ -1932,8 +1942,6 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
     nStart++;
 
     // followed by arbitrary characters followed by a blank or '>'
-    sal_Char c;
-    sal_Int32 nPos;
     for( nPos = nStart; nPos < sCmp.getLength(); ++nPos )
     {
         if( '>'==(c=sCmp[nPos]) || HTML_ISSPACE(c) )
commit 14ca886136e4ce481dc32ed019b23a367c682c3e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jan 23 17:04:38 2014 +0100

    fdo#69649 RTF import: don't crash on empty TOC result
    
    Regression from commit 9679e9c23216decb5f9f25f85b04cb3f25211111
    (fdo#69649 Fix for pre-rendered Table Of Contents, 2013-12-30), the
    situation that the field doesn't have a result wasn't handled, resulting
    in a m_aTextAppendStack.pop() call in dmapper, without a matching
    .push() one.
    
    Change-Id: I456d9096d01fb27832a40f6b72802ec555d62647
    (cherry picked from commit 018bbe6c538d99c2f14fd4c761048848dc458f4a)
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/qa/core/data/rtf/pass/fdo54641.rtf b/sw/qa/core/data/rtf/pass/fdo54641.rtf
new file mode 100644
index 0000000..25a3f7e
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/fdo54641.rtf
@@ -0,0 +1,39 @@
+{\rtf1
+{\stylesheet
+{\s0\qj\widctlpar\f0\fs20 \snext0 Normal;}
+{\cs10 \additive\ssemihidden Default Paragraph Font;}
+{\s1\qc\sb240\sa120\keepn\f0\b\fs40 \sbasedon0\snext0 Part;}
+{\s2\ql\sb240\sa120\keepn\f0\b\fs40 \sbasedon0\snext0 heading 1;}
+{\s3\ql\sb240\sa120\keepn\f0\b\fs32 \sbasedon0\snext0 heading 2;}
+}
+\paperw11960\paperh16900\margl2500\margr2560\margt2520\margb1820\pgnstart0\widowctrl\qj\ftnbj\f0\aftnnar
+{\pard\plain\s20\qc\sb240\sa240\b\f0\fs36\sl240\slmult1 \fi0 De titel van het testfile\par
+\pard\plain\s21\qc\sa120\f0\fs20\sl240\slmult1 \sb120 \fi0 \chdate \par
+\pard\plain\s80\ql\sb240\sa120\keepn\f0\b\fs20\sl240\slmult1 \sb120 \fi0  Inhoudsopgave\par
+\pard\plain\s0\qj\widctlpar\f0\fs20\sl240\slmult1 \sb120 \fi0 \par
+{\field
+{\*\fldinst TOC \\o "1-3" }
+{\fldrslt }
+}
+\page
+\pard\plain\s0\qj\widctlpar\f0\fs20\sl240\slmult1 \sb180 \fi0 
+{}
+\par
+\pard\plain\ql\sb240\sa120\keepn\f0\b\fs40\sl240\slmult1 \sb120 \fi0 Hoofdstuk 1\par
+\pard\plain\s2\ql\sb240\sa120\keepn\f0\b\fs40\sl240\slmult1 \sb360 \fi0 De eerste test\par
+\pard\plain\s0\qj\widctlpar\f0\fs20\sl240\slmult1 \sb360 \fi0 In dit hoofdstuk zullen de eerste tests uitgevoerd worden.\par
+\pard\plain\s3\ql\sb240\sa120\keepn\f0\b\fs32\sl240\slmult1 \sb360 \fi0 1.1  Figuren\par
+{\pard\plain\s31\qc\sb120\sa0\keep\widctlpar\f0\fs20\sl240\slmult1 \sb420 \fi0  
+{\pict\picscalex92\picscaley92\piccropl0\piccropr0\piccropt0\piccropb0
+\picw20032\pich2725\picwgoal5357\pichgoal1545\pngblip\bliptag-1891142031
+{\*\blipuid 8f477671d3377e167ce61bb2e9de72f7}
+47494638396110001000d5ff00000000ffffffc0c0c0555f00ffffaafcfcfcf6f6f6eaeaeae6e6e6e4e4e4e3e3e3c2c2c2c1c1c1bcbcbcb5b5b5b3b3b3b0b0b0adadada5a5a5a2a2a2a1a1a19f9f9f9494948a8a8a8888888686867b7b7b6c6c6c5c5c5c4e4e4e4b4b4b4747474646463d3d3d3c3c3c2e2e2e2525251b1b1b18181810101009090906060603030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021f90401000002002c0000000010001000000684408170482c0a06c8a4728924389f506833b281302a8e6b164b18103024c52111504cca67332102e0042e9a40d9319f8300a343c1200f54e47f7e2a00001e0b0a7d0d728a010d838400261a7c0d94947784252700127e9d159f6c8411140019080ea7a9a85f842122281612b1b3b25d6b1f29291d0fbbbdbc5d5e51c34e4cc64a46c94341003b
+}
+\par
+}
+\pard\plain\s0\qj\widctlpar\f0\fs20\sl240\slmult1 \sb240 \fi0 De test wordt gevormd door een enkele, simpele figuur
+[
+].\par
+\pard\plain\s3\ql\sb240\sa120\keepn\f0\b\fs32\sl240\slmult1 \sb360 \fi0 1.2  Tabellen\par
+}
+}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a92b120..f59882a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -154,6 +154,7 @@ DomainMapper_Impl::DomainMapper_Impl(
         m_bIsColumnBreakDeferred( false ),
         m_bIsPageBreakDeferred( false ),
         m_bStartTOC(false),
+        m_bStartedTOC(false),
         m_bTOCPageRef(false),
         m_nSymboldata(-1),
         m_pLastSectionContext( ),
@@ -1248,6 +1249,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, PropertyMapP
             {
                 if (m_bStartTOC)
                 {
+                    m_bStartedTOC = true;
                     uno::Reference< text::XTextCursor > xTOCTextCursor;
                     xTOCTextCursor = xTextAppend->getEnd()->getText( )->createTextCursor( );
                     xTOCTextCursor->gotoEnd(false);
@@ -3757,7 +3759,11 @@ void DomainMapper_Impl::PopFieldContext()
                 if( xToInsert.is() )
                 {
                     m_bStartTOC = false;
-                    m_aTextAppendStack.pop();
+                    if (m_bStartedTOC)
+                    {
+                        m_aTextAppendStack.pop();
+                        m_bStartedTOC = false;
+                    }
                     if(xTOCMarkerCursor.is())
                     {
                         xTOCMarkerCursor->goLeft(1,sal_True);
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index b7d01d9..6fe81d4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -332,6 +332,8 @@ private:
     bool                                                                            m_bIsColumnBreakDeferred;
     bool                                                                            m_bIsPageBreakDeferred;
     bool                                                                            m_bStartTOC;
+    /// If we got any text that is the pre-rendered result of the TOC field.
+    bool                                                                            m_bStartedTOC;
     bool                                                                            m_bTOCPageRef;
 
     LineNumberSettings                                                              m_aLineNumberSettings;
commit f5c1929cdfe1731c609338028df37e13d9a1ae80
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jul 1 15:00:05 2014 +0200

    fdo#80661 clash with a global symbol from libreoffice
    
    Change-Id: I422a8c246f93101008dca59a5fd17810a4155c16
    Reviewed-on: https://gerrit.libreoffice.org/10018
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/external/libmspub/0001-fdo-80661-clash-with-a-global-symbol-from-libreoffic.patch b/external/libmspub/0001-fdo-80661-clash-with-a-global-symbol-from-libreoffic.patch
new file mode 100644
index 0000000..e01c380
--- /dev/null
+++ b/external/libmspub/0001-fdo-80661-clash-with-a-global-symbol-from-libreoffic.patch
@@ -0,0 +1,38 @@
+From aedff4411981ed73bdd077ebad66abdf03a172df Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Tue, 1 Jul 2014 10:10:01 +0200
+Subject: [PATCH] fdo#80661 clash with a global symbol from libreoffice
+
+Change-Id: I7d556a5a207b055342a0b369cc0cb800b60014df
+(cherry picked from commit 50e45a89147807dadb301cc7b6ba934806ae269a)
+Signed-off-by: David Tardon <dtardon at redhat.com>
+---
+ src/lib/PolygonUtils.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/lib/PolygonUtils.cpp b/src/lib/PolygonUtils.cpp
+index bd79064..54f800a 100644
+--- a/src/lib/PolygonUtils.cpp
++++ b/src/lib/PolygonUtils.cpp
+@@ -5715,6 +5715,9 @@ Coordinate libmspub::CustomShape::getTextRectangle(double x, double y, double wi
+   return Coordinate(startX, startY, endX, endY);
+ }
+ 
++namespace
++{
++
+ struct LineInfo
+ {
+   WPXPropertyListVector m_vertices;
+@@ -5736,6 +5739,8 @@ struct LineInfo
+ private:
+ };
+ 
++}
++
+ void drawEmulatedLine(boost::shared_ptr<const CustomShape> shape, ShapeType shapeType, const std::vector<Line> &lines,
+                       Vector2D center, VectorTransformation2D transform,
+                       double x, double y, double scaleX, double scaleY,
+-- 
+1.9.3
+
diff --git a/external/libmspub/UnpackedTarball_libmspub.mk b/external/libmspub/UnpackedTarball_libmspub.mk
index 044ce96..0ac2dac 100644
--- a/external/libmspub/UnpackedTarball_libmspub.mk
+++ b/external/libmspub/UnpackedTarball_libmspub.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libmspub))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,libmspub,$(MSPUB_TARBALL)))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libmspub,1))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libmspub,\
+	external/libmspub/0001-fdo-80661-clash-with-a-global-symbol-from-libreoffic.patch \
+))
+
 # vim: set noet sw=4 ts=4:
commit 255d3d4c88d43749847e8404204cbeb5a7cdd65b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jun 30 16:29:48 2014 +0100

    Resolves: fdo#80681 widget is not transparent
    
    regression from 12dfca2ea61116665a7abefd43a9a4caa2b8920b
    Author: Armin Le Grand <alg at apache.org>
    Date:   Mon May 14 15:16:00 2012 +0000
        Resolves: #i119307# added deletion of sw's BmpWindow control...
        ...due to the fact that graphics may be transparent
    
    Change-Id: I7eb2ee8ed53f0ef907a4573a735c71de43b6e8d3
    (cherry picked from commit 1caad856de1c1c5b0a8c31d2226416a2db9632cd)
    Reviewed-on: https://gerrit.libreoffice.org/9987
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 7679f6a..a058f16 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2597,8 +2597,12 @@ BmpWindow::BmpWindow(Window* pPar, WinBits nStyle)
     , bGraphic(false)
     , bLeftAlign(false)
 {
-    // #i119307# use background, the graphic might have transparency
-    SetBackground(Wallpaper(Color(COL_WHITE)));
+    SetBackground();
+    SetPaintTransparent(sal_True);
+    // #i119307# the graphic might have transparency, set up white as the color
+    // to use when drawing a rectangle under the image
+    SetLineColor(COL_WHITE);
+    SetFillColor(COL_WHITE);
 }
 
 Size BmpWindow::GetOptimalSize() const
@@ -2656,7 +2660,7 @@ void BmpWindow::Paint( const Rectangle& )
     }
 
     // #i119307# clear window background, the graphic might have transparency
-    Erase();
+    DrawRect(Rectangle(aPntPos, aPntSz));
 
     if ( bGraphic )
         aGraphic.Draw( this, aPntPos, aPntSz );
commit 79e3137ab3b02eb59fd6e6742a15b2199df4eaa9
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Jun 26 14:51:47 2014 -0400

    fdo#79151: No need to offset column index by category labels.
    
    In fact, doing so would lead to a corrupt internal data table.  The
    internal data stores category labels separately from the column data, so
    there is no reason why we need to offset for category labels here.
    
    (cherry picked from commit ecde8155fefcdacb08177a10a4eddc24f6675b0b)
    
    Conflicts:
    	chart2/source/controller/dialogs/DataBrowserModel.cxx
    
    Change-Id: I29dd99e53837cba7a1e28d2a1ef39a5384378805
    Reviewed-on: https://gerrit.libreoffice.org/9928
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 8bfa963..e3544e0 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -344,9 +344,6 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
 
         if( xChartType.is())
         {
-            sal_Int32 nOffset = 0;
-            if( xDiagram.is() && lcl_ShowCategories( xDiagram ))
-                nOffset=getCategoryColumnCount();
             // get shared sequences of current series
             Reference< chart2::XDataSeriesContainer > xSeriesCnt( xChartType, uno::UNO_QUERY );
             lcl_tSharedSeqVec aSharedSequences;
@@ -364,7 +361,6 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex )
                             xSource->getDataSequences());
                         sal_Int32 nSeqIdx = 0;
                         sal_Int32 nSeqSize = aLSequences.getLength();
-                        nStartCol -= (nOffset - 1);
                         for( sal_Int32 nIndex = nStartCol;
                              (nSeqIdx < nSeqSize);
                              ++nSeqIdx )
commit 4f0d34c63f1702b27d6d61a4d01bb80b4c35df2c
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date:   Fri Jun 27 18:20:14 2014 +0200

    fdo#63378 Enable Impress Remote Dialog menu item for all view shells.
    
    Change-Id: I47f040c1463b4be648d411c2f7f0070b8aed3e9c
    (cherry picked from commit d61468314bbfd2a79929b48e62d7e5ed354ab79b)
    Reviewed-on: https://gerrit.libreoffice.org/9976
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 71e7b2f..d2772bc 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -284,6 +284,19 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
         }
         break;
 
+        case SID_REMOTE_DLG:
+        {
+#ifdef ENABLE_SDREMOTE
+             SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
+             VclAbstractDialog* pDlg = pFact ?
+                 pFact->CreateRemoteDialog( mrSlideSorter.GetContentWindow().get() ) :
+                 0;
+             if (pDlg)
+                 pDlg->Execute();
+#endif
+        }
+        break;
+
         default:
             break;
     }
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 6bdb2b3..1278094 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -287,6 +287,17 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
         }
         break;
 
+        case SID_REMOTE_DLG:
+        {
+#ifdef ENABLE_SDREMOTE
+             SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
+             VclAbstractDialog* pDlg = pFact ? pFact->CreateRemoteDialog(GetActiveWindow()) : 0;
+             if (pDlg)
+                 pDlg->Execute();
+#endif
+        }
+        break;
+
         case SID_CUSTOMSHOW_DLG:
         {
             SetCurrentFunction( FuCustomShowDlg::Create( this, GetActiveWindow(), pOlView, GetDoc(), rReq ) );


More information about the Libreoffice-commits mailing list