sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 ++-------------- svx/source/svdraw/svdxcgv.cxx | 5 ++++- vcl/unx/generic/fontmanager/fontmanager.cxx | 21 --------------------- 3 files changed, 6 insertions(+), 36 deletions(-)
New commits: commit 7545a53f53c786c1124ba750f9339ffc237d6467 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Mon Mar 14 11:21:35 2022 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Mon Mar 14 11:53:22 2022 +0100 unit_online_get_fonts() has not been used by Online since 2017 Change-Id: I7dddb4fd40f219df1969f452c95170bc70caa44f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131524 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <t...@collabora.com> diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index bee1f4d4d92b..eb2b869217b3 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -1141,25 +1141,4 @@ void PrintFontManager::getGlyphWidths( fontID nFont, CloseTTFont(pTTFont); } -/// used by online unit tests via dlopen. -extern "C" { -SAL_DLLPUBLIC_EXPORT const char * unit_online_get_fonts(void) -{ - std::vector< fontID > aFontIDs; - PrintFontManager &rMgr = PrintFontManager::get(); - rMgr.getFontList(aFontIDs); - OStringBuffer aBuf; - aBuf.append( static_cast<sal_Int32>(aFontIDs.size()) ); - aBuf.append( " PS fonts.\n" ); - for( auto nId : aFontIDs ) - { - const OUString& rName = rMgr.getPSName( nId ); - aBuf.append( OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ) ); - aBuf.append( "\n" ); - } - static OString aResult = aBuf.makeStringAndClear(); - return aResult.getStr(); -} -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 9630bbc6df8bbff2c853e07be93579a96cc7cdbb Author: Mert Tumer <mert.tu...@collabora.com> AuthorDate: Wed Jan 19 14:23:52 2022 +0300 Commit: Mert Tumer <mert.tu...@collabora.com> CommitDate: Mon Mar 14 11:53:10 2022 +0100 lok: Set pasted text rect pos to 0, 0 Rect size change according to the length of the text however, this can make the text inserted in the negative coordinates and half of it becomes invisible. Signed-off-by: Mert Tumer <mert.tu...@collabora.com> Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131519 Tested-by: Jenkins diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index d5972c459e92..8a4da8dbf301 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -2469,21 +2469,9 @@ void SdTiledRenderingTest::testPasteTextOnSlide() SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(pObject); CPPUNIT_ASSERT(pTextObj); CPPUNIT_ASSERT_EQUAL(SdrObjKind::Text, pTextObj->GetObjIdentifier()); - // This test is unreliable: it gives alternating results for the following coordinates. - // As a compromise, instead of disabling it altogether, we allow for both sets of values. const Point aPos = pTextObj->GetLastBoundRect().TopLeft(); - if (aPos.getX() < 10000) - { - // We get this with 'make CppunitTest_sd_tiledrendering' - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(6739), aPos.getX(), 100); - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(6822), aPos.getY(), 100); - } - else - { - // We get this with 'make check' - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(12990), aPos.getX(), 100); - CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<tools::Long>(7393), aPos.getY(), 100); - } + CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(0), aPos.getX()); + CPPUNIT_ASSERT_EQUAL(static_cast<tools::Long>(0), aPos.getY()); } void SdTiledRenderingTest::testTdf115873() diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 513eb39c7996..a9b720f300d8 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -50,6 +50,7 @@ #include <svx/svdotable.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> +#include <comphelper/lok.hxx> using namespace com::sun::star; @@ -406,7 +407,9 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po nSizY /= aDstFr.GetNumerator(); tools::Long xs=nSizX; tools::Long ys=nSizY; - Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2); + // set the pos to 0, 0 for online case + bool isLOK = comphelper::LibreOfficeKit::isActive(); + Point aPos(isLOK ? 0 : rCenter.X()-xs/2, isLOK ? 0 : rCenter.Y()-ys/2); tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); pObj->SetLogicRect(aR); rLst.InsertObject(pObj, SAL_MAX_SIZE);