[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/contnr/treelistbox.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 291cb54cdd74336b5dcbb11450737c2199d41802 Author: Jan Holesovsky Date: Tue Mar 13 12:39:11 2018 +0100 tdf#116334: Actually when there is no handler, we have to return 'true'. Also use the return value of the link's Call() [as the SvTreeListBox::ExpandingHdl() is doing], the appropriate callbacks seem to return the expected 'false' in the cases I've reviewed... Change-Id: I0cdd63e8ec4c794839070b914150e0b32f743359 Reviewed-on: https://gerrit.libreoffice.org/51213 Reviewed-by: pranavk Tested-by: pranavk diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 7190afa3d405..72259b8886a4 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -429,8 +429,7 @@ void SvTreeListBox::DeselectHdl() bool SvTreeListBox::DoubleClickHdl() { -aDoubleClickHdl.Call( this ); -return false; +return !aDoubleClickHdl.IsSet() || aDoubleClickHdl.Call(this); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/contnr/treelistbox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2d38885e41db37dc49fe7456ac0550a30548a6c4 Author: Jan Holesovsky Date: Thu Mar 1 12:13:53 2018 +0100 tdf#115950: Indicate that the dialog was already destroyed. The DoubleClickHdl()'s return value does not mean "was handled", but actually "is there anything more to be done"; so if we actually destroy the dialog in the aDoubleClickHdl.Call(this), we have to return 'false'. Change-Id: I7c510e8341eb5f74703b4266f86cb1e840a2b1fd Reviewed-on: https://gerrit.libreoffice.org/50262 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index b7a220a131d7..7190afa3d405 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -430,7 +430,7 @@ void SvTreeListBox::DeselectHdl() bool SvTreeListBox::DoubleClickHdl() { aDoubleClickHdl.Call( this ); -return true; +return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/contnr/treelistbox.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit d157eb5469348d2aeccfd405fd20b013ca6e7761 Author: Caolán McNamara Date: Thu Sep 28 14:34:17 2017 +0100 Resolves: tdf#112656 don't reset to default font if a custom font was set the list has been laid out with the smaller custom font, including calculating the bounding box of the entry, then rendered with the default larger font Change-Id: I2ae569c9857d4e1016cbf55da4c3334c63dcf5f6 Reviewed-on: https://gerrit.libreoffice.org/42910 Reviewed-by: Eike Rathke Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 3043863d688c5bbd5101ebd5ddd8a9452e05ca50) Reviewed-on: https://gerrit.libreoffice.org/43031 Reviewed-by: Miklos Vajna (cherry picked from commit f9c6022d109062d9b13339463f363892b2439d7d) diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 988c59dbbf03..b7a220a131d7 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3593,12 +3593,9 @@ void SvTreeListBox::StateChanged( StateChangedType eType ) void SvTreeListBox::ApplySettings(vcl::RenderContext& rRenderContext) { -const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); -vcl::Font aFont; -aFont = rStyleSettings.GetFieldFont(); -aFont.SetColor(rStyleSettings.GetWindowTextColor()); -SetPointFont(rRenderContext, aFont); +SetPointFont(rRenderContext, GetPointFont(*this)); +const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); rRenderContext.SetTextColor(rStyleSettings.GetFieldTextColor()); rRenderContext.SetTextFillColor(); rRenderContext.SetBackground(rStyleSettings.GetFieldColor()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/brwbox/ebbcontrols.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit aa302e7decc945dfac389b858d2d513129527b5a Author: Maxim Monastirsky Date: Thu Jan 5 14:05:39 2017 +0200 tdf#105121 Crash in GrabFocus during dispose Change-Id: I03a001f5c670e0ca2c6d78fcf726ea5a46a93eab (cherry picked from commit fae07692473f0e29e469b1da5d767fc9203dd22c) diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 0271ff821527..0e6248212166 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -289,7 +289,8 @@ namespace svt void CheckBoxControl::GetFocus() { -pBox->GrabFocus(); +if (pBox) +pBox->GrabFocus(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/filter/SvFilterOptionsDialog.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit be707dc607a7a9be9952420ee8494984fee894f6 Author: Aron Budea Date: Fri Aug 4 19:07:38 2017 +0200 Make build with Werror work again Change-Id: Id8b839a3e636613b65fbbad494cc3458f74f6fd6 Reviewed-on: https://gerrit.libreoffice.org/40904 Reviewed-by: Aron Budea Tested-by: Aron Budea diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index ed2b32c88665..f68787634676 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -216,7 +216,6 @@ sal_Int16 SvFilterOptionsDialog::execute() { sal_Int16 nRet = ui::dialogs::ExecutableDialogResults::CANCEL; -OUString aFilterNameStr( "FilterName" ); OUString aInternalFilterName; uno::Reference xGraphic; sal_Int32 j, nCount = maMediaDescriptor.getLength(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/contnr/svlbitm.cxx | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) New commits: commit 4a822b85d2c2e32422cfe001a37b5057651f3ecf Author: Caolán McNamara Date: Fri Jul 14 14:22:06 2017 +0100 Resolves: tdf#99071 tree view shows odd text widths when > 100 lines reverts commit 62ea355b2679073b8ee326df5793231996136da9 Date: Thu Dec 12 09:55:35 2013 +0100 fdo#72125: GetTextWidth() can get very expensive. Let's just count an approximate width using a cached value when we have too many entries. The expert dialog got fixed by not populating it with all options on load and instead by incremental disclosure as the users searches/expands it so this optimization effort isn't needed in the meantime there was another problem the above papered over with commit b4bbb5e5d7b31caad2fbcc00382ad27df3c81001 Date: Sun May 17 22:56:46 2015 +0900 refactor how font, fg. and bg. are applied in widgets/controls which was fixed (hopefully) in the previous commit Change-Id: I8383d9cd7a9983a85c7f3acec0281d984c44f9e7 Reviewed-on: https://gerrit.libreoffice.org/39951 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/40193 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 52c0da1fbacc..51c5a5d9cb8f 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -216,25 +216,7 @@ void SvLBoxString::InitViewData( { if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); - -// fdo#72125: GetTextWidth() can get very expensive; let's just count -// an approximate width using a cached value when we have many entries -long nTextWidth; -if (pView->GetEntryCount() > 100) -{ -static SvTreeListBox *s_pPreviousView = nullptr; -static float s_fApproximateCharWidth = 0.0; -if (s_pPreviousView != pView) -{ -s_pPreviousView = pView; -s_fApproximateCharWidth = pView->approximate_char_width(); -} -nTextWidth = maText.getLength() * s_fApproximateCharWidth; -} -else -nTextWidth = pView->GetTextWidth(maText); - -pViewData->maSize = Size(nTextWidth, pView->GetTextHeight()); +pViewData->maSize = Size(pView->GetTextWidth(maText), pView->GetTextHeight()); } // *** ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/contnr/treelistbox.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 1908a229514f8681bdfef52eaf832f7922748bdc Author: Caolán McNamara Date: Fri Jul 14 14:40:47 2017 +0100 list views are recalculating layout on every paint instead of when the font changes since... commit b4bbb5e5d7b31caad2fbcc00382ad27df3c81001 Date: Sun May 17 22:56:46 2015 +0900 refactor how font, fg. and bg. are applied in widgets/controls Change-Id: I8c9ebeb8d85f2c8b5e5ddc0aa03b6d64b5348132 Reviewed-on: https://gerrit.libreoffice.org/39950 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/40192 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 5239e362bae1..14baee04e1ec 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3595,7 +3595,6 @@ void SvTreeListBox::ApplySettings(vcl::RenderContext& rRenderContext) aFont = rStyleSettings.GetFieldFont(); aFont.SetColor(rStyleSettings.GetWindowTextColor()); SetPointFont(rRenderContext, aFont); -AdjustEntryHeightAndRecalc(); rRenderContext.SetTextColor(rStyleSettings.GetFieldTextColor()); rRenderContext.SetTextFillColor(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/svhtml/parhtml.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit efdefc4571a781857cc26f651159e1d9d3d4ff43 Author: Andras Timar Date: Tue May 23 00:02:09 2017 +0200 no need to cast to sal_uLong (in fact it is wrong) Change-Id: I67063fe69aa7980f75fa8666916a695085a77a58 diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index becae25e904b..9ec51dfce12e 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -2001,8 +2001,8 @@ bool HTMLParser::ParseMetaOptionsImpl( bool valid = false; if (comphelper::string::getTokenCount(aContent, ';') == 2) { -Date aDate((sal_uLong)aContent.getToken(0, ';').toInt32()); -tools::Time aTime((sal_uLong)aContent.getToken(1, ';').toInt64()); +Date aDate(aContent.getToken(0, ';').toInt32()); +tools::Time aTime(aContent.getToken(1, ';').toInt64()); DateTime aDateTime(aDate, aTime); uDT = aDateTime.GetUNODateTime(); valid = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source sw/qa
svtools/source/graphic/descriptor.cxx |1 + svtools/source/graphic/descriptor.hxx |1 + sw/qa/extras/odfexport/odfexport.cxx |5 + 3 files changed, 7 insertions(+) New commits: commit 40460de56fd734711996567ee1c746e51760 Author: Miklos Vajna Date: Fri May 19 16:21:48 2017 +0200 svtools: fix mime type of PDF images Otherwise the UNO API user can only see this image has a replacement, but not possible to say if it's an SVG or a PDF image. Change-Id: Ibde7915e02620acecbbb237dc3b82d9c784a Reviewed-on: https://gerrit.libreoffice.org/37827 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 9b261681e5325e3fb7c87653de8e367ec18486c9) diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index ca4b4346c5db..5b00e0215808 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -319,6 +319,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** // added Svg mimetype support case GfxLinkType::NativeSvg: pMimeType = MIMETYPE_SVG; break; +case GfxLinkType::NativePdf: pMimeType = MIMETYPE_PDF; break; default: pMimeType = nullptr; diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx index 029a1d8520f5..ff72e2d511b8 100644 --- a/svtools/source/graphic/descriptor.hxx +++ b/svtools/source/graphic/descriptor.hxx @@ -51,6 +51,7 @@ #define MIMETYPE_SGV"image/x-sgv" #define MIMETYPE_EMF"image/x-emf" #define MIMETYPE_SVG"image/svg+xml" +#define MIMETYPE_PDF"application/pdf" #define MIMETYPE_VCLGRAPHIC "image/x-vclgraphic" namespace comphelper { class PropertySetInfo; } diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 43aee578696c..a5f456f4807f 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -855,6 +855,11 @@ DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt") // This failed, pdf+png replacement graphics pair didn't survive an ODT roundtrip. CPPUNIT_ASSERT(!getProperty(xShape, "ReplacementGraphicURL").isEmpty()); +auto xGraphic = getProperty< uno::Reference >(xShape, "Graphic"); +CPPUNIT_ASSERT(xGraphic.is()); +// This was image/x-vclgraphic, not exposing the info that the image is a PDF one. +CPPUNIT_ASSERT_EQUAL(OUString("application/pdf"), getProperty(xGraphic, "MimeType")); + if (mbExported) { uno::Sequence aArgs(1); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source sw/qa
svtools/source/svhtml/parhtml.cxx|1 sw/qa/extras/htmlimport/data/meta-changedby.html | 21 +++ sw/qa/extras/htmlimport/htmlimport.cxx | 25 +++ 3 files changed, 47 insertions(+) New commits: commit b5a64a8ce15f3b9dacd527f1e7663300af6e2ad2 Author: Jan Holesovsky Date: Wed May 17 18:35:53 2017 +0200 html import: Don't create HTML: postit. Change-Id: I8deea3b60d9bb86c20539be2ad23e6b07f44e51b Reviewed-on: https://gerrit.libreoffice.org/37728 Reviewed-by: Aron Budea Tested-by: Aron Budea diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 971821384827..becae25e904b 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1989,6 +1989,7 @@ bool HTMLParser::ParseMetaOptionsImpl( case HTML_META_CHANGEDBY: if (i_xDocProps.is()) { i_xDocProps->setModifiedBy( aContent ); +bChanged = true; } break; diff --git a/sw/qa/extras/htmlimport/data/meta-changedby.html b/sw/qa/extras/htmlimport/data/meta-changedby.html new file mode 100644 index ..b228b31073f7 --- /dev/null +++ b/sw/qa/extras/htmlimport/data/meta-changedby.html @@ -0,0 +1,21 @@ + + + + + + + + + + + @page { size: 21cm 29.7cm; margin: 2cm } + p { margin-bottom: 0.25cm; line-height: 120% } + td p { margin-bottom: 0cm } + + + + +Test + + + diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index f32bdb4b2a4b..55c2a9c38a23 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -148,6 +148,31 @@ DECLARE_HTMLIMPORT_TEST(testMetaIsoDates, "meta-ISO8601-dates.html") CPPUNIT_ASSERT_EQUAL(DateTime(Date(8, 5, 2017), tools::Time(12, 47, 0, 38600)), aModified); } +DECLARE_HTMLIMPORT_TEST(testChangedby, "meta-changedby.html") +{ +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +CPPUNIT_ASSERT(pTextDoc); +SwDocShell* pDocShell(pTextDoc->GetDocShell()); +uno::Reference xDocProps; + +CPPUNIT_ASSERT(pDocShell); +uno::Reference xDPS(pDocShell->GetModel(), uno::UNO_QUERY); +xDocProps.set(xDPS->getDocumentProperties()); + +// get the document properties +CPPUNIT_ASSERT(xDocProps.is()); + +// the doc's property ModifiedBy is set correctly, ... +CPPUNIT_ASSERT_EQUAL(OUString("Blah"), xDocProps->getModifiedBy()); + +uno::Reference xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xFieldsAccess(xTextFieldsSupplier->getTextFields()); +uno::Reference xFields(xFieldsAccess->createEnumeration()); + +// ...but there is no comment 'HTML: ' +CPPUNIT_ASSERT(!xFields->hasMoreElements()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - svtools/source
svtools/source/control/ruler.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 7fcb7496f5cb24bfe1c2e4d48a77072fd18c1f60 Author: Mike Kaganski Date: Thu May 4 14:58:17 2017 +0300 tdf#107622: also update nNullVirOff when changing nNullOff Change-Id: Iad867d6130c263d7bbfd7caf5c1805f13325aedb Reviewed-on: https://gerrit.libreoffice.org/37234 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 088ce8d2df78dd60724d1be0feb9f02bbcd043a4) Reviewed-on: https://gerrit.libreoffice.org/37250 Tested-by: Mike Kaganski diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 25fa30af1422..7306b097df87 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -2515,6 +2515,7 @@ void Ruler::SetNullOffset( long nPos ) { if ( mpData->nNullOff != nPos ) { +mpData->nNullVirOff += nPos - mpData->nNullOff; mpData->nNullOff = nPos; ImplUpdate(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits