[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 5 commits - desktop/source sc/qa sc/source sd/qa sd/source sw/qa sw/source vcl/jsdialog vcl/source
Mert Tumer (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 8 13:25:42 UTC 2021
desktop/source/lib/init.cxx | 3 +++
sc/qa/unit/tiledrendering/tiledrendering.cxx | 17 +++++++++++++++++
sc/source/ui/unoobj/docuno.cxx | 12 +++++++++++-
sd/qa/unit/tiledrendering/tiledrendering.cxx | 16 ++++++++++++++++
sd/source/ui/unoidl/unomodel.cxx | 2 ++
sd/source/ui/view/drviewse.cxx | 1 +
sw/qa/extras/tiledrendering/tiledrendering.cxx | 17 +++++++++++++++++
sw/source/uibase/uno/unotxdoc.cxx | 2 ++
vcl/jsdialog/executor.cxx | 17 +++++++++++++++++
vcl/source/app/salvtables.cxx | 2 +-
10 files changed, 87 insertions(+), 2 deletions(-)
New commits:
commit 4c6040c6a59f00f0a2b62d456e809af0c2f3adab
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Wed Dec 16 23:01:25 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Apr 8 15:17:10 2021 +0200
jsdialogs: send click pos for drawingarea
Change-Id: I91aae808fe17f47fe9fa75dca069e4919c2ce4c3
Signed-off-by: Mert Tumer <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108685
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index c538371a4f2b..f338cb6830b2 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -119,6 +119,23 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat
{
if (sAction == "click")
{
+ int separatorPos = rData["data"].indexOf(';');
+ if (separatorPos > 0)
+ {
+ // x;y
+ OString clickPosX = OUStringToOString(rData["data"].copy(0, separatorPos), RTL_TEXTENCODING_ASCII_US);
+ OString clickPosY = OUStringToOString(rData["data"].copy(separatorPos + 1), RTL_TEXTENCODING_ASCII_US);
+ if (!clickPosX.isEmpty() && !clickPosY.isEmpty())
+ {
+ double posX = std::atof(clickPosX.getStr());
+ double posY = std::atof(clickPosY.getStr());
+ Size size = pArea->get_size_request();
+ posX = posX * size.Width();
+ posY = posY * size.Height();
+ LOKTrigger::trigger_click(*pArea, Point(posX, posY));
+ return true;
+ }
+ }
LOKTrigger::trigger_click(*pArea, Point(10, 10));
return true;
}
commit 1b7d097d004cc7a629af4d3b8c8ff973a600c704
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Thu Dec 10 11:59:06 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Apr 8 15:15:59 2021 +0200
fix rendershapeselection for drawing
Change-Id: Id4cb37885bf9b442adc679b895d89cd615ffb2ee
Signed-off-by: Mert Tumer <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108681
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109213
Tested-by: Jenkins
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 352dc13d5576..7ea03307b40c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3616,6 +3616,9 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu
case LOK_DOCTYPE_PRESENTATION:
aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export");
break;
+ case LOK_DOCTYPE_DRAWING:
+ aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export");
+ break;
case LOK_DOCTYPE_TEXT:
aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export");
break;
commit 470110a48ce3c975945bd2d3bae2578a65adb6e9
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Wed Dec 16 21:02:42 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Apr 8 15:15:46 2021 +0200
Fix MouseClick shoud be MouseLeft for drawing area
Change-Id: I4dd0c6862c6473d3cbfcc4535c2d2ebe4a0a238a
Signed-off-by: Mert Tumer <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108683
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109215
Tested-by: Jenkins
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index f80d51e605ef..4b7ccce0153c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5872,7 +5872,7 @@ OutputDevice& SalInstanceDrawingArea::get_ref_device() { return *m_xDrawingArea;
void SalInstanceDrawingArea::click(const Point& rPos)
{
- MouseEvent aEvent(rPos);
+ MouseEvent aEvent(rPos, 1, MouseEventModifiers::NONE, MOUSE_LEFT, 0);
m_xDrawingArea->MouseButtonDown(aEvent);
m_xDrawingArea->MouseButtonUp(aEvent);
}
commit 7c5d07139549caf1f16755e4577c124c85093e42
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Wed Dec 9 14:13:26 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Apr 8 15:15:32 2021 +0200
Insert draw connectors directly for online
Change-Id: I962a69c142151a43c47efbdb79428760ab07ad98
Signed-off-by: Mert Tumer <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108682
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109214
Tested-by: Jenkins
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index db9662bb7650..bd4c3775300d 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -448,6 +448,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_CONNECTOR_LINES_CIRCLES:
case SID_INSERT_SIGNATURELINE:
{
+ bCreateDirectly = comphelper::LibreOfficeKit::isActive();
SetCurrentFunction( FuConstructRectangle::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
rReq.Done();
}
commit 3f330a02c9f997f5a101c18c24942c5bc8e11153
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Tue Oct 13 20:16:22 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Apr 8 15:07:09 2021 +0200
Check render parameters for AutoSpellChecking
Conflicts:
sc/qa/unit/tiledrendering/tiledrendering.cxx
sw/qa/extras/tiledrendering/tiledrendering.cxx
Change-Id: Ife2551b4023461da26e70ac3de505adf9d7db1e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106602
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index bb34928fef7d..ed6370e1dbe5 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -112,6 +112,7 @@ public:
void testSheetGeometryDataCorrectness();
void testDeleteCellMultilineContent();
void testSpellOnlineParameter();
+ void testSpellOnlineRenderParameter();
CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
CPPUNIT_TEST(testRowColumnHeaders);
@@ -157,6 +158,7 @@ public:
CPPUNIT_TEST(testSheetGeometryDataCorrectness);
CPPUNIT_TEST(testDeleteCellMultilineContent);
CPPUNIT_TEST(testSpellOnlineParameter);
+ CPPUNIT_TEST(testSpellOnlineRenderParameter);
CPPUNIT_TEST_SUITE_END();
private:
@@ -603,6 +605,21 @@ void ScTiledRenderingTest::testViewCursors()
CPPUNIT_ASSERT(aView1.m_bViewCursorInvalidated);
}
+void ScTiledRenderingTest::testSpellOnlineRenderParameter()
+{
+ ScModelObj* pModelObj = createDoc("empty.ods");
+ ScDocument* pDoc = pModelObj->GetDocument();
+ bool bSet = pDoc->GetDocOptions().IsAutoSpell();
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues =
+ {
+ comphelper::makePropertyValue(".uno:SpellOnline", uno::makeAny(!bSet)),
+ };
+ pModelObj->initializeForTiledRendering(aPropertyValues);
+
+ CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+}
+
void ScTiledRenderingTest::testTextViewSelection()
{
comphelper::LibreOfficeKit::setActive();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 1fbbf37ac812..eca643fc5a1c 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1163,7 +1163,7 @@ void ScModelObj::completeFunction(const OUString& rFunctionName)
}
}
-void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& /*rArguments*/)
+void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& rArguments)
{
SolarMutexGuard aGuard;
@@ -1172,6 +1172,16 @@ void ScModelObj::initializeForTiledRendering(const css::uno::Sequence<css::beans
aAppOptions.SetAutoComplete(false);
SC_MOD()->SetAppOptions(aAppOptions);
+ for (const beans::PropertyValue& rValue : rArguments)
+ {
+ if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>())
+ {
+ ScDocOptions options = GetDocument()->GetDocOptions();
+ options.SetAutoSpell(rValue.Value.get<bool>());
+ GetDocument()->SetDocOptions(options);
+ }
+ }
+
// show us the text exactly
ScInputOptions aInputOptions(SC_MOD()->GetInputOptions());
aInputOptions.SetTextWysiwyg(true);
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 1aba4c65a77a..ae4aab1b1e91 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -128,6 +128,7 @@ public:
void testRegenerateDiagram();
void testLanguageAllText();
void testInsertDeletePageInvalidation();
+ void testSpellOnlineRenderParameter();
CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
CPPUNIT_TEST(testCreateDestroy);
@@ -180,6 +181,7 @@ public:
CPPUNIT_TEST(testRegenerateDiagram);
CPPUNIT_TEST(testLanguageAllText);
CPPUNIT_TEST(testInsertDeletePageInvalidation);
+ CPPUNIT_TEST(testSpellOnlineRenderParameter);
CPPUNIT_TEST_SUITE_END();
@@ -2461,6 +2463,20 @@ void SdTiledRenderingTest::testInsertDeletePageInvalidation()
CPPUNIT_ASSERT_EQUAL(size_t(8), aView1.m_aInvalidations.size());
}
+void SdTiledRenderingTest::testSpellOnlineRenderParameter()
+{
+ // Load the document.
+ SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
+ bool bSet = pXImpressDocument->GetDoc()->GetOnlineSpell();
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues =
+ {
+ comphelper::InitPropertySequence({ { ".uno:SpellOnline", uno::makeAny(!bSet) } }),
+ };
+ pXImpressDocument->initializeForTiledRendering(aPropertyValues);
+ CPPUNIT_ASSERT_EQUAL(!bSet, pXImpressDocument->GetDoc()->GetOnlineSpell());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 5310c120bf51..5321e17f900e 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2446,6 +2446,8 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs
pDrawView->SetPageShadowVisible(rValue.Value.get<bool>());
else if (rValue.Name == ".uno:Author" && rValue.Value.has<OUString>())
pDrawView->SetAuthor(rValue.Value.get<OUString>());
+ else if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>())
+ mpDoc->SetOnlineSpell(rValue.Value.get<bool>());
}
// Disable comments if requested
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index a8fa06ba50c8..193d45135c8c 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -147,6 +147,7 @@ public:
void testDropDownFormFieldButtonNoSelection();
void testDropDownFormFieldButtonNoItem();
void testTablePaintInvalidate();
+ void testSpellOnlineRenderParameter();
void testExtTextInputReadOnly();
void testBulletDeleteInvalidation();
void testBulletNoNumInvalidation();
@@ -223,6 +224,7 @@ public:
CPPUNIT_TEST(testDropDownFormFieldButtonNoSelection);
CPPUNIT_TEST(testDropDownFormFieldButtonNoItem);
CPPUNIT_TEST(testTablePaintInvalidate);
+ CPPUNIT_TEST(testSpellOnlineRenderParameter);
CPPUNIT_TEST(testExtTextInputReadOnly);
CPPUNIT_TEST(testBulletDeleteInvalidation);
CPPUNIT_TEST(testBulletNoNumInvalidation);
@@ -2885,6 +2887,21 @@ void SwTiledRenderingTest::testTablePaintInvalidate()
CPPUNIT_ASSERT_EQUAL(0, m_nInvalidations);
}
+void SwTiledRenderingTest::testSpellOnlineRenderParameter()
+{
+ SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
+ SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
+ const SwViewOption* pOpt = pWrtShell->GetViewOptions();
+ bool bSet = pOpt->IsOnlineSpell();
+
+ uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence(
+ {
+ {".uno:SpellOnline", uno::makeAny(!bSet)},
+ }));
+ pXTextDocument->initializeForTiledRendering(aPropertyValues);
+ CPPUNIT_ASSERT_EQUAL(!bSet, pOpt->IsOnlineSpell());
+}
+
void SwTiledRenderingTest::testExtTextInputReadOnly()
{
// Create a document with a protected section + a normal paragraph after it.
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 48f0fba1e6bb..0cc2856c4200 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3482,6 +3482,8 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css::
// switch.
m_pDocShell->SetView(pView);
}
+ else if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has<bool>())
+ aViewOption.SetOnlineSpell(rValue.Value.get<bool>());
}
// Set the initial zoom value to 1; usually it is set in setClientZoom and
More information about the Libreoffice-commits
mailing list