configure.ac | 2 - sc/source/filter/oox/worksheethelper.cxx | 7 +++++ sc/source/ui/view/cellsh.cxx | 2 - sc/source/ui/view/tabview3.cxx | 2 - sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 10 +++++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 +++ sw/qa/extras/layout/data/tdf117028.docx |binary sw/qa/extras/layout/layout.cxx | 24 ++++++++++++++++++ sw/qa/extras/ooxmlexport/data/tdf116976.docx |binary sw/qa/extras/ooxmlexport/data/tdf116985.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 17 ++++++++++++ sw/source/core/access/accpara.cxx | 2 - sw/source/core/doc/notxtfrm.cxx | 2 - sw/source/core/inc/frame.hxx | 3 +- sw/source/core/layout/anchoreddrawobject.cxx | 17 ++++++++++++ sw/source/core/layout/paintfrm.cxx | 23 ++++++++++------- sw/source/core/text/inftxt.cxx | 2 - sw/source/core/txtnode/fntcache.cxx | 2 - writerfilter/source/dmapper/GraphicImport.cxx | 10 ++++++- 19 files changed, 107 insertions(+), 22 deletions(-)
New commits: commit 608a1afa58ba91abb65905d3d90887361b99c08b Author: Andras Timar <andras.ti...@collabora.com> Date: Thu Apr 26 11:50:30 2018 +0200 Bump version to 6.0-2 Change-Id: If85be11de1e91253f64e1046da5f0682a0e35e1a diff --git a/configure.ac b/configure.ac index 7928b4705f39..74876a3ad331 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[6.0.10.1],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[6.0.10.2],[],[],[https://collaboraoffice.com/]) AC_PREREQ([2.59]) commit 68dc10a1767d8c555d48699ad6349799b4aea286 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Apr 16 10:11:26 2018 +0200 tdf#117028 sw: conditionally consider fill of shape for in-textbox auto color Commit f966767e1ccfa432da33e1a0fd6de69e17a36bc3 (tdf#116925 sw: consider fill styles of shape for in-textbox auto color, 2018-04-10) did this unconditionally, but there are two cases: 1) Shape (with textbox) has a fill, in that case auto text color of textbox should consider the shape fill. 2) Shape has no fill, in that case the shape fill should not be considered when counting the background of a transparent fly frame. Fix 2) without breaking 1) by making the change to SwFrame::GetBackgroundBrush() opt-in, and only use it for auto font color, not in other cases. Change-Id: I761a1b7d6ecf47586edbe5641ec012f22f6a53d7 Reviewed-on: https://gerrit.libreoffice.org/52941 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit d9420a64fbb288020d33b681f40a858db49afca7) Reviewed-on: https://gerrit.libreoffice.org/52972 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 15593a5421a7f14ac8a4056aa233443130bcda6f) diff --git a/sw/qa/extras/layout/data/tdf117028.docx b/sw/qa/extras/layout/data/tdf117028.docx new file mode 100644 index 000000000000..877264b4db33 Binary files /dev/null and b/sw/qa/extras/layout/data/tdf117028.docx differ diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 3709e306f53d..9a73e2025147 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -18,10 +18,12 @@ class SwLayoutWriter : public SwModelTestBase public: void testTdf116830(); void testTdf116925(); + void testTdf117028(); CPPUNIT_TEST_SUITE(SwLayoutWriter); CPPUNIT_TEST(testTdf116830); CPPUNIT_TEST(testTdf116925); + CPPUNIT_TEST(testTdf117028); CPPUNIT_TEST_SUITE_END(); private: @@ -84,6 +86,28 @@ void SwLayoutWriter::testTdf116925() "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/push[3]/textcolor[@color='#ffffff']", 1); } +void SwLayoutWriter::testTdf117028() +{ + SwDoc* pDoc = createDoc("tdf117028.docx"); + SwDocShell* pShell = pDoc->GetDocShell(); + + // Dump the rendering of the first page as an XML file. + std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile(); + MetafileXmlDump dumper; + xmlDocPtr pXmlDoc = dumper.dumpAndParse(*xMetaFile); + CPPUNIT_ASSERT(pXmlDoc); + + // The only polypolygon in the rendering result was the white background we + // want to avoid. + xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "//polypolygon"); + xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval; + CPPUNIT_ASSERT_EQUAL(0, xmlXPathNodeSetGetLength(pXmlNodes)); + xmlXPathFreeObject(pXmlObj); + + // Make sure the text is still rendered. + assertXPathContent(pXmlDoc, "//textarray/text", "Hello"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 0d60a9d09af3..83527b5102c3 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -998,7 +998,7 @@ static bool lcl_GetBackgroundColor( Color & rColor, drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; if ( pFrame && - pFrame->GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false ) ) + pFrame->GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false, /*bConsiderTextBox=*/false ) ) { if ( pSectionTOXColor ) { diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 4a5176d50e6b..fd21b43bb3c7 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -187,7 +187,7 @@ static void lcl_ClearArea( const SwFrame &rFrame, SwRect aOrigRect; drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; - if ( rFrame.GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigRect, false ) ) + if ( rFrame.GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigRect, false, /*bConsiderTextBox=*/false ) ) { SwRegionRects const region(rPtArea); basegfx::utils::B2DClipState aClipState; diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index ca26c68bcc15..71363e95e2b1 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -555,7 +555,8 @@ public: const SvxBrushItem*& rpBrush, const Color*& rpColor, SwRect &rOrigRect, - bool bLowerMode ) const; + bool bLowerMode, + bool bConsiderTextBox ) const; inline void SetCompletePaint() const; inline void ResetCompletePaint() const; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 4c54017b14b7..fedcd36f2266 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3783,7 +3783,7 @@ bool SwFlyFrame::IsBackgroundTransparent() const SwRect aDummyRect; drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; - if ( GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false) ) + if ( GetBackgroundBrush( aFillAttributes, pBackgrdBrush, pSectionTOXColor, aDummyRect, false, /*bConsiderTextBox=*/false) ) { if ( pSectionTOXColor && (pSectionTOXColor->GetTransparency() != 0) && @@ -6364,7 +6364,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage, bool bLowMode = true; drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; - bool bBack = GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, bLowerMode ); + bool bBack = GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, bLowerMode, /*bConsiderTextBox=*/false ); //- Output if a separate background is used. bool bNoFlyBackground = !gProp.bSFlyMetafile && !bBack && IsFlyFrame(); if ( bNoFlyBackground ) @@ -6374,7 +6374,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage, // <GetBackgroundBrush> disabled this option with the parameter <bLowerMode> if ( bLowerMode ) { - bBack = GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ); + bBack = GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false, /*bConsiderTextBox=*/false ); } // If still no background found for the fly frame, initialize the // background brush <pItem> with global retouche color and set <bBack> @@ -7164,7 +7164,7 @@ const Color SwPageFrame::GetDrawBackgrdColor() const SwRect aDummyRect; drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; - if ( GetBackgroundBrush( aFillAttributes, pBrushItem, pDummyColor, aDummyRect, true) ) + if ( GetBackgroundBrush( aFillAttributes, pBrushItem, pDummyColor, aDummyRect, true, /*bConsiderTextBox=*/false) ) { if(aFillAttributes.get() && aFillAttributes->isUsed()) { @@ -7328,6 +7328,10 @@ void SwFrame::Retouch( const SwPageFrame * pPage, const SwRect &rRect ) const * input parameter - boolean indicating, if background brush should *not* be * taken from parent. * + * @param bConsiderTextBox + * consider the TextBox of this fly frame (if there is any) when determining + * the background color, useful for automatic font color. + * * @return true, if a background brush for the frame is found */ bool SwFrame::GetBackgroundBrush( @@ -7335,7 +7339,8 @@ bool SwFrame::GetBackgroundBrush( const SvxBrushItem* & rpBrush, const Color*& rpCol, SwRect &rOrigRect, - bool bLowerMode ) const + bool bLowerMode, + bool bConsiderTextBox ) const { const SwFrame *pFrame = this; SwViewShell *pSh = getRootFrame()->GetCurrShell(); @@ -7349,8 +7354,8 @@ bool SwFrame::GetBackgroundBrush( if (pFrame->supportsFullDrawingLayerFillAttributeSet()) { - bool bTextBox = false; - if (pFrame->IsFlyFrame()) + bool bHandledTextBox = false; + if (pFrame->IsFlyFrame() && bConsiderTextBox) { const SwFlyFrame* pFlyFrame = static_cast<const SwFlyFrame*>(pFrame); SwFrameFormat* pShape @@ -7364,12 +7369,12 @@ bool SwFrame::GetBackgroundBrush( rFillAttributes.reset( new drawinglayer::attribute::SdrAllFillAttributesHelper( pObject->GetMergedItemSet())); - bTextBox = true; + bHandledTextBox = true; } } } - if (!bTextBox) + if (!bHandledTextBox) rFillAttributes = pFrame->getSdrAllFillAttributesHelper(); } const SvxBrushItem &rBack = pFrame->GetAttrSet()->GetBackground(); diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index de131470c958..8001e94143c4 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -534,7 +534,7 @@ static bool lcl_IsDarkBackground( const SwTextPaintInfo& rInf ) // See implementation in /core/layout/paintfrm.cxx // There is a background color, if there is a background brush and // its color is *not* "no fill"/"auto fill". - if( rInf.GetTextFrame()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) ) + if( rInf.GetTextFrame()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false, /*bConsiderTextBox=*/false ) ) { if ( !pCol ) pCol = &pItem->GetColor(); diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index a7484a5ac4a7..a6d89f1add2a 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2510,7 +2510,7 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont ) /// OD 21.08.2002 #99657# /// There is a user defined setting for the background, if there /// is a background brush and its color is *not* "no fill"/"auto fill". - if( GetFrame()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false ) ) + if( GetFrame()->GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, false, /*bConsiderTextBox=*/true ) ) { if (aFillAttributes.get() && aFillAttributes->isUsed()) { commit 46335fe3b260af7e29fbff7645c43cceca2b8ab1 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Apr 13 15:09:53 2018 +0200 tdf#116985 sw: fix geometry of textbox of shape with relative size Relative size of shapes are calculated by the layout, so the normal doc model-level synchronization between the shape and its textbox was not enough. Change-Id: Ia6f460132efaf03a7ba3a023cf751f6fff74404d Reviewed-on: https://gerrit.libreoffice.org/52831 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit c8b976ac64c9cac360f7c4fd9844fcfac7ba25a8) Reviewed-on: https://gerrit.libreoffice.org/52971 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 33dcd5f61e1966accf9b68c662bac7cb70352ca1) diff --git a/sw/qa/extras/ooxmlexport/data/tdf116985.docx b/sw/qa/extras/ooxmlexport/data/tdf116985.docx new file mode 100644 index 000000000000..2a8e2023884d Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf116985.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 23f91c2e1228..275460d09950 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -231,6 +231,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116976, "tdf116976.docx") getProperty<sal_Int16>(getShape(1), "RelativeWidth")); } +DECLARE_OOXMLEXPORT_TEST(testTdf116985, "tdf116985.docx") +{ + // Body frame width is 10800, 40% is the requested relative width, with 144 + // spacing to text on the left/right side. So ideal width would be 4032, + // was 3431. Allow one pixel tolerance, though. + sal_Int32 nWidth + = parseDump("/root/page[1]/body/txt[1]/anchored/fly/infos/bounds", "width").toInt32(); + CPPUNIT_ASSERT(nWidth > 4000); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index dfbdce3021bb..ca5014f7e9b5 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -32,6 +32,8 @@ #include <IDocumentState.hxx> #include <txtfly.hxx> #include <viewimp.hxx> +#include <textboxhelper.hxx> +#include <unomid.h> using namespace ::com::sun::star; @@ -661,9 +663,22 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const bool bEnableSetModified = pDoc->getIDocumentState().IsEnableSetModified(); pDoc->getIDocumentState().SetEnableSetModified(false); - const_cast< SdrObject* >( GetDrawObj() )->Resize( aCurrObjRect.TopLeft(), + auto pObject = const_cast<SdrObject*>(GetDrawObj()); + pObject->Resize( aCurrObjRect.TopLeft(), Fraction( nTargetWidth, aCurrObjRect.GetWidth() ), Fraction( nTargetHeight, aCurrObjRect.GetHeight() ), false ); + + if (SwFrameFormat* pFrameFormat = FindFrameFormat(pObject)) + { + if (SwTextBoxHelper::isTextBox(pFrameFormat, RES_DRAWFRMFMT)) + { + // Shape has relative size and also a textbox, update its text area as well. + uno::Reference<drawing::XShape> xShape(pObject->getUnoShape(), uno::UNO_QUERY); + SwTextBoxHelper::syncProperty(pFrameFormat, RES_FRM_SIZE, MID_FRMSIZE_SIZE, + uno::makeAny(xShape->getSize())); + } + } + pDoc->getIDocumentState().SetEnableSetModified(bEnableSetModified); } } commit bc72562aa8807d352124bd687ff078e7c5bedf4f Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Apr 12 18:39:36 2018 +0200 tdf#116976 DOCX import: fix rel size of shape after bitmap We have a queue of these odd relative sizes (which are not XML attributes but text inside the XML element), if the bitmap doesn't pop the queue, the following shape won't get its size. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport11.cxx Change-Id: I1602208c9509d8889bf0be254f3b25fb25fafca2 Reviewed-on: https://gerrit.libreoffice.org/52970 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 65f4c7b8725e8fe086889fca8c7c9b7e32fdd4d5) diff --git a/sw/qa/extras/ooxmlexport/data/tdf116976.docx b/sw/qa/extras/ooxmlexport/data/tdf116976.docx new file mode 100644 index 000000000000..70492a4af2f3 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf116976.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 44d30d687e94..23f91c2e1228 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -224,6 +224,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107035, "tdf107035.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(COL_AUTO), nPgNumColour); } +DECLARE_OOXMLEXPORT_TEST(testTdf116976, "tdf116976.docx") +{ + // This was 0, reltive size of shape after bitmap was ignored. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(40), + getProperty<sal_Int16>(getShape(1), "RelativeWidth")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index b6c11b58c603..6830e9db71b1 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1065,10 +1065,12 @@ void GraphicImport::lcl_sprm(Sprm& rSprm) break; case NS_ooxml::LN_CT_SizeRelH_pctWidth: case NS_ooxml::LN_CT_SizeRelV_pctHeight: - if (m_xShape.is() && !m_pImpl->m_rPositivePercentages.empty()) + if (m_pImpl->m_rPositivePercentages.empty()) + break; + + if (m_xShape.is()) { sal_Int16 nPositivePercentage = rtl::math::round(m_pImpl->m_rPositivePercentages.front().toDouble() / oox::drawingml::PER_PERCENT); - m_pImpl->m_rPositivePercentages.pop(); if (nPositivePercentage) { @@ -1077,6 +1079,10 @@ void GraphicImport::lcl_sprm(Sprm& rSprm) xPropertySet->setPropertyValue(aProperty, uno::makeAny(nPositivePercentage)); } } + + // Make sure the token is consumed even if xShape is an empty + // reference. + m_pImpl->m_rPositivePercentages.pop(); break; case NS_ooxml::LN_EG_WrapType_wrapNone: // 90944; - doesn't contain attributes //depending on the behindDoc attribute text wraps through behind or in front of the object commit 4878a8bc1e5081dd5dfa68682021d7e77bd6b10c Author: Rene Engelhard <r...@debian.org> Date: Tue Apr 24 15:56:23 2018 +0200 fix build with poppler 0.64 GooString became const... Change-Id: Icc95be2e8603a4e22c6a9ac2008986bacd0bfba5 Reviewed-on: https://gerrit.libreoffice.org/53422 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit 106b2c96e9807af14d6eb6e8f83dcf25095a093e) diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 00fd56a226d1..9618e5b2a28f 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -446,6 +446,9 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state ) FontAttributes aNewFont; int nSize = 0; +#if POPPLER_CHECK_VERSION(0, 64, 0) + const +#endif GooString* pFamily = gfxFont->getName(); if( pFamily ) { @@ -742,6 +745,9 @@ void PDFOutDev::updateFont(GfxState *state) FontAttributes aFont; int nEmbedSize=0; +#if POPPLER_CHECK_VERSION(0, 64, 0) + const +#endif Ref* pID = gfxFont->getID(); // TODO(Q3): Portability problem long long fontID = (long long)pID->gen << 32 | (long long)pID->num; @@ -932,7 +938,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, printf( "\n" ); } +#if POPPLER_CHECK_VERSION(0, 64, 0) +void PDFOutDev::drawString(GfxState*, const GooString* /*s*/) +#else void PDFOutDev::drawString(GfxState*, GooString* /*s*/) +#endif { // TODO(F3): NYI } diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index 922c513ff86b..2a6268c0ba1d 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -223,7 +223,11 @@ namespace pdfi double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen) override; +#if POPPLER_CHECK_VERSION(0, 64, 0) + virtual void drawString(GfxState *state, const GooString *s) override; +#else virtual void drawString(GfxState *state, GooString *s) override; +#endif virtual void endTextObject(GfxState *state) override; //----- image drawing commit a2cea5eedd9739bdd76dc95813aded38c27ee4b1 Author: Eike Rathke <er...@redhat.com> Date: Tue Apr 24 13:10:08 2018 +0200 Related: tdf#116274 ignore the one excess cols definition's last column <cols> ... <col min="5" max="16384" width="31.75" style="3"/> </cols> may be present even if there isn't any content. Apparently used with pageBreakPreview to grey out the area. Change-Id: I6a79f9ec692ec07b02f4b4205ccd0cf3cf9f363f (cherry picked from commit 16265dcdb21d7cf69c65c2a84f1d21a5d8574dd4) Reviewed-on: https://gerrit.libreoffice.org/53377 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit eeb8ce7d4e008fdc99032e21be655e522bd55c77) diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index c1cdae73e4b1..aade8b4e88d0 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -770,6 +770,13 @@ void WorksheetGlobals::setColumnModel( const ColumnModel& rModel ) // checkCol(). Cater for this oddity. if (nLastCol == mrMaxApiPos.Col() + 1) --nLastCol; + // Excel may add a column range for the remaining columns (with + // <cols><col .../></cols>), even if not used or only used to grey out + // columns in page break view. Don't let that trigger overflow warning, + // so check for the last possible column. If there really is content in + // the range that should be caught anyway. + else if (nLastCol == getAddressConverter().getMaxXlsAddress().Col()) + nLastCol = mrMaxApiPos.Col(); else if( !getAddressConverter().checkCol( nLastCol, true ) ) nLastCol = mrMaxApiPos.Col(); // try to find entry in column model map that is able to merge with the passed model commit ea00ad5da19c46853bb00568becc6dcfc64bd2eb Author: Maxim Monastirsky <momonas...@gmail.com> Date: Sun Apr 15 13:15:28 2018 +0300 tdf#116821 Keep row/column buttons enabled even when insert impossible So other commands included in these buttons (like delete or set height/ width), could still be used. Change-Id: If9e96116aebf73b2d20fb8d63ee67da3d17e3d9f Reviewed-on: https://gerrit.libreoffice.org/52909 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonas...@gmail.com> (cherry picked from commit 3732d5ab1782bbadfee457115fbd8dce78453cc2) Reviewed-on: https://gerrit.libreoffice.org/53286 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> (cherry picked from commit a3ea83896f2d3aefa8cd67b3aa54884450999481) diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 92b389504b99..2fd9a2beed93 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -246,7 +246,6 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) break; } case FID_INS_CELLSDOWN: - case SID_ROW_OPERATIONS: bDisable = (!bSimpleArea) || GetViewData()->SimpleColMarked(); break; @@ -267,7 +266,6 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet ) break; } case FID_INS_CELLSRIGHT: - case SID_COLUMN_OPERATIONS: bDisable = (!bSimpleArea) || GetViewData()->SimpleRowMarked(); break; diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 69bc8035b421..6e93f5f5756a 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -535,8 +535,6 @@ void ScTabView::SelectionChanged() rBindings.Invalidate( FID_INS_CELL ); rBindings.Invalidate( FID_INS_CELLSDOWN ); rBindings.Invalidate( FID_INS_CELLSRIGHT ); - rBindings.Invalidate( SID_ROW_OPERATIONS ); - rBindings.Invalidate( SID_COLUMN_OPERATIONS ); rBindings.Invalidate( FID_CHG_COMMENT ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits