[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/core/crsr/crsr.cxx | 29 + sw/qa/core/crsr/data/sel-all-starts-with-table.odt |binary sw/source/core/crsr/callnk.cxx |5 ++- sw/source/core/doc/docfmt.cxx |1 4 files changed, 33 insertions(+), 2 deletions(-) New commits: commit 6f1e02c96b887750f974c187a82ecd6236e6a435 Author: Miklos Vajna AuthorDate: Mon Sep 14 21:02:31 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 09:07:18 2020 +0200 tdf#135682 sw: fix lost selection-all when doc starts with table Regression from commit c56bf1479cc71d1a2b0639f6383e90c1f7e3655b (tdf#105330 sw: fix lost cursor on undoing nested table insert, 2019-09-16), the problem was that the change reverted lcl_notifyRow() back to its original state, because it seemed the conditional notification is no longer needed. However, this broke the fix for tdf#37606 (ability to select-all when the doc starts with a table). Fix the problem by handling the starts-with-table case similar to a normal table selection, so there is still no need to restore the nested table visitor code but select-all works nicely with starts-with-table documents again. Change-Id: Icb823a39432d1774a63a0c633c172bba827ac76d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102694 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx index 6c503e81cb90..f02c3bd3487b 100644 --- a/sw/qa/core/crsr/crsr.cxx +++ b/sw/qa/core/crsr/crsr.cxx @@ -18,6 +18,13 @@ #include #include +#include + +#include +#include +#include + +char const DATA_DIRECTORY[] = "/sw/qa/core/crsr/data/"; /// Covers sw/source/core/crsr/ fixes. class SwCoreCrsrTest : public SwModelTestBase @@ -75,6 +82,28 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testFindReplace) CPPUNIT_ASSERT_EQUAL(OUString("bar"), aActualStart); } +CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testSelAllStartsWithTable) +{ +load(DATA_DIRECTORY, "sel-all-starts-with-table.odt"); +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +SwDocShell* pDocShell = pTextDoc->GetDocShell(); +SwDoc* pDoc = pDocShell->GetDoc(); +SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); + +CPPUNIT_ASSERT_EQUAL(static_cast(1), pDoc->GetTableFrameFormatCount(/*bUsed=*/true)); + +pWrtShell->SelAll(); +pWrtShell->SelAll(); +Scheduler::ProcessEventsToIdle(); +pWrtShell->DelLeft(); + +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 0 +// - Actual : 1 +// i.e. the table selection was lost and the table was not deleted. +CPPUNIT_ASSERT_EQUAL(static_cast(0), pDoc->GetTableFrameFormatCount(/*bUsed=*/true)); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/core/crsr/data/sel-all-starts-with-table.odt b/sw/qa/core/crsr/data/sel-all-starts-with-table.odt new file mode 100644 index ..a368095a55cf Binary files /dev/null and b/sw/qa/core/crsr/data/sel-all-starts-with-table.odt differ diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 3b0ca8fcc21a..a59c9c6aac61 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -59,7 +59,7 @@ SwCallLink::SwCallLink( SwCursorShell & rSh ) } } -static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell const & rShell) +static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell & rShell) { if ( !pNode ) return; @@ -76,11 +76,12 @@ static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell const & rShe const SwTableLine* pLine = pRow->GetTabLine( ); -if (rShell.IsTableMode()) +if (rShell.IsTableMode() || (rShell.StartsWithTable() && rShell.ExtendedSelectedAll())) { // If we have a table selection, then avoid the notification: it's not necessary (the text // cursor needs no updating) and the notification may kill the selection overlay, leading to // flicker. +// Same for whole-document selection when it starts with a table. return; } diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index b0d5f00dfd40..90fa2ed9e289 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1955,6 +1955,7 @@ void SwDoc::dumpAsXml(xmlTextWriterPtr pWriter) const mpFrameFormatTable->dumpAsXml(pWriter, "frmFormatTable"); mpSpzFrameFormatTable->dumpAsXml(pWriter, "spzFrameFormatTable"); mpSectionFormatTable->dumpAsXml(pWriter); +mpTableFrameFormatTable->dumpAsXml(pWriter, "tableFrameFormatTable"); mpNumRuleTable->dumpAsXml(pWriter); getIDocumentRedlineAccess().GetRedlineTable().dumpAsXml(pWriter); getIDocumentRedlineAccess().GetExtraRedlineTable().dumpAsXml(pWriter);
[Libreoffice-commits] online.git: kit/Kit.cpp net/Socket.hpp net/WebSocketHandler.hpp
kit/Kit.cpp |2 +- net/Socket.hpp |4 ++-- net/WebSocketHandler.hpp |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 3d082ad4513421e31f126f35889cde2b5663d8bc Author: Miklos Vajna AuthorDate: Tue Sep 15 09:08:21 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 09:34:18 2020 +0200 Mark processInputEnabled() as const Change-Id: I9869b20e01ba50166d696d1f6846c06d8764 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102703 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/kit/Kit.cpp b/kit/Kit.cpp index 87335ecaa..c955a3339 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -1391,7 +1391,7 @@ private: public: void enableProcessInput(bool enable = true){ _inputProcessingEnabled = enable; } -bool processInputEnabled() { return _inputProcessingEnabled; } +bool processInputEnabled() const { return _inputProcessingEnabled; } bool hasQueueItems() const { diff --git a/net/Socket.hpp b/net/Socket.hpp index 7ec78f00a..4c2ba13eb 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -371,7 +371,7 @@ public: /// Enable/disable processing of incoming data at socket level. virtual void enableProcessInput(bool /*enable*/){}; -virtual bool processInputEnabled(){ return true; }; +virtual bool processInputEnabled() const { return true; }; /// Called after successful socket reads. virtual void handleIncomingMessage(SocketDisposition &disposition) = 0; @@ -1063,7 +1063,7 @@ public: return _incomingFD; } -bool processInputEnabled(){ return _inputProcessingEnabled; } +bool processInputEnabled() const { return _inputProcessingEnabled; } void enableProcessInput(bool enable = true){ _inputProcessingEnabled = enable; } protected: diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp index 9cab57118..7fb38c86d 100644 --- a/net/WebSocketHandler.hpp +++ b/net/WebSocketHandler.hpp @@ -826,7 +826,7 @@ protected: socket->enableProcessInput(enable); } -virtual bool processInputEnabled() override +virtual bool processInputEnabled() const override { std::shared_ptr socket = _socket.lock(); if (socket) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/formulacell.hxx |2 +- sc/source/core/data/colorscale.cxx |6 +++--- sc/source/core/data/column3.cxx |2 +- sc/source/core/data/conditio.cxx|4 ++-- sc/source/core/data/formulacell.cxx | 36 ++-- sc/source/core/data/table4.cxx |3 +-- 6 files changed, 26 insertions(+), 27 deletions(-) New commits: commit 37095b7484b99a86ba81e5fb64aa5426a98e9183 Author: Caolán McNamara AuthorDate: Mon Sep 14 10:27:21 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 09:42:47 2020 +0200 StartListeningTo always dereferences its argument Change-Id: I4930ff5644d4ec184b4f55747d1a6b13a28bf49e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102660 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index d57dda491d11..49d6ddb9b762 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -460,7 +460,7 @@ public: bool InterpretFormulaGroup(SCROW nStartOffset = -1, SCROW nEndOffset = -1); // nOnlyNames may be one or more of SC_LISTENING_NAMES_* -void StartListeningTo( ScDocument* pDoc ); +void StartListeningTo( ScDocument& rDoc ); void StartListeningTo( sc::StartListeningContext& rCxt ); void EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr = nullptr, ScAddress aPos = ScAddress() ); diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 298d15d2cf51..deec68636033 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -174,7 +174,7 @@ ScColorScaleEntry::ScColorScaleEntry(const ScColorScaleEntry& rEntry): if(rEntry.mpCell) { mpCell.reset(new ScFormulaCell(*rEntry.mpCell, *rEntry.mpCell->GetDocument(), rEntry.mpCell->aPos, ScCloneFlags::NoMakeAbsExternal)); -mpCell->StartListeningTo( mpCell->GetDocument() ); +mpCell->StartListeningTo( *mpCell->GetDocument() ); mpListener.reset(new ScFormulaListener(mpCell.get())); } } @@ -190,7 +190,7 @@ ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& if(rEntry.mpCell) { mpCell.reset(new ScFormulaCell(*rEntry.mpCell, *rEntry.mpCell->GetDocument(), rEntry.mpCell->aPos, ScCloneFlags::NoMakeAbsExternal)); -mpCell->StartListeningTo( pDoc ); +mpCell->StartListeningTo( *pDoc ); mpListener.reset(new ScFormulaListener(mpCell.get())); if (mpFormat) mpListener->setCallback([&]() { mpFormat->DoRepaint();}); @@ -206,7 +206,7 @@ ScColorScaleEntry::~ScColorScaleEntry() COVERITY_NOEXCEPT_FALSE void ScColorScaleEntry::SetFormula( const OUString& rFormula, ScDocument* pDoc, const ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar ) { mpCell.reset(new ScFormulaCell( pDoc, rAddr, rFormula, eGrammar )); -mpCell->StartListeningTo( pDoc ); +mpCell->StartListeningTo( *pDoc ); mpListener.reset(new ScFormulaListener(mpCell.get())); if (mpFormat) mpListener->setCallback([&]() { mpFormat->DoRepaint();}); diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index f37ab25d2c51..55a1f59575bd 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -644,7 +644,7 @@ void ScColumn::AttachNewFormulaCell( } break; case sc::SingleCellListening: -rCell.StartListeningTo(pDocument); +rCell.StartListeningTo(*pDocument); StartListeningUnshared( rNewSharedRows); break; case sc::NoListening: diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index a76cebed65f8..b3089a4053a2 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -400,7 +400,7 @@ void ScConditionEntry::MakeCells( const ScAddress& rPos ) // pFCell1 will hold a flat-copied ScTokenArray sharing ref-counted // code tokens with pFormula1 pFCell1.reset( new ScFormulaCell(mpDoc, rPos, *pFormula1) ); -pFCell1->StartListeningTo( mpDoc ); +pFCell1->StartListeningTo( *mpDoc ); } if ( pFormula2 && !pFCell2 && !bRelRef2 ) @@ -408,7 +408,7 @@ void ScConditionEntry::MakeCells( const ScAddress& rPos ) // pFCell2 will hold a flat-copied ScTokenArray sharing ref-counted // code tokens with pFormula2 pFCell2.reset( new ScFormulaCell(mpDoc, rPos, *pFormula2) ); -pFCell2->StartListeningTo( mpDoc ); +pFCell2->StartListeningTo( *mpDoc ); } } diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index a67dc496731a..1ea54895f4ee 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -928,7 +928,7 @@ ScFormulaCell::ScFormulaCell(const ScFormulaCell& rCell, ScDocument& rDoc, const } if( nCloneFlags & ScClon
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/formulacell.hxx|2 - sc/source/core/data/colorscale.cxx|2 - sc/source/core/data/column3.cxx |6 ++--- sc/source/core/data/formulacell.cxx | 38 +- sc/source/core/tool/sharedformula.cxx |2 - 5 files changed, 25 insertions(+), 25 deletions(-) New commits: commit eae8f8b8b45460e4cab11818adb3713b17929713 Author: Caolán McNamara AuthorDate: Mon Sep 14 10:50:57 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 09:43:03 2020 +0200 EndListeningTo always dereferences its argument Change-Id: I0e61c1c367a0ffcd8acbf3202293833886a59c42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102661 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 49d6ddb9b762..296211687c39 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -463,7 +463,7 @@ public: void StartListeningTo( ScDocument& rDoc ); void StartListeningTo( sc::StartListeningContext& rCxt ); void EndListeningTo( -ScDocument* pDoc, ScTokenArray* pArr = nullptr, ScAddress aPos = ScAddress() ); +ScDocument& rDoc, ScTokenArray* pArr = nullptr, ScAddress aPos = ScAddress() ); void EndListeningTo( sc::EndListeningContext& rCxt ); bool IsShared() const; diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index deec68636033..f920985d7263 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -200,7 +200,7 @@ ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& ScColorScaleEntry::~ScColorScaleEntry() COVERITY_NOEXCEPT_FALSE { if(mpCell) -mpCell->EndListeningTo(mpCell->GetDocument()); +mpCell->EndListeningTo(*mpCell->GetDocument()); } void ScColorScaleEntry::SetFormula( const OUString& rFormula, ScDocument* pDoc, const ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar ) diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 55a1f59575bd..f6a42fce7a72 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -125,7 +125,7 @@ void ScColumn::DeleteContent( SCROW nRow, bool bBroadcast ) if (it->type == sc::element_type_formula) { ScFormulaCell* p = sc::formula_block::at(*it->data, aPos.second); -p->EndListeningTo(GetDoc()); +p->EndListeningTo(*GetDoc()); sc::SharedFormulaUtil::unshareFormulaCell(aPos, *p); } maCells.set_empty(nRow, nRow); @@ -334,7 +334,7 @@ void ScColumn::DetachFormulaCell( // Have the dying formula cell stop listening. // If in a shared formula group this ends the group listening. -rCell.EndListeningTo(GetDoc()); +rCell.EndListeningTo(*GetDoc()); } sc::SharedFormulaUtil::unshareFormulaCell(aPos, rCell); @@ -392,7 +392,7 @@ public: if (mpCxt) pCell->EndListeningTo(*mpCxt); else -pCell->EndListeningTo(mpDoc); +pCell->EndListeningTo(*mpDoc); } }; diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 1ea54895f4ee..50fd18bf4293 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -1211,7 +1211,7 @@ void ScFormulaCell::CompileTokenArray( bool bNoListening ) bNoListening = true; if( !bNoListening && pCode->GetCodeLen() ) -EndListeningTo( pDocument ); +EndListeningTo( *pDocument ); ScCompiler aComp(pDocument, aPos, *pCode, pDocument->GetGrammar(), true, cMatrixFlag != ScMatrixMode::NONE); bSubTotal = aComp.CompileTokenArray(); if( pCode->GetCodeError() == FormulaError::NONE ) @@ -1251,7 +1251,7 @@ void ScFormulaCell::CompileTokenArray( sc::CompileFormulaContext& rCxt, bool bNo bNoListening = true; if( !bNoListening && pCode->GetCodeLen() ) -EndListeningTo( pDocument ); +EndListeningTo( *pDocument ); ScCompiler aComp(rCxt, aPos, *pCode, true, cMatrixFlag != ScMatrixMode::NONE); bSubTotal = aComp.CompileTokenArray(); if( pCode->GetCodeError() == FormulaError::NONE ) @@ -2317,7 +2317,7 @@ void ScFormulaCell::InterpretTail( ScInterpreterContext& rContext, ScInterpretTa if (pCode->IsRecalcModeAlways()) { // The formula was previously volatile, but no more. -EndListeningTo(pDocument); +EndListeningTo(*pDocument); pCode->SetExclusiveRecalcModeNormal(); } else @@ -2370,7 +2370,7 @@ void ScFormulaCell::HandleStuffAfterParallelCalculation(ScInterpreter* pInterpre if (pCode->IsRecalcModeAlways()) { // The formula was p
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/colorscale.hxx |2 +- sc/source/core/data/colorscale.cxx |6 +++--- sc/source/filter/oox/condformatbuffer.cxx |2 +- sc/source/filter/xml/xmlcondformat.cxx |2 +- sc/source/ui/condformat/colorformat.cxx|2 +- sc/source/ui/condformat/condformatdlgentry.cxx |4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 41a86d795ef34124a43e1ddab2bcbc8cf122ec83 Author: Caolán McNamara AuthorDate: Mon Sep 14 10:56:21 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 09:46:03 2020 +0200 ScColorScaleEntry::SetFormula always dereferences its ScDocument* arg Change-Id: I5e539a952650707810686fa3d3c14cc79a482173 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102662 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index 2f325c4d0f79..c6539ec52409 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -62,7 +62,7 @@ public: void SetColor(const Color&); double GetValue() const; void SetValue(double nValue); -void SetFormula(const OUString& rFormula, ScDocument* pDoc, const ScAddress& rAddr, +void SetFormula(const OUString& rFormula, ScDocument& rDoc, const ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT); void UpdateReference( const sc::RefUpdateContext& rCxt ); diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index f920985d7263..a9b047ae8274 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -203,10 +203,10 @@ ScColorScaleEntry::~ScColorScaleEntry() COVERITY_NOEXCEPT_FALSE mpCell->EndListeningTo(*mpCell->GetDocument()); } -void ScColorScaleEntry::SetFormula( const OUString& rFormula, ScDocument* pDoc, const ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar ) +void ScColorScaleEntry::SetFormula( const OUString& rFormula, ScDocument& rDoc, const ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar ) { -mpCell.reset(new ScFormulaCell( pDoc, rAddr, rFormula, eGrammar )); -mpCell->StartListeningTo( *pDoc ); +mpCell.reset(new ScFormulaCell( &rDoc, rAddr, rFormula, eGrammar )); +mpCell->StartListeningTo( rDoc ); mpListener.reset(new ScFormulaListener(mpCell.get())); if (mpFormat) mpListener->setCallback([&]() { mpFormat->DoRepaint();}); diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 3b67674e254a..348d898bab21 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -240,7 +240,7 @@ ScColorScaleEntry* ConvertToModel( const ColorScaleRuleModelEntry& rEntry, ScDoc if(!rEntry.maFormula.isEmpty()) { pEntry->SetType(COLORSCALE_FORMULA); -pEntry->SetFormula(rEntry.maFormula, pDoc, rAddr, formula::FormulaGrammar::GRAM_ENGLISH_XL_A1); +pEntry->SetFormula(rEntry.maFormula, *pDoc, rAddr, formula::FormulaGrammar::GRAM_ENGLISH_XL_A1); } return pEntry; diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx index 41c8bbee7f3a..318e7c079458 100644 --- a/sc/source/filter/xml/xmlcondformat.cxx +++ b/sc/source/filter/xml/xmlcondformat.cxx @@ -847,7 +847,7 @@ void setColorEntryType(const OUString& rType, ScColorScaleEntry* pEntry, const O { pEntry->SetType(COLORSCALE_FORMULA); //position does not matter, only table is important -pEntry->SetFormula(rFormula, rImport.GetDocument(), ScAddress(0,0,rImport.GetTables().GetCurrentSheet()), formula::FormulaGrammar::GRAM_ODFF); +pEntry->SetFormula(rFormula, *rImport.GetDocument(), ScAddress(0,0,rImport.GetTables().GetCurrentSheet()), formula::FormulaGrammar::GRAM_ODFF); } else if(rType == "auto-minimum") pEntry->SetType(COLORSCALE_AUTO); diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index a5935d48e863..974cd567b9a3 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -42,7 +42,7 @@ void GetType(const weld::ComboBox& rLstBox, const weld::Entry& rEd, ScColorScale pEntry->SetValue(nVal); break; case COLORSCALE_FORMULA: -pEntry->SetFormula(rEd.get_text(), pDoc, rPos); +pEntry->SetFormula(rEd.get_text(), *pDoc, rPos); break; } } diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 589b9c50f5ca..1bd243ff235e 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -699,7 +699,7 @@ void SetColorScaleEntry(ScColorScaleEntry* pEntry, const weld::ComboBox& rType,
[Libreoffice-commits] core.git: sc/source
sc/source/ui/condformat/condformatdlgentry.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 90fbbecb2e80d47106d48c308af5addb3d8db57e Author: Caolán McNamara AuthorDate: Mon Sep 14 10:58:13 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 09:46:21 2020 +0200 ScIconSetFrmtDataEntry::CreateEntry always dereferences it ScDocument* arg Change-Id: I4adee5f3632d4c9a9846f38828c85e39c1f3218d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102663 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 1bd243ff235e..5836221cba22 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1323,7 +1323,7 @@ public: mxGrid->set_grid_top_attach(nTop); } -ScColorScaleEntry* CreateEntry(ScDocument* pDoc, const ScAddress& rPos) const; +ScColorScaleEntry* CreateEntry(ScDocument& rDoc, const ScAddress& rPos) const; void SetFirstEntry(); }; @@ -1373,7 +1373,7 @@ ScIconSetFrmtDataEntry::~ScIconSetFrmtDataEntry() mpContainer->move(mxGrid.get(), nullptr); } -ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument* pDoc, const ScAddress& rPos) const +ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument& rDoc, const ScAddress& rPos) const { sal_Int32 nPos = mxLbEntryType->get_active(); OUString aText = mxEdEntry->get_text(); @@ -1381,7 +1381,7 @@ ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument* pDoc, const S sal_uInt32 nIndex = 0; double nVal = 0; -SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable(); +SvNumberFormatter* pNumberFormatter = rDoc.GetFormatTable(); (void)pNumberFormatter->IsNumberFormat(aText, nIndex, nVal); pEntry->SetValue(nVal); @@ -1398,7 +1398,7 @@ ScColorScaleEntry* ScIconSetFrmtDataEntry::CreateEntry(ScDocument* pDoc, const S break; case 3: pEntry->SetType(COLORSCALE_FORMULA); -pEntry->SetFormula(aText, *pDoc, rPos, pDoc->GetGrammar()); +pEntry->SetFormula(aText, rDoc, rPos, rDoc.GetGrammar()); break; default: assert(false); @@ -1516,7 +1516,7 @@ ScFormatEntry* ScIconSetFrmtEntry::GetEntry() const pData->eIconSetType = static_cast(mxLbIconSetType->get_active()); for(const auto& rxEntry : maEntries) { -pData->m_Entries.emplace_back(rxEntry->CreateEntry(mpDoc, maPos)); +pData->m_Entries.emplace_back(rxEntry->CreateEntry(*mpDoc, maPos)); } pFormat->SetIconSetData(pData); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/data/column3.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit e24430486f9c584fb687fe6897807d6cb9f1f217 Author: Caolán McNamara AuthorDate: Mon Sep 14 10:59:43 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 09:46:42 2020 +0200 DetachFormulaCellsHandler never passed a null ScDocument* Change-Id: I7974fbfe832bbb20a1aab868826611a0f7a05698 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102664 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index f6a42fce7a72..4079fb04266c 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -380,19 +380,19 @@ public: class DetachFormulaCellsHandler { -ScDocument* mpDoc; +ScDocument& mrDoc; sc::EndListeningContext* mpCxt; public: -DetachFormulaCellsHandler( ScDocument* pDoc, sc::EndListeningContext* pCxt ) : -mpDoc(pDoc), mpCxt(pCxt) {} +DetachFormulaCellsHandler( ScDocument& rDoc, sc::EndListeningContext* pCxt ) : +mrDoc(rDoc), mpCxt(pCxt) {} void operator() (size_t /*nRow*/, ScFormulaCell* pCell) { if (mpCxt) pCell->EndListeningTo(*mpCxt); else -pCell->EndListeningTo(*mpDoc); +pCell->EndListeningTo(mrDoc); } }; @@ -459,7 +459,7 @@ void ScColumn::DetachFormulaCells( if (GetDoc()->IsClipOrUndo()) return; -DetachFormulaCellsHandler aFunc(GetDoc(), nullptr); +DetachFormulaCellsHandler aFunc(*GetDoc(), nullptr); sc::ProcessFormula(aPos.first, maCells, nRow, nNextTopRow-1, aFunc); } @@ -542,7 +542,7 @@ void ScColumn::DetachFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, S if (GetDoc()->IsClipOrUndo()) return; -DetachFormulaCellsHandler aFunc(GetDoc(), &rCxt); +DetachFormulaCellsHandler aFunc(*GetDoc(), &rCxt); sc::ProcessFormula(it, maCells, nRow1, nRow2, aFunc); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/data/formulacell.cxx |2 +- sc/source/core/inc/refupdat.hxx |2 +- sc/source/core/tool/refupdat.cxx|8 3 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 4ef697e670aaa7cac547846ac961e6d26aac816d Author: Caolán McNamara AuthorDate: Mon Sep 14 11:04:05 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 09:47:05 2020 +0200 ScRefUpdate::DoTranspose always dereferences its ScDocument* argument Change-Id: If61bdc93954177792ec750836a87d7f9a1ba1730 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102665 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 50fd18bf4293..5d3502c2dfcf 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -3813,7 +3813,7 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD SCCOL nRelPosX = aOldPos.Col(); SCROW nRelPosY = aOldPos.Row(); SCTAB nRelPosZ = aOldPos.Tab(); -ScRefUpdate::DoTranspose( nRelPosX, nRelPosY, nRelPosZ, pDocument, aDestRange, rSource.aStart ); +ScRefUpdate::DoTranspose( nRelPosX, nRelPosY, nRelPosZ, *pDocument, aDestRange, rSource.aStart ); aOldPos.Set( nRelPosX, nRelPosY, nRelPosZ ); bPosChanged = true; } diff --git a/sc/source/core/inc/refupdat.hxx b/sc/source/core/inc/refupdat.hxx index 52c1402e6283..1601c66bfe6c 100644 --- a/sc/source/core/inc/refupdat.hxx +++ b/sc/source/core/inc/refupdat.hxx @@ -62,7 +62,7 @@ public: static ScRefUpdateRes UpdateTranspose( const ScDocument& rDoc, const ScRange& rSource, const ScAddress& rDest, ScRange& rRef ); -static void DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab, const ScDocument* pDoc, +static void DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab, const ScDocument& rDoc, const ScRange& rSource, const ScAddress& rDest ); static ScRefUpdateRes UpdateGrow( diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx index 68cc9d173414..3a1693edebfc 100644 --- a/sc/source/core/tool/refupdat.cxx +++ b/sc/source/core/tool/refupdat.cxx @@ -507,13 +507,13 @@ void ScRefUpdate::MoveRelWrap( const ScDocument& rDoc, const ScAddress& rPos, } void ScRefUpdate::DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab, -const ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest ) +const ScDocument& rDoc, const ScRange& rSource, const ScAddress& rDest ) { SCTAB nDz = rDest.Tab() - rSource.aStart.Tab(); if (nDz) { SCTAB nNewTab = rTab+nDz; -SCTAB nCount = pDoc->GetTableCount(); +SCTAB nCount = rDoc.GetTableCount(); while (nNewTab<0) nNewTab = sal::static_int_cast( nNewTab + nCount ); while (nNewTab>=nCount) nNewTab = sal::static_int_cast( nNewTab - nCount ); rTab = nNewTab; @@ -542,8 +542,8 @@ ScRefUpdateRes ScRefUpdate::UpdateTranspose( SCCOL nCol1 = rRef.aStart.Col(), nCol2 = rRef.aEnd.Col(); SCROW nRow1 = rRef.aStart.Row(), nRow2 = rRef.aEnd.Row(); SCTAB nTab1 = rRef.aStart.Tab(), nTab2 = rRef.aEnd.Tab(); -DoTranspose(nCol1, nRow1, nTab1, &rDoc, rSource, rDest); -DoTranspose(nCol2, nRow2, nTab2, &rDoc, rSource, rDest); +DoTranspose(nCol1, nRow1, nTab1, rDoc, rSource, rDest); +DoTranspose(nCol2, nRow2, nTab2, rDoc, rSource, rDest); rRef.aStart = ScAddress(nCol1, nRow1, nTab1); rRef.aEnd = ScAddress(nCol2, nRow2, nTab2); eRet = UR_UPDATED; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source
vcl/source/app/vclevent.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8abebbba4b3597190d1023cb93c17983d9cb5c99 Author: Caolán McNamara AuthorDate: Fri Sep 11 11:36:40 2020 +0100 Commit: Miklos Vajna CommitDate: Tue Sep 15 09:55:43 2020 +0200 application level settings-changed event callbacks not triggering this was originally... ImplDelData aDel( pWinEvent->GetWindow() ); while ( aIter != aEnd && !aDel.IsDead() ) before commit 1db7af8bc9febdf72138fac533ec81d6983da729 Date: Tue Jan 26 22:10:52 2016 +0530 tdf#96888 - Kill internal vcl dog-tags ... back then if GetWindow was null ImplDelData.IsDead() was always false Change-Id: I1e75c27635532afa08ed43bf92bda35b34ae6320 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102423 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx index b99a56a4fc0c..3dfad4a4ca78 100644 --- a/vcl/source/app/vclevent.cxx +++ b/vcl/source/app/vclevent.cxx @@ -50,7 +50,7 @@ void VclEventListeners::Call( VclSimpleEvent& rEvent ) const if (VclWindowEvent* pWindowEvent = dynamic_cast(&rEvent)) { VclPtr xWin(pWindowEvent->GetWindow()); -while ( aIter != aEnd && xWin && ! xWin->IsDisposed() ) +while ( aIter != aEnd && (!xWin || !xWin->IsDisposed()) ) { Link &rLink = *aIter; // check this hasn't been removed in some re-enterancy scenario fdo#47368 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/unx
vcl/unx/gtk3/gtk3gtkframe.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 363048be0a14b686da8110b96f28a55e25478a89 Author: Caolán McNamara AuthorDate: Thu Sep 10 19:57:26 2020 +0100 Commit: Miklos Vajna CommitDate: Tue Sep 15 09:56:23 2020 +0200 tdf#136512 listen to style-updated on pEventWidget instead of toplevel... m_pWindow to avoid infinite event loop under Linux Mint Mate 18.3 Change-Id: Iaeec4538c7a3c1d49042c4eeb6d30ffc6ab01af8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102416 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 8ca684ca53b7..22ea69f31d7b 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -864,7 +864,8 @@ void GtkSalFrame::InitCommon() gtk_widget_set_redraw_on_allocate(GTK_WIDGET(m_pFixedContainer), false); // connect signals -g_signal_connect( G_OBJECT(m_pWindow), "style-updated", G_CALLBACK(signalStyleUpdated), this ); +// use pEventWidget instead of m_pWindow to avoid infinite event loop under Linux Mint Mate 18.3 +g_signal_connect( G_OBJECT(pEventWidget), "style-updated", G_CALLBACK(signalStyleUpdated), this ); gtk_widget_set_has_tooltip(pEventWidget, true); m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "query-tooltip", G_CALLBACK(signalTooltipQuery), this )); m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "button-press-event", G_CALLBACK(signalButton), this )); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sd/source
sd/source/filter/eppt/eppt.cxx |2 ++ sd/source/filter/eppt/pptx-epptbase.cxx |6 ++ sd/source/filter/eppt/pptx-epptooxml.cxx |3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) New commits: commit 80497a3f2b41c99fcd0b6987d1bfb213ea86fdb2 Author: Caolán McNamara AuthorDate: Fri Sep 11 10:04:45 2020 +0100 Commit: Miklos Vajna CommitDate: Tue Sep 15 09:57:05 2020 +0200 crashtesting: failed on export of tdf118002-1.potx to pptx because the bg isn't set a master isn't exported, so the endelement XML_sldMasterIdLst isn't exported and the document is broken so don't exit early if the propertyset isn't found and always call ImplWriteSlideMaster Modify the ppt variant PPTWriter::ImplWriteSlideMaster to do nothing on an empty propertyset allowing PowerPointExport:ImplWriteSlideMaster to output its XML_sldMasterIdLst on the last master Change-Id: I512ee10b3b3c80b6566827d708b737c6c502c3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102451 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit b7756fdde63b1eef85ef13772fc3578e345d34dc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102422 Reviewed-by: Miklos Vajna diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 26f0dae9f234..5c1f9da7d7af 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -361,6 +361,8 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_ void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertySet > const & aXBackgroundPropSet ) { +if (!aXBackgroundPropSet) +return; mpPptEscherEx->PtReplaceOrInsert( EPP_Persist_MainMaster | nPageNum, mpStrm->Tell() ); mpPptEscherEx->OpenContainer( EPP_MainMaster ); mpPptEscherEx->AddAtom( 24, EPP_SlideAtom, 2 ); diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index 552816e83a14..b5ce6b24958d 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -387,11 +387,9 @@ bool PPTWriterBase::CreateSlideMaster( sal_uInt32 nPageNum ) return false; SetCurrentStyleSheet( nPageNum ); -if ( !ImplGetPropertyValue( mXPagePropSet, "Background" ) ) // load background shape -return false; css::uno::Reference< css::beans::XPropertySet > aXBackgroundPropSet; -if ( !( mAny >>= aXBackgroundPropSet ) ) -return false; +if (ImplGetPropertyValue(mXPagePropSet, "Background"))// load background shape +mAny >>= aXBackgroundPropSet; ImplWriteSlideMaster( nPageNum, aXBackgroundPropSet ); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index d2fca1e919c7..a8af03e34ecb 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1272,7 +1272,8 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro pFS->startElementNS(XML_p, XML_cSld); -ImplWriteBackground(pFS, aXBackgroundPropSet); +if (aXBackgroundPropSet) +ImplWriteBackground(pFS, aXBackgroundPropSet); WriteShapeTree(pFS, MASTER, true); pFS->endElementNS(XML_p, XML_cSld); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source
cui/source/inc/numpages.hxx |1 + cui/source/tabpages/numpages.cxx |7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit 0cad102659b14e978143388fa4c819472192d618 Author: Caolán McNamara AuthorDate: Mon Sep 14 14:44:25 2020 +0100 Commit: Miklos Vajna CommitDate: Tue Sep 15 09:57:42 2020 +0200 rhbz#1878275 should use value_changed for spinbutton changes Change-Id: I8d042eb9c288e9db69a49cb9e097b23cf765aae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102640 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 26ec055e249b..ebbe46625562 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -273,6 +273,7 @@ class SvxNumOptionsTabPage : public SfxTabPage DECL_LINK(RatioHdl_Impl, weld::ToggleButton&, void); DECL_LINK(CharFmtHdl_Impl, weld::ComboBox&, void); DECL_LINK(EditModifyHdl_Impl, weld::Entry&, void); +DECL_LINK(SpinModifyHdl_Impl, weld::SpinButton&, void); DECL_LINK(AllLevelHdl_Impl, weld::SpinButton&, void); DECL_LINK(OrientHdl_Impl, weld::ComboBox&, void); DECL_LINK(SameLevelHdl_Impl, weld::ToggleButton&, void); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index b2b53a8e1898..c271ebaaa858 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1068,7 +1068,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC m_xWidthMF->connect_value_changed(LINK(this, SvxNumOptionsTabPage, SizeHdl_Impl)); m_xHeightMF->connect_value_changed(LINK(this, SvxNumOptionsTabPage, SizeHdl_Impl)); m_xRatioCB->connect_toggled(LINK(this, SvxNumOptionsTabPage, RatioHdl_Impl)); -m_xStartED->connect_changed(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl)); +m_xStartED->connect_value_changed(LINK(this, SvxNumOptionsTabPage, SpinModifyHdl_Impl)); m_xPrefixED->connect_changed(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl)); m_xSuffixED->connect_changed(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl)); m_xAllLevelNF->connect_value_changed(LINK(this,SvxNumOptionsTabPage, AllLevelHdl_Impl)); @@ -2088,6 +2088,11 @@ IMPL_LINK(SvxNumOptionsTabPage, EditModifyHdl_Impl, weld::Entry&, rEdit, void) EditModifyHdl_Impl(&rEdit); } +IMPL_LINK(SvxNumOptionsTabPage, SpinModifyHdl_Impl, weld::SpinButton&, rSpinButton, void) +{ +EditModifyHdl_Impl(&rSpinButton); +} + void SvxNumOptionsTabPage::EditModifyHdl_Impl(const weld::Entry* pEdit) { bool bPrefix = pEdit == m_xPrefixED.get(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source chart2/uiconfig
chart2/source/controller/dialogs/res_DataLabel.cxx |5 chart2/source/controller/dialogs/res_DataLabel.hxx |2 chart2/source/controller/inc/TextLabelItemConverter.hxx|2 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx | 36 ++ chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx | 37 ++ chart2/source/inc/chartview/ChartSfxItemIds.hxx|5 chart2/source/view/main/ChartItemPool.cxx |1 chart2/uiconfig/ui/dlg_DataLabel.ui| 55 ++ chart2/uiconfig/ui/tp_DataLabel.ui | 55 ++ 9 files changed, 195 insertions(+), 3 deletions(-) New commits: commit 28b53da4c49b2dc8550f28b07183fb7c60e1c298 Author: Balazs Varga AuthorDate: Tue Sep 8 10:21:33 2020 +0200 Commit: László Németh CommitDate: Tue Sep 15 09:57:54 2020 +0200 tdf#133227 chart UI: option to hide leader lines between data points and displaced data labels of a data series. Follow-up of the following commits related to the new UNO property ShowCustomLeaderLines for data labels: commit e2f4e65a7b8024c00b049eebf0d87637efda7f24 (tdf#134571 chart2, xmloff: add loext:custom-leader-lines) commit 5d67d70b26706ce8a08612c12a68821f984210a2 (tdf#134563 Add UNO API for custom leader lines) Change-Id: Id8a953b16ff737ca924c0c2c3241fba4e3ac904b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102221 Tested-by: László Németh Reviewed-by: László Németh diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 35f96f775e01..62568fc71296 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -111,6 +111,7 @@ DataLabelResources::DataLabelResources(weld::Builder* pBuilder, weld::Window* pP , m_xLB_TextDirection(new TextDirectionListBox(pBuilder->weld_combo_box("LB_LABEL_TEXTDIR"))) , m_xDC_Dial(new svx::DialControl) , m_xDC_DialWin(new weld::CustomWeld(*pBuilder, "CT_DIAL", *m_xDC_Dial)) +, m_xCBCustomLeaderLines(pBuilder->weld_check_button("CB_CUSTOM_LEADER_LINES")) { m_xDC_Dial->SetText(m_xFT_Dial->get_label()); @@ -143,6 +144,7 @@ DataLabelResources::DataLabelResources(weld::Builder* pBuilder, weld::Window* pP m_xCBCategory->connect_toggled( LINK( this, DataLabelResources, CheckHdl )); m_xCBSymbol->connect_toggled( LINK( this, DataLabelResources, CheckHdl )); m_xCBWrapText->connect_toggled( LINK( this, DataLabelResources, CheckHdl )); +m_xCBCustomLeaderLines->connect_toggled( LINK( this, DataLabelResources, CheckHdl )); m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState ); m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState); @@ -280,6 +282,8 @@ void DataLabelResources::FillItemSet( SfxItemSet* rOutAttrs ) const rOutAttrs->Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYMBOL, m_xCBSymbol->get_active()) ); if( m_xCBWrapText->get_state()!= TRISTATE_INDET ) rOutAttrs->Put( SfxBoolItem( SCHATTR_DATADESCR_WRAP_TEXT, m_xCBWrapText->get_active()) ); +if( m_xCBCustomLeaderLines->get_state() != TRISTATE_INDET ) +rOutAttrs->Put(SfxBoolItem( SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, m_xCBCustomLeaderLines->get_active()) ); auto const aSep = our_aLBEntryMap[m_xLB_Separator->get_active()]; rOutAttrs->Put( SfxStringItem( SCHATTR_DATADESCR_SEPARATOR, aSep) ); @@ -311,6 +315,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_CATEGORY, *m_xCBCategory ); lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_SYMBOL, *m_xCBSymbol ); lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_WRAP_TEXT, *m_xCBWrapText ); +lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_CUSTOM_LEADER_LINES, *m_xCBCustomLeaderLines ); m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState ); m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState); diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx index f926d45c0d
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf132483.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport15.cxx| 14 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) New commits: commit e48eb426bbef20b9f5646d3fe3978a6f476be5cb Author: Bakos Attila AuthorDate: Fri Jul 10 12:42:11 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 10:22:56 2020 +0200 tdf#132483: DOCX import: fix OLE anchoring position The relative orientation of OLE objects was not copied from the replacement object to OLE, resulting bad position. Co-authored-by: Attila Bánhegyi (NISZ) Change-Id: If62124e5a40218a224e047efbe86a09606b44af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98493 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 54031e6a2912ebe723b4423b5d737c13c9bb03c5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102565 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/data/tdf132483.docx b/sw/qa/extras/ooxmlexport/data/tdf132483.docx new file mode 100644 index ..e4ebf4b78511 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf132483.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index f17d9ad3f668..792e919394b7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -11,6 +11,7 @@ #include #include +#include char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/"; @@ -178,6 +179,19 @@ DECLARE_OOXMLEXPORT_TEST(testRelativeAnchorHeightFromBottomMarginHasFooter, CPPUNIT_ASSERT_EQUAL(static_cast(1147), nAnchoredHeight); } +DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx") +{ +uno::Reference xOLEProps(getShape(1), uno::UNO_QUERY_THROW); +sal_Int16 nVRelPos = -1; +sal_Int16 nHRelPos = -1; +xOLEProps->getPropertyValue("VertOrientRelation") >>= nVRelPos; +xOLEProps->getPropertyValue("HoriOrientRelation") >>= nHRelPos; +CPPUNIT_ASSERT_EQUAL_MESSAGE("The OLE is shifted vertically", +text::RelOrientation::PAGE_FRAME , nVRelPos); +CPPUNIT_ASSERT_EQUAL_MESSAGE("The OLE is shifted horizontally", +text::RelOrientation::PAGE_FRAME , nHRelPos); +} + DECLARE_OOXMLEXPORT_TEST(testRelativeAnchorHeightFromBottomMarginNoFooter, "tdf133070_testRelativeAnchorHeightFromBottomMarginNoFooter.docx") { diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 0f468e43937e..3c6d165facb6 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2228,7 +2228,9 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const std::share OUString("HoriOrient"), OUString("HoriOrientPosition"), OUString("VertOrient"), -OUString("VertOrientPosition") +OUString("VertOrientPosition"), +OUString("VertOrientRelation"), +OUString("HoriOrientRelation") }; for (const OUString & s : pProperties) xOLEProperties->setPropertyValue(s, xReplacementProperties->getPropertyValue(s)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit 661852ab6fec9c873dfee383d6f08b020223155d Author: Pedro Pinto Silva AuthorDate: Mon Sep 14 16:03:10 2020 +0200 Commit: Pedro Silva CommitDate: Tue Sep 15 10:27:47 2020 +0200 Mobile: Menu bar: Fix absent document-header on read-only documents Change-Id: Icd23f8236cfd7d72335b0cc295d62fb979090512 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102679 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index bcd427865..68997aae5 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -876,11 +876,8 @@ L.Control.Menubar = L.Control.extend({ }); $('#main-menu').attr('tabindex', 0); - // The _createFileIcon function shows the Collabora logo in the iOS app case, no - // need to delay that until the document has been made editable. - if (window.ThisIsTheiOSApp || !this._map.isPermissionReadOnly()) { - this._createFileIcon(); - } + + this._createFileIcon(); }, _onStyleMenu: function (e) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/uiwriter/data3/tdf135623.docx |binary sw/qa/extras/uiwriter/uiwriter3.cxx| 46 - 2 files changed, 45 insertions(+), 1 deletion(-) New commits: commit 485a8a8f21f951d19586b694c233eb4a2dd7b57a Author: Xisco Fauli AuthorDate: Mon Sep 14 14:13:16 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 10:40:29 2020 +0200 tdf#135623: sw_uiwriter: Add unittest Change-Id: I77bc9e22d294ecc218b1570e75742344ef1d2ea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102668 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/uiwriter/data3/tdf135623.docx b/sw/qa/extras/uiwriter/data3/tdf135623.docx new file mode 100644 index ..ed139eaeffdb Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf135623.docx differ diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index 46e5a4eee028..5cfe6beb3aa4 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -1317,7 +1317,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128782) CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y); CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X); //Y position in shape 2 has changed -CPPUNIT_ASSERT(aPos[1].Y != xShape2->getPosition().Y); +CPPUNIT_ASSERT(aPos[1].Y < xShape2->getPosition().Y); dispatchCommand(mxComponent, ".uno:Undo", {}); Scheduler::ProcessEventsToIdle(); @@ -1330,6 +1330,50 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128782) CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135623) +{ +load(DATA_DIRECTORY, "tdf135623.docx"); +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +CPPUNIT_ASSERT(pTextDoc); + +CPPUNIT_ASSERT_EQUAL(2, getShapes()); +CPPUNIT_ASSERT_EQUAL(2, getPages()); + +uno::Reference xShape1 = getShape(1); +uno::Reference xShape2 = getShape(2); + +awt::Point aPos[2]; +aPos[0] = xShape1->getPosition(); +aPos[1] = xShape2->getPosition(); + +//select shape 1 and move it down +dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {}); +Scheduler::ProcessEventsToIdle(); + +pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X); +//Y position in shape 1 has changed +CPPUNIT_ASSERT(aPos[0].Y < xShape1->getPosition().Y); +CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); + +dispatchCommand(mxComponent, ".uno:Undo", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y); +CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X); + +// Without the fix in place, this test would have failed here +// - Expected: 1351 +// - Actual : 2233 +CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); + +CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133490) { load(DATA_DIRECTORY, "tdf133490.odt"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/source
sw/source/core/doc/doclay.cxx |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) New commits: commit e752f7d984a82eb720c2cb63be44ea1935d39502 Author: Vasily Melenchuk AuthorDate: Fri Sep 11 14:06:23 2020 +0300 Commit: Xisco Fauli CommitDate: Tue Sep 15 10:40:15 2020 +0200 tdf#135623: modified generation of unique fly name Modified lcl_GetUniqueFlyName() is right now always marks current fly format name number as used. Yes, this can lead to some gaps in numbering is some cases, but meanwhile guarantee that there will be no duplicates if format name does not match SdrObject name. Change-Id: If39ed993614ae1665deba21ae8d5e6bd542fb6e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102460 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 07a695ec1988ee8b02256cab2e07a1b429ead24b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102636 Reviewed-by: Vasily Melenchuk (cherry picked from commit c514e9cfca2901f325644a65ee1b87455a56e7f0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102638 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 2a63e2112b6b..ec4861fe39b2 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1349,11 +1349,9 @@ static OUString lcl_GetUniqueFlyName(const SwDoc* pDoc, const char* pDefStrId, s if (pObj) lcl_collectUsedNums(aUsedNums, nNmLen, *pObj, aName); } -else -{ -OUString sName = pFlyFormat->GetName(); -lcl_collectUsedNums(aUsedNums, nNmLen, sName, aName); -} + +OUString sName = pFlyFormat->GetName(); +lcl_collectUsedNums(aUsedNums, nNmLen, sName, aName); } // All numbers are flagged accordingly, so determine the right one ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/qa sw/source
sw/qa/core/crsr/crsr.cxx | 29 + sw/qa/core/crsr/data/sel-all-starts-with-table.odt |binary sw/source/core/crsr/callnk.cxx |5 ++- sw/source/core/doc/docfmt.cxx |1 4 files changed, 33 insertions(+), 2 deletions(-) New commits: commit ffc8cc8d7891ef4be1a364116a2bc9075f51b2b9 Author: Miklos Vajna AuthorDate: Mon Sep 14 21:02:31 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 10:50:26 2020 +0200 tdf#135682 sw: fix lost selection-all when doc starts with table Regression from commit c56bf1479cc71d1a2b0639f6383e90c1f7e3655b (tdf#105330 sw: fix lost cursor on undoing nested table insert, 2019-09-16), the problem was that the change reverted lcl_notifyRow() back to its original state, because it seemed the conditional notification is no longer needed. However, this broke the fix for tdf#37606 (ability to select-all when the doc starts with a table). Fix the problem by handling the starts-with-table case similar to a normal table selection, so there is still no need to restore the nested table visitor code but select-all works nicely with starts-with-table documents again. (cherry picked from commit 6f1e02c96b887750f974c187a82ecd6236e6a435) Change-Id: Icb823a39432d1774a63a0c633c172bba827ac76d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102704 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx index 9345fdde6dd6..e1664f70a839 100644 --- a/sw/qa/core/crsr/crsr.cxx +++ b/sw/qa/core/crsr/crsr.cxx @@ -15,6 +15,13 @@ #include #include +#include + +#include +#include +#include + +char const DATA_DIRECTORY[] = "/sw/qa/core/crsr/data/"; /// Covers sw/source/core/crsr/ fixes. class SwCoreCrsrTest : public SwModelTestBase @@ -72,6 +79,28 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testFindReplace) CPPUNIT_ASSERT_EQUAL(OUString("bar"), aActualStart); } +CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testSelAllStartsWithTable) +{ +load(DATA_DIRECTORY, "sel-all-starts-with-table.odt"); +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +SwDocShell* pDocShell = pTextDoc->GetDocShell(); +SwDoc* pDoc = pDocShell->GetDoc(); +SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); + +CPPUNIT_ASSERT_EQUAL(static_cast(1), pDoc->GetTableFrameFormatCount(/*bUsed=*/true)); + +pWrtShell->SelAll(); +pWrtShell->SelAll(); +Scheduler::ProcessEventsToIdle(); +pWrtShell->DelLeft(); + +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 0 +// - Actual : 1 +// i.e. the table selection was lost and the table was not deleted. +CPPUNIT_ASSERT_EQUAL(static_cast(0), pDoc->GetTableFrameFormatCount(/*bUsed=*/true)); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/core/crsr/data/sel-all-starts-with-table.odt b/sw/qa/core/crsr/data/sel-all-starts-with-table.odt new file mode 100644 index ..a368095a55cf Binary files /dev/null and b/sw/qa/core/crsr/data/sel-all-starts-with-table.odt differ diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 90905da63b7a..f6c277036920 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -59,7 +59,7 @@ SwCallLink::SwCallLink( SwCursorShell & rSh ) } } -static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell const & rShell) +static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell & rShell) { if ( !pNode ) return; @@ -76,11 +76,12 @@ static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell const & rShe const SwTableLine* pLine = pRow->GetTabLine( ); -if (rShell.IsTableMode()) +if (rShell.IsTableMode() || (rShell.StartsWithTable() && rShell.ExtendedSelectedAll())) { // If we have a table selection, then avoid the notification: it's not necessary (the text // cursor needs no updating) and the notification may kill the selection overlay, leading to // flicker. +// Same for whole-document selection when it starts with a table. return; } diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 230337e9d22a..7b877a7cddb2 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1955,6 +1955,7 @@ void SwDoc::dumpAsXml(xmlTextWriterPtr pWriter) const mpFrameFormatTable->dumpAsXml(pWriter, "frmFormatTable"); mpSpzFrameFormatTable->dumpAsXml(pWriter, "spzFrameFormatTable"); mpSectionFormatTable->dumpAsXml(pWriter); +mpTableFrameFormatTable->dumpAsXml(pWriter, "tableFrameFormatTable"); mpNumRuleTable->dumpAsXml(pWriter); getIDocumentRedlineAccess().GetRedlineTable().dumpAsXml(pWriter); getIDocumentRedlineAcce
[Libreoffice-commits] core.git: config_host.mk.in configure.ac external/icu
config_host.mk.in |1 + configure.ac|3 +++ external/icu/ExternalProject_icu.mk |3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 315919306c7b6e95db6a280c4aa8d2203970e292 Author: Mike Kaganski AuthorDate: Thu Aug 6 20:52:01 2020 +0300 Commit: Mike Kaganski CommitDate: Tue Sep 15 10:53:11 2020 +0200 Set PYTHONWARNINGS to error by default for --enable-werror Setting it in environment overrides this setting. The rationale is to avoid introducing warnings like these appeared recently: zipfile.py:1517: UserWarning: Duplicate name: 'cmd/ar/sc_bulletsandnumberingdialog.png' (see e.g. https://ci.libreoffice.org/job/gerrit_windows/71910/consoleFull) Change-Id: I8ae42e039ec3d028c01dbc4bcf422feae9e46271 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100268 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/config_host.mk.in b/config_host.mk.in index b0594a06f949..92fe857fa483 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -499,6 +499,7 @@ export PYTHON_LIBS=$(gb_SPACE)@PYTHON_LIBS@ export PYTHON_VERSION=@PYTHON_VERSION@ export PYTHON_VERSION_MAJOR=@PYTHON_VERSION_MAJOR@ export PYTHON_VERSION_MINOR=@PYTHON_VERSION_MINOR@ +export PYTHONWARNINGS=@PYTHONWARNINGS@ export QRCODEGEN_CFLAGS=$(gb_SPACE)@QRCODEGEN_CFLAGS@ export QRCODEGEN_LIBS=$(gb_SPACE)@QRCODEGEN_LIBS@ export QT5_CFLAGS=$(gb_SPACE)@QT5_CFLAGS@ diff --git a/configure.ac b/configure.ac index c5ab4159e17f..8b3097fb4c2e 100644 --- a/configure.ac +++ b/configure.ac @@ -5136,16 +5136,19 @@ dnl === AC_MSG_CHECKING([whether to turn warnings to errors]) if test -n "$enable_werror" -a "$enable_werror" != "no"; then ENABLE_WERROR="TRUE" +PYTHONWARNINGS="error" AC_MSG_RESULT([yes]) else if test -n "$LODE_HOME" -a -z "$enable_werror"; then ENABLE_WERROR="TRUE" +PYTHONWARNINGS="error" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi AC_SUBST(ENABLE_WERROR) +AC_SUBST(PYTHONWARNINGS) dnl Check for --enable-assert-always-abort, set ASSERT_ALWAYS_ABORT dnl === diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk index 3c0a22ec9f37..8913ebdfdf6f 100644 --- a/external/icu/ExternalProject_icu.mk +++ b/external/icu/ExternalProject_icu.mk @@ -21,7 +21,7 @@ ifeq ($(OS),WNT) $(call gb_ExternalProject_get_state_target,icu,build) : $(call gb_Trace_StartRange,icu,EXTERNAL) $(call gb_ExternalProject_run,build,\ - export LIB="$(ILIB)" \ + export LIB="$(ILIB)" PYTHONWARNINGS="default" \ && CFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS)" CPPFLAGS="$(SOLARINC)" CXXFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS)" \ INSTALL=`cygpath -m /usr/bin/install` \ ./runConfigureICU \ @@ -65,6 +65,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) : $(call gb_ExternalProject_run,build,\ CPPFLAGS=$(icu_CPPFLAGS) CFLAGS=$(icu_CFLAGS) \ CXXFLAGS=$(icu_CXXFLAGS) LDFLAGS=$(icu_LDFLAGS) \ + PYTHONWARNINGS="default" \ ./configure \ --disable-layout --disable-samples \ $(if $(filter FUZZERS,$(BUILD_TYPE)),--disable-release) \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - extras/source
extras/source/autocorr/lang/ko/DocumentList.xml |2 ++ 1 file changed, 2 insertions(+) New commits: commit f34b1e7d4024d47a446dcf374a8f8743a5631219 Author: DaeHyun Sung AuthorDate: Thu Sep 10 01:07:32 2020 +0900 Commit: Caolán McNamara CommitDate: Tue Sep 15 10:57:42 2020 +0200 add Korean autocorrect items ㈜ & ㉿ tdf#132614 add Korean autocorrect items(Bracket to enclose characters). Insert -> Conversion (주) -> ㈜ [U+321C] (KS) -> ㉿ [U+327F] In Korea, It usually used these marks. Popular word processor in Korea, such as MS Word, Hancom HWP, support these autocorrect items Change-Id: If6248689cea06bfc4182dd0bbea5e9d26286517d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102331 Tested-by: Jenkins Reviewed-by: Andras Timar (cherry picked from commit 080c0ba99a0499f2033ccc10586e6ad5e8d8b542) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102642 Reviewed-by: Caolán McNamara diff --git a/extras/source/autocorr/lang/ko/DocumentList.xml b/extras/source/autocorr/lang/ko/DocumentList.xml index 2936602979d4..e56625334cfa 100644 --- a/extras/source/autocorr/lang/ko/DocumentList.xml +++ b/extras/source/autocorr/lang/ko/DocumentList.xml @@ -3,6 +3,8 @@ + + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/CppunitTest_sw_core_crsr.mk sw/Module_sw.mk sw/qa sw/source
sw/CppunitTest_sw_core_crsr.mk | 73 + sw/Module_sw.mk|1 sw/qa/core/crsr/crsr.cxx | 58 sw/qa/core/crsr/data/sel-all-starts-with-table.odt |binary sw/source/core/crsr/callnk.cxx |5 - sw/source/core/doc/docfmt.cxx |1 6 files changed, 136 insertions(+), 2 deletions(-) New commits: commit d3a874cedc6129bace47fbee4b781e7a5e30b65f Author: Miklos Vajna AuthorDate: Mon Sep 14 21:02:31 2020 +0200 Commit: Caolán McNamara CommitDate: Tue Sep 15 10:58:41 2020 +0200 tdf#135682 sw: fix lost selection-all when doc starts with table Regression from commit c56bf1479cc71d1a2b0639f6383e90c1f7e3655b (tdf#105330 sw: fix lost cursor on undoing nested table insert, 2019-09-16), the problem was that the change reverted lcl_notifyRow() back to its original state, because it seemed the conditional notification is no longer needed. However, this broke the fix for tdf#37606 (ability to select-all when the doc starts with a table). Fix the problem by handling the starts-with-table case similar to a normal table selection, so there is still no need to restore the nested table visitor code but select-all works nicely with starts-with-table documents again. (cherry picked from commit 6f1e02c96b887750f974c187a82ecd6236e6a435) Conflicts: sw/qa/core/crsr/crsr.cxx Change-Id: Icb823a39432d1774a63a0c633c172bba827ac76d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102706 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/CppunitTest_sw_core_crsr.mk b/sw/CppunitTest_sw_core_crsr.mk new file mode 100644 index ..895b3ff63e57 --- /dev/null +++ b/sw/CppunitTest_sw_core_crsr.mk @@ -0,0 +1,73 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#* + +$(eval $(call gb_CppunitTest_CppunitTest,sw_core_crsr)) + +$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_crsr)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_crsr, \ +sw/qa/core/crsr/crsr \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,sw_core_crsr, \ +comphelper \ +cppu \ +cppuhelper \ +sal \ +sfx \ +svxcore \ +sw \ +test \ +unotest \ +utl \ +vcl \ +svt \ +tl \ +svl \ +)) + +$(eval $(call gb_CppunitTest_use_externals,sw_core_crsr,\ +boost_headers \ +libxml2 \ +)) + +$(eval $(call gb_CppunitTest_set_include,sw_core_crsr,\ +-I$(SRCDIR)/sw/inc \ +-I$(SRCDIR)/sw/source/core/inc \ +-I$(SRCDIR)/sw/source/uibase/inc \ +-I$(SRCDIR)/sw/qa/inc \ +$$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_api,sw_core_crsr,\ + udkapi \ + offapi \ + oovbaapi \ +)) + +$(eval $(call gb_CppunitTest_use_ure,sw_core_crsr)) +$(eval $(call gb_CppunitTest_use_vcl,sw_core_crsr)) + +$(eval $(call gb_CppunitTest_use_rdb,sw_core_crsr,services)) + +$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_crsr,\ +officecfg/registry \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,sw_core_crsr)) + +$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_crsr, \ +modules/swriter \ +)) + +$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_crsr)) + +# vim: set noet sw=4 ts=4: diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index f8d59d1e7848..aa737173f861 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -113,6 +113,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_core_objectpositioning \ CppunitTest_sw_core_layout \ CppunitTest_sw_core_unocore \ +CppunitTest_sw_core_crsr \ )) ifneq ($(DISABLE_GUI),TRUE) diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx new file mode 100644 index ..c22e072091a5 --- /dev/null +++ b/sw/qa/core/crsr/crsr.cxx @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +char const DATA_DIRECTORY[] = "/sw/qa/core/crsr/data/"; + +/// Covers sw/source/core/crsr/ fixes. +class SwCoreCrsrTes
[Libreoffice-commits] core.git: sw/source
sw/source/core/undo/unattr.cxx |4 1 file changed, 4 insertions(+) New commits: commit d39651a69d789522b2faffd01879db25354b9a22 Author: Vasily Melenchuk AuthorDate: Thu Aug 27 15:13:08 2020 +0300 Commit: Thorsten Behrens CommitDate: Tue Sep 15 11:04:25 2020 +0200 sw: additional asserts/warns to diagnose empty style names Since undo/redo is using format name instead of old approach with pointers (which can point to invalid/removed style) it is a problem when we trying to use any style without name: it will be not resolved and undo/redo will work incorrectly: it can apply invalid attributes or apply style to another random objects. Change-Id: Iccba3e8ab223955ce940dfc17d0bd4858bd364f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101472 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 905c55d97243..9dcb56ae83a0 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -99,6 +99,8 @@ SwUndoFormatAttr::SwUndoFormatAttr( const SfxItemSet& rOldSet, , m_nFormatWhich( rChgFormat.Which() ) , m_bSaveDrawPt( bSaveDrawPt ) { +assert(m_sFormatName.getLength()); + Init( rChgFormat ); } @@ -111,6 +113,8 @@ SwUndoFormatAttr::SwUndoFormatAttr( const SfxPoolItem& rItem, SwFormat& rChgForm , m_nFormatWhich( rChgFormat.Which() ) , m_bSaveDrawPt( bSaveDrawPt ) { +assert(m_sFormatName.getLength()); + m_pOldSet->Put( rItem ); Init( rChgFormat ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/rangelst.hxx |2 +- sc/source/core/data/documen5.cxx |7 --- sc/source/core/tool/rangelst.cxx |6 +++--- sc/source/ui/condformat/condformatdlg.cxx |4 ++-- sc/source/ui/docshell/docsh4.cxx |2 +- sc/source/ui/drawfunc/fuins2.cxx |2 +- sc/source/ui/miscdlgs/acredlin.cxx|2 +- sc/source/ui/miscdlgs/highred.cxx |2 +- sc/source/ui/unoobj/cellsuno.cxx |2 +- sc/source/ui/unoobj/chartuno.cxx |2 +- sc/source/ui/vba/vbarange.cxx |2 +- sc/source/ui/view/drawvie4.cxx|2 +- 12 files changed, 18 insertions(+), 17 deletions(-) New commits: commit 2943c7b1d7b8e6c087f1ad5f1be9ed8f5bbc027c Author: Caolán McNamara AuthorDate: Mon Sep 14 11:12:38 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 11:12:55 2020 +0200 ScRangeList::Parse ScDocument* argument dereferenced on all used paths so nDefaultTab is always used (in ScAcceptChgDlg::FilterHandle pDoc might possibly be null, but that doesn't seem possible in practice) Change-Id: I39ec7f7f96fa2421f492c9e73659abdfba21c3f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102666 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 6a74662d7572..48a2b088065e 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -41,7 +41,7 @@ public: ScRangeList& operator=(const ScRangeList& rList); ScRangeList& operator=(ScRangeList&& rList) noexcept; -ScRefFlags Parse( const OUString&, const ScDocument*, +ScRefFlags Parse( const OUString&, const ScDocument&, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO, SCTAB nDefaultTab = 0, sal_Unicode cDelimiter = 0 ); diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index 2702e1e65e54..71a4b97f1e73 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -163,6 +163,7 @@ uno::Reference< chart2::XChartDocument > ScDocument::GetChartByName( const OUStr } return xReturn; } + void ScDocument::GetChartRanges( const OUString& rChartName, ::std::vector< ScRangeList >& rRangesVector, const ScDocument* pSheetNameDoc ) { rRangesVector.clear(); @@ -174,7 +175,7 @@ void ScDocument::GetChartRanges( const OUString& rChartName, ::std::vector< ScRa for(const OUString & aRangeString : aRangeStrings) { ScRangeList aRanges; -aRanges.Parse( aRangeString, pSheetNameDoc, pSheetNameDoc->GetAddressConvention() ); +aRanges.Parse( aRangeString, *pSheetNameDoc, pSheetNameDoc->GetAddressConvention() ); rRangesVector.push_back(aRanges); } } @@ -228,7 +229,7 @@ void ScDocument::GetOldChartParameters( const OUString& rName, OUString aRangesStr; lcl_GetChartParameters( xChartDoc, aRangesStr, eDataRowSource, bHasCategories, bFirstCellAsLabel ); -rRanges.Parse( aRangesStr, this ); +rRanges.Parse( aRangesStr, *this ); if ( eDataRowSource == chart::ChartDataRowSource_COLUMNS ) { rRowHeaders = bHasCategories; @@ -284,7 +285,7 @@ void ScDocument::UpdateChartArea( const OUString& rChartName, // append to old ranges, keep other settings aNewRanges = new ScRangeList; -aNewRanges->Parse( aRangesStr, this ); +aNewRanges->Parse( aRangesStr, *this ); for ( size_t nAdd = 0, nAddCount = rNewList->size(); nAdd < nAddCount; ++nAdd ) aNewRanges->push_back( (*rNewList)[nAdd] ); diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 5b156e2d3449..4121f2c5baea 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -103,7 +103,7 @@ ScRangeList::~ScRangeList() { } -ScRefFlags ScRangeList::Parse( const OUString& rStr, const ScDocument* pDoc, +ScRefFlags ScRangeList::Parse( const OUString& rStr, const ScDocument& rDoc, formula::FormulaGrammar::AddressConvention eConv, SCTAB nDefaultTab, sal_Unicode cDelimiter ) { @@ -114,14 +114,14 @@ ScRefFlags ScRangeList::Parse( const OUString& rStr, const ScDocument* pDoc, ScRefFlags nResult = ~ScRefFlags::ZERO;// set all bits ScRange aRange; -const SCTAB nTab = pDoc ? nDefaultTab : 0; +const SCTAB nTab = nDefaultTab; sal_Int32 nPos = 0; do { const OUString aOne = rStr.getToken( 0, cDelimiter, nPos ); aRange.aStart.SetTab( nTab ); // default tab if
[Libreoffice-commits] core.git: 2 commits - sc/inc sc/source
sc/inc/address.hxx |2 +- sc/inc/rangeutl.hxx |2 +- sc/source/core/data/documen5.cxx |2 +- sc/source/core/tool/address.cxx |6 +++--- sc/source/core/tool/rangelst.cxx |2 +- sc/source/core/tool/rangeutl.cxx |4 ++-- sc/source/filter/excel/xicontent.cxx |2 +- sc/source/filter/excel/xilink.cxx|2 +- sc/source/filter/oox/worksheetbuffer.cxx |2 +- sc/source/filter/oox/worksheethelper.cxx |2 +- sc/source/ui/app/inputhdl.cxx|2 +- sc/source/ui/app/inputwin.cxx|2 +- sc/source/ui/dbgui/consdlg.cxx |2 +- sc/source/ui/dbgui/dbnamdlg.cxx |4 ++-- sc/source/ui/docshell/arealink.cxx |2 +- sc/source/ui/docshell/docsh4.cxx |2 +- sc/source/ui/miscdlgs/anyrefdg.cxx |2 +- sc/source/ui/miscdlgs/crnrdlg.cxx|8 sc/source/ui/miscdlgs/optsolver.cxx |2 +- sc/source/ui/pagedlg/areasdlg.cxx|2 +- sc/source/ui/unoobj/addruno.cxx |2 +- sc/source/ui/unoobj/cellsuno.cxx |4 ++-- sc/source/ui/view/viewfun2.cxx |6 +++--- 23 files changed, 33 insertions(+), 33 deletions(-) New commits: commit 1f7bbd1fcd81e23ed3c8965664863bc7bb7c107c Author: Caolán McNamara AuthorDate: Mon Sep 14 12:18:12 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 11:13:30 2020 +0200 ScRangeUtil::MakeArea ScDocument* arg dereferenced on all branches Change-Id: I91f36130322110facc8cf9d530da8af15f894650 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102705 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index a65939e81e03..62fb8fe0a4b3 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -42,7 +42,7 @@ public: static bool MakeArea( const OUString& rAreaStr, ScArea& rArea, - const ScDocument* pDoc, + const ScDocument& rDoc, SCTAB nTab, ScAddress::Details const & rDetails ); diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 340b76eeada1..47a6008de5d8 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star; bool ScRangeUtil::MakeArea( const OUString& rAreaStr, ScArea& rArea, -const ScDocument* pDoc, +const ScDocument& rDoc, SCTAB nTab, ScAddress::Details const & rDetails ) { @@ -56,7 +56,7 @@ bool ScRangeUtil::MakeArea( const OUString& rAreaStr, aStrArea += ":" + rAreaStr.copy( nPointPos+1 ); // do not include '.' in copy } -bSuccess = ConvertDoubleRef( pDoc, aStrArea, nTab, startPos, endPos, rDetails ); +bSuccess = ConvertDoubleRef( &rDoc, aStrArea, nTab, startPos, endPos, rDetails ); if ( bSuccess ) rArea = ScArea( startPos.Tab(), diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 7f6252fe248a..82b117ddf187 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -347,7 +347,7 @@ IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl, weld::Button&, void) for ( sal_Int32 i=0; iget_text(i), - pDataAreas[i], pDoc, nTab, eConv); + pDataAreas[i], *pDoc, nTab, eConv); } theOutParam.nCol= aDestAddress.Col(); commit 129ae164844c2d635fe7f152ad0c47c02e08b9d4 Author: Caolán McNamara AuthorDate: Mon Sep 14 11:29:43 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 11:13:11 2020 +0200 ScRangeList::ParseAny ScDocument* argument dereferenced on all used paths Change-Id: Ie41a1b58f8bec0e8197aa49aa92522f11de40a28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102667 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index a56572c65f8f..8a4d9b6afc98 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -557,7 +557,7 @@ public: const css::uno::Sequence* pExternalLinks = nullptr, const OUString* pErrRef = nullptr ); -SC_DLLPUBLIC ScRefFlags ParseAny( const OUString&, const ScDocument*, +SC_DLLPUBLIC ScRefFlags ParseAny( const OUString&, const ScDocument&, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); SC_DLLPUBLIC ScRefFlags ParseCols( const ScDocument& rDoc, const OUString&, diff -
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - chart2/CppunitTest_chart2_geometry.mk chart2/Module_chart2.mk chart2/qa chart2/source oox/source
chart2/CppunitTest_chart2_geometry.mk| 139 + chart2/Module_chart2.mk | 1 chart2/qa/extras/chart2geometry.cxx | 242 ++ chart2/qa/extras/data/xlsx/tdf135184RoundLineCap.xlsx |binary chart2/qa/extras/data/xlsx/tdf135184RoundLineCap2.xlsx |binary chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx | 1 chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx | 6 chart2/source/inc/LinePropertiesHelper.hxx | 3 chart2/source/model/main/DataPointProperties.cxx | 8 chart2/source/tools/LinePropertiesHelper.cxx | 8 chart2/source/view/inc/VLineProperties.hxx | 1 chart2/source/view/main/PropertyMapper.cxx | 9 chart2/source/view/main/ShapeFactory.cxx | 5 chart2/source/view/main/VLineProperties.cxx | 3 oox/source/drawingml/chart/objectformatter.cxx | 6 oox/source/export/drawingml.cxx | 23 16 files changed, 435 insertions(+), 20 deletions(-) New commits: commit 2b218729b8332fa2bc8a20480c8ba701e1bca361 Author: Regina Henschel AuthorDate: Mon Jul 27 21:55:05 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 11:14:13 2020 +0200 tdf#135184 add linecaps in charts Chart is currently not able to interpret property linecap. But in case of linecap 'round' or 'square', line dashes lengths are adapted so that they look same as in MS Office (tdf#134053). This does not work, if the corresponding linecap property is not interpreted. Dashed border of data labels is not fixed because of bug tdf#135366. In addition I have fixed errors in prstDash detection, which I have noticed while creating unit tests. The unit tests cover file text, not visual appearence. Change-Id: I8cf2d2b2fc0923c2882f8148b4550bc363270480 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99562 Tested-by: Jenkins Reviewed-by: Regina Henschel (cherry picked from commit 74be8bb787a44464957e5d3105c8de6d36e81b4a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101871 Reviewed-by: Xisco Fauli diff --git a/chart2/CppunitTest_chart2_geometry.mk b/chart2/CppunitTest_chart2_geometry.mk new file mode 100644 index ..fb07f9108a5f --- /dev/null +++ b/chart2/CppunitTest_chart2_geometry.mk @@ -0,0 +1,139 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#* + +$(eval $(call gb_CppunitTest_CppunitTest,chart2_geometry)) + +$(eval $(call gb_CppunitTest_use_externals,chart2_geometry, \ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,chart2_geometry, \ +chart2/qa/extras/chart2geometry \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,chart2_geometry, \ +$(call gb_Helper_optional,AVMEDIA,avmedia) \ +basegfx \ +comphelper \ +cppu \ +cppuhelper \ +drawinglayer \ +editeng \ +for \ +forui \ +i18nlangtag \ +msfilter \ +oox \ +sal \ +salhelper \ +sax \ +sb \ +sc \ +sw \ +sd \ +sfx \ +sot \ +svl \ +svt \ +svx \ +svxcore \ +test \ +tl \ +tk \ +ucbhelper \ +unotest \ +utl \ +vbahelper \ +vcl \ +xo \ +)) + +$(eval $(call gb_CppunitTest_set_include,chart2_geometry,\ +-I$(SRCDIR)/chart2/inc \ +$$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,chart2_geometry)) + +$(eval $(call gb_CppunitTest_use_ure,chart2_geometry)) +$(eval $(call gb_CppunitTest_use_vcl,chart2_geometry)) + +$(eval $(call gb_CppunitTest_use_components,chart2_geometry,\ +basic/util/sb \ +animations/source/animcore/animcore \ +chart2/source/controller/chartcontroller \ +chart2/source/chartcore \ +comphelper/util/comphelp \ +configmgr/source/configmgr \ +dtrans/util/mcnttype \ +dbaccess/util/dba \ +embeddedobj/util/embobj \ +emfio/emfio \ +eventattacher/source/evtatt \ +filter/source/config/cache/filterconfig1 \ +filter/source/odfflatxml/odfflatxml \ +filter/source/storagefilterdetect/storagefd \ +filter/source/xmlfilteradaptor/xmlfa \ +filter/source/xmlfilterdetect/xmlfd \ +f
[Libreoffice-commits] core.git: sw/source
sw/source/core/inc/unoport.hxx|3 +-- sw/source/core/unocore/unoredline.cxx | 13 + 2 files changed, 10 insertions(+), 6 deletions(-) New commits: commit cca02a2fbdbcc6f178c05543b0315fe8e1ade812 Author: Michael Stahl AuthorDate: Mon Sep 14 18:59:05 2020 +0200 Commit: Michael Stahl CommitDate: Tue Sep 15 11:15:00 2020 +0200 sw: don't throw if disposed in SwXRedlinePortion::getPropertyValue() No other SwXTextPortion method does that, so avoid it here for consistency, just return void. Change-Id: Iae9b6b12e21609e315a9f269feb0703657bbf3cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102691 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx index 7817d7d16d36..69c407d5b135 100644 --- a/sw/source/core/inc/unoport.hxx +++ b/sw/source/core/inc/unoport.hxx @@ -273,8 +273,7 @@ class SwXRedlinePortion : public SwXTextPortion private: SwRangeRedline const& m_rRedline; -/// @throws css::uno::RuntimeException -void Validate(); +bool Validate(); using SwXTextPortion::GetPropertyValue; diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 615b1b04c4b4..4ba69d93b553 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -197,7 +197,10 @@ static uno::Sequence lcl_GetSuccessorProperties(const SwRa uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName ) { SolarMutexGuard aGuard; -Validate(); +if (!Validate()) +{ +return uno::Any(); +} uno::Any aRet; if(rPropertyName == UNO_NAME_REDLINE_TEXT) { @@ -225,7 +228,7 @@ uno::Any SwXRedlinePortion::getPropertyValue( const OUString& rPropertyName ) return aRet; } -void SwXRedlinePortion::Validate() +bool SwXRedlinePortion::Validate() { SwUnoCursor& rUnoCursor = GetCursor(); //search for the redline @@ -233,9 +236,11 @@ void SwXRedlinePortion::Validate() const SwRedlineTable& rRedTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); bool bFound = false; for(size_t nRed = 0; nRed < rRedTable.size() && !bFound; nRed++) +{ bFound = &m_rRedline == rRedTable[nRed]; -if(!bFound) -throw uno::RuntimeException(); +} +return bFound; +// don't throw; the only caller can return void instead } uno::Sequence< sal_Int8 > SAL_CALL SwXRedlinePortion::getImplementationId( ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: config_host.mk.in configure.ac external/skia
config_host.mk.in |1 + configure.ac |8 +++- external/skia/Library_skia.mk |1 + 3 files changed, 9 insertions(+), 1 deletion(-) New commits: commit 9d2ce7ef8ea225369ec9a2e6a9b6b7a031f1a708 Author: Luboš Luňák AuthorDate: Mon Sep 14 15:35:26 2020 +0200 Commit: Luboš Luňák CommitDate: Tue Sep 15 11:42:31 2020 +0200 disable Clang's -fmodules-codegen for Skia if optimizing it Skia is explicitly made to build optimized even in debug builds, unless --enable-skia=debug is given, so $(PCH_MODULES_CODEGEN) gets set even for it by com_GCC_class.mk , although normally it's disabled for optimized builds as not worth it. Explicitly disable the flag for Skia. Change-Id: Icf030f0bdc99dbc476af585937c864f951d2b7ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102674 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/config_host.mk.in b/config_host.mk.in index 92fe857fa483..182a80069074 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -472,6 +472,7 @@ export PAGEMAKER_LIBS=$(gb_SPACE)@PAGEMAKER_LIBS@ export PCH_INSTANTIATE_TEMPLATES=@PCH_INSTANTIATE_TEMPLATES@ export PCH_MODULES_CODEGEN=@PCH_MODULES_CODEGEN@ export PCH_MODULES_DEBUGINFO=@PCH_MODULES_DEBUGINFO@ +export PCH_NO_MODULES_CODEGEN=@PCH_NO_MODULES_CODEGEN@ export PERL=@PERL@ export PKGFORMAT=@PKGFORMAT@ export PKGMK=@PKGMK@ diff --git a/configure.ac b/configure.ac index 8b3097fb4c2e..5acf53a3601c 100644 --- a/configure.ac +++ b/configure.ac @@ -5507,11 +5507,16 @@ fi AC_SUBST(BUILDING_PCH_WITH_OBJ) PCH_MODULES_CODEGEN= +PCH_NO_MODULES_CODEGEN= if test -n "$BUILDING_PCH_WITH_OBJ"; then AC_MSG_CHECKING([whether $CC supports -Xclang -fmodules-codegen]) save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror -Xclang -fmodules-codegen" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ PCH_MODULES_CODEGEN="-Xclang -fmodules-codegen" ],[]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])], +[ +PCH_MODULES_CODEGEN="-Xclang -fmodules-codegen" +PCH_NO_MODULES_CODEGEN="-Xclang -fno-modules-codegen" +],[]) CFLAGS=$save_CFLAGS if test -n "$PCH_MODULES_CODEGEN"; then AC_MSG_RESULT(yes) @@ -5521,6 +5526,7 @@ if test -n "$BUILDING_PCH_WITH_OBJ"; then CFLAGS=$save_CFLAGS fi AC_SUBST(PCH_MODULES_CODEGEN) +AC_SUBST(PCH_NO_MODULES_CODEGEN) PCH_MODULES_DEBUGINFO= if test -n "$BUILDING_PCH_WITH_OBJ"; then AC_MSG_CHECKING([whether $CC supports -Xclang -fmodules-debuginfo]) diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk index 735152808f12..feda0793b566 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/Library_skia.mk @@ -29,6 +29,7 @@ $(eval $(call gb_Library_add_defs,skia,\ ifeq ($(ENABLE_SKIA_DEBUG),) $(eval $(call gb_Library_add_cxxflags,skia, \ $(gb_COMPILEROPTFLAGS) \ +$(PCH_NO_MODULES_CODEGEN) \ )) endif ___ 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-6.4' - 2 commits - include/xmloff sw/qa sw/source xmloff/source
include/xmloff/txtparae.hxx|4 + sw/qa/extras/odfexport/data/nestedTableInFooter.odt|binary sw/qa/extras/odfexport/data/tdf124470TableAndEmbeddedUsedFonts.odt |binary sw/qa/extras/odfexport/odfexport.cxx | 29 + sw/source/filter/xml/xmltble.cxx | 30 +- sw/source/filter/xml/xmltexte.hxx |6 ++ xmloff/source/text/txtparae.cxx|6 ++ 7 files changed, 73 insertions(+), 2 deletions(-) New commits: commit ef27927b9d953aca6043f09074df956401b32a43 Author: Mike Kaganski AuthorDate: Fri Aug 21 00:15:29 2020 +0300 Commit: Mike Kaganski CommitDate: Tue Sep 15 11:50:26 2020 +0200 tdf#135942: avoid collecting autostyles during writing them This modifies the container over which iteration is performed. Additionally, make sure that all nested table autostyles are collected on the first phase. Change-Id: I74c0bb1aaacad095226c21e6bf51cc8668133bb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101096 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit f0286ad82465152b29bba01ab2edeb97291397fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101069 Reviewed-by: Caolán McNamara (cherry picked from commit 0273675e7dde577077ccca17571846a0942f2630) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102700 Tested-by: Jenkins CollaboraOffice diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index 7ded21114fd6..c01c03eea4d3 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -365,6 +365,8 @@ protected: const css::uno::Reference< css::beans::XPropertySet> & i_xPortion, bool i_bAutoStyles, bool i_isProgress, bool & rPrevCharIsSpace); +bool isAutoStylesCollected() const { return mbCollected; } + virtual void exportTableAutoStyles(); public: diff --git a/sw/qa/extras/odfexport/data/nestedTableInFooter.odt b/sw/qa/extras/odfexport/data/nestedTableInFooter.odt new file mode 100644 index ..0356f04ee14e Binary files /dev/null and b/sw/qa/extras/odfexport/data/nestedTableInFooter.odt differ diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index c40824a1e823..5ef2d7cd0b38 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2414,5 +2414,17 @@ DECLARE_ODFEXPORT_TEST(tdf124470, "tdf124470TableAndEmbeddedUsedFonts.odt") } } +DECLARE_ODFEXPORT_TEST(tdf135942, "nestedTableInFooter.odt") +{ +// All table autostyles should be collected, including nested, and must not crash. + +CPPUNIT_ASSERT_EQUAL(1, getPages()); + +if (xmlDocPtr pXmlDoc = parseExport("styles.xml")) +{ +assertXPath(pXmlDoc, "/office:document-styles/office:automatic-styles/style:style[@style:family='table']", 2); +} +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 80d786d8d884..6a4fa1c9902b 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -1183,8 +1183,27 @@ void SwXMLTextParagraphExport::exportTable( // During the flat XML export (used e.g. by .sdw-export) // ALL flags are set at the same time. const bool bExportStyles = bool( GetExport().getExportFlags() & SvXMLExportFlags::STYLES ); -if ( bExportStyles || !pFormat->GetDoc()->IsInHeaderFooter( aIdx ) ) +if (!isAutoStylesCollected() +&& (bExportStyles || !pFormat->GetDoc()->IsInHeaderFooter(aIdx))) +{ maTableNodes.push_back(pTableNd); +// Collect all tables inside cells of this table, too +const auto aCellNames = pXTable->getCellNames(); +for (const OUString& rCellName : aCellNames) +{ + css::uno::Reference xCell( +pXTable->getCellByName(rCellName), css::uno::UNO_QUERY); +if (!xCell) +continue; +auto xEnumeration = xCell->createEnumeration(); +while (xEnumeration->hasMoreElements()) +{ +if (css::uno::Reference xInnerTable{ +xEnumeration->nextElement(), css::uno::UNO_QUERY }) +exportTable(xInnerTable, bAutoStyles, _bProgress); +} +} +} } else { diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index b830da3057
[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - loleaflet/src
loleaflet/src/layer/tile/CalcTileLayer.js |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 9a558124440ccd0a51e964647150d79a2c03525b Author: Michael Meeks AuthorDate: Tue Sep 15 11:02:54 2020 +0100 Commit: Michael Meeks CommitDate: Tue Sep 15 11:02:54 2020 +0100 calc grid: fix this interleaving. When the span starts in the middle of the view don't render backwards. Change-Id: Icc97fef88a65c0ca83167ddb72c03bece9a8e047 diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 7cf1318a7..2c08e2faa 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -1839,8 +1839,10 @@ L.SheetDimension = L.Class.extend({ (spanData.data.sizecore * (spanData.end - spanData.start + 1)); if (spanFirstCorePx < endPix && spanData.data.poscorepx > startPix) { - var firstCorePx = startPix + spanData.data.sizecore - - ((startPix - spanFirstCorePx) % spanData.data.sizecore); + var firstCorePx = Math.max( + spanFirstCorePx, + startPix + spanData.data.sizecore - + ((startPix - spanFirstCorePx) % spanData.data.sizecore)); var lastCorePx = Math.min(endPix, spanData.data.poscorepx); for (var pos = firstCorePx; pos <= lastCorePx; pos += spanData.data.sizecore) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cui/source oox/source sw/qa
cui/source/tabpages/swpossizetabpage.cxx |4 - oox/source/vml/vmlshape.cxx |8 +- sw/qa/core/objectpositioning/data/vml-vertical-alignment.docx |binary sw/qa/core/objectpositioning/objectpositioning.cxx| 40 ++ 4 files changed, 48 insertions(+), 4 deletions(-) New commits: commit cf0c04d5fc85acbe6cbeb090de6a739a0d5a8d30 Author: Tibor Nagy AuthorDate: Thu Sep 10 14:13:37 2020 +0200 Commit: László Németh CommitDate: Tue Sep 15 12:11:39 2020 +0200 tdf#103611 sw: fix vertical alignment to page bottom margin Allow to align objects to page bottom margin vertically in Position and Size settings. Fix also DOCX import of VML shapes. Co-authored-by: Attila Szűcs (NISZ) Change-Id: I78db2553ee9d963b18a2d580b1cbb76c1917ac0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102379 Tested-by: László Németh Reviewed-by: László Németh diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index e78826bc5105..803b56081007 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -308,7 +308,7 @@ static FrmMap aHCharHtmlAbsMap[] = // #i18732# - allow vertical alignment at page areas // #i22341# - handle on its own constexpr auto VERT_CHAR_REL = LB::VertFrame|LB::VertPrintArea| - LB::RelPageFrame|LB::RelPagePrintArea; + LB::RelPageFrame|LB::RelPagePrintArea|LB::RelPagePrintAreaBottom; static FrmMap aVCharMap[] = { @@ -323,7 +323,7 @@ static FrmMap aVCharMap[] = {SvxSwFramePosString::BOTTOM,SvxSwFramePosString::BOTTOM, VertOrientation::BOTTOM,VERT_CHAR_REL|LB::RelChar}, {SvxSwFramePosString::BELOW, SvxSwFramePosString::BELOW, VertOrientation::CHAR_BOTTOM, LB::RelChar}, {SvxSwFramePosString::CENTER_VERT, SvxSwFramePosString::CENTER_VERT, VertOrientation::CENTER,VERT_CHAR_REL|LB::RelChar}, -{SvxSwFramePosString::FROMTOP, SvxSwFramePosString::FROMTOP, VertOrientation::NONE, VERT_CHAR_REL|LB::RelPagePrintAreaBottom}, +{SvxSwFramePosString::FROMTOP, SvxSwFramePosString::FROMTOP, VertOrientation::NONE, VERT_CHAR_REL}, {SvxSwFramePosString::FROMBOTTOM,SvxSwFramePosString::FROMBOTTOM, VertOrientation::NONE, LB::RelChar|LB::VertLine}, {SvxSwFramePosString::TOP, SvxSwFramePosString::TOP, VertOrientation::LINE_TOP, LB::VertLine}, {SvxSwFramePosString::BOTTOM,SvxSwFramePosString::BOTTOM, VertOrientation::LINE_BOTTOM, LB::VertLine}, diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 905548bafb9e..eb0f886c32b6 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -608,6 +608,10 @@ static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rType { rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_PRINT_AREA); } +else if (rTypeModel.maPositionVerticalRelative == "bottom-margin-area") +{ +rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_PRINT_AREA_BOTTOM); +} else { rPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::FRAME); @@ -663,9 +667,9 @@ static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rType else if ( rTypeModel.maPositionVertical == "bottom" ) rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::BOTTOM)); else if ( rTypeModel.maPositionVertical == "inside" ) -rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::LINE_TOP)); +rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::TOP)); else if ( rTypeModel.maPositionVertical == "outside" ) -rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::LINE_BOTTOM)); +rPropSet.setAnyProperty(PROP_VertOrient, makeAny(text::VertOrientation::BOTTOM)); lcl_setSurround( rPropSet, rTypeModel, rGraphicHelper ); } diff --git a/sw/qa/core/objectpositioning/data/vml-vertical-alignment.docx b/sw/qa/core/objectpositioning/data/vml-vertical-alignment.docx new file mode 100644 index ..36ed5fdfb063 Binary files /dev/null and b/sw/qa/core/objectpositioning/data/vml-vertical-alignment.docx differ diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx b/sw/qa/core/objectpositioning/objectpositioning.cxx index b6d06022fd7c..13a936500329 100644 --- a/sw/qa/core/objectpositioning/objectpositioning.cxx +++ b/sw/qa/core/objectpositioning/objectpositioning.cxx @@ -231,6 +231,46 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testInsideOutsideVertAlignBott // Verify that t
[Libreoffice-commits] online.git: android/lib loleaflet/css loleaflet/src
android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java | 15 +++ loleaflet/css/toolbar.css|1 loleaflet/src/control/Control.MobileTopBar.js|2 loleaflet/src/control/Control.Toolbar.js |8 +++ loleaflet/src/control/Control.UIManager.js | 21 +- loleaflet/src/control/Permission.js |7 +++ loleaflet/src/map/Map.js |5 ++ 7 files changed, 56 insertions(+), 3 deletions(-) New commits: commit 4cd1baa02d0b36e68a7194c77fdeb68c5af59f8a Author: mert AuthorDate: Wed Feb 12 20:53:34 2020 +0300 Commit: Mert Tumer CommitDate: Tue Sep 15 12:22:10 2020 +0200 android: back button switches to readonly mode instead of closing Currently pressing back button on edit mode closes the document, this patch may prevent unintentional touches Change-Id: Ic7061186fa8794203fd4614c07a11b219d3a10d9 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100666 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88555 diff --git a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java index 77f9e0e68..88b1fdafd 100644 --- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java +++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java @@ -122,6 +122,7 @@ public class LOActivity extends AppCompatActivity { /** In case the mobile-wizard is visible, we have to intercept the Android's Back button. */ private boolean mMobileWizardVisible = false; +private boolean mIsEditModeActive = false; private ValueCallback valueCallback; @@ -697,6 +698,9 @@ public class LOActivity extends AppCompatActivity { // just return one level up in the mobile-wizard (or close it) callFakeWebsocketOnMessage("'mobile: mobilewizardback'"); return; +} else if (mIsEditModeActive) { +callFakeWebsocketOnMessage("'mobile: readonlymode'"); +return; } finishWithProgress(); @@ -928,6 +932,17 @@ public class LOActivity extends AppCompatActivity { startActivity(intent); return false; } +case "EDITMODE": { +switch (messageAndParam[1]) { +case "on": +mIsEditModeActive = true; +break; +case "off": +mIsEditModeActive = false; +break; +} +return false; +} } return true; } diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css index 343ebd8d6..a994cd4b2 100644 --- a/loleaflet/css/toolbar.css +++ b/loleaflet/css/toolbar.css @@ -753,6 +753,7 @@ button.leaflet-control-search-next .w2ui-icon.users{ background: url('images/contacts-dark.svg') no-repeat center; } .w2ui-icon.fullscreen{ background: url('images/lc_fullscreen.svg') no-repeat center !important; } .w2ui-icon.closemobile{ background: url('images/lc_closedocmobile.svg') no-repeat center !important; } +.w2ui-icon.editmode { background: url('images/lc_listitem-selected.svg') no-repeat center / 28px !important; } .w2ui-icon.closetoolbar{ background: url('images/close_toolbar.svg') no-repeat center !important; } .w2ui-icon.sidebar_modify_page{ background: url('images/lc_formproperties.svg') no-repeat center !important; } .w2ui-icon.sidebar_slide_change{ background: url('images/sidebar-transition-large.svg') no-repeat center !important; } diff --git a/loleaflet/src/control/Control.MobileTopBar.js b/loleaflet/src/control/Control.MobileTopBar.js index 05fd7c7ed..b562c0153 100644 --- a/loleaflet/src/control/Control.MobileTopBar.js +++ b/loleaflet/src/control/Control.MobileTopBar.js @@ -193,6 +193,7 @@ L.Control.MobileTopBar = L.Control.extend({ toolbarDownButtons.forEach(function(id) { toolbar.enable(id); }); + toolbar.set('closemobile', {img: 'editmode'}); } } else { toolbar = w2ui['actionbar']; @@ -200,6 +201,7 @@ L.Control.MobileTopBar = L.Control.extend({ toolbarDownButtons.forEach(function(id) { toolbar.disable(id); }); + toolbar.set('closemobile', {img: 'closemobile'}); } } }, diff --git a/loleaflet/src/control/Control.Toolbar.js b
[Libreoffice-commits] core.git: solenv/bin
solenv/bin/image-sort.py |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit c4d9e922eefd08382e7a4f9fb1926f82a3f8fc4d Author: Mike Kaganski AuthorDate: Tue Sep 15 10:42:16 2020 +0200 Commit: Mike Kaganski CommitDate: Tue Sep 15 12:30:09 2020 +0200 Don't use argparse to open control_file Use idiomatic 'with' instead This avoids the warnings: Exception ignored in: <_io.FileIO name='C:/lo/src/core/postprocess/packimages/image-sort.lst' mode='rb' closefd=True> ResourceWarning: unclosed file <_io.TextIOWrapper name='C:/lo/src/core/postprocess/packimages/image-sort.lst' mode='r' encoding='cp1251'> Change-Id: I1cf8248cdab8dd9fd585545c64de2aebcbfe5365 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102647 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/solenv/bin/image-sort.py b/solenv/bin/image-sort.py index d45037e25c7f..75b5da6ce0e7 100644 --- a/solenv/bin/image-sort.py +++ b/solenv/bin/image-sort.py @@ -120,7 +120,7 @@ def chew_controlfile(ifile): parser = argparse.ArgumentParser() # where the control file lives -parser.add_argument('control_file', metavar='image-sort.lst', type=open, +parser.add_argument('control_file', metavar='image-sort.lst', help='the sort control file') # where the uiconfigs live parser.add_argument('base_path', metavar='directory', @@ -138,7 +138,8 @@ else: args.output = sys.stdout close_output = False -chew_controlfile(args.control_file) +with open(args.control_file) as cf: +chew_controlfile(cf) for icon in global_list: if not icon.startswith('sc_'): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ooxmlexport/ooxmlexport15.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8d768405c85eb045ae78f8be151b22c2bde029e1 Author: Xisco Fauli AuthorDate: Tue Sep 15 10:45:56 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 12:50:20 2020 +0200 sw_ooxmlexport15: another OOXMLIMPORT_TEST -> OOXMLEXPORT_TEST Change-Id: Ica5febe044c978fbb40b5998ab7eb088352d151d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102713 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index e29ec68fa278..902d1c9df6a2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -573,7 +573,7 @@ DECLARE_OOXMLEXPORT_TEST(TestTdf135653, "tdf135653.docx") CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE bg color does not match!", aExpectedColor, aFillColor); } -DECLARE_OOXMLIMPORT_TEST(testTdf135665, "tdf135665.docx") +DECLARE_OOXMLEXPORT_TEST(testTdf135665, "tdf135665.docx") { uno::Reference xOLEProps1(getShape(1), uno::UNO_QUERY_THROW); uno::Reference xOLEProps2(getShape(2), uno::UNO_QUERY_THROW); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sc/source
sc/source/ui/cctrl/tbzoomsliderctrl.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 22886babfdb9fad2e50d40e04250d54366a9a708 Author: Noel Grandin AuthorDate: Mon Sep 7 13:28:33 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 12:51:16 2020 +0200 tdf#135181 Calc print preview zoom slider print preview not transparent (gen) Change-Id: I7244f429194145df99a4b52fce144c6ec45f3b61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102168 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 00cffc20e40b2412c7e9867eed24c9834504e24f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102646 Reviewed-by: Xisco Fauli diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 6e05c824d5af..4c9cc5832f73 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -397,9 +397,11 @@ void ScZoomSlider::DoPaint(vcl::RenderContext& rRenderContext) Size aSliderWindowSize(GetOutputSizePixel()); tools::Rectangle aRect(Point(0, 0), aSliderWindowSize); -ScopedVclPtrInstance< VirtualDevice > pVDev(rRenderContext); -pVDev->SetBackground(Wallpaper(COL_TRANSPARENT)); +ScopedVclPtrInstance< VirtualDevice > pVDev(rRenderContext, DeviceFormat::DEFAULT, DeviceFormat::BITMASK); pVDev->SetOutputSizePixel(aSliderWindowSize); +pVDev->SetFillColor( COL_TRANSPARENT ); +pVDev->SetLineColor( COL_TRANSPARENT ); +pVDev->DrawRect( aRect ); tools::Rectangle aSlider = aRect; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - oox/source sw/qa sw/source writerfilter/source
oox/source/token/properties.txt |1 + oox/source/vml/vmlshape.cxx |1 + sw/qa/extras/ooxmlexport/data/tdf135665.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport15.cxx| 17 +++-- sw/source/core/unocore/unoframe.cxx |8 ++-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 17 + 6 files changed, 32 insertions(+), 12 deletions(-) New commits: commit 2048a2c268125f17a440ec449df4030b91758172 Author: Daniel Arato (NISZ) AuthorDate: Wed Sep 2 15:46:56 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 12:55:59 2020 +0200 tdf#135665 DOCX: import tight wrap setting of VML shapes The wrap setting that OOXML calls "tight" and LibreOffice calls "contour" (== true) was not supported by the import code, only the export. Change-Id: I48739ffaad48e28df05fd87a9b51a14238dc47e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101932 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 4b7ee7bd61f78be60211cc72ba36da987191266e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102124 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 41e33ea67c26..5ae85fd245e1 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -508,6 +508,7 @@ SubViewSize Subtotals Suffix Surround +SurroundContour SwapXAndYAxis Symbol SymbolColor diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index a1e5744db8da..d52e8e97fe1d 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -584,6 +584,7 @@ static void lcl_setSurround(PropertySet& rPropSet, const ShapeTypeModel& rTypeMo nSurround = css::text::WrapTextMode_NONE; rPropSet.setProperty(PROP_Surround, static_cast(nSurround)); +rPropSet.setProperty(PROP_SurroundContour, aWrapType == "tight"); } static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel, const GraphicHelper& rGraphicHelper) diff --git a/sw/qa/extras/ooxmlexport/data/tdf135665.docx b/sw/qa/extras/ooxmlexport/data/tdf135665.docx new file mode 100644 index ..2400a1c1a46c Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf135665.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index 792e919394b7..ab204e9c5e67 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -41,7 +41,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133370_columnBreak, "tdf133370_columnBreak.odt") CPPUNIT_ASSERT_EQUAL(1, getPages()); } -DECLARE_OOXMLIMPORT_TEST(testTdf131801, "tdf131801.docx") +DECLARE_OOXMLEXPORT_TEST(testTdf131801, "tdf131801.docx") { CPPUNIT_ASSERT_EQUAL(1, getPages()); @@ -126,6 +126,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf134063, "tdf134063.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(720), getXPath(pDump, "//page[1]/body/txt[1]/Text[3]", "nWidth").toInt32()); } +DECLARE_OOXMLEXPORT_TEST(testTdf135665, "tdf135665.docx") +{ +uno::Reference xOLEProps1(getShape(1), uno::UNO_QUERY_THROW); +uno::Reference xOLEProps2(getShape(2), uno::UNO_QUERY_THROW); +bool bSurroundContour1 = false; +bool bSurroundContour2 = false; +xOLEProps1->getPropertyValue("SurroundContour") >>= bSurroundContour1; +xOLEProps2->getPropertyValue("SurroundContour") >>= bSurroundContour2; + +CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE tight wrap setting not imported correctly", true, bSurroundContour1); +CPPUNIT_ASSERT_EQUAL_MESSAGE("OLE tight wrap setting not imported correctly", false, bSurroundContour2); +} + DECLARE_OOXMLEXPORT_TEST(testAtPageShapeRelOrientation, "rotated_shape.fodt") { // invalid combination of at-page anchor and horizontal-rel="paragraph" @@ -179,7 +192,7 @@ DECLARE_OOXMLEXPORT_TEST(testRelativeAnchorHeightFromBottomMarginHasFooter, CPPUNIT_ASSERT_EQUAL(static_cast(1147), nAnchoredHeight); } -DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx") +DECLARE_OOXMLEXPORT_TEST(TestTdf132483, "tdf132483.docx") { uno::Reference xOLEProps(getShape(1), uno::UNO_QUERY_THROW); sal_Int16 nVRelPos = -1; diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index a04ac6908b92..c96dc6676dda 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -751,15 +751,19 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI bRet &= aSh.PutValue(*pShTr, MID_SHADOW_TRANSPARENCE); rToSet.Put(aSh); } -const ::uno::Any* pSur = nullptr; +const ::uno::Any* pSur = nullptr; GetProperty(RES_SURROUND, MID_SURROUND_SURROUNDTYPE, pSur); +const ::uno::Any* pSurCont = nullptr; +GetProperty(RES_SURROUND, MID_SURROUND
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/css
loleaflet/css/toolbar.css | 17 + 1 file changed, 17 insertions(+) New commits: commit 3c616b3042307e9e78a61574c04db829c37d3574 Author: Andras Timar AuthorDate: Tue Sep 15 08:57:38 2020 +0200 Commit: Andras Timar CommitDate: Tue Sep 15 13:10:47 2020 +0200 jQuery tooltip styles backported from master Change-Id: Iac1090fc3bca1518db0f220f7386cd83d5f25cc4 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102702 Reviewed-by: Pedro Silva Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css index 5f3135989..372370653 100644 --- a/loleaflet/css/toolbar.css +++ b/loleaflet/css/toolbar.css @@ -876,3 +876,20 @@ menu-entry-with-icon.padding-left + menu-entry-icon.width */ .menu-entry-no-icon { padding-left: 42px; } + +/* jQuery tooltips (back-ported from jquery-ui-lightness.css) */ +.ui-tooltip { + padding: 7px 9px !important; + position: absolute !important; + z-index: !important; + max-width: 300px !important; + background: #2a2a2a !important; +} +body .ui-tooltip { + border-width: 2px !important; +} +.ui-tooltip-content { + font-size: 0.8em !important; + color: #fff !important; + background: #2a2a2a !important; +} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/gdi/salgdilayout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0a0b4d95da228cb0ae8a5af9b002f87232a8576f Author: Andrea Gelmini AuthorDate: Tue Sep 15 11:13:50 2020 +0200 Commit: Julien Nabet CommitDate: Tue Sep 15 13:12:48 2020 +0200 Fix typo Change-Id: I0ee96ee32e419138811f19226e87d21107877d85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102717 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 5758bfd2acec..02c316b7b39d 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -954,7 +954,7 @@ bool SalGraphics::CreateTTFfontSubset(vcl::AbstractTrueTypeFont& rTTF, const OSt // Also the much more complex PrintFontManager variant has this limit. // Also the very first implementation has the limit in // commit 8789ed701e98031f2a1657ea0dfd6f7a0b050992 -// - Why doesn't the PrintFontManager care about the fake glpyh? It +// - Why doesn't the PrintFontManager care about the fake glyph? It // is used on all unx platforms to create the subset font. // - Should the SAL_WARN actually be asserts, like on MacOS? if (nOrigGlyphCount > 256) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf118701.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport14.cxx|5 + writerfilter/source/dmapper/DomainMapper.cxx |2 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 16 writerfilter/source/dmapper/DomainMapper_Impl.hxx |1 + 5 files changed, 23 insertions(+), 1 deletion(-) New commits: commit d8b5dbc8be757ef64b4d09dd1a72cb52c11d6d10 Author: Bakos Attila AuthorDate: Tue Jun 30 15:03:31 2020 +0200 Commit: Gabor Kelemen CommitDate: Tue Sep 15 13:27:44 2020 +0200 tdf#118701 DOCX import: fix image position on page break If an image anchored to an empty paragraph only with section properties, don't remove that paragraph to keep the image on the page before the page break. IsLastParaEmpty() tries to move a text cursor over the empty paragraph marked for deletion. If it contains an image anchored as a character, the cursor won't reach the end of the previous paragraph by goLeft(2). Co-authored-by: Attila Bánhegyi (NISZ) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97518 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit b216fc5b583050cfb1cdf9bd82ec3c1bd2e09d70) Change-Id: Ic22c7553948eb06739232d7e35fc49ad14f96518 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102563 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/sw/qa/extras/ooxmlexport/data/tdf118701.docx b/sw/qa/extras/ooxmlexport/data/tdf118701.docx new file mode 100644 index ..654a22709919 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf118701.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index 92d2d7869662..8ec18a49eb4a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -466,6 +466,11 @@ DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx") text::RelOrientation::PAGE_FRAME , nHRelPos); } +DECLARE_OOXMLIMPORT_TEST(testTdf118701, "tdf118701.docx") +{ +CPPUNIT_ASSERT_EQUAL_MESSAGE("At least one paragraph is missing from the file!", 3, getParagraphs()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index ec3809cd291a..3339bb27e220 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3475,7 +3475,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) } m_pImpl->SetParaSectpr(false); finishParagraph(bRemove); -if (bRemove) +if (bRemove && m_pImpl->IsLastParaEmpty()) m_pImpl->RemoveLastParagraph(); } else diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 6e6a074dad43..b77428a35f53 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -477,6 +477,22 @@ void DomainMapper_Impl::AddDummyParaForTableInSection() } } +bool DomainMapper_Impl::IsLastParaEmpty() +{ +bool bRet = true; +if (!m_aTextAppendStack.empty() && m_aTextAppendStack.top().xTextAppend) +{ +//creating cursor for finding text content +uno::Reference xCursor = m_aTextAppendStack.top().xTextAppend->createTextCursor(); +xCursor->gotoEnd(false); +//selecting the last 2 characters in the document +xCursor->goLeft(2, true); +//the last paragraph is empty, if they are newlines +bRet = xCursor->getString().match(OUString(SAL_NEWLINE_STRING).concat(SAL_NEWLINE_STRING)); +} +return bRet; +} + void DomainMapper_Impl::RemoveLastParagraph( ) { if (m_bDiscardHeaderFooter) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 7291973be2a1..9eef8dbee58d 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -619,6 +619,7 @@ public: void RemoveDummyParaForTableInSection(); void AddDummyParaForTableInSection(); +bool IsLastParaEmpty(); void RemoveLastParagraph( ); void SetIsLastParagraphInSection( bool bIsLast ); bool GetIsLastParagraphInSection() const { return m_bIsLastParaInSection;} ___ 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-6.4' - include/svl include/svx svx/source
include/svl/solar.hrc |2 +- include/svx/unoshprp.hxx|4 +++- svx/source/unodraw/unoshape.cxx | 37 + 3 files changed, 41 insertions(+), 2 deletions(-) New commits: commit 564550b8049e478ce4012a099d445f64d803336a Author: Miklos Vajna AuthorDate: Tue Sep 8 17:26:12 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 13:34:41 2020 +0200 svx UNO API for shapes: expose what scaling factor is used for autofit scaling TextFitToSizeScale is 0 when the shape has no text or autofit is not enabled, 100 when there is autofit (but no scale-down), a value between the two otherwise. Towards allowing both "autofit" and "same font size for these shapes" at the same time for SmartArt purposes. (cherry picked from commit cd268f0047443ddbb22361cdc15093e881f83588) Conflicts: include/svx/unoshprp.hxx svx/source/unodraw/unoshape.cxx Change-Id: Iff88fcc4c2e67b543687b1d87d614622cbf2e38a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102724 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/include/svl/solar.hrc b/include/svl/solar.hrc index 6b4cb07bbc33..317d45a84bc1 100644 --- a/include/svl/solar.hrc +++ b/include/svl/solar.hrc @@ -23,7 +23,7 @@ // defines -- #define OWN_ATTR_VALUE_START3900 -#define OWN_ATTR_VALUE_END 4004 +#define OWN_ATTR_VALUE_END 4005 #define RID_LIB_START 1 #define RID_LIB_END 1 diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx index 54b8db4b2715..873cd9a4676a 100644 --- a/include/svx/unoshprp.hxx +++ b/include/svx/unoshprp.hxx @@ -192,7 +192,8 @@ #define OWN_ATTR_SIGNATURELINE_UNSIGNED_IMAGE (OWN_ATTR_VALUE_START+102) #define OWN_ATTR_SIGNATURELINE_IS_SIGNED(OWN_ATTR_VALUE_START+103) #define OWN_ATTR_QRCODE (OWN_ATTR_VALUE_START+104) -// ATTENTION: maximum is OWN_ATTR_VALUE_START+104 svx, see include/svl/solar.hrc +#define OWN_ATTR_TEXTFITTOSIZESCALE (OWN_ATTR_VALUE_START+105) +// ATTENTION: maximum is OWN_ATTR_VALUE_START+105 svx, see include/svl/solar.hrc // #FontWork# #define FONTWORK_PROPERTIES \ @@ -340,6 +341,7 @@ { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , cppu::UnoType::get(), 0, 0},\ { OUString("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ { OUString("UINamePlural"), OWN_ATTR_UINAME_PLURAL , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ +{ OUString("TextFitToSizeScale"), OWN_ATTR_TEXTFITTOSIZESCALE, ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ /* #i68101# */ \ { OUString(UNO_NAME_MISC_OBJ_TITLE),OWN_ATTR_MISC_OBJ_TITLE , ::cppu::UnoType::get(),0, 0}, \ { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType::get(),0, 0}, diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 3f07f5ab9a82..cd71640027d2 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -93,6 +93,8 @@ #include #include +#include +#include #include #include @@ -174,6 +176,35 @@ protected: } }; +namespace +{ +/// Calculates what scaling factor will be used for autofit text scaling of this shape. +sal_Int16 GetTextFitToSizeScale(SdrObject* pObject) +{ +SdrTextObj* pTextObj = dynamic_cast(pObject); +if (!pTextObj) +{ +return 0; +} + +const SfxItemSet& rTextObjSet = pTextObj->GetMergedItemSet(); +if (rTextObjSet.GetItem(SDRATTR_TEXT_FITTOSIZE)->GetValue() +!= drawing::TextFitToSizeType_AUTOFIT) +{ +return 0; +} + +std::unique_ptr pOutliner += pTextObj->getSdrModelFromSdrObject().createOutliner(OutlinerMode::TextObject); +tools::Rectangle aBoundRect(pTextObj->GetCurrentBoundRect()); +pTextObj->SetupOutlinerFormatting(*pOutliner, aBoundRect); +sal_uInt16 nX = 0; +sal_uInt16 nY = 0; +pOutliner->GetGlobalCharStretching(nX, nY); +return nY; +} +} + SvxShape::SvxShape( SdrObject* pObject ) : maSize(100,100) , mpImpl( new SvxShapeImpl( *this, maMutex ) ) @@ -2838,6 +2869,12 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl break; } +case OWN_ATTR_TEXTFITTOSIZESCALE: +{ +rValue <<= GetTextFitToSizeScale(GetSdrObject()); +break; +} + case OWN_ATTR_UINAME_PLURAL: { rValue <<= GetSdrObject()->TakeObjNamePlural(); ___ Libreoffice-commits mailing
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5c2e19905bcce4611e436e7932aa0ae874a8f2ef Author: Olivier Hallot AuthorDate: Tue Sep 15 08:35:33 2020 -0300 Commit: Gerrit Code Review CommitDate: Tue Sep 15 13:35:33 2020 +0200 Update git submodules * Update helpcontent2 from branch 'master' to f44071b2e41f0956301b435fc009b4349c13cba0 - Add video in remaining entry pages. Change-Id: I2e125dc4e9aff28c6078257a7cf1f2b5a4571ff5 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/102735 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 5887392cbba2..f44071b2e41f 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 5887392cbba2f28ea1cf042be335cfe0cd485257 +Subproject commit f44071b2e41f0956301b435fc009b4349c13cba0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: source/text
source/text/sbasic/shared/main0601.xhp |2 +- source/text/schart/main.xhp|1 + source/text/sdatabase/main.xhp |1 + source/text/shared/05/new_help.xhp |1 + 4 files changed, 4 insertions(+), 1 deletion(-) New commits: commit f44071b2e41f0956301b435fc009b4349c13cba0 Author: Olivier Hallot AuthorDate: Tue Sep 15 08:22:11 2020 -0300 Commit: Olivier Hallot CommitDate: Tue Sep 15 13:35:33 2020 +0200 Add video in remaining entry pages. Change-Id: I2e125dc4e9aff28c6078257a7cf1f2b5a4571ff5 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/102735 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/sbasic/shared/main0601.xhp b/source/text/sbasic/shared/main0601.xhp index 19bf5c3c1..27d3a2c28 100644 --- a/source/text/sbasic/shared/main0601.xhp +++ b/source/text/sbasic/shared/main0601.xhp @@ -30,7 +30,7 @@ %PRODUCTNAME Basic Help - + %PRODUCTNAME provides an Application Programming Interface (API) that allows controlling the $[officename] components with different programming languages by using the $[officename] Software Development Kit (SDK). For more information about the $[officename] API and the Software Development Kit, visit https://api.libreoffice.org/"; name="api.libreoffice.org">https://api.libreoffice.org This help section explains the most common functions of %PRODUCTNAME Basic. For more in-depth information please refer to the https://wiki.documentfoundation.org/Documentation/BASIC_Guide"; name="wiki.documentfoundation.org BASIC Guide">OpenOffice.org BASIC Programming Guide on the Wiki. diff --git a/source/text/schart/main.xhp b/source/text/schart/main.xhp index c87d4e813..d3aadef2b 100644 --- a/source/text/schart/main.xhp +++ b/source/text/schart/main.xhp @@ -32,6 +32,7 @@ MW added one entry Using Charts in %PRODUCTNAME + $[officename] lets you present data graphically in a chart, so that you can visually compare data series and view trends in the data. You can insert charts into spreadsheets, text documents, drawings, and presentations. Chart Data diff --git a/source/text/sdatabase/main.xhp b/source/text/sdatabase/main.xhp index 98c7dedfd..2925265dc 100644 --- a/source/text/sdatabase/main.xhp +++ b/source/text/sdatabase/main.xhp @@ -35,6 +35,7 @@ data sources;$[officename] Base mw changed "Base,..."Using Databases in %PRODUCTNAME Base + In %PRODUCTNAME Base, you can access data that is stored in a wide variety of database file formats. %PRODUCTNAME Base natively supports some flat file database formats, such as the dBASE format. You can also use %PRODUCTNAME Base to connect to external relational databases, such as databases from MySQL or Oracle. The following database types are read-only types in %PRODUCTNAME Base. From within %PRODUCTNAME Base it is not possible to change the database structure or to edit, insert, and delete database records for these database types: diff --git a/source/text/shared/05/new_help.xhp b/source/text/shared/05/new_help.xhp index 9e7cc9529..5c2400b7e 100644 --- a/source/text/shared/05/new_help.xhp +++ b/source/text/shared/05/new_help.xhp @@ -25,6 +25,7 @@ The %PRODUCTNAME Help + %PRODUCTNAME Help pages are displayed in your system default web browser. ___ 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-6.4' - include/svx svx/source
include/svx/sdtfsitm.hxx| 10 ++ include/svx/svdotext.hxx|2 +- include/svx/unoshprp.hxx|2 +- svx/source/svdraw/svdattr.cxx | 10 ++ svx/source/svdraw/svdotext.cxx | 10 +- svx/source/unodraw/unoshape.cxx | 13 + 6 files changed, 44 insertions(+), 3 deletions(-) New commits: commit 3e8cce134c92690da1955953da118d45f1c5ddde Author: Miklos Vajna AuthorDate: Wed Sep 9 15:49:16 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 13:52:57 2020 +0200 svx UNO API for shapes: allow setting a max factor for autofit text scale This allows getting the scale factor from multiple shapes (that have text), seeing what factors they use and then setting the factor to the minimum of the values. Towards allowing both "autofit" and "same font size for these shapes" at the same time for SmartArt purposes. (cherry picked from commit 81345de4858d6e72ecb8fc6621396570f4a4ee93) Conflicts: include/svx/sdtfsitm.hxx include/svx/unoshprp.hxx Change-Id: I31a5e097c62e6e65b32956a4a32137bc3339c64c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102725 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/include/svx/sdtfsitm.hxx b/include/svx/sdtfsitm.hxx index ac5b71cec722..d884dc7a5995 100644 --- a/include/svx/sdtfsitm.hxx +++ b/include/svx/sdtfsitm.hxx @@ -38,7 +38,13 @@ public: SdrTextFitToSizeTypeItem( css::drawing::TextFitToSizeType const eFit = css::drawing::TextFitToSizeType_NONE) : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE, eFit) {} +SdrTextFitToSizeTypeItem(const SdrTextFitToSizeTypeItem& rItem) +: SfxEnumItem(rItem), +m_nMaxScale(rItem.GetMaxScale()) +{ +} virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override; +bool operator==(const SfxPoolItem& rItem) const override; virtual sal_uInt16 GetValueCount() const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; @@ -49,6 +55,10 @@ public: virtual bool HasBoolValue() const override; virtual bool GetBoolValue() const override; virtual void SetBoolValue(bool bVal) override; +void SetMaxScale(sal_Int16 nMaxScale) { m_nMaxScale = nMaxScale; } +sal_Int16 GetMaxScale() const { return m_nMaxScale; } +private: +sal_Int16 m_nMaxScale = 0; }; #endif diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index 78e09d508199..020bcb6cdd22 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -263,7 +263,7 @@ private: tools::Rectangle& rPaintRect, Fraction&aFitXCorrection ) const; void ImpAutoFitText( SdrOutliner& rOutliner ) const; -static void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting ); +void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting ) const; SVX_DLLPRIVATE SdrObjectUniquePtr ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const; SVX_DLLPRIVATE void ImpRegisterLink(); SVX_DLLPRIVATE void ImpDeregisterLink(); diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx index 873cd9a4676a..cf263ea8cadd 100644 --- a/include/svx/unoshprp.hxx +++ b/include/svx/unoshprp.hxx @@ -341,7 +341,7 @@ { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , cppu::UnoType::get(), 0, 0},\ { OUString("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ { OUString("UINamePlural"), OWN_ATTR_UINAME_PLURAL , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ -{ OUString("TextFitToSizeScale"), OWN_ATTR_TEXTFITTOSIZESCALE, ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ +{ OUString("TextFitToSizeScale"), OWN_ATTR_TEXTFITTOSIZESCALE, ::cppu::UnoType::get(), 0, 0}, \ /* #i68101# */ \ { OUString(UNO_NAME_MISC_OBJ_TITLE),OWN_ATTR_MISC_OBJ_TITLE , ::cppu::UnoType::get(),0, 0}, \ { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType::get(),0, 0}, diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 31cf34a76c73..1eb98121a203 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -939,6 +939,16 @@ SfxPoolItem* SdrTextFitToSizeTypeItem::CreateDefault() { return new SdrTextFitTo SfxPoolItem* SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); } +bool SdrTextFitToSizeTypeItem::operator==(const SfxPoolItem&
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf118701.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport14.cxx| 18 -- writerfilter/source/dmapper/DomainMapper.cxx |5 +++-- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 22 +- writerfilter/source/dmapper/DomainMapper_Impl.hxx |5 - 5 files changed, 28 insertions(+), 22 deletions(-) New commits: commit 342afecbd35921e18dde4cfd29f27ca520d1b7a0 Author: László Németh AuthorDate: Fri Jul 10 18:52:42 2020 +0200 Commit: Gabor Kelemen CommitDate: Tue Sep 15 14:00:54 2020 +0200 tdf#134793 DOCX import: fix numbering with inline images before page break. Previous fix for tdf#118701 didn't keep numbering of the paragraph marked for deletion. This reverts commit b216fc5b583050cfb1cdf9bd82ec3c1bd2e09d70 (tdf#118701 DOCX import: fix image position on page break). Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98541 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 616a47c9570f9ce67b18a124f08f4a342bff3468) Change-Id: I5bde927f15b4b1f682d81482734fadff7690f6d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102649 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/sw/qa/extras/ooxmlexport/data/tdf118701.docx b/sw/qa/extras/ooxmlexport/data/tdf118701.docx index 654a22709919..8fb26669d1fa 100644 Binary files a/sw/qa/extras/ooxmlexport/data/tdf118701.docx and b/sw/qa/extras/ooxmlexport/data/tdf118701.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index 8ec18a49eb4a..3d0f8f91a172 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -466,9 +466,23 @@ DECLARE_OOXMLIMPORT_TEST(TestTdf132483, "tdf132483.docx") text::RelOrientation::PAGE_FRAME , nHRelPos); } -DECLARE_OOXMLIMPORT_TEST(testTdf118701, "tdf118701.docx") +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf118701, "tdf118701.docx") { -CPPUNIT_ASSERT_EQUAL_MESSAGE("At least one paragraph is missing from the file!", 3, getParagraphs()); +// This was 6, related to moving inline images after the page breaks +CPPUNIT_ASSERT_EQUAL(4, getPages()); + +xmlDocPtr pXmlDoc = parseExport(); + +assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr[1]/w:numPr", 0); +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr[1]/w:numPr", 0); +assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr[1]/w:numPr", 0); +assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr[1]/w:numPr", 1); + +// Keep numbering of the paragraph of the inline image +assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr[1]/w:numPr", 0); +assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr[1]/w:numPr", 1); +// This was 0 +assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr[1]/w:numPr", 1); } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 3339bb27e220..86ed6e3cfdb3 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3460,7 +3460,8 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) && !bSingleParagraphAfterRedline && !m_pImpl->GetIsDummyParaAddedForTableInSection() && !( pSectionContext && pSectionContext->GetBreakType() != -1 && pContext && pContext->isSet(PROP_BREAK_TYPE) ) -&& !m_pImpl->GetIsPreviousParagraphFramed()); +&& !m_pImpl->GetIsPreviousParagraphFramed() +&& !m_pImpl->IsParaWithInlineObject()); const bool bNoNumbering = bRemove || (!m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() && bSingleParagraph); PropertyMapPtr xContext = bNoNumbering ? m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) : PropertyMapPtr(); @@ -3475,7 +3476,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) } m_pImpl->SetParaSectpr(false); finishParagraph(bRemove); -if (bRemove && m_pImpl->IsLastParaEmpty()) +if (bRemove) m_pImpl->RemoveLastParagraph(); } else diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index b77428a35f53..67ec8b869544 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -310,7 +310,8 @@ DomainMapper_Impl::DomainMapper_Impl( m_bParaHadField(false), m_bParaAutoBefore(false), m_bFirstParagraphInCell(true), -m_bSaveFirstParagraphInCell(false) +m_bSaveFirstParagraphInCell(false), +m_bParaWithInlineObject(false)
[Libreoffice-commits] core.git: sc/source
sc/source/ui/miscdlgs/tabopdlg.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 0bcff15d6f62c0712be98abfbce194a9285c6351 Author: Caolán McNamara AuthorDate: Mon Sep 14 12:19:34 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 14:11:31 2020 +0200 lcl_Parse ScDocument* arg dereferenced on all branches Change-Id: I1cf901ab555c0f3bca7ef2d505a08dd53f83cd18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102714 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 7bc5b37d7abe..625b9ca4b393 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -207,16 +207,16 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError ) pEd->GrabFocus(); } -static bool lcl_Parse( const OUString& rString, const ScDocument* pDoc, SCTAB nCurTab, +static bool lcl_Parse( const OUString& rString, const ScDocument& rDoc, SCTAB nCurTab, ScRefAddress& rStart, ScRefAddress& rEnd ) { bool bRet = false; -const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); +const formula::FormulaGrammar::AddressConvention eConv = rDoc.GetAddressConvention(); if ( rString.indexOf(':') != -1 ) -bRet = ConvertDoubleRef( pDoc, rString, nCurTab, rStart, rEnd, eConv ); +bRet = ConvertDoubleRef( &rDoc, rString, nCurTab, rStart, rEnd, eConv ); else { -bRet = ConvertSingleRef( pDoc, rString, nCurTab, rStart, eConv ); +bRet = ConvertSingleRef( &rDoc, rString, nCurTab, rStart, eConv ); rEnd = rStart; } return bRet; @@ -242,7 +242,7 @@ IMPL_LINK(ScTabOpDlg, BtnHdl, weld::Button&, rBtn, void) else if (m_xEdRowCell->GetText().isEmpty() && m_xEdColCell->GetText().isEmpty()) nError = TABOPERR_NOCOLROW; -else if ( !lcl_Parse( m_xEdFormulaRange->GetText(), pDoc, nCurTab, +else if ( !lcl_Parse( m_xEdFormulaRange->GetText(), *pDoc, nCurTab, theFormulaCell, theFormulaEnd ) ) nError = TABOPERR_WRONGFORMULA; else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/inc sc/source
sc/inc/address.hxx |2 +- sc/inc/rangeutl.hxx |2 +- sc/source/core/tool/address.cxx |4 ++-- sc/source/core/tool/interpr1.cxx |4 ++-- sc/source/core/tool/rangeutl.cxx | 12 ++-- sc/source/ui/dbgui/PivotLayoutDialog.cxx |2 +- sc/source/ui/dbgui/consdlg.cxx |4 ++-- sc/source/ui/miscdlgs/tabopdlg.cxx |2 +- sc/source/ui/optdlg/tpusrlst.cxx |2 +- 9 files changed, 17 insertions(+), 17 deletions(-) New commits: commit c678eba2f06ce7f16939879eedb918f303a4e1b1 Author: Caolán McNamara AuthorDate: Mon Sep 14 12:26:27 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 14:12:36 2020 +0200 ScRangeUtil::IsAbsPos ScDocument* arg dereferenced on all branches Change-Id: Ie42e6eb280886c237b7042948298eef0bd38eebf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102720 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index 601fdee3803f..e0d0f65c2b88 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -65,7 +65,7 @@ public: ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); static bool IsAbsPos( const OUString& rPosStr, - const ScDocument* pDoc, + const ScDocument& rDoc, SCTAB nTab, OUString* pCompleteStr, ScRefAddress* pPosTripel = nullptr, diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 2e5c09ac2b2f..24f62c9c5de5 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -208,7 +208,7 @@ bool ScRangeUtil::IsAbsArea( const OUString& rAreaStr, } bool ScRangeUtil::IsAbsPos( const OUString& rPosStr, -const ScDocument* pDoc, +const ScDocument& rDoc, SCTAB nTab, OUString* pCompleteStr, ScRefAddress* pPosTripel, @@ -216,7 +216,7 @@ bool ScRangeUtil::IsAbsPos( const OUString& rPosStr, { ScRefAddressthePos; -bool bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails ); +bool bIsAbsPos = ConvertSingleRef( &rDoc, rPosStr, nTab, thePos, rDetails ); thePos.SetRelCol( false ); thePos.SetRelRow( false ); thePos.SetRelTab( false ); @@ -226,7 +226,7 @@ bool ScRangeUtil::IsAbsPos( const OUString& rPosStr, if ( pPosTripel ) *pPosTripel = thePos; if ( pCompleteStr ) -*pCompleteStr = thePos.GetRefString( pDoc, MAXTAB+1, rDetails ); +*pCompleteStr = thePos.GetRefString( &rDoc, MAXTAB+1, rDetails ); } return bIsAbsPos; @@ -294,7 +294,7 @@ bool ScRangeUtil::MakeRangeFromName ( { CutPosString( aStrArea, aStrArea ); -if ( IsAbsPos( aStrArea, &rDoc, nTable, +if ( IsAbsPos( aStrArea, rDoc, nTable, nullptr, &aStartPos, rDetails ) ) { nTab = aStartPos.Tab(); diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 18a571a3077d..db9f53681a18 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -303,7 +303,7 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) OUString aPosStr; ScRangeUtil::CutPosString( pEd->GetText(), aPosStr ); -bEditOk = ScRangeUtil::IsAbsPos( aPosStr, pDoc, +bEditOk = ScRangeUtil::IsAbsPos( aPosStr, *pDoc, nTab, &theCompleteStr, nullptr, eConv ); } @@ -339,7 +339,7 @@ IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl, weld::Button&, void) OUStringaDestPosStr( m_xEdDestArea->GetText() ); const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); -if ( ScRangeUtil::IsAbsPos( aDestPosStr, pDoc, nTab, nullptr, &aDestAddress, eConv ) ) +if ( ScRangeUtil::IsAbsPos( aDestPosStr, *pDoc, nTab, nullptr, &aDestAddress, eConv ) ) { ScConsolidateParam theOutParam( theConsData ); std::unique_ptr pDataAreas(new ScArea[nDataAreaCount]); diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 9dbb50e52bdb..e0e4ed90e3c2 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -654,7 +654,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, weld::Button&, rBtn, void ) if ( !bAreaOk ) { bAreaOk = ScRangeUtil::IsAbsPos( theAreaStr, - pDoc, +
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/rangeutl.hxx |2 +- sc/source/core/tool/rangeutl.cxx | 10 +- sc/source/ui/dbgui/consdlg.cxx |2 +- sc/source/ui/optdlg/tpusrlst.cxx |2 +- 4 files changed, 8 insertions(+), 8 deletions(-) New commits: commit 9bd86da7c5e00ef092fcccfc8c37b9f9ca9dc89b Author: Caolán McNamara AuthorDate: Mon Sep 14 12:22:57 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 14:11:57 2020 +0200 ScRangeUtil::IsAbsArea ScDocument* arg dereferenced on all branches Change-Id: Ie83a42db769b45f6d64d0c2b7fda58216efc36c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102718 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index 62fb8fe0a4b3..601fdee3803f 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -57,7 +57,7 @@ public: ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); static bool IsAbsArea ( const OUString& rAreaStr, - const ScDocument* pDoc, + const ScDocument& rDoc, SCTAB nTab, OUString* pCompleteStr, ScRefAddress* pStartPos= nullptr, diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 47a6008de5d8..1e709a4b7100 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -169,7 +169,7 @@ bool ScRangeUtil::IsAbsTabArea( const OUString& rAreaStr, } bool ScRangeUtil::IsAbsArea( const OUString& rAreaStr, - const ScDocument* pDoc, + const ScDocument& rDoc, SCTAB nTab, OUString* pCompleteStr, ScRefAddress* pStartPos, @@ -179,7 +179,7 @@ bool ScRangeUtil::IsAbsArea( const OUString& rAreaStr, ScRefAddressstartPos; ScRefAddressendPos; -bool bIsAbsArea = ConvertDoubleRef( pDoc, rAreaStr, nTab, startPos, endPos, rDetails ); +bool bIsAbsArea = ConvertDoubleRef( &rDoc, rAreaStr, nTab, startPos, endPos, rDetails ); if ( bIsAbsArea ) { @@ -192,9 +192,9 @@ bool ScRangeUtil::IsAbsArea( const OUString& rAreaStr, if ( pCompleteStr ) { -*pCompleteStr = startPos.GetRefString( pDoc, MAXTAB+1, rDetails ); +*pCompleteStr = startPos.GetRefString( &rDoc, MAXTAB+1, rDetails ); *pCompleteStr += ":"; -*pCompleteStr += endPos .GetRefString( pDoc, nTab, rDetails ); +*pCompleteStr += endPos.GetRefString( &rDoc, nTab, rDetails ); } if ( pStartPos && pEndPos ) @@ -280,7 +280,7 @@ bool ScRangeUtil::MakeRangeFromName ( pData->GetSymbol( aStrArea ); -if ( IsAbsArea( aStrArea, &rDoc, nTable, +if ( IsAbsArea( aStrArea, rDoc, nTable, nullptr, &aStartPos, &aEndPos, rDetails ) ) { nTab = aStartPos.Tab(); diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 82b117ddf187..18a571a3077d 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -295,7 +295,7 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd ) if ( pEd == m_xEdDataArea.get() ) { -bEditOk = ScRangeUtil::IsAbsArea( pEd->GetText(), pDoc, +bEditOk = ScRangeUtil::IsAbsArea( pEd->GetText(), *pDoc, nTab, &theCompleteStr, nullptr, nullptr, eConv ); } else if ( pEd == m_xEdDestArea.get() ) diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index e32ebb5de033..9dbb50e52bdb 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -645,7 +645,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, weld::Button&, rBtn, void ) if ( !theAreaStr.isEmpty() ) { bAreaOk = ScRangeUtil::IsAbsArea( theAreaStr, - pDoc, + *pDoc, pViewData->GetTabNo(), &theAreaStr, &theStartPos, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/css
loleaflet/css/mobilewizard.css |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e3bace4a4467325ebc4b2e42c37dfb38687b2692 Author: Pedro Pinto Silva AuthorDate: Tue Sep 15 12:57:19 2020 +0200 Commit: Pedro Silva CommitDate: Tue Sep 15 14:21:18 2020 +0200 Mobile wizard: SetObjectToForeground label shouldn't be visible Change-Id: I193731a3fc9d6a5eef958a2d28f83a054b16 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102731 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/css/mobilewizard.css b/loleaflet/css/mobilewizard.css index 992e8afca..0f2d23145 100644 --- a/loleaflet/css/mobilewizard.css +++ b/loleaflet/css/mobilewizard.css @@ -659,7 +659,7 @@ a.leaflet-control-zoom-in { border-radius: 100px; background-color: #696969; } -#mobile-wizard #SendToBack > span, #mobile-wizard #ObjectBackOne > span, #mobile-wizard #ObjectForwardOne > span, #mobile-wizard #BringToFront > span, #mobile-wizard #SetObjectToBackground > span, #mobile-wizard #SetObjectToForeground > #mobile-wizard span, #mobile-wizard #FlipVertical > span, #mobile-wizard #FlipHorizontal > span, #mobile-wizard #Bold > span, #mobile-wizard #Italic > span, #mobile-wizard #Underline > span, #mobile-wizard #Strikeout > span, #mobile-wizard #StyleApply > span, #mobile-wizard #StyleUpdateByExample > span, #mobile-wizard #StyleNewByExample > span, #mobile-wizard #Shadowed > span, #mobile-wizard #Grow > span, #mobile-wizard #Shrink > span, #mobile-wizard #Color > span, #mobile-wizard #Spacing > span, #mobile-wizard #SuperScript > span, #mobile-wizard #SubScript > span, #mobile-wizard #AlignLeft > span, #mobile-wizard #AlignRight > span, #mobile-wizard #AlignHorizontalCenter > span, #mobile-wizard #AlignBlock > span, #mobile-wizard #ParaLeftToRight > spa n, #mobile-wizard #ParaRightToLeft > span, #mobile-wizard #AlignTop > span, #mobile-wizard #AlignVCenter > span, #mobile-wizard #AlignBottom > span, #mobile-wizard #IncrementIndent > span, #mobile-wizard #DecrementIndent > span, #mobile-wizard #LeftPara > span, #mobile-wizard #RightPara > span, #mobile-wizard #CenterPara > span, #mobile-wizard #JustifyPara > span, #mobile-wizard #DefaultBullet > span, #mobile-wizard #DefaultNumbering > span, #mobile-wizard #ParaspaceIncrease > span, #mobile-wizard #ParaspaceDecrease > span, #mobile-wizard #LineSpacing > span, #mobile-wizard #HangingIndent > span, #mobile-wizard #CellVertTop > span, #mobile-wizard #CellVertCenter > span, #mobile-wizard #CellVertBottom > span, #mobile-wizard div[id*='Table'] > span, #mobile-wizard div[id*='Row'] > span, #mobile-wizard div[id*='Column'] > span, #mobile-wizard div[id*='Cell'] > span, #mobile-wizard div[id^='Outline'] > span, #mobile-wizard #nolines > img{ +#mobile-wizard #SendToBack > span, #mobile-wizard #ObjectBackOne > span, #mobile-wizard #ObjectForwardOne > span, #mobile-wizard #BringToFront > span, #mobile-wizard #SetObjectToBackground > span, #mobile-wizard #SetObjectToForeground > #mobile-wizard span, #mobile-wizard #FlipVertical > span, #mobile-wizard #FlipHorizontal > span, #mobile-wizard #Bold > span, #mobile-wizard #Italic > span, #mobile-wizard #Underline > span, #mobile-wizard #Strikeout > span, #mobile-wizard #StyleApply > span, #mobile-wizard #StyleUpdateByExample > span, #mobile-wizard #StyleNewByExample > span, #mobile-wizard #Shadowed > span, #mobile-wizard #Grow > span, #mobile-wizard #Shrink > span, #mobile-wizard #Color > span, #mobile-wizard #Spacing > span, #mobile-wizard #SuperScript > span, #mobile-wizard #SubScript > span, #mobile-wizard #AlignLeft > span, #mobile-wizard #AlignRight > span, #mobile-wizard #AlignHorizontalCenter > span, #mobile-wizard #AlignBlock > span, #mobile-wizard #ParaLeftToRight > spa n, #mobile-wizard #ParaRightToLeft > span, #mobile-wizard #AlignTop > span, #mobile-wizard #AlignVCenter > span, #mobile-wizard #AlignBottom > span, #mobile-wizard #IncrementIndent > span, #mobile-wizard #DecrementIndent > span, #mobile-wizard #LeftPara > span, #mobile-wizard #RightPara > span, #mobile-wizard #CenterPara > span, #mobile-wizard #JustifyPara > span, #mobile-wizard #DefaultBullet > span, #mobile-wizard #DefaultNumbering > span, #mobile-wizard #ParaspaceIncrease > span, #mobile-wizard #ParaspaceDecrease > span, #mobile-wizard #LineSpacing > span, #mobile-wizard #HangingIndent > span, #mobile-wizard #CellVertTop > span, #mobile-wizard #CellVertCenter > span, #mobile-wizard #CellVertBottom > span, #mobile-wizard div[id*='Table'] > span, #mobile-wizard div[id*='Row'] > span, #mobile-wizard div[id*='Column'] > span, #mobile-wizard div[id*='Cell'] > span, #mobile-wizard div[id^='Outline'] > span, #mobile-wizard #nolines > img, #mobile-wizard #SetObjectToForeground > span { display: none !important; } #mobile-wizard #SendToBack, #mobile-wizard #ObjectBackOne, #mobile-wizard #ObjectForwardOne, #mobile
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sfx2/source
sfx2/source/sidebar/SidebarDockingWindow.cxx |8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) New commits: commit 6780e9c9b3224e5c0088110f02fdd88073fbdad4 Author: Henry Castro AuthorDate: Tue Sep 15 08:22:34 2020 -0400 Commit: Henry Castro CommitDate: Tue Sep 15 14:33:16 2020 +0200 Revert "sidebar: restrict sending once a "created" message" This reverts commit 855ce740ee1ce4cfdafdc34266ce96682874. It has so much damage in mobile devices, I do not understand the message "created", "close", it should means create de sidebar window, but it is used as "show", "hide" Change-Id: I5f45d58be577b7b6302adf57279cab5880f7060c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102743 Tested-by: Henry Castro Reviewed-by: Henry Castro diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 6818c201631d..302605d6a65a 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -107,9 +107,6 @@ public: SAL_WARN("sfx.sidebar", rError.message()); } } - -bool GetLastLOKWindow() { return m_LastLOKWindowId; } - }; SidebarDockingWindow::SidebarDockingWindow(SfxBindings* pSfxBindings, SidebarChildWindow& rChildWindow, @@ -208,10 +205,7 @@ void SidebarDockingWindow::NotifyResize() SetLOKNotifier(pCurrentView); } -if (mpIdleNotify->GetLastLOKWindow() == 0) -{ -mpIdleNotify->Start(); -} +mpIdleNotify->Start(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - 2 commits - include/oox oox/source sd/qa
include/oox/core/xmlfilterbase.hxx |8 + include/oox/drawingml/shape.hxx |8 + oox/source/core/xmlfilterbase.cxx |8 + oox/source/drawingml/diagram/diagram.cxx|9 +- oox/source/drawingml/diagram/diagram.hxx| 14 ++- oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 82 +++- oox/source/drawingml/diagram/diagramlayoutatoms.hxx | 12 +- oox/source/drawingml/shape.cxx | 55 + oox/source/ppt/pptshape.cxx | 13 +++ sd/qa/unit/data/pptx/smartart-autofit-sync.pptx |binary sd/qa/unit/import-tests-smartart.cxx| 41 ++ 11 files changed, 238 insertions(+), 12 deletions(-) New commits: commit bb83c782bcb3e9320dcad35e8aff99cc76dc7d55 Author: Miklos Vajna AuthorDate: Mon Sep 14 16:58:38 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 14:39:15 2020 +0200 oox smartart: handle Which defines that a data node has text properties as direct formatting, so autoscale should not happen. We decide autofit at a shape level, smartart defines custom text props at a data node level. So take the shape, go to its first presentation node, get its data node and see if it has custom text props. If not, continue to scale text down till it fits. smartart-autofit-sync.pptx is extended to contain a 3rd shape: the first two have their autofit scaling synchronized, while the 3rd has a fixed font size of 10pt. (cherry picked from commit 89b385c2336e5b3868d2a040e11134b349b7d010) Change-Id: I6caacdaab9a36072b9ad5021bd217c955b09b790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102712 Tested-by: Jenkins Reviewed-by: Gülşah Köse diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index d804373017f1..e68f4e4bdf44 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -478,6 +478,54 @@ void ApplyConstraintToLayout(const Constraint& rConstraint, LayoutPropertyMap& r } } } + +/// Does the first data node of this shape have customized text properties? +bool HasCustomText(const ShapePtr& rShape, LayoutNode& rLayoutNode) +{ +const PresPointShapeMap& rPresPointShapeMap += rLayoutNode.getDiagram().getLayout()->getPresPointShapeMap(); +const DiagramData::StringMap& rPresOfNameMap += rLayoutNode.getDiagram().getData()->getPresOfNameMap(); +const DiagramData::PointNameMap& rPointNameMap += rLayoutNode.getDiagram().getData()->getPointNameMap(); +// Get the first presentation node of the shape. +const dgm::Point* pPresNode = nullptr; +for (const auto& rPair : rPresPointShapeMap) +{ +if (rPair.second == rShape) +{ +pPresNode = rPair.first; +break; +} +} +// Get the first data node of the presentation node. +dgm::Point* pDataNode = nullptr; +if (pPresNode) +{ +auto itPresToData = rPresOfNameMap.find(pPresNode->msModelId); +if (itPresToData != rPresOfNameMap.end()) +{ +for (const auto& rPair : itPresToData->second) +{ +const DiagramData::SourceIdAndDepth& rItem = rPair.second; +auto it = rPointNameMap.find(rItem.msSourceId); +if (it != rPointNameMap.end()) +{ +pDataNode = it->second; +break; +} +} +} +} + +// If we have a data node, see if its text is customized or not. +if (pDataNode) +{ +return pDataNode->mbCustomText; +} + +return false; +} } void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector& rConstraints, @@ -1452,7 +1500,13 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector& if (!aRun->getTextCharacterProperties().moHeight.has()) aRun->getTextCharacterProperties().moHeight = fFontSize * 100; } - pTextBody->getTextProperties().maPropertyMap.setProperty(PROP_TextFitToSize, drawing::TextFitToSizeType_AUTOFIT); + +if (!HasCustomText(rShape, getLayoutNode())) +{ +// No customized text properties: enable autofit. +pTextBody->getTextProperties().maPropertyMap.setProperty( +PROP_TextFitToSize, drawing::TextFitToSizeType_AUTOFIT); +} // ECMA-376-1:2016 21.4.7.5 ST_AutoTextRotation (Auto Text Rotation) const sal_Int32 nautoTxRot = maMap.count(XML_autoTxRot) ? maMap.find(XML_autoTxRot)->second : XML_upr; diff --git a/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx b/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx index f682c143
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/svx svx/source
include/svx/sdtfsitm.hxx| 10 ++ include/svx/svdotext.hxx|2 +- include/svx/unoshprp.hxx|2 +- svx/source/svdraw/svdattr.cxx | 10 ++ svx/source/svdraw/svdotext.cxx | 10 +- svx/source/unodraw/unoshape.cxx | 13 + 6 files changed, 44 insertions(+), 3 deletions(-) New commits: commit 618b12b768eaffd40fcd98eb0ed55d0e7850b64c Author: Miklos Vajna AuthorDate: Wed Sep 9 15:49:16 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 14:38:47 2020 +0200 svx UNO API for shapes: allow setting a max factor for autofit text scale This allows getting the scale factor from multiple shapes (that have text), seeing what factors they use and then setting the factor to the minimum of the values. Towards allowing both "autofit" and "same font size for these shapes" at the same time for SmartArt purposes. (cherry picked from commit 81345de4858d6e72ecb8fc6621396570f4a4ee93) Conflicts: include/svx/unoshprp.hxx Change-Id: I31a5e097c62e6e65b32956a4a32137bc3339c64c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102710 Tested-by: Jenkins Reviewed-by: Gülşah Köse diff --git a/include/svx/sdtfsitm.hxx b/include/svx/sdtfsitm.hxx index 597da1ad591c..c446bc1fbca6 100644 --- a/include/svx/sdtfsitm.hxx +++ b/include/svx/sdtfsitm.hxx @@ -38,7 +38,13 @@ public: SdrTextFitToSizeTypeItem( css::drawing::TextFitToSizeType const eFit = css::drawing::TextFitToSizeType_NONE) : SfxEnumItem(SDRATTR_TEXT_FITTOSIZE, eFit) {} +SdrTextFitToSizeTypeItem(const SdrTextFitToSizeTypeItem& rItem) +: SfxEnumItem(rItem), +m_nMaxScale(rItem.GetMaxScale()) +{ +} virtual SdrTextFitToSizeTypeItem* Clone(SfxItemPool* pPool=nullptr) const override; +bool operator==(const SfxPoolItem& rItem) const override; virtual sal_uInt16 GetValueCount() const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; @@ -49,6 +55,10 @@ public: virtual bool HasBoolValue() const override; virtual bool GetBoolValue() const override; virtual void SetBoolValue(bool bVal) override; +void SetMaxScale(sal_Int16 nMaxScale) { m_nMaxScale = nMaxScale; } +sal_Int16 GetMaxScale() const { return m_nMaxScale; } +private: +sal_Int16 m_nMaxScale = 0; }; #endif diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index 6f1804bb1757..5ee175520251 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -263,7 +263,7 @@ private: tools::Rectangle& rPaintRect, Fraction&aFitXCorrection ) const; void ImpAutoFitText( SdrOutliner& rOutliner ) const; -static void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting ); +void ImpAutoFitText( SdrOutliner& rOutliner, const Size& rShapeSize, bool bIsVerticalWriting ) const; SVX_DLLPRIVATE SdrObjectUniquePtr ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const; SVX_DLLPRIVATE void ImpRegisterLink(); SVX_DLLPRIVATE void ImpDeregisterLink(); diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx index 8051634c3e42..cf7452e8303a 100644 --- a/include/svx/unoshprp.hxx +++ b/include/svx/unoshprp.hxx @@ -349,7 +349,7 @@ { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , cppu::UnoType::get(), 0, 0},\ { OUString("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ { OUString("UINamePlural"), OWN_ATTR_UINAME_PLURAL , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ -{ OUString("TextFitToSizeScale"), OWN_ATTR_TEXTFITTOSIZESCALE, ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ +{ OUString("TextFitToSizeScale"), OWN_ATTR_TEXTFITTOSIZESCALE, ::cppu::UnoType::get(), 0, 0}, \ /* #i68101# */ \ { OUString(UNO_NAME_MISC_OBJ_TITLE),OWN_ATTR_MISC_OBJ_TITLE , ::cppu::UnoType::get(),0, 0}, \ { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType::get(),0, 0}, diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index f57b523db96e..05992d9dc86d 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -937,6 +937,16 @@ SfxPoolItem* SdrTextFitToSizeTypeItem::CreateDefault() { return new SdrTextFitTo SdrTextFitToSizeTypeItem* SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); } +bool SdrTextFitToSizeTypeItem::operator==(const SfxPoolItem& rItem) const +{ +if (!SfxEnu
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/svl include/svx svx/source
include/svl/solar.hrc |2 +- include/svx/unoshprp.hxx|4 +++- svx/source/unodraw/unoshape.cxx | 33 + 3 files changed, 37 insertions(+), 2 deletions(-) New commits: commit e62432c57f21df84885553a79cb765c9fcb35cc9 Author: Miklos Vajna AuthorDate: Tue Sep 8 17:26:12 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 14:38:30 2020 +0200 svx UNO API for shapes: expose what scaling factor is used for autofit scaling TextFitToSizeScale is 0 when the shape has no text or autofit is not enabled, 100 when there is autofit (but no scale-down), a value between the two otherwise. Towards allowing both "autofit" and "same font size for these shapes" at the same time for SmartArt purposes. (cherry picked from commit cd268f0047443ddbb22361cdc15093e881f83588) Conflicts: include/svx/unoshprp.hxx Change-Id: Iff88fcc4c2e67b543687b1d87d614622cbf2e38a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102709 Tested-by: Jenkins Reviewed-by: Gülşah Köse diff --git a/include/svl/solar.hrc b/include/svl/solar.hrc index 6b4cb07bbc33..317d45a84bc1 100644 --- a/include/svl/solar.hrc +++ b/include/svl/solar.hrc @@ -23,7 +23,7 @@ // defines -- #define OWN_ATTR_VALUE_START3900 -#define OWN_ATTR_VALUE_END 4004 +#define OWN_ATTR_VALUE_END 4005 #define RID_LIB_START 1 #define RID_LIB_END 1 diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx index 9aa2ecb16dae..8051634c3e42 100644 --- a/include/svx/unoshprp.hxx +++ b/include/svx/unoshprp.hxx @@ -192,7 +192,8 @@ #define OWN_ATTR_SIGNATURELINE_UNSIGNED_IMAGE (OWN_ATTR_VALUE_START+102) #define OWN_ATTR_SIGNATURELINE_IS_SIGNED(OWN_ATTR_VALUE_START+103) #define OWN_ATTR_QRCODE (OWN_ATTR_VALUE_START+104) -// ATTENTION: maximum is OWN_ATTR_VALUE_START+104 svx, see include/svl/solar.hrc +#define OWN_ATTR_TEXTFITTOSIZESCALE (OWN_ATTR_VALUE_START+105) +// ATTENTION: maximum is OWN_ATTR_VALUE_START+105 svx, see include/svl/solar.hrc // #FontWork# #define FONTWORK_PROPERTIES \ @@ -348,6 +349,7 @@ { OUString(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , cppu::UnoType::get(), 0, 0},\ { OUString("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ { OUString("UINamePlural"), OWN_ATTR_UINAME_PLURAL , ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ +{ OUString("TextFitToSizeScale"), OWN_ATTR_TEXTFITTOSIZESCALE, ::cppu::UnoType::get(), css::beans::PropertyAttribute::READONLY, 0}, \ /* #i68101# */ \ { OUString(UNO_NAME_MISC_OBJ_TITLE),OWN_ATTR_MISC_OBJ_TITLE , ::cppu::UnoType::get(),0, 0}, \ { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType::get(),0, 0}, diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 080f455c4005..e1077663cc68 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -82,6 +82,8 @@ #include #include +#include +#include #include #include @@ -165,6 +167,31 @@ protected: } }; +/// Calculates what scaling factor will be used for autofit text scaling of this shape. +sal_Int16 GetTextFitToSizeScale(SdrObject* pObject) +{ +SdrTextObj* pTextObj = dynamic_cast(pObject); +if (!pTextObj) +{ +return 0; +} + +const SfxItemSet& rTextObjSet = pTextObj->GetMergedItemSet(); +if (rTextObjSet.GetItem(SDRATTR_TEXT_FITTOSIZE)->GetValue() +!= drawing::TextFitToSizeType_AUTOFIT) +{ +return 0; +} + +std::unique_ptr pOutliner += pTextObj->getSdrModelFromSdrObject().createOutliner(OutlinerMode::TextObject); +tools::Rectangle aBoundRect(pTextObj->GetCurrentBoundRect()); +pTextObj->SetupOutlinerFormatting(*pOutliner, aBoundRect); +sal_uInt16 nX = 0; +sal_uInt16 nY = 0; +pOutliner->GetGlobalCharStretching(nX, nY); +return nY; +} } SvxShape::SvxShape( SdrObject* pObject ) @@ -2833,6 +2860,12 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl break; } +case OWN_ATTR_TEXTFITTOSIZESCALE: +{ +rValue <<= GetTextFitToSizeScale(GetSdrObject()); +break; +} + case OWN_ATTR_UINAME_PLURAL: { rValue <<= GetSdrObject()->TakeObjNamePlural(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/sfx2 sfx2/source sw/qa sw/source
include/sfx2/AccessibilityCheck.hxx |2 +- sfx2/source/accessibility/AccessibilityCheck.cxx |5 - sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |4 ++-- sw/source/uibase/app/docst.cxx |2 +- sw/source/uibase/shells/basesh.cxx |2 +- 5 files changed, 9 insertions(+), 6 deletions(-) New commits: commit bc2cec8162a184b1a44cc37766924d65e57c4ce7 Author: Andrea Gelmini AuthorDate: Mon Aug 31 17:05:11 2020 +0200 Commit: Julien Nabet CommitDate: Tue Sep 15 15:12:47 2020 +0200 Fix typo in code It passed "make check" on Linux Change-Id: Id56c9b50540a4de1950dfc4b49ea783d164a6604 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101811 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/include/sfx2/AccessibilityCheck.hxx b/include/sfx2/AccessibilityCheck.hxx index 185bc050d771..959601c9872e 100644 --- a/include/sfx2/AccessibilityCheck.hxx +++ b/include/sfx2/AccessibilityCheck.hxx @@ -27,7 +27,7 @@ public: virtual void check() = 0; -AccessibilityIssueCollection& getIssueCollecton(); +AccessibilityIssueCollection& getIssueCollection(); }; } // end sfx namespace diff --git a/sfx2/source/accessibility/AccessibilityCheck.cxx b/sfx2/source/accessibility/AccessibilityCheck.cxx index 7e6c3209053c..adb0ddf282d6 100644 --- a/sfx2/source/accessibility/AccessibilityCheck.cxx +++ b/sfx2/source/accessibility/AccessibilityCheck.cxx @@ -14,7 +14,10 @@ namespace sfx { AccessibilityCheck::~AccessibilityCheck() = default; -AccessibilityIssueCollection& AccessibilityCheck::getIssueCollecton() { return m_aIssueCollection; } +AccessibilityIssueCollection& AccessibilityCheck::getIssueCollection() +{ +return m_aIssueCollection; +} } // end sfx namespace diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx index 40cf5d905bac..e7d96f8ea993 100644 --- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx +++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx @@ -31,7 +31,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckDocumentIssues) CPPUNIT_ASSERT(pDoc); sw::AccessibilityCheck aCheck(pDoc); aCheck.check(); -auto& aIssues = aCheck.getIssueCollecton().getIssues(); +auto& aIssues = aCheck.getIssueCollection().getIssues(); CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DOCUMENT_LANGUAGE, aIssues[0]->m_eIssueID); CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DOCUMENT_TITLE, aIssues[1]->m_eIssueID); @@ -43,7 +43,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testTableSplitMergeAndAltText) CPPUNIT_ASSERT(pDoc); sw::AccessibilityCheck aCheck(pDoc); aCheck.check(); -auto& aIssues = aCheck.getIssueCollecton().getIssues(); +auto& aIssues = aCheck.getIssueCollection().getIssues(); CPPUNIT_ASSERT_EQUAL(size_t(7), aIssues.size()); CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::NO_ALT_GRAPHIC, aIssues[0]->m_eIssueID); diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 6886b548ba56..666db6b0d9a9 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -1471,7 +1471,7 @@ sfx::AccessibilityIssueCollection SwDocShell::runAccessibilityCheck() { sw::AccessibilityCheck aCheck(m_xDoc.get()); aCheck.check(); -return aCheck.getIssueCollecton(); +return aCheck.getIssueCollection(); } std::set SwDocShell::GetDocColors() diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 4dfd92584a0e..b0ba28e53074 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2674,7 +2674,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) { sw::AccessibilityCheck aCheck(rSh.GetDoc()); aCheck.check(); -svx::AccessibilityCheckDialog aDialog(pMDI, aCheck.getIssueCollecton()); +svx::AccessibilityCheckDialog aDialog(pMDI, aCheck.getIssueCollection()); aDialog.run(); } break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: android/lib common/Session.hpp loleaflet/src wsd/ClientSession.cpp
android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |4 +++ common/Session.hpp |4 +++ loleaflet/src/core/Socket.js |3 ++ wsd/ClientSession.cpp| 13 ++ 4 files changed, 24 insertions(+) New commits: commit 115bb1b652dc931344c4a19f0bafd7363115914b Author: mert AuthorDate: Thu Sep 10 17:04:36 2020 +0300 Commit: Mert Tumer CommitDate: Tue Sep 15 15:14:40 2020 +0200 Fix unable to open password protected documents on mobile Change-Id: Ifd67cb6f3640784176abfe483f0364c1dfe4b5d9 Signed-off-by: mert Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102388 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102729 diff --git a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java index 88b1fdafd..2066a1fd6 100644 --- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java +++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java @@ -943,6 +943,10 @@ public class LOActivity extends AppCompatActivity { } return false; } +case "loadwithpassword": { +mProgressDialog.determinate(R.string.loading); +return true; +} } return true; } diff --git a/common/Session.hpp b/common/Session.hpp index e88a59d89..61e35ff42 100644 --- a/common/Session.hpp +++ b/common/Session.hpp @@ -193,6 +193,10 @@ public: bool getHaveDocPassword() const { return _haveDocPassword; } +void setHaveDocPassword(const bool val) { _haveDocPassword = val; } + +void setDocPassword(const std::string& password) { _docPassword = password; } + const std::string& getDocPassword() const { return _docPassword; } const std::string& getUserExtraInfo() const { return _userExtraInfo; } diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index 8a22e0c8d..750e98bd6 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -696,6 +696,9 @@ L.Socket = L.Class.extend({ callback: L.bind(function(data) { if (data) { this._map._docPassword = data.password; + if (window.ThisIsAMobileApp) { + window.postMobileMessage('loadwithpassword password=' + data.password); + } this._map.loadDocument(); } else if (passwordType === 'to-modify') { this._map._docPassword = ''; diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp index 60733a0c5..44b3f0271 100644 --- a/wsd/ClientSession.cpp +++ b/wsd/ClientSession.cpp @@ -395,6 +395,19 @@ bool ClientSession::_handleInput(const char *buffer, int length) return loadDocument(buffer, length, tokens, docBroker); } +else if (tokens.equals(0, "loadwithpassword")) +{ +std::string docPassword; +if (tokens.size() > 1 && getTokenString(tokens[1], "password", docPassword)) +{ +if (!docPassword.empty()) +{ +setHaveDocPassword(true); +setDocPassword(docPassword); +} +} +return loadDocument(buffer, length, tokens, docBroker); +} else if (getDocURL().empty()) { sendTextFrameAndLogError("error: cmd=" + tokens[0] + " kind=nodocloaded"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit ce572a9d44adeef32781251d7c9b3ee679611b97 Author: Pranam Lashkari AuthorDate: Tue Sep 15 17:38:15 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:23:57 2020 +0200 leaflet: removed bogus menu items in Draw menu Change-Id: I055cb3cb08b7f91d35602ee33c6b799048950134 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102740 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 68997aae5..8caebf2ba 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -286,15 +286,15 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, - {type: 'separator'}, - {uno: '.uno:SlideMasterPage'}, - {type: 'separator'}, - {uno: '.uno:ModifyPage'}, - {uno: '.uno:SlideChangeWindow'}, - {uno: '.uno:CustomAnimation'}, - {uno: '.uno:MasterSlidesPanel'}, - {type: 'separator'}, - {uno: '.uno:Sidebar'}] + {type: 'separator', drawing: false}, + {uno: '.uno:SlideMasterPage', drawing: false}, + {type: 'separator', drawing: false}, + {uno: '.uno:ModifyPage', drawing: false}, + {uno: '.uno:SlideChangeWindow', drawing: false}, + {uno: '.uno:CustomAnimation', drawing: false}, + {uno: '.uno:MasterSlidesPanel', drawing: false}, + {type: 'separator', drawing: false}, + {uno: '.uno:Sidebar', drawing: false}] }, {name: _UNO('.uno:InsertMenu', 'presentation'), id: 'insert', type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/qa
sw/qa/extras/uiwriter/data3/tdf133490.odt |binary sw/qa/extras/uiwriter/uiwriter3.cxx | 88 ++ 2 files changed, 88 insertions(+) New commits: commit 6df6c300ea499b260af0daa4d9a97f320e3e161e Author: Xisco Fauli AuthorDate: Sun Sep 6 16:46:16 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 15:27:06 2020 +0200 tdf#133490: sw_uiwriter: Add unittest Change-Id: I8a0660922e29d0dfaf8b859d396b88997a46bc92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102108 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli (cherry picked from commit 7b4b1cb7c753fadbc20892ef8cc961b7a61e8d19) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102648 Tested-by: Jenkins diff --git a/sw/qa/extras/uiwriter/data3/tdf133490.odt b/sw/qa/extras/uiwriter/data3/tdf133490.odt new file mode 100644 index ..98050b58fe46 Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf133490.odt differ diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index fe637456f517..669122e62ebb 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -833,6 +833,94 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128782) CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133490) +{ +load(DATA_DIRECTORY, "tdf133490.odt"); +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +CPPUNIT_ASSERT(pTextDoc); + +CPPUNIT_ASSERT_EQUAL(1, getShapes()); + +dispatchCommand(mxComponent, ".uno:SelectAll", {}); +dispatchCommand(mxComponent, ".uno:Cut", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(0, getShapes()); + +dispatchCommand(mxComponent, ".uno:Paste", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(1, getShapes()); + +dispatchCommand(mxComponent, ".uno:Paste", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(2, getShapes()); + +uno::Reference xShape1 = getShape(1); +uno::Reference xShape2 = getShape(2); + +awt::Point aPos[2]; +aPos[0] = xShape1->getPosition(); +aPos[1] = xShape2->getPosition(); + +//select shape 2 and move it to the right +dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {}); +dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {}); +Scheduler::ProcessEventsToIdle(); + +for (sal_Int32 i = 0; i < 5; ++i) +{ +pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RIGHT); +Scheduler::ProcessEventsToIdle(); +} + +CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y); +//X position in shape 2 has changed +CPPUNIT_ASSERT(aPos[1].X < xShape2->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); + +for (sal_Int32 i = 0; i < 4; ++i) +{ +dispatchCommand(mxComponent, ".uno:Undo", {}); +Scheduler::ProcessEventsToIdle(); + +// Without the fix in place, undo action would have changed shape1's position +// and this test would have failed with +// - Expected: -139 +// - Actual : 1194 +CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y); +CPPUNIT_ASSERT(aPos[1].X < xShape2->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); +} + +dispatchCommand(mxComponent, ".uno:Undo", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y); +// Shape 2 has come back to the original position +CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); + +dispatchCommand(mxComponent, ".uno:Undo", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(1, getShapes()); + +dispatchCommand(mxComponent, ".uno:Undo", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(0, getShapes()); + +dispatchCommand(mxComponent, ".uno:Undo", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(1, getShapes()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132637_protectTrackChanges) { load(DATA_DIRECTORY, "tdf132637_protectTrackChanges.doc"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/address.hxx |2 +- sc/source/core/tool/address.cxx|4 ++-- sc/source/core/tool/interpr1.cxx |4 ++-- sc/source/core/tool/rangeutl.cxx |6 +++--- sc/source/ui/miscdlgs/tabopdlg.cxx |8 5 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 2ee88d0ebe767ccd5f49300be5bd675edec0c2cf Author: Caolán McNamara AuthorDate: Mon Sep 14 12:27:37 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 15:27:21 2020 +0200 ConvertSingleRef never passed a null ScDocument* Change-Id: I1ce4f369d8078e1950204b3046457582d9d67397 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102736 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index c2304965b240..5fc9a361cb66 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -959,7 +959,7 @@ template< typename T > inline void PutInOrder( T& nStart, T& nEnd ) } } -bool ConvertSingleRef( const ScDocument* pDocument, const OUString& rRefString, +bool ConvertSingleRef( const ScDocument& pDocument, const OUString& rRefString, SCTAB nDefTab, ScRefAddress& rRefAddress, const ScAddress::Details& rDetails, ScAddress::ExternalInfo* pExtInfo = nullptr ); diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index dc820a73582c..4596074e102a 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1493,7 +1493,7 @@ static ScRefFlags lcl_ScAddress_Parse ( const sal_Unicode* p, const ScDocument* } } -bool ConvertSingleRef( const ScDocument* pDoc, const OUString& rRefString, +bool ConvertSingleRef( const ScDocument& rDoc, const OUString& rRefString, SCTAB nDefTab, ScRefAddress& rRefAddress, const ScAddress::Details& rDetails, ScAddress::ExternalInfo* pExtInfo /* = NULL */ ) @@ -1502,7 +1502,7 @@ bool ConvertSingleRef( const ScDocument* pDoc, const OUString& rRefString, if (pExtInfo || (ScGlobal::FindUnquoted( rRefString, SC_COMPILER_FILE_TAB_SEP) == -1)) { ScAddress aAddr( 0, 0, nDefTab ); -ScRefFlags nRes = aAddr.Parse( rRefString, pDoc, rDetails, pExtInfo); +ScRefFlags nRes = aAddr.Parse( rRefString, &rDoc, rDetails, pExtInfo); if ( nRes & ScRefFlags::VALID ) { rRefAddress.Set( aAddr, diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 3c6dea7ce105..7e906aa18ea5 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -8106,8 +8106,8 @@ void ScInterpreter::ScIndirect() else PushDoubleRef( aRefAd, aRefAd2); } -else if ( ConvertSingleRef(&mrDoc, sRefStr, nTab, aRefAd, aDetails, &aExtInfo) || - ( bTryXlA1 && ConvertSingleRef (&mrDoc, sRefStr, nTab, aRefAd, +else if ( ConvertSingleRef(mrDoc, sRefStr, nTab, aRefAd, aDetails, &aExtInfo) || + ( bTryXlA1 && ConvertSingleRef (mrDoc, sRefStr, nTab, aRefAd, aDetailsXlA1, &aExtInfo) ) ) { if (aExtInfo.mbExternal) diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 24f62c9c5de5..c90c61d0055c 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -128,9 +128,9 @@ bool ScRangeUtil::IsAbsTabArea( const OUString& rAreaStr, aStartPosStr = aTempAreaStr.copy( 0, nColonPos ); aEndPosStr = aTempAreaStr.copy( nColonPos+1 ); -if ( ConvertSingleRef( pDoc, aStartPosStr, 0, aStartPos, rDetails ) ) +if ( ConvertSingleRef( *pDoc, aStartPosStr, 0, aStartPos, rDetails ) ) { -if ( ConvertSingleRef( pDoc, aEndPosStr, aStartPos.Tab(), aEndPos, rDetails ) ) +if ( ConvertSingleRef( *pDoc, aEndPosStr, aStartPos.Tab(), aEndPos, rDetails ) ) { aStartPos.SetRelCol( false ); aStartPos.SetRelRow( false ); @@ -216,7 +216,7 @@ bool ScRangeUtil::IsAbsPos( const OUString& rPosStr, { ScRefAddressthePos; -bool bIsAbsPos = ConvertSingleRef( &rDoc, rPosStr, nTab, thePos, rDetails ); +bool bIsAbsPos = ConvertSingleRef( rDoc, rPosStr, nTab, thePos, rDetails ); thePos.SetRelCol( false ); thePos.SetRelRow( false ); thePos.SetRelTab( false ); diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 5fda368f1c40..7e9be6ea820a 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -216,7 +216,7 @@ static bool lcl_Parse( const OUString& rString, const ScDocument& rDoc, SCTAB nC bRet = ConvertDoubleRef( rDoc, rString, nCurTab, rStart, rEnd, eConv ); else { -bRet = ConvertSingleRef( &rDoc, rString, nCurTab, rStart, eConv ); +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/qa
sw/qa/extras/uiwriter/data3/tdf135623.docx |binary sw/qa/extras/uiwriter/uiwriter3.cxx| 46 - 2 files changed, 45 insertions(+), 1 deletion(-) New commits: commit 04334ade62d6f8f3001684338d35b93edb5e3588 Author: Xisco Fauli AuthorDate: Mon Sep 14 14:13:16 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 15:27:57 2020 +0200 tdf#135623: sw_uiwriter: Add unittest Change-Id: I77bc9e22d294ecc218b1570e75742344ef1d2ea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102668 Tested-by: Jenkins Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102715 diff --git a/sw/qa/extras/uiwriter/data3/tdf135623.docx b/sw/qa/extras/uiwriter/data3/tdf135623.docx new file mode 100644 index ..ed139eaeffdb Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf135623.docx differ diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index 669122e62ebb..bddb827de74b 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -820,7 +820,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128782) CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y); CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X); //Y position in shape 2 has changed -CPPUNIT_ASSERT(aPos[1].Y != xShape2->getPosition().Y); +CPPUNIT_ASSERT(aPos[1].Y < xShape2->getPosition().Y); dispatchCommand(mxComponent, ".uno:Undo", {}); Scheduler::ProcessEventsToIdle(); @@ -833,6 +833,50 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf128782) CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135623) +{ +load(DATA_DIRECTORY, "tdf135623.docx"); +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +CPPUNIT_ASSERT(pTextDoc); + +CPPUNIT_ASSERT_EQUAL(2, getShapes()); +CPPUNIT_ASSERT_EQUAL(2, getPages()); + +uno::Reference xShape1 = getShape(1); +uno::Reference xShape2 = getShape(2); + +awt::Point aPos[2]; +aPos[0] = xShape1->getPosition(); +aPos[1] = xShape2->getPosition(); + +//select shape 1 and move it down +dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {}); +Scheduler::ProcessEventsToIdle(); + +pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X); +//Y position in shape 1 has changed +CPPUNIT_ASSERT(aPos[0].Y < xShape1->getPosition().Y); +CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); + +dispatchCommand(mxComponent, ".uno:Undo", {}); +Scheduler::ProcessEventsToIdle(); + +CPPUNIT_ASSERT_EQUAL(aPos[0].X, xShape1->getPosition().X); +CPPUNIT_ASSERT_EQUAL(aPos[0].Y, xShape1->getPosition().Y); +CPPUNIT_ASSERT_EQUAL(aPos[1].X, xShape2->getPosition().X); + +// Without the fix in place, this test would have failed here +// - Expected: 1351 +// - Actual : 2233 +CPPUNIT_ASSERT_EQUAL(aPos[1].Y, xShape2->getPosition().Y); + +CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133490) { load(DATA_DIRECTORY, "tdf133490.odt"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - sw/qa sw/source
sw/qa/core/layout/data/tdf134783_testAnchorPositionBasedOnParagraph.fodt | 284 ++ sw/qa/core/layout/layout.cxx | 15 sw/source/core/inc/frmtool.hxx | 5 sw/source/core/layout/flowfrm.cxx| 12 sw/source/core/layout/frmtool.cxx| 9 5 files changed, 317 insertions(+), 8 deletions(-) New commits: commit abd60664236bf57e032f438e1603453b24a2bbda Author: Regényi Balázs AuthorDate: Sat Jul 11 21:29:33 2020 +0200 Commit: Gabor Kelemen CommitDate: Tue Sep 15 15:34:26 2020 +0200 tdf#134783 sw: fix contextual spacing position of shape anchored to paragraph, i.e. when paragraph spacing removed between same style paragraphs with option "Don't add space between paragraphs of the same style". Follow-up of commit 11059331718fb8faab483c75633b4e80d8028b7d (SwFlowFrm: implement contextual spacing) Co-authored-by: Szabolcs Tóth Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98584 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 713c6b1880ee06f8ff0aa869906058f247db6e3a) Change-Id: Id128ad7cab3c7dde4333de3b11a5a3693d039243 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102650 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/sw/qa/core/layout/data/tdf134783_testAnchorPositionBasedOnParagraph.fodt b/sw/qa/core/layout/data/tdf134783_testAnchorPositionBasedOnParagraph.fodt new file mode 100644 index ..aa5cc77126b9 --- /dev/null +++ b/sw/qa/core/layout/data/tdf134783_testAnchorPositionBasedOnParagraph.fodt @@ -0,0 +1,284 @@ + + +http://openoffice.org/2004/office"; xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report"; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/200 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns :css3t="http://www.w3.org/TR/css3-text/"; xmlns:officeooo="http://openoffice.org/2009/office"; office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2020-07-14T15:50:45.95100PT1M19S1LibreOfficeDev/7.1.0.0.alpha0$Windows_X86_64 LibreOffice_project/e8ffd954ee590d1f382685ceae12a51387919fb8 + + + 0 + 0 + 37837 + 23232 + true + false + + + view2 + 10911 + 6713 + 0 + 0 + 37835 + 23230 + 0 + 1 + false + 100 + false + false + + + + + false + + + + 1 + true + false + false + true + false + false + true + true + + + true + false + false + 0 + true + false + true + false + false + 0 + false + true + false + false + false + false + high-resolution + false + false + true + false + false + false + false + false + true + false + true + false + + false + false + false + true + false + 2065661 + false + false + false + false + false + 2065661 + false + true + false + true + true + false + false + false + true + true + false + true + false + false + false + false + true + false + false + false + false + false + false + 0 + true + false + true + true + true + false + true + false +
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.JSDialogBuilder.js |1 + 1 file changed, 1 insertion(+) New commits: commit fec0b314afcab140db51629469b10bd0c10a9757 Author: Pedro Pinto Silva AuthorDate: Tue Sep 15 12:52:53 2020 +0200 Commit: Pedro Silva CommitDate: Tue Sep 15 15:39:36 2020 +0200 Mobile: Set icon for combobox rotation Change-Id: Id063188781165d8724cbe4b04ec7f9c5b767e37c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102730 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index f6679381c..b3518afd4 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -424,6 +424,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ case 'masterslide': case 'SdTableDesignPanel': case 'ChartTypePanel': + case 'rotation': iconURL = L.LOUtil.getImageURL('lc_'+ sectionTitle.id.toLowerCase() +'.svg'); break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: cypress_test/integration_tests cypress_test/Makefile.am cypress_test/support
cypress_test/Makefile.am|5 ++- cypress_test/integration_tests/common/helper.js | 34 cypress_test/support/index.js | 10 ++- 3 files changed, 36 insertions(+), 13 deletions(-) New commits: commit f6d5cf9c3fdd6def25f2c2d3911ba580b00709df Author: Tamás Zolnai AuthorDate: Mon Sep 14 15:53:51 2020 +0200 Commit: Tamás Zolnai CommitDate: Tue Sep 15 15:40:22 2020 +0200 cypress: support running tests with php-proxy. Change-Id: I9fe4a974582e0475026f6798a338bae033e6d7e6 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102733 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am index 821886137..429473e30 100644 --- a/cypress_test/Makefile.am +++ b/cypress_test/Makefile.am @@ -235,7 +235,9 @@ endef define start_loolwsd $(if $(findstring nextcloud, $(CYPRESS_INTEGRATION)),\ $(eval FREE_PORT:=9980),\ - $(eval FREE_PORT:=$(shell $(GET_PORT_BINARY) --host=127.0.0.1 $(ALLOWED_PORTS + $(if $(findstring php-proxy, $(CYPRESS_INTEGRATION)), + $(eval FREE_PORT:=9982),\ + $(eval FREE_PORT:=$(shell $(GET_PORT_BINARY) --host=127.0.0.1 $(ALLOWED_PORTS) @echo "Found available port for testing: $(FREE_PORT)" @echo @echo "Launching loolwsd..." @@ -248,6 +250,7 @@ define start_loolwsd --o:logging.file[@enable]=true --o:logging.level=trace \ --port=$(FREE_PORT) \ --pidfile=$(PID_FILE) \ + $(if $(findstring php-proxy, $(CYPRESS_INTEGRATION)),--o:net.proxy_prefix=true) \ > /dev/null 2>&1 & @$(WAIT_ON_BINARY) http://localhost:$(FREE_PORT) --timeout 6 @echo diff --git a/cypress_test/integration_tests/common/helper.js b/cypress_test/integration_tests/common/helper.js index 4ef9cd937..9c1823b81 100644 --- a/cypress_test/integration_tests/common/helper.js +++ b/cypress_test/integration_tests/common/helper.js @@ -31,18 +31,20 @@ function loadTestDocLocal(fileName, subFolder, noFileCopy) { }); // Open test document - var URI; + var URI = 'http://localhost'; + if (Cypress.env('INTEGRATION') === 'php-proxy') { + URI += '/richproxy/proxy.php?req='; + } else { + URI += ':' + Cypress.env('SERVER_PORT'); + } + if (subFolder === undefined) { - URI = 'http://localhost:'+ - Cypress.env('SERVER_PORT') + - '/loleaflet/' + + URI += '/loleaflet/' + Cypress.env('WSD_VERSION_HASH') + '/loleaflet.html?lang=en-US&file_path=file://' + Cypress.env('WORKDIR') + fileName; } else { - URI = 'http://localhost:'+ - Cypress.env('SERVER_PORT') + - '/loleaflet/' + + URI += '/loleaflet/' + Cypress.env('WSD_VERSION_HASH') + '/loleaflet.html?lang=en-US&file_path=file://' + Cypress.env('WORKDIR') + subFolder + '/' + fileName; @@ -192,6 +194,11 @@ function loadTestDoc(fileName, subFolder, noFileCopy) { // Wait for the document to fully load cy.get('.leaflet-tile-loaded', {timeout : Cypress.config('defaultCommandTimeout') * 2.0}); + // The client is irresponsive for some seconds after load, because of the incoming messages. + if (Cypress.env('INTEGRATION') === 'php-proxy') { + cy.wait(1); + } + // Wait for the sidebar to open. doIfOnDesktop(function() { // sometimes sidebar fails to open @@ -360,11 +367,16 @@ function afterAll(fileName) { .should('not.exist'); } - } else if (Cypress.env('SERVER_PORT') === 9979) { + } else if (Cypress.env('SERVER_PORT') === 9979 || Cypress.env('INTEGRATION') === 'php-proxy') { // Make sure that the document is closed - cy.visit('http://admin:admin@localhost:' + - Cypress.env('SERVER_PORT') + - '/loleaflet/dist/admin/admin.html'); + if (Cypress.env('INTEGRATION') === 'php-proxy') { + cy.visit('http://admin:admin@localhost/richproxy/proxy.php?req=' + + '/loleaflet/dist/admin/admin.html'); + } else { + cy.visit('http://admin:admin@localhost:' + + Cypress.env('SERVER_PORT') + + '/loleaflet/dist/admin/admin.html'); + } cy.wait(5000); } else { diff --git a/cypress_test/support/index.js b/cypress_t
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/conditio.hxx |8 sc/inc/validat.hxx|8 sc/source/core/data/conditio.cxx | 24 sc/source/core/data/validat.cxx | 10 +- sc/source/filter/excel/xicontent.cxx |4 ++-- sc/source/filter/oox/condformatbuffer.cxx | 12 ++-- 6 files changed, 33 insertions(+), 33 deletions(-) New commits: commit 0ba320d6a0a7a63c790384e295281c08bce929b2 Author: Caolán McNamara AuthorDate: Mon Sep 14 12:40:03 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 15:45:04 2020 +0200 ScCondFormatEntry ScDocument* arg always dereferenced Change-Id: I6a5c930b7f59b877fab479f7dc4228a0658c0e08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102739 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx index cd49a361a324..364538749910 100644 --- a/sc/inc/conditio.hxx +++ b/sc/inc/conditio.hxx @@ -355,10 +355,10 @@ public: Type eType = Type::Condition ); ScConditionEntry( ScConditionMode eOper, const ScTokenArray* pArr1, const ScTokenArray* pArr2, -ScDocument* pDocument, const ScAddress& rPos ); +ScDocument& rDocument, const ScAddress& rPos ); ScConditionEntry( const ScConditionEntry& r ); // flat copy of formulas // true copy of formulas (for Ref-Undo): -ScConditionEntry( ScDocument* pDocument, const ScConditionEntry& r ); +ScConditionEntry( ScDocument& rDocument, const ScConditionEntry& r ); virtual ~ScConditionEntry() override; boolIsEqual( const ScFormatEntry& r, bool bIgnoreSrcPos ) const override; @@ -463,10 +463,10 @@ public: Type eType = Type::Condition); ScCondFormatEntry( ScConditionMode eOper, const ScTokenArray* pArr1, const ScTokenArray* pArr2, -ScDocument* pDocument, const ScAddress& rPos, +ScDocument& rDocument, const ScAddress& rPos, const OUString& rStyle ); ScCondFormatEntry( const ScCondFormatEntry& r ); -ScCondFormatEntry( ScDocument* pDocument, const ScCondFormatEntry& r ); +ScCondFormatEntry( ScDocument& rDocument, const ScCondFormatEntry& r ); virtual ~ScCondFormatEntry() override; boolIsEqual( const ScFormatEntry& r, bool bIgnoreSrcPos ) const override; diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx index 36b3ee5a1584..e42b0b3f018b 100644 --- a/sc/inc/validat.hxx +++ b/sc/inc/validat.hxx @@ -89,15 +89,15 @@ public: formula::FormulaGrammar::Grammar eGrammar2 = formula::FormulaGrammar::GRAM_DEFAULT ); ScValidationData( ScValidationMode eMode, ScConditionMode eOper, const ScTokenArray* pArr1, const ScTokenArray* pArr2, -ScDocument* pDocument, const ScAddress& rPos ); +ScDocument& rDocument, const ScAddress& rPos ); ScValidationData( const ScValidationData& r ); -ScValidationData( ScDocument* pDocument, const ScValidationData& r ); +ScValidationData( ScDocument& rDocument, const ScValidationData& r ); virtual ~ScValidationData() override; ScValidationData* Clone() const // real copy -{ return new ScValidationData( GetDocument(), *this ); } +{ return new ScValidationData( *GetDocument(), *this ); } ScValidationData* Clone(ScDocument* pNew) const override -{ return new ScValidationData( pNew, *this ); } +{ return new ScValidationData( *pNew, *this ); } voidResetInput(); voidResetError(); diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index b3089a4053a2..bd239fc84fe4 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -202,8 +202,8 @@ ScConditionEntry::ScConditionEntry( const ScConditionEntry& r ) : // Formula cells are created at IsValid } -ScConditionEntry::ScConditionEntry( ScDocument* pDocument, const ScConditionEntry& r ) : -ScFormatEntry(pDocument), +ScConditionEntry::ScConditionEntry( ScDocument& rDocument, const ScConditionEntry& r ) : +ScFormatEntry(&rDocument), eOp(r.eOp), nOptions(r.nOptions), nVal1(r.nVal1), @@ -221,7 +221,7 @@ ScConditionEntry::ScConditionEntry( ScDocument* pDocument, const ScConditionEntr bRelRef1(r.bRelRef1), bRelRef2(r.bRelRef2), bFirstRun(true), -mpListener(new ScFormulaListener(*pDocument)), +mpListener(new ScFormulaListener(rDocument)),
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/control/Control.MobileWizard.js | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) New commits: commit 18d9de88f9c9d4813245bf1d156d5fd2722e6860 Author: Pranam Lashkari AuthorDate: Thu Sep 10 07:17:43 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:46:59 2020 +0200 leaflet: optimized the changing levels in wizard going up in wizards which has huge contect (i.e: function in calc) was very slow because animation performed on all the elements of the same class but needed to perform it on the sblings only Change-Id: I1db86492cc3ee7513efa44ccf08a0d15853364fd Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102350 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 853dfe333..f5677ee73 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -178,7 +178,7 @@ L.Control.MobileWizard = L.Control.extend({ $('#mobile-wizard-tabs').hide(); } - var titles = '.ui-header.level-' + this.getCurrentLevel() + '.mobile-wizard'; + var titles = '.ui-header.level-' + this.getCurrentLevel() + '.mobile-wizard:visible'; if (animate) $(titles).hide('slide', { direction: 'left' }, 'fast'); @@ -227,11 +227,18 @@ L.Control.MobileWizard = L.Control.extend({ else this._setTitle(this._mainTitle); - $('.ui-content.level-' + this._currentDepth + '.mobile-wizard').siblings().show('slide', { direction: 'left' }, 'fast'); - $('.ui-content.level-' + this._currentDepth + '.mobile-wizard').hide(); + var headers; + if (this._currentDepth === 0) { + headers = $('.ui-header.level-' + this._currentDepth + '.mobile-wizard'); + } else { + headers = $('.ui-content.level-' + this._currentDepth + '.mobile-wizard:visible').siblings() + .not('.ui-content.level-' + this._currentDepth + '.mobile-wizard'); + } + + $('.ui-content.level-' + this._currentDepth + '.mobile-wizard:visible').hide(); $('#mobile-wizard.funcwizard div#mobile-wizard-content').removeClass('showHelpBG'); $('#mobile-wizard.funcwizard div#mobile-wizard-content').addClass('hideHelpBG'); - $('.ui-header.level-' + this._currentDepth + '.mobile-wizard').show('slide', { direction: 'left' }, 'fast'); + headers.show('slide', { direction: 'left' }, 'fast'); if (this._currentDepth == 0 || (this._isTabMode && this._currentDepth == 1)) { this._inMainMenu = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: 2 commits - cypress_test/integration_tests loleaflet/src
cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js |7 +++ loleaflet/src/map/handler/Map.Scroll.js |5 - 2 files changed, 11 insertions(+), 1 deletion(-) New commits: commit fa410c77d33b5446af38fb55cc00eb053c0b4324 Author: Pranam Lashkari AuthorDate: Fri Sep 11 14:24:37 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:47:44 2020 +0200 scrolling: fixed multitouch horizontal scrolling Change-Id: I2b30be5bd2d96c4757cd4059a28fb08a702bc3ca Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102447 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/map/handler/Map.Scroll.js b/loleaflet/src/map/handler/Map.Scroll.js index 9377f2d75..3f088cd23 100644 --- a/loleaflet/src/map/handler/Map.Scroll.js +++ b/loleaflet/src/map/handler/Map.Scroll.js @@ -48,7 +48,10 @@ L.Map.Scroll = L.Handler.extend({ this._timer = setTimeout(L.bind(this._performScroll, this), left); } else { - this._vertical = 1; + if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) + this._vertical = 0; + else + this._vertical = 1; this._timer = setTimeout(L.bind(this._performScroll, this), left); } commit 03ce16f47cca5c7b7edce0cfc331ebf2c35e0d46 Author: Tamás Zolnai AuthorDate: Tue Sep 15 13:17:44 2020 +0200 Commit: Tamás Zolnai CommitDate: Tue Sep 15 15:47:26 2020 +0200 cypress: NC: fix writer page orientation test. Change-Id: I32e946388f06b3412d54c37dd556976dff362aa7 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102734 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js index 8c2d6e985..8e46bfb95 100644 --- a/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js +++ b/cypress_test/integration_tests/mobile/writer/hamburger_menu_spec.js @@ -774,6 +774,13 @@ describe('Trigger hamburger menu options.', function() { cy.get('.leaflet-tile-loaded[style=\'width: 256px; height: 256px; left: 1023px; top: 5px;\']') .should('not.exist'); + // Move the cursor to the right side of the document, + // so the new tile will be visible and loaded. + helper.typeIntoDocument('{end}'); + + cy.get('.blinking-cursor') + .should('be.visible'); + openPageWizard(); helper.clickOnIdle('#paperorientation'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/map/handler/Map.Scroll.js |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 9ca84b6fe5d0ab84d0005530eedf76f8c7342e08 Author: Pranam Lashkari AuthorDate: Fri Sep 11 14:24:37 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:47:53 2020 +0200 scrolling: fixed multitouch horizontal scrolling Change-Id: I2b30be5bd2d96c4757cd4059a28fb08a702bc3ca Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102420 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/map/handler/Map.Scroll.js b/loleaflet/src/map/handler/Map.Scroll.js index 9377f2d75..3f088cd23 100644 --- a/loleaflet/src/map/handler/Map.Scroll.js +++ b/loleaflet/src/map/handler/Map.Scroll.js @@ -48,7 +48,10 @@ L.Map.Scroll = L.Handler.extend({ this._timer = setTimeout(L.bind(this._performScroll, this), left); } else { - this._vertical = 1; + if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) + this._vertical = 0; + else + this._vertical = 1; this._timer = setTimeout(L.bind(this._performScroll, this), left); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - icon-themes/colibre icon-themes/colibre_svg
icon-themes/colibre/cmd/32/backgroundcolor.png |binary icon-themes/colibre/cmd/lc_backgroundcolor.png |binary icon-themes/colibre/cmd/sc_backgroundcolor.png |binary icon-themes/colibre_svg/cmd/32/backgroundcolor.svg |2 +- icon-themes/colibre_svg/cmd/lc_backgroundcolor.svg |2 +- icon-themes/colibre_svg/cmd/sc_backgroundcolor.svg |3 ++- 6 files changed, 4 insertions(+), 3 deletions(-) New commits: commit bfb8ea0b77fb3e34b9604e4f6e25a0d3ac4169db Author: Rizal Muttaqin AuthorDate: Tue Sep 15 12:11:00 2020 +0700 Commit: Rizal Muttaqin CommitDate: Tue Sep 15 15:47:16 2020 +0200 Colibre: tdf#134928 remove red stripe from background color icons Change-Id: If0aeb80c5307166d0db9f4f7ea34dfe2d59b9df2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102698 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin (cherry picked from commit 4ece7d97c4866b5e639caff5fb3bcec3dceceb8d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102644 diff --git a/icon-themes/colibre/cmd/32/backgroundcolor.png b/icon-themes/colibre/cmd/32/backgroundcolor.png index 3a0938d8343f..f77c60af3afd 100644 Binary files a/icon-themes/colibre/cmd/32/backgroundcolor.png and b/icon-themes/colibre/cmd/32/backgroundcolor.png differ diff --git a/icon-themes/colibre/cmd/lc_backgroundcolor.png b/icon-themes/colibre/cmd/lc_backgroundcolor.png index 805dc68667ae..49313545f54b 100644 Binary files a/icon-themes/colibre/cmd/lc_backgroundcolor.png and b/icon-themes/colibre/cmd/lc_backgroundcolor.png differ diff --git a/icon-themes/colibre/cmd/sc_backgroundcolor.png b/icon-themes/colibre/cmd/sc_backgroundcolor.png index 5d988fd3b577..0b1f4dba2345 100644 Binary files a/icon-themes/colibre/cmd/sc_backgroundcolor.png and b/icon-themes/colibre/cmd/sc_backgroundcolor.png differ diff --git a/icon-themes/colibre_svg/cmd/32/backgroundcolor.svg b/icon-themes/colibre_svg/cmd/32/backgroundcolor.svg index dc2cd7102b42..3c02f0a8615b 100644 --- a/icon-themes/colibre_svg/cmd/32/backgroundcolor.svg +++ b/icon-themes/colibre_svg/cmd/32/backgroundcolor.svg @@ -1 +1 @@ -http://www.w3.org/2000/svg";> \ No newline at end of file +http://www.w3.org/2000/svg";> \ No newline at end of file diff --git a/icon-themes/colibre_svg/cmd/lc_backgroundcolor.svg b/icon-themes/colibre_svg/cmd/lc_backgroundcolor.svg index e0b3e869b9f0..d2a52ebf19d4 100644 --- a/icon-themes/colibre_svg/cmd/lc_backgroundcolor.svg +++ b/icon-themes/colibre_svg/cmd/lc_backgroundcolor.svg @@ -1 +1 @@ -http://www.w3.org/2000/svg";> \ No newline at end of file +http://www.w3.org/2000/svg";> \ No newline at end of file diff --git a/icon-themes/colibre_svg/cmd/sc_backgroundcolor.svg b/icon-themes/colibre_svg/cmd/sc_backgroundcolor.svg index f3aed8442a7a..e9de59a1b3b0 100644 --- a/icon-themes/colibre_svg/cmd/sc_backgroundcolor.svg +++ b/icon-themes/colibre_svg/cmd/sc_backgroundcolor.svg @@ -1,2 +1,3 @@ http://www.w3.org/2000/svg";> -/&gt; \ No newline at end of file + +/&amp;gt; \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5c7937803fa03df79921667bd2121609c5696b5a Author: Shivam Kumar Singh AuthorDate: Tue Sep 15 13:33:41 2020 +0530 Commit: Rizal Muttaqin CommitDate: Tue Sep 15 15:48:19 2020 +0200 tdf#135028 Added icon for the Styles Inspector Change-Id: Ie6c5430bd43d40193297062cd546ef311e41dd15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102707 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index 3be01d081c8c..11881687f1f8 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -49,7 +49,7 @@ InspectorDeck - private:graphicrepository/cmd/lc_editglossary.png + private:graphicrepository/cmd/lc_inspectordeck.png ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/layer/AnnotationManager.js | 11 --- loleaflet/src/layer/marker/Annotation.js | 23 +++ loleaflet/src/layer/tile/ImpressTileLayer.js | 10 +++--- loleaflet/src/layer/tile/TileLayer.js|7 +-- 4 files changed, 35 insertions(+), 16 deletions(-) New commits: commit d89fc4147f23e7031d5b58f4f533187a0dc22600 Author: Pranam Lashkari AuthorDate: Fri Sep 11 08:53:19 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:49:03 2020 +0200 leaflet: annotation: use vex dialogs for annotation reply Change-Id: I171c5712fcae54b4c1c6e2a8be7dd12bd6765f0a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102413 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index 59d7ce867..d5d9f2264 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -627,9 +627,14 @@ L.AnnotationManager = L.Class.extend({ }, reply: function (annotation) { - annotation.reply(); - this.select(annotation); - annotation.focus(); + if (window.mode.isMobile() || window.mode.isTablet()) { + this._map._docLayer.newAnnotationVex(annotation, annotation._onReplyClick,/* isMod */ true, ''); + } + else { + annotation.reply(); + this.select(annotation); + annotation.focus(); + } }, resolve: function (annotation) { diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index 2d1986ef6..b5c7f3069 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -343,14 +343,21 @@ L.Annotation = L.Layer.extend({ _onReplyClick: function (e) { L.DomEvent.stopPropagation(e); - this._data.reply = this._nodeReplyText.value; - // Assigning an empty string to .innerHTML property in some browsers will convert it to 'null' - // While in browsers like Chrome and Firefox, a null value is automatically converted to '' - // Better to assign '' here instead of null to keep the behavior same for all - this._nodeReplyText.value = ''; - this.show(); - this._checkBounds(); - this._map.fire('AnnotationReply', {annotation: this}); + if (window.mode.isMobile() || window.mode.isTablet()) { + e.annotation._data.reply = e.annotation.text; + e.annotation.show(); + e.annotation._checkBounds(); + this._map.fire('AnnotationReply', {annotation: e.annotation}); + } else { + this._data.reply = this._nodeReplyText.value; + // Assigning an empty string to .innerHTML property in some browsers will convert it to 'null' + // While in browsers like Chrome and Firefox, a null value is automatically converted to '' + // Better to assign '' here instead of null to keep the behavior same for all + this._nodeReplyText.value = ''; + this.show(); + this._checkBounds(); + this._map.fire('AnnotationReply', {annotation: this}); + } }, _onResolveClick: function (e) { diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js index 9f9a3389f..22a310bc5 100644 --- a/loleaflet/src/layer/tile/ImpressTileLayer.js +++ b/loleaflet/src/layer/tile/ImpressTileLayer.js @@ -161,9 +161,13 @@ L.ImpressTileLayer = L.TileLayer.extend({ onAnnotationReply: function (annotation) { this.onAnnotationCancel(); this._selectedAnnotation = annotation._data.id; - annotation.reply(); - this.scrollUntilAnnotationIsVisible(annotation); - annotation.focus(); + if (window.mode.isMobile() || window.mode.isTablet()) { + this._map._docLayer.newAnnotationVex(annotation, annotation._onReplyClick,/* isMod */ true, ''); + } else { + annotation.reply(); + this.scrollUntilAnnotationIsVisible(annotation); + annotation.focus(); + } }, onAnnotationRemove: function (id) { diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 79b936ada..b5e4c0740 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -381,7 +381,7 @@ L.TileLayer = L.GridLayer.extend({
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/layer/AnnotationManager.js| 11 +++--- loleaflet/src/layer/AnnotationManagerImpress.js | 10 ++--- loleaflet/src/layer/marker/Annotation.js| 25 +++- loleaflet/src/layer/tile/TileLayer.js |7 -- 4 files changed, 36 insertions(+), 17 deletions(-) New commits: commit 245f797ac984c01cda85c508c44844586e9d694d Author: Pranam Lashkari AuthorDate: Fri Sep 11 08:20:29 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:48:44 2020 +0200 leaflet: annotation: use vex dialogs for annotation reply Change-Id: I171c5712fcae54b4c1c6e2a8be7dd12bd6765f0a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102412 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index 11224fd2a..e5ad6b498 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -626,9 +626,14 @@ L.AnnotationManager = L.AnnotationManagerBase.extend({ }, reply: function (annotation) { - annotation.reply(); - this.select(annotation); - annotation.focus(); + if (window.mode.isMobile() || window.mode.isTablet()) { + this._doclayer.newAnnotationVex(annotation, annotation._onReplyClick,/* isMod */ true, ''); + } + else { + annotation.reply(); + this.select(annotation); + annotation.focus(); + } }, resolve: function (annotation) { diff --git a/loleaflet/src/layer/AnnotationManagerImpress.js b/loleaflet/src/layer/AnnotationManagerImpress.js index 542f0572b..815021e9f 100644 --- a/loleaflet/src/layer/AnnotationManagerImpress.js +++ b/loleaflet/src/layer/AnnotationManagerImpress.js @@ -129,9 +129,13 @@ L.AnnotationManagerImpress = L.AnnotationManagerBase.extend({ onAnnotationReply: function (annotation) { this.onAnnotationCancel(); this._selectedAnnotation = annotation._data.id; - annotation.reply(); - this.scrollUntilAnnotationIsVisible(annotation); - annotation.focus(); + if (window.mode.isMobile() || window.mode.isTablet()) { + this._doclayer.newAnnotationVex(annotation, annotation._onReplyClick,/* isMod */ true, ''); + } else { + annotation.reply(); + this.scrollUntilAnnotationIsVisible(annotation); + annotation.focus(); + } }, onAnnotationRemove: function (id) { this.onAnnotationCancel(); diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js index bf1ca54d3..dc4f94633 100644 --- a/loleaflet/src/layer/marker/Annotation.js +++ b/loleaflet/src/layer/marker/Annotation.js @@ -361,14 +361,21 @@ L.Annotation = L.Layer.extend({ _onReplyClick: function (e) { L.DomEvent.stopPropagation(e); - this._data.reply = this._nodeReplyText.value; - // Assigning an empty string to .innerHTML property in some browsers will convert it to 'null' - // While in browsers like Chrome and Firefox, a null value is automatically converted to '' - // Better to assign '' here instead of null to keep the behavior same for all - this._nodeReplyText.value = ''; - this.show(); - this._checkBounds(); - this._map.fire('AnnotationReply', {annotation: this}); + if (window.mode.isMobile() || window.mode.isTablet()) { + e.annotation._data.reply = e.annotation.text; + e.annotation.show(); + e.annotation._checkBounds(); + this._map.fire('AnnotationReply', {annotation: e.annotation}); + } else { + this._data.reply = this._nodeReplyText.value; + // Assigning an empty string to .innerHTML property in some browsers will convert it to 'null' + // While in browsers like Chrome and Firefox, a null value is automatically converted to '' + // Better to assign '' here instead of null to keep the behavior same for all + this._nodeReplyText.value = ''; + this.show(); + this._checkBounds(); + this._map.fire('AnnotationReply', {annotation: this}); + } }, _onResolveClick: function (e) { @@ -466,7 +473,7 @@ L.Annotation = L.Layer.extend({ _updateAnnotationMarker: function () { // Make sure to place the markers only for presentations and draw documents
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.FormulaBar.js |3 ++- loleaflet/src/control/Control.PresentationBar.js |3 ++- loleaflet/src/control/Control.SearchBar.js |3 ++- loleaflet/src/control/Control.SheetsBar.js |3 ++- loleaflet/src/control/Control.SigningBar.js |3 ++- loleaflet/src/control/Control.StatusBar.js |3 ++- loleaflet/src/control/Control.TopToolbar.js |3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) New commits: commit 40a67b00a20132d85a25d3bbf5b525e21edf9b80 Author: Pranam Lashkari AuthorDate: Sat Sep 12 11:23:28 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:49:26 2020 +0200 leaflet: disable tooltip in mobile and tablet Change-Id: I591b2392d6c7072144bd7229a60933c61a2f3241 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102506 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.FormulaBar.js b/loleaflet/src/control/Control.FormulaBar.js index b58353d82..a4d666009 100644 --- a/loleaflet/src/control/Control.FormulaBar.js +++ b/loleaflet/src/control/Control.FormulaBar.js @@ -42,7 +42,8 @@ L.Control.FormulaBar = L.Control.extend({ $('#addressInput').off('keyup', that.onAddressInput.bind(that)).on('keyup', that.onAddressInput.bind(that)); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['formulabar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.PresentationBar.js b/loleaflet/src/control/Control.PresentationBar.js index 2adcf2eae..26076245b 100644 --- a/loleaflet/src/control/Control.PresentationBar.js +++ b/loleaflet/src/control/Control.PresentationBar.js @@ -42,7 +42,8 @@ L.Control.PresentationBar = L.Control.extend({ window.hideTooltip(this, e.target); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function() { w2ui['presentation-toolbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SearchBar.js b/loleaflet/src/control/Control.SearchBar.js index 1025d39cf..a4d82f445 100644 --- a/loleaflet/src/control/Control.SearchBar.js +++ b/loleaflet/src/control/Control.SearchBar.js @@ -38,7 +38,8 @@ L.Control.SearchBar = L.Control.extend({ window.setupSearchInput(); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['searchbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SheetsBar.js b/loleaflet/src/control/Control.SheetsBar.js index d3a6012e9..a67e425e7 100644 --- a/loleaflet/src/control/Control.SheetsBar.js +++ b/loleaflet/src/control/Control.SheetsBar.js @@ -35,7 +35,8 @@ L.Control.SheetsBar = L.Control.extend({ window.hideTooltip(this, e.target); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['spreadsheet-toolbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SigningBar.js b/loleaflet/src/control/Control.SigningBar.js index c31d90ee4..acffbd77f 100644 --- a/loleaflet/src/control/Control.SigningBar.js +++ b/loleaflet/src/control/Control.SigningBar.js @@ -27,7 +27,8 @@ L.Control.SigningBar = L.Control.extend({ onRefresh: function() { } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function() { w2ui['document-signing-bar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.StatusBar.js b/loleaflet/src/control/Control.StatusBar.js index 67752f432..29a844e9f 100644 --- a/loleaflet/src/control/Control.StatusBar.js +++ b/loleaflet/src/control/Control.StatusBar.js @@ -238,7 +238,8 @@ L.Control.StatusBar = L.Control.extend({ window.setupSearchInput(); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.show();
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/control/Control.FormulaBar.js |3 ++- loleaflet/src/control/Control.PresentationBar.js |3 ++- loleaflet/src/control/Control.SearchBar.js |3 ++- loleaflet/src/control/Control.SheetsBar.js |3 ++- loleaflet/src/control/Control.SigningBar.js |3 ++- loleaflet/src/control/Control.StatusBar.js |3 ++- loleaflet/src/control/Control.TopToolbar.js |3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) New commits: commit a6194dd3e2d6edd460c2f84b9ad829883eace5c5 Author: Pranam Lashkari AuthorDate: Sat Sep 12 11:23:28 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:49:46 2020 +0200 leaflet: disable tooltip in mobile and tablet Change-Id: I591b2392d6c7072144bd7229a60933c61a2f3241 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102429 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.FormulaBar.js b/loleaflet/src/control/Control.FormulaBar.js index b58353d82..a4d666009 100644 --- a/loleaflet/src/control/Control.FormulaBar.js +++ b/loleaflet/src/control/Control.FormulaBar.js @@ -42,7 +42,8 @@ L.Control.FormulaBar = L.Control.extend({ $('#addressInput').off('keyup', that.onAddressInput.bind(that)).on('keyup', that.onAddressInput.bind(that)); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['formulabar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.PresentationBar.js b/loleaflet/src/control/Control.PresentationBar.js index 2adcf2eae..26076245b 100644 --- a/loleaflet/src/control/Control.PresentationBar.js +++ b/loleaflet/src/control/Control.PresentationBar.js @@ -42,7 +42,8 @@ L.Control.PresentationBar = L.Control.extend({ window.hideTooltip(this, e.target); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function() { w2ui['presentation-toolbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SearchBar.js b/loleaflet/src/control/Control.SearchBar.js index 1025d39cf..a4d82f445 100644 --- a/loleaflet/src/control/Control.SearchBar.js +++ b/loleaflet/src/control/Control.SearchBar.js @@ -38,7 +38,8 @@ L.Control.SearchBar = L.Control.extend({ window.setupSearchInput(); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['searchbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SheetsBar.js b/loleaflet/src/control/Control.SheetsBar.js index d3a6012e9..a67e425e7 100644 --- a/loleaflet/src/control/Control.SheetsBar.js +++ b/loleaflet/src/control/Control.SheetsBar.js @@ -35,7 +35,8 @@ L.Control.SheetsBar = L.Control.extend({ window.hideTooltip(this, e.target); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function(e) { w2ui['spreadsheet-toolbar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.SigningBar.js b/loleaflet/src/control/Control.SigningBar.js index c31d90ee4..acffbd77f 100644 --- a/loleaflet/src/control/Control.SigningBar.js +++ b/loleaflet/src/control/Control.SigningBar.js @@ -27,7 +27,8 @@ L.Control.SigningBar = L.Control.extend({ onRefresh: function() { } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.bind('touchstart', function() { w2ui['document-signing-bar'].touchStarted = true; diff --git a/loleaflet/src/control/Control.StatusBar.js b/loleaflet/src/control/Control.StatusBar.js index 98ec5cd55..fd0b9b0aa 100644 --- a/loleaflet/src/control/Control.StatusBar.js +++ b/loleaflet/src/control/Control.StatusBar.js @@ -238,7 +238,8 @@ L.Control.StatusBar = L.Control.extend({ window.setupSearchInput(); } }); - toolbar.tooltip(); + if (window.mode.isDesktop()) + toolbar.tooltip(); toolbar.show();
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/control/Control.Menubar.js | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit 064d28077aa2b8359acbcc3feb86143a949bab42 Author: Pranam Lashkari AuthorDate: Tue Sep 15 17:38:15 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 15:50:59 2020 +0200 leaflet: removed bogus menu items in Draw menu Change-Id: I055cb3cb08b7f91d35602ee33c6b799048950134 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102651 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 92d84430b..2800a800f 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -283,15 +283,15 @@ L.Control.Menubar = L.Control.extend({ {name: _UNO('.uno:ZoomPlus', 'presentation'), id: 'zoomin', type: 'action'}, {name: _UNO('.uno:ZoomMinus', 'presentation'), id: 'zoomout', type: 'action'}, {name: _('Reset zoom'), id: 'zoomreset', type: 'action'}, - {type: 'separator'}, - {uno: '.uno:SlideMasterPage'}, - {type: 'separator'}, - {uno: '.uno:ModifyPage'}, - {uno: '.uno:SlideChangeWindow'}, - {uno: '.uno:CustomAnimation'}, - {uno: '.uno:MasterSlidesPanel'}, - {type: 'separator'}, - {uno: '.uno:Sidebar'}] + {type: 'separator', drawing: false}, + {uno: '.uno:SlideMasterPage', drawing: false}, + {type: 'separator', drawing: false}, + {uno: '.uno:ModifyPage', drawing: false}, + {uno: '.uno:SlideChangeWindow', drawing: false}, + {uno: '.uno:CustomAnimation', drawing: false}, + {uno: '.uno:MasterSlidesPanel', drawing: false}, + {type: 'separator', drawing: false}, + {uno: '.uno:Sidebar', drawing: false}] }, {name: _UNO('.uno:InsertMenu', 'presentation'), id: 'insert', type: 'menu', menu: [ {name: _('Local Image...'), id: 'insertgraphic', type: 'action'}, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - chart2/qa chart2/source
chart2/qa/extras/chart2import.cxx | 26 ++ chart2/qa/extras/data/xlsx/tdf134225.xlsx |binary chart2/source/view/charttypes/PieChart.cxx | 14 +- 3 files changed, 27 insertions(+), 13 deletions(-) New commits: commit a2d2822bb55c9ff5c48898062a0e66f9251631d3 Author: Balazs Varga AuthorDate: Tue Jun 23 15:02:59 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 15:54:18 2020 +0200 tdf#134225 Chart view: fix moved date label outside from pie chart. Do not need to check the sector size of a pie slice, before best fit algorithm, so we can use the CENTER position as a start position of BEST_FIT. Completion of c66cb6d6e4a843dc7c7d06e1c2c0723a6ff85fc5 (tdf#134029 Chart view: enable to move data label) Change-Id: Ie1a53784e7df2887282155113bf8bb607cdb09e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96945 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 57fedb272cfcad3436142dbe9eac2870e3c3e3d2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100054 Reviewed-by: Xisco Fauli diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 3e0704c876ae..5a896f89a18d 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -161,6 +161,7 @@ public: void testTdf119138MissingAutoTitleDeleted(); void testStockChartShiftedCategoryPosition(); void testTdf133376(); +void testTdf134225(); void testTdf91250(); CPPUNIT_TEST_SUITE(Chart2ImportTest); @@ -271,6 +272,7 @@ public: CPPUNIT_TEST(testTdf119138MissingAutoTitleDeleted); CPPUNIT_TEST(testStockChartShiftedCategoryPosition); CPPUNIT_TEST(testTdf133376); +CPPUNIT_TEST(testTdf134225); CPPUNIT_TEST(testTdf91250); CPPUNIT_TEST_SUITE_END(); @@ -2527,6 +2529,30 @@ void Chart2ImportTest::testTdf133376() CPPUNIT_ASSERT_DOUBLES_EQUAL(5269, aLabelPosition.Y, 30); } +void Chart2ImportTest::testTdf134225() +{ +load("/chart2/qa/extras/data/xlsx/", "tdf134225.xlsx"); +Reference xChartDoc(getChartDocFromSheet(0, mxComponent), +UNO_QUERY_THROW); + +Reference xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW); +Reference xDrawPage(xDrawPageSupplier->getDrawPage(), UNO_SET_THROW); +Reference xShapes(xDrawPage->getByIndex(0), UNO_QUERY_THROW); +Reference xDataPointLabel1(getShapeByName(xShapes, +"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=0"), UNO_SET_THROW); +CPPUNIT_ASSERT(xDataPointLabel1.is()); +awt::Point aLabelPosition1 = xDataPointLabel1->getPosition(); + +Reference xDataPointLabel2(getShapeByName(xShapes, +"CID/MultiClick/CID/D=0:CS=0:CT=0:Series=0:DataLabels=:DataLabel=1"), UNO_SET_THROW); +CPPUNIT_ASSERT(xDataPointLabel2.is()); +awt::Point aLabelPosition2 = xDataPointLabel2->getPosition(); + +// Check the distance between the position of the 1st data point label and the second one +CPPUNIT_ASSERT_DOUBLES_EQUAL(1800, sal_Int32(aLabelPosition2.X - aLabelPosition1.X), 200); +CPPUNIT_ASSERT_DOUBLES_EQUAL(2123, sal_Int32(aLabelPosition2.Y - aLabelPosition1.Y), 200); +} + void Chart2ImportTest::testTdf91250() { load("/chart2/qa/extras/data/docx/", "tdf91250.docx"); diff --git a/chart2/qa/extras/data/xlsx/tdf134225.xlsx b/chart2/qa/extras/data/xlsx/tdf134225.xlsx new file mode 100644 index ..ae7bdc66e302 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf134225.xlsx differ diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 9032b40977f1..5ab60729cf93 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -294,19 +294,7 @@ void PieChart::createTextLabelShape( //AVOID_OVERLAP is in fact "Best fit" in the UI. bool bMovementAllowed = ( nLabelPlacement == css::chart::DataLabelPlacement::AVOID_OVERLAP ); if( bMovementAllowed ) -{ -// Use center for "Best fit" for now. In the future we -// may want to implement a real best fit algorithm. -// But center is good enough, and close to what Excel -// does. - -// Place the label outside if the sector is too small -// The threshold is set to 2%, but can be improved by making it a function of -// label width and radius too ? -double fFrac = fabs( nVal / rParam.mfLogicYSum ); -nLabelPlacement = ( fFrac <= 0.02 ) ? css::chart::DataLabelPlacement::OUTSIDE : -css::chart::DataLabelPlacement::CENTER; -} +nLabelPlacement = css::chart::DataLabelPlacement::CENTER; ///for `OUTSIDE` (`INSIDE`) label placements an offset of 150 (-150), in the ///radius direction, is added to the final screen position of the label ___ Libreoffice-commits mailing list libreoffic
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/control/Control.ColumnHeader.js |2 +- loleaflet/src/control/Control.RowHeader.js|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 6faef8a61c610656ca6eafe00251d0b88977 Author: thais-dev AuthorDate: Tue Sep 1 07:22:23 2020 -0300 Commit: Andras Timar CommitDate: Tue Sep 15 15:57:39 2020 +0200 Loleaflet: add time value for the context menu of header be in sync with the context menu of the cells. Change-Id: I3f228e57375b10671b98de1a1444af87e8b2ed38 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101924 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Reviewed-by: Aron Budea (cherry picked from commit e32fc7981e3fffe218d6211929b11a6d1b6f9ad6) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102418 Reviewed-by: Andras Timar diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index a18b707bd..4c7dc5372 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -99,7 +99,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({ }); } else { var menuData = L.Control.JSDialogBuilder.getMenuStructureForMobileWizard(this._menuItem, true, ''); - (new Hammer(this._canvas, {recognizers: [[Hammer.Press]]})) + (new Hammer(this._canvas, {recognizers: [[Hammer.Press, {time: 500}]]})) .on('press', L.bind(function () { if (this._map.isPermissionEdit()) { window.contextMenuWizard = true; diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js index 27a681f18..6cdc82a45 100644 --- a/loleaflet/src/control/Control.RowHeader.js +++ b/loleaflet/src/control/Control.RowHeader.js @@ -96,7 +96,7 @@ L.Control.RowHeader = L.Control.Header.extend({ }); } else { var menuData = L.Control.JSDialogBuilder.getMenuStructureForMobileWizard(this._menuItem, true, ''); - (new Hammer(this._canvas, {recognizers: [[Hammer.Press]]})) + (new Hammer(this._canvas, {recognizers: [[Hammer.Press, {time: 500}]]})) .on('press', L.bind(function () { if (this._map.isPermissionEdit()) { window.contextMenuWizard = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) New commits: commit c5080207a83bef2013d76b1f39c7761c99efa8fc Author: Miklos Vajna AuthorDate: Mon Jul 20 11:36:13 2020 +0200 Commit: Gabor Kelemen CommitDate: Tue Sep 15 16:16:20 2020 +0200 tdf#50879 PDF export: ensure only built-in fonts are used for forms Alternative would be to embed the whole font, which is unusual: PDF typically just embeds the used subset. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99032 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 6294ecd7b4da38de98b24ddfb9f201cef98c1f41) Change-Id: Ic0b7e121b3ae38804c1a396ea36104ebcc0b9588 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102653 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index a2a3f5ca9a5b..a5feebb54675 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3618,6 +3618,13 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font& sal_Int32 PDFWriterImpl::getBestBuildinFont( const vcl::Font& rFont ) { sal_Int32 nBest = 4; // default to Helvetica + +if (rFont.GetFamilyType() == FAMILY_ROMAN) +{ +// Serif: default to Times-Roman. +nBest = 8; +} + OUString aFontName( rFont.GetFamilyName() ); aFontName = aFontName.toAsciiLowerCase(); @@ -3764,14 +3771,14 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit // prepare font to use, draw field border Font aFont = drawFieldBorder( rEdit, rWidget, rSettings ); -sal_Int32 nBest = getSystemFont( aFont ); +// Get the built-in font which is closest to aFont. +sal_Int32 nBest = getBestBuildinFont(aFont); // prepare DA string OStringBuffer aDA( 32 ); appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetFieldTextColor() ), aDA ); aDA.append( ' ' ); -aDA.append( "/F" ); -aDA.append( nBest ); +aDA.append(pdf::BuildinFontFace::Get(nBest).getNameObject()); OStringBuffer aDR( 32 ); aDR.append( "/Font " ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/control/Control.Menubar.js |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit f29a261ba8e3fa28973bb5660fe90583deb52724 Author: Pedro Pinto Silva AuthorDate: Mon Sep 14 16:03:10 2020 +0200 Commit: Pedro Silva CommitDate: Tue Sep 15 16:17:58 2020 +0200 Mobile: Menu bar: Fix absent document-header on read-only documents Change-Id: Icd23f8236cfd7d72335b0cc295d62fb979090512 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102645 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 2800a800f..a97ba8430 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -854,11 +854,8 @@ L.Control.Menubar = L.Control.extend({ }); $('#main-menu').attr('tabindex', 0); - // The _createFileIcon function shows the Collabora logo in the iOS app case, no - // need to delay that until the document has been made editable. - if (window.ThisIsTheiOSApp || !this._map.isPermissionReadOnly()) { - this._createFileIcon(); - } + + this._createFileIcon(); }, _onStyleMenu: function (e) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/rangenam.hxx |2 +- sc/source/core/tool/rangenam.cxx |6 +++--- sc/source/ui/docshell/docfunc.cxx |2 +- 3 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 587a0c682308bb63462d4d8074d59f6fa8a9a51d Author: Caolán McNamara AuthorDate: Mon Sep 14 15:17:27 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 16:45:27 2020 +0200 ScRangeData::MakeValidName never passed a null ScDocument* Change-Id: I8decd37658133d4bbe44703e430cb74946483ee8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102741 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index 3239031dc5ab..5d8ba1be6773 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -153,7 +153,7 @@ public: voidValidateTabRefs(); -static void MakeValidName( const ScDocument* pDoc, OUString& rName ); +static void MakeValidName( const ScDocument& rDoc, OUString& rName ); SC_DLLPUBLIC static IsNameValidType IsNameValid( const OUString& rName, const ScDocument* pDoc ); diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 93037c73b538..a02191038db2 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -419,7 +419,7 @@ void ScRangeData::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nLocal aPos.SetTab(rCxt.getNewTab(aPos.Tab())); } -void ScRangeData::MakeValidName( const ScDocument* pDoc, OUString& rName ) +void ScRangeData::MakeValidName( const ScDocument& rDoc, OUString& rName ) { // strip leading invalid characters @@ -451,8 +451,8 @@ void ScRangeData::MakeValidName( const ScDocument* pDoc, OUString& rName ) ScAddress::Details details( static_cast( nConv ) ); // Don't check Parse on VALID, any partial only VALID may result in // #REF! during compile later! -while (aRange.Parse(rName, pDoc, details) != ScRefFlags::ZERO || -aAddr.Parse(rName, pDoc, details) != ScRefFlags::ZERO) +while (aRange.Parse(rName, &rDoc, details) != ScRefFlags::ZERO || +aAddr.Parse(rName, &rDoc, details) != ScRefFlags::ZERO) { // Range Parse is partially valid also with invalid sheet name, // Address Parse ditto, during compile name would generate a #REF! diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 2d60e831cef8..ab353c1699f1 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -5208,7 +5208,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, return; OUString aName = rDoc.GetString(nPosX, nPosY, nTab); -ScRangeData::MakeValidName(&rDoc, aName); +ScRangeData::MakeValidName(rDoc, aName); if (aName.isEmpty()) return; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/qa sc/source
sc/inc/reffind.hxx |4 ++-- sc/qa/unit/ucalc.cxx|8 sc/source/core/tool/reffind.cxx | 12 ++-- sc/source/ui/view/editsh.cxx|2 +- sc/source/ui/view/viewfun4.cxx |2 +- 5 files changed, 14 insertions(+), 14 deletions(-) New commits: commit cf301f5e1a8a3f8617c76c627042f20322673bdb Author: Caolán McNamara AuthorDate: Mon Sep 14 15:27:11 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 16:45:46 2020 +0200 ScRefFinder ScDocument* argument dereferenced on all paths Change-Id: I0e78a9b286dbd8e9a4acbd411f556b6eea0ec1ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102742 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/reffind.hxx b/sc/inc/reffind.hxx index 9cb3bd00b924..9defa2986a8b 100644 --- a/sc/inc/reffind.hxx +++ b/sc/inc/reffind.hxx @@ -28,7 +28,7 @@ class ScRefFinder { OUString maFormula; formula::FormulaGrammar::AddressConvention meConv; -ScDocument* mpDoc; +ScDocument& mrDoc; ScAddress maPos; sal_Int32 mnFound; sal_Int32 mnSelStart; @@ -36,7 +36,7 @@ class ScRefFinder public: ScRefFinder( -const OUString& rFormula, const ScAddress& rPos, ScDocument* pDoc, +const OUString& rFormula, const ScAddress& rPos, ScDocument& rDoc, formula::FormulaGrammar::AddressConvention eConvP = formula::FormulaGrammar::CONV_OOO ); ~ScRefFinder(); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index d79146f92a86..bfb741b07166 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -2959,7 +2959,7 @@ void Test::testToggleRefFlag() OUString aFormula("=B100"); ScAddress aPos(1, 5, 0); -ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_OOO); +ScRefFinder aFinder(aFormula, aPos, *m_pDoc, formula::FormulaGrammar::CONV_OOO); // Original CPPUNIT_ASSERT_EQUAL_MESSAGE("Does not equal the original text.", aFormula, aFinder.GetText()); @@ -2990,7 +2990,7 @@ void Test::testToggleRefFlag() OUString aFormula("=R2C1"); ScAddress aPos(3, 5, 0); -ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_XL_R1C1); +ScRefFinder aFinder(aFormula, aPos, *m_pDoc, formula::FormulaGrammar::CONV_XL_R1C1); // Original CPPUNIT_ASSERT_EQUAL_MESSAGE("Does not equal the original text.", aFormula, aFinder.GetText()); @@ -3021,7 +3021,7 @@ void Test::testToggleRefFlag() // overlap the formula string at all (inspired by fdo#39135). OUString aFormula("=R1C1"); ScAddress aPos(1, 1, 0); -ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_XL_R1C1); +ScRefFinder aFinder(aFormula, aPos, *m_pDoc, formula::FormulaGrammar::CONV_XL_R1C1); // Original CPPUNIT_ASSERT_EQUAL(aFormula, aFinder.GetText()); @@ -3055,7 +3055,7 @@ void Test::testToggleRefFlag() // Calc A1: OUString aFormula("=A1+4"); ScAddress aPos(1, 1, 0); -ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_OOO); +ScRefFinder aFinder(aFormula, aPos, *m_pDoc, formula::FormulaGrammar::CONV_OOO); // Original CPPUNIT_ASSERT_EQUAL(aFormula, aFinder.GetText()); diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx index 07d658ceb464..b4e7ea49eddf 100644 --- a/sc/source/core/tool/reffind.cxx +++ b/sc/source/core/tool/reffind.cxx @@ -204,10 +204,10 @@ void ExpandToText(const sal_Unicode* p, sal_Int32 nLen, sal_Int32& rStartPos, sa ScRefFinder::ScRefFinder( const OUString& rFormula, const ScAddress& rPos, -ScDocument* pDoc, formula::FormulaGrammar::AddressConvention eConvP) : +ScDocument& rDoc, formula::FormulaGrammar::AddressConvention eConvP) : maFormula(rFormula), meConv(eConvP), -mpDoc(pDoc), +mrDoc(rDoc), maPos(rPos), mnFound(0), mnSelStart(0), @@ -269,7 +269,7 @@ void ScRefFinder::ToggleRel( sal_Int32 nStartPos, sal_Int32 nEndPos ) // Check the validity of the expression, and toggle the relative flag. ScAddress::Details aDetails(meConv, maPos.Row(), maPos.Col()); ScAddress::ExternalInfo aExtInfo; -ScRefFlags nResult = aAddr.Parse(aExpr, mpDoc, aDetails, &aExtInfo); +ScRefFlags nResult = aAddr.Parse(aExpr, &mrDoc, aDetails, &aExtInfo); if ( nResult & ScRefFlags::VALID ) { ScRefFlags nFlags; @@ -292,10 +292,10 @@ void ScRefFinder::ToggleRel( sal_Int32 nStartPos, sal_Int32 nEndPos ) { OUString aRef = aExpr.copy(nSep+1); OUString aExtDocNameTabName = aExpr.copy(0, nSep+1); -nResult = aAddr.Parse(aRef, mpDoc, aDetails); +nResult = aAddr.Parse(aRef, &mrDoc, aDetails); aAddr.SetTab(0); // force to
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/qa sw/source
sw/qa/extras/ooxmlexport/data/tdf131420.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport12.cxx |6 ++ sw/source/filter/ww8/docxattributeoutput.cxx |2 ++ 3 files changed, 8 insertions(+) New commits: commit 589ae9b70346e3fae768c4e7aafbc7c504861987 Author: Tibor Nagy AuthorDate: Mon Aug 10 10:51:20 2020 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 15 16:54:41 2020 +0200 tdf#131420 DOCX export: fix missing border of frame Co-authored-by: Attila Szűcs (NISZ) Change-Id: If6ce28aab938eaf22fe578f8880e139b7b4eb22c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100418 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 49e2bd6103669ca94d4e308fc08beed57f85c7e2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102754 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/data/tdf131420.docx b/sw/qa/extras/ooxmlexport/data/tdf131420.docx new file mode 100644 index ..3600735245af Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf131420.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index 15ae1de673ce..1ae45cb04183 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -1069,6 +1069,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116883, "tdf116883.docx") } } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131420, "tdf131420.docx") +{ +xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml"); +assertXPath(pXmlDocument, "/w:document/w:body/w:p/w:pPr/w:pBdr[2]"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 9dc7a4122ec2..329dc349431c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1240,10 +1240,12 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar if (!m_bWritingHeaderFooter && m_pCurrentFrame) { const SwFrameFormat& rFrameFormat = m_pCurrentFrame->GetFrameFormat(); +const SvxBoxItem& rBox = rFrameFormat.GetBox(); if (TextBoxIsFramePr(rFrameFormat)) { const Size aSize = m_pCurrentFrame->GetSize(); PopulateFrameProperties(&rFrameFormat, aSize); +FormatBox(rBox); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: cypress_test/integration_tests
cypress_test/integration_tests/mobile/calc/alignment_options_spec.js | 25 - cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js| 27 +- 2 files changed, 27 insertions(+), 25 deletions(-) New commits: commit 8899b587459910e6b08253f04b23d2ca1c69c453 Author: Tamás Zolnai AuthorDate: Tue Sep 15 14:30:53 2020 +0200 Commit: Tamás Zolnai CommitDate: Tue Sep 15 17:05:14 2020 +0200 cypress: php-proxy: fix text wraping test. It could fail without php-proy too, but php-proxy slows things down and makes this issue more visible. Change-Id: I6bda9bfd195b28c797b0690e05cddf3f0ee98e12 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102750 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js index e90368bf0..39c5e29d5 100644 --- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js +++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js @@ -5,6 +5,8 @@ var calcHelper = require('../../common/calc_helper'); var mobileHelper = require('../../common/mobile_helper'); var calcMobileHelper = require('./calc_mobile_helper'); +require('cypress-wait-until'); + describe('Change alignment settings.', function() { var testFileName = 'alignment_options.ods'; @@ -273,18 +275,17 @@ describe('Change alignment settings.', function() { .should('have.prop', 'checked', true); // We use the text position as indicator - cy.get('body') - .should(function() { - getTextPosForFirstCell(); - - cy.get('@currentTextPos') - .then(function(currentTextPos) { - cy.get('@originalTextPos') - .then(function(originalTextPos) { - expect(originalTextPos).to.be.greaterThan(currentTextPos); - }); - }); - }); + cy.waitUntil(function() { + getTextPosForFirstCell(); + + return cy.get('@currentTextPos') + .then(function(currentTextPos) { + return cy.get('@originalTextPos') + .then(function(originalTextPos) { + return originalTextPos > currentTextPos; + }); + }); + }); }); it('Apply stacked option.', function() { diff --git a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js index a94993ed6..dcbcdb870 100644 --- a/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js +++ b/cypress_test/integration_tests/mobile/calc/bottom_toolbar_spec.js @@ -1,10 +1,12 @@ -/* global describe it cy require expect afterEach */ +/* global describe it cy require afterEach */ var helper = require('../../common/helper'); var calcHelper = require('../../common/calc_helper'); var mobileHelper = require('../../common/mobile_helper'); var calcMobileHelper = require('./calc_mobile_helper'); +require('cypress-wait-until'); + describe('Interact with bottom toolbar.', function() { var testFileName; @@ -203,18 +205,17 @@ describe('Interact with bottom toolbar.', function() { .click(); // We use the text position as indicator - cy.get('body') - .should(function() { - getTextPosForFirstCell(); - - cy.get('@currentTextPos') - .then(function(currentTextPos) { - cy.get('@originalTextPos') - .then(function(originalTextPos) { - expect(originalTextPos).to.be.greaterThan(currentTextPos); - }); - }); - }); + cy.waitUntil(function() { + getTextPosForFirstCell(); + + return cy.get('@currentTextPos') + .then(function(currentTextPos) { + return cy.get('@originalTextPos') + .then(function(originalTextPos
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/oox oox/source sd/qa
include/oox/core/xmlfilterbase.hxx |8 ++ include/oox/drawingml/shape.hxx |8 ++ oox/source/core/xmlfilterbase.cxx |8 ++ oox/source/drawingml/diagram/diagram.cxx|9 ++- oox/source/drawingml/diagram/diagram.hxx| 14 +++-- oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 26 + oox/source/drawingml/diagram/diagramlayoutatoms.hxx | 12 ++-- oox/source/drawingml/shape.cxx | 55 oox/source/ppt/pptshape.cxx | 13 sd/qa/unit/data/pptx/smartart-autofit-sync.pptx |binary sd/qa/unit/import-tests-smartart.cxx| 30 ++ 11 files changed, 172 insertions(+), 11 deletions(-) New commits: commit 6a6a8f25f8c75f1220b66c4071d1739ced7c80b4 Author: Miklos Vajna AuthorDate: Fri Sep 11 17:30:27 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 17:21:51 2020 +0200 oox smartart: add support for syncing font heights of multiple shapes When 2 or more shapes have their text set to autofit and they have a constraint like: Then make sure that the automatic font size is the same for all shapes and all content fits, by using the smallest scaling factor from all relevant shapes. Some rework is needed, because normally oox::drawingml::Shapes don't have access to their parents, at the same time there can be multiple SmartArts on a single slide, so storing the grouping info in the filter is problematic, too. Solve this by storing the grouping in the toplevel oox::drawingml::Shape and exposing them in XmlFilterBase just during the time the children of the toplevel shape of the SmartArt are added. This works, because we know SmartArts can't be nested. (cherry picked from commit 1bd3474c7c7945e1182dfbaca89be05ea98dd3e8) Conflicts: include/oox/core/xmlfilterbase.hxx oox/source/drawingml/diagram/diagram.cxx Change-Id: I6c591eadc7166c7c42752650afdb7ee1e416cff6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102726 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/include/oox/core/xmlfilterbase.hxx b/include/oox/core/xmlfilterbase.hxx index 68bd801eaefd..cb8be7117fdf 100644 --- a/include/oox/core/xmlfilterbase.hxx +++ b/include/oox/core/xmlfilterbase.hxx @@ -65,6 +65,7 @@ namespace sax_fastparser { namespace utl { class MediaDescriptor; } namespace oox { +namespace drawingml { class Shape; } namespace core { class FragmentHandler; @@ -79,6 +80,10 @@ typedef std::vector< TextField > TextFieldStack; struct XmlFilterBaseImpl; +using ShapePairs += std::map, css::uno::Reference>; +using NamedShapePairs = std::map; + class OOX_DLLPUBLIC XmlFilterBase : public FilterBase { public: @@ -242,6 +247,9 @@ public: /// user about it. void setMissingExtDrawing(); +void setDiagramFontHeights(NamedShapePairs* pDiagramFontHeights); +NamedShapePairs* getDiagramFontHeights(); + void checkDocumentProperties( const css::uno::Reference& xDocProps); diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx index 1895c2f2aad6..5b6fd21ce00d 100644 --- a/include/oox/drawingml/shape.hxx +++ b/include/oox/drawingml/shape.hxx @@ -29,6 +29,8 @@ #include #include #include + +#include #include #include #include @@ -239,6 +241,8 @@ public: void keepDiagramDrawing(::oox::core::XmlFilterBase& rFilterBase, const OUString& rFragmentPath); +oox::core::NamedShapePairs& getDiagramFontHeights() { return maDiagramFontHeights; } + protected: enum FrameType @@ -272,6 +276,7 @@ protected: const basegfx::B2DHomMatrix& aTransformation ); voidkeepDiagramCompatibilityInfo(); +void syncDiagramFontHeights(); voidconvertSmartArtToMetafile( ::oox::core::XmlFilterBase const& rFilterBase ); css::uno::Reference< css::drawing::XShape > @@ -377,6 +382,9 @@ private: /// The shape fill should be set to that of the slide background surface. bool mbUseBgFill = false; + +/// For SmartArt, this contains groups of shapes: automatic font size is the same in each group. +oox::core::NamedShapePairs maDiagramFontHeights; }; } } diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 2cc1daa54b04..fe449dd70909 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -180,6 +180,7 @@ struct XmlFilterBaseImpl RelationsMap maRelationsMap; TextFieldStack maTextFieldStack; const NamespaceMap&mrNamespaceMap; +NamedShapePairs* mpDiagramFontHeights = nullptr; /// @throws RuntimeException explicitXmlFilterBaseImpl(); @@ -957,6 +958,13 @@ void
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/rangeutl.hxx |2 - sc/source/core/tool/rangeutl.cxx | 38 +- sc/source/filter/xml/XMLTableShapeResizer.cxx |2 - sc/source/ui/unoobj/chart2uno.cxx |2 - 4 files changed, 22 insertions(+), 22 deletions(-) New commits: commit 662c6a43a4826fc88cd6a86bb57ab7fd513a4762 Author: Caolán McNamara AuthorDate: Mon Sep 14 15:32:26 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 17:27:19 2020 +0200 GetStringFromXMLRangeString never passed a null ScDocument* Change-Id: I2855e212db08b6df0aa91f25b10b4605173b2095 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102745 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index e0d0f65c2b88..286eb01421da 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -218,7 +218,7 @@ public: static void GetStringFromXMLRangeString( OUString& rString, const OUString& rXMLRange, -const ScDocument* pDoc ); +const ScDocument& rDoc ); /// String to RangeData core static ScRangeData* GetRangeDataFromString(const OUString& rString, const SCTAB nTab, const ScDocument& rDoc); diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index c90c61d0055c..a2996f13b81b 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -702,12 +702,12 @@ void ScRangeStringConverter::GetStringFromRangeList( } static void lcl_appendCellAddress( -OUStringBuffer& rBuf, const ScDocument* pDoc, const ScAddress& rCell, +OUStringBuffer& rBuf, const ScDocument& rDoc, const ScAddress& rCell, const ScAddress::ExternalInfo& rExtInfo) { if (rExtInfo.mbExternal) { -ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); +ScExternalRefManager* pRefMgr = rDoc.GetExternalRefManager(); const OUString* pFilePath = pRefMgr->getExternalFileName(rExtInfo.mnFileId, true); if (!pFilePath) return; @@ -721,18 +721,18 @@ static void lcl_appendCellAddress( ScRangeStringConverter::AppendTableName(rBuf, rExtInfo.maTabName); rBuf.append('.'); -OUString aAddr(rCell.Format(ScRefFlags::ADDR_ABS, nullptr, pDoc->GetAddressConvention())); +OUString aAddr(rCell.Format(ScRefFlags::ADDR_ABS, nullptr, rDoc.GetAddressConvention())); rBuf.append(aAddr); } else { -OUString aAddr(rCell.Format(ScRefFlags::ADDR_ABS_3D, pDoc, pDoc->GetAddressConvention())); +OUString aAddr(rCell.Format(ScRefFlags::ADDR_ABS_3D, &rDoc, rDoc.GetAddressConvention())); rBuf.append(aAddr); } } static void lcl_appendCellRangeAddress( -OUStringBuffer& rBuf, const ScDocument* pDoc, const ScAddress& rCell1, const ScAddress& rCell2, +OUStringBuffer& rBuf, const ScDocument& rDoc, const ScAddress& rCell1, const ScAddress& rCell2, const ScAddress::ExternalInfo& rExtInfo1, const ScAddress::ExternalInfo& rExtInfo2) { if (rExtInfo1.mbExternal) @@ -740,7 +740,7 @@ static void lcl_appendCellRangeAddress( OSL_ENSURE(rExtInfo2.mbExternal, "2nd address is not external!?"); OSL_ENSURE(rExtInfo1.mnFileId == rExtInfo2.mnFileId, "File IDs do not match between 1st and 2nd addresses."); -ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); +ScExternalRefManager* pRefMgr = rDoc.GetExternalRefManager(); const OUString* pFilePath = pRefMgr->getExternalFileName(rExtInfo1.mnFileId, true); if (!pFilePath) return; @@ -754,7 +754,7 @@ static void lcl_appendCellRangeAddress( ScRangeStringConverter::AppendTableName(rBuf, rExtInfo1.maTabName); rBuf.append('.'); -OUString aAddr(rCell1.Format(ScRefFlags::ADDR_ABS, nullptr, pDoc->GetAddressConvention())); +OUString aAddr(rCell1.Format(ScRefFlags::ADDR_ABS, nullptr, rDoc.GetAddressConvention())); rBuf.append(aAddr); rBuf.append(":"); @@ -766,7 +766,7 @@ static void lcl_appendCellRangeAddress( rBuf.append('.'); } -aAddr = rCell2.Format(ScRefFlags::ADDR_ABS, nullptr, pDoc->GetAddressConvention()); +aAddr = rCell2.Format(ScRefFlags::ADDR_ABS, nullptr, rDoc.GetAddressConvention()); rBuf.append(aAddr); } else @@ -774,14 +774,14 @@ static void lcl_appendCellRangeAddress( ScRange aRange; aRange.aStart = rCell1; aRange.aEnd = rCell2; -OUString aAddr(aRange.Format(*pDoc, ScRefFlags::RANGE_ABS_3D, pDoc->GetAddressConvention())); +OUString aAddr(aRange.Format(rDoc, ScRefFlags::RANGE_ABS_3D, rDoc.GetAddressConvention())); rBuf.append(aAddr); } } -void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, const
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/rangeutl.hxx |2 +- sc/source/core/tool/rangeutl.cxx |6 +++--- sc/source/ui/dbgui/PivotLayoutDialog.cxx |4 ++-- sc/source/ui/dbgui/consdlg.cxx |2 +- sc/source/ui/dbgui/foptmgr.cxx |2 +- sc/source/ui/dbgui/tpsort.cxx|2 +- sc/source/ui/miscdlgs/linkarea.cxx |2 +- 7 files changed, 10 insertions(+), 10 deletions(-) New commits: commit 3fc713a8e53d7882089ec4b9240bf78bb99f8275 Author: Caolán McNamara AuthorDate: Mon Sep 14 15:38:14 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 17:39:42 2020 +0200 ScAreaNameIterator always dereferences its ScDocument* argument Change-Id: Ibdeeb634561a4bdd437e04bece77315b392b020e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102746 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index 286eb01421da..a09cded44e51 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -257,7 +257,7 @@ private: boolbFirstPass; public: -ScAreaNameIterator( const ScDocument* pDoc ); +ScAreaNameIterator( const ScDocument& rDoc ); bool Next( OUString& rName, ScRange& rRange ); bool WasDBName() const { return !bFirstPass; } diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index a2996f13b81b..a9e8399e351a 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -934,9 +934,9 @@ bool ScArea::operator==( const ScArea& r ) const && (nRowEnd == r.nRowEnd) ); } -ScAreaNameIterator::ScAreaNameIterator( const ScDocument* pDoc ) : -pRangeName(pDoc->GetRangeName()), -pDBCollection(pDoc->GetDBCollection()), +ScAreaNameIterator::ScAreaNameIterator( const ScDocument& rDoc ) : +pRangeName(rDoc.GetRangeName()), +pDBCollection(rDoc.GetDBCollection()), bFirstPass(true) { if (pRangeName) diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index fa4be02ab400..73e5a820178e 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -225,7 +225,7 @@ void ScPivotLayoutDialog::SetupSource() // Setup Named Ranges bool bIsNamedRange = false; -ScAreaNameIterator aIterator(&mrDocument); +ScAreaNameIterator aIterator(mrDocument); OUString aEachName; ScRange aEachRange; @@ -265,7 +265,7 @@ void ScPivotLayoutDialog::SetupDestination() mxDestinationListBox->clear(); // Fill up named ranges -ScAreaNameIterator aIterator(&mrDocument); +ScAreaNameIterator aIterator(mrDocument); OUString aName; ScRange aRange; diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index db9f53681a18..e0609a493386 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -188,7 +188,7 @@ void ScConsolidateDlg::Init() OUString aStrName; sal_uInt16 nAt = 0; ScRange aRange; -ScAreaNameIterator aIter( pDoc ); +ScAreaNameIterator aIter( *pDoc ); while ( aIter.Next( aStrName, aRange ) ) { OUString aStrArea(aRange.Format(*pDoc, ScRefFlags::ADDR_ABS_3D, eConv)); diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index af13177bda8c..31cb7efa245a 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -105,7 +105,7 @@ void ScFilterOptionsMgr::Init() pLbCopyArea->clear(); pLbCopyArea->append_text(rStrUndefined); -ScAreaNameIterator aIter( pDoc ); +ScAreaNameIterator aIter( *pDoc ); OUString aName; ScRange aRange; while ( aIter.Next( aName, aRange ) ) diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 5ad843793a37..6fc4d45655af 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -544,7 +544,7 @@ void ScTabPageSortOptions::Init() m_xLbOutPos->append_text(aStrUndefined); m_xLbOutPos->set_sensitive(false); -ScAreaNameIterator aIter( pDoc ); +ScAreaNameIterator aIter( *pDoc ); OUString aName; ScRange aRange; while ( aIter.Next( aName, aRange ) ) diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index a5e683e5dcbf..c4c23b1ba369 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -250,7 +250,7 @@ void ScLinkedAreaDlg::UpdateSourceRanges() m_xLbRanges->append_text("CSV_all"); } -ScAreaNameIterator aIter(&m_pSourceShell->GetDocument()); +ScAreaNameIterator aIter(m_pSourceShell->GetDocument()); ScRange aDummy; OUString aName; while ( aIter.Next( aName, aDummy ) ) ___ Libreoffice-commits mailing list libreoffi
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - oox/source sd/qa
oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 56 +++- sd/qa/unit/data/pptx/smartart-autofit-sync.pptx |binary sd/qa/unit/import-tests-smartart.cxx| 11 +++ 3 files changed, 66 insertions(+), 1 deletion(-) New commits: commit 1333c831b511e38ec114f51b4bf5e6fef3d7b30e Author: Miklos Vajna AuthorDate: Mon Sep 14 16:58:38 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Sep 15 18:09:58 2020 +0200 oox smartart: handle Which defines that a data node has text properties as direct formatting, so autoscale should not happen. We decide autofit at a shape level, smartart defines custom text props at a data node level. So take the shape, go to its first presentation node, get its data node and see if it has custom text props. If not, continue to scale text down till it fits. smartart-autofit-sync.pptx is extended to contain a 3rd shape: the first two have their autofit scaling synchronized, while the 3rd has a fixed font size of 10pt. (cherry picked from commit 89b385c2336e5b3868d2a040e11134b349b7d010) Change-Id: I6caacdaab9a36072b9ad5021bd217c955b09b790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102727 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 6823e45b3043..6175832a426d 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -479,6 +479,54 @@ void ApplyConstraintToLayout(const Constraint& rConstraint, LayoutPropertyMap& r } } } + +/// Does the first data node of this shape have customized text properties? +bool HasCustomText(const ShapePtr& rShape, LayoutNode& rLayoutNode) +{ +const PresPointShapeMap& rPresPointShapeMap += rLayoutNode.getDiagram().getLayout()->getPresPointShapeMap(); +const DiagramData::StringMap& rPresOfNameMap += rLayoutNode.getDiagram().getData()->getPresOfNameMap(); +const DiagramData::PointNameMap& rPointNameMap += rLayoutNode.getDiagram().getData()->getPointNameMap(); +// Get the first presentation node of the shape. +const dgm::Point* pPresNode = nullptr; +for (const auto& rPair : rPresPointShapeMap) +{ +if (rPair.second == rShape) +{ +pPresNode = rPair.first; +break; +} +} +// Get the first data node of the presentation node. +dgm::Point* pDataNode = nullptr; +if (pPresNode) +{ +auto itPresToData = rPresOfNameMap.find(pPresNode->msModelId); +if (itPresToData != rPresOfNameMap.end()) +{ +for (const auto& rPair : itPresToData->second) +{ +const DiagramData::SourceIdAndDepth& rItem = rPair.second; +auto it = rPointNameMap.find(rItem.msSourceId); +if (it != rPointNameMap.end()) +{ +pDataNode = it->second; +break; +} +} +} +} + +// If we have a data node, see if its text is customized or not. +if (pDataNode) +{ +return pDataNode->mbCustomText; +} + +return false; +} } void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector& rConstraints, @@ -1453,7 +1501,13 @@ void AlgAtom::layoutShape(const ShapePtr& rShape, const std::vector& if (!aRun->getTextCharacterProperties().moHeight.has()) aRun->getTextCharacterProperties().moHeight = fFontSize * 100; } - pTextBody->getTextProperties().maPropertyMap.setProperty(PROP_TextFitToSize, drawing::TextFitToSizeType_AUTOFIT); + +if (!HasCustomText(rShape, getLayoutNode())) +{ +// No customized text properties: enable autofit. +pTextBody->getTextProperties().maPropertyMap.setProperty( +PROP_TextFitToSize, drawing::TextFitToSizeType_AUTOFIT); +} // ECMA-376-1:2016 21.4.7.5 ST_AutoTextRotation (Auto Text Rotation) const sal_Int32 nautoTxRot = maMap.count(XML_autoTxRot) ? maMap.find(XML_autoTxRot)->second : XML_upr; diff --git a/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx b/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx index f682c143f584..9a6ce0f494c5 100644 Binary files a/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx and b/sd/qa/unit/data/pptx/smartart-autofit-sync.pptx differ diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index 0d41e3094052..4844afe5a84e 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -1557,6 +1557,17 @@ void SdImportTestSmartArt::testAutofitSync() // requested that their scaling matches. CPPUNIT_ASSERT_EQUAL(
[Libreoffice-commits] online.git: cypress_test/integration_tests
cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) New commits: commit 328ed481179cb8d79c5a1eacc1a24e69b492739a Author: Tamás Zolnai AuthorDate: Tue Sep 15 13:58:24 2020 +0200 Commit: Tamás Zolnai CommitDate: Tue Sep 15 18:20:40 2020 +0200 cypress: php-proxy: select a row to remove text selection. Instead of selecting a column. Selecting a column means 1048576 cells, which makes things slow. While selecting a row means only 1024 cells, which won't slow down the execution. This issue becomes more visible with php-proxy since it's even slower. Change-Id: I67828dcba250b2d04053cd44c6f8c83e7a466792 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102749 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js index 70b4f1e67..5947dba2c 100644 --- a/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js +++ b/cypress_test/integration_tests/mobile/calc/calc_mobile_helper.js @@ -1,15 +1,31 @@ -/* global cy expect */ +/* global cy expect require */ + +require('cypress-wait-until'); function removeTextSelection() { cy.log('Removing text selection - start.'); - cy.get('.spreadsheet-header-columns') - .click(); + cy.get('.spreadsheet-header-rows') + .then(function(header) { + var rect = header[0].getBoundingClientRect(); + var posX = (rect.right + rect.left) / 2.0; + var posY = (rect.top + rect.bottom) / 2.0; + + var moveY = 0.0; + cy.waitUntil(function() { + cy.get('body') + .click(posX, posY + moveY); + + moveY += 1.0; + var regex = /A([0-9]+):AMJ\1$/; + return cy.get('input#addressInput') + .should('have.prop', 'value') + .then(function(value) { + return regex.test(value); + }); + }); + }); - var regex = /[A-Z]1:[A-Z]1048576/; - cy.get('input#addressInput') - .should('have.prop', 'value') - .should('match', regex); cy.log('Removing text selection - end.'); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/app/transobj.cxx |2 +- sc/source/ui/inc/viewdata.hxx |6 +++--- sc/source/ui/unoobj/docuno.cxx |2 +- sc/source/ui/view/viewdata.cxx | 18 +- 4 files changed, 14 insertions(+), 14 deletions(-) New commits: commit 7f242cef830edac793753f9ac3ce162869cd67c6 Author: Caolán McNamara AuthorDate: Mon Sep 14 16:27:37 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 20:07:14 2020 +0200 setDocument and InitData never called with a null ScDocument* Change-Id: Ia0c6613daabcdcd61bd3efe1fe8a79ccbc7fa19c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102751 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index f329576d2bbc..3b2d355fb0b7 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -100,7 +100,7 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPr tools::Rectangle aBound( Point(), pDev->GetOutputSize() ); //! use size from clip area? ScViewData aViewData(nullptr,nullptr); -aViewData.InitData( pDoc ); +aViewData.InitData( *pDoc ); aViewData.SetTabNo( rBlock.aEnd.Tab() ); aViewData.SetScreen( rBlock.aStart.Col(), rBlock.aStart.Row(), diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 2c362b58c4ec..d79d2e0b84ae 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -138,7 +138,7 @@ private: public: ScPositionHelper(ScDocument *pDoc, bool bColumn); -void setDocument(ScDocument *pDoc, bool bColumn); +void setDocument(ScDocument& rDoc, bool bColumn); void insert(index_type nIndex, long nPos); void removeByIndex(index_type nIndex); @@ -247,7 +247,7 @@ private: boolmbOldCursorValid; // "virtual" Cursor position when combined ScViewDataTable(ScDocument *pDoc = nullptr); -voidInitData(ScDocument *pDoc); +voidInitData(ScDocument& rDoc); voidWriteUserDataSequence( css::uno::Sequence & rSettings, const ScViewData& rViewData, SCTAB nTab ) const; @@ -349,7 +349,7 @@ public: ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ); ~ScViewData() COVERITY_NOEXCEPT_FALSE; -voidInitData( ScDocument* pDocument ); +voidInitData(ScDocument& rDocument); ScDocShell* GetDocShell() const { return pDocShell; } ScDocFunc& GetDocFunc() const; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 2531c4776284..3ff67bb64af6 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2081,7 +2081,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec tools::Rectangle aBound( Point(), pDev->GetOutputSize()); ScViewData aViewData(nullptr,nullptr); -aViewData.InitData( &rDoc ); +aViewData.InitData( rDoc ); aViewData.SetTabNo( aRange.aStart.Tab() ); aViewData.SetScreen( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ); diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 69fadf2f61f7..6af89998cd99 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -124,9 +124,9 @@ ScPositionHelper::ScPositionHelper(ScDocument *pDoc, bool bColumn) mData.insert(std::make_pair(-1, 0)); } -void ScPositionHelper::setDocument(ScDocument *pDoc, bool bColumn) +void ScPositionHelper::setDocument(ScDocument& rDoc, bool bColumn) { -MAX_INDEX = bColumn ? pDoc->MaxCol() : MAXTILEDROW; +MAX_INDEX = bColumn ? rDoc.MaxCol() : MAXTILEDROW; } void ScPositionHelper::insert(index_type nIndex, long nPos) @@ -514,10 +514,10 @@ ScViewDataTable::ScViewDataTable(ScDocument *pDoc) : nPixPosY[0]=nPixPosY[1]=0; } -void ScViewDataTable::InitData(ScDocument *pDoc) +void ScViewDataTable::InitData(ScDocument& rDoc) { -aWidthHelper.setDocument(pDoc, true); -aHeightHelper.setDocument(pDoc, false); +aWidthHelper.setDocument(rDoc, true); +aHeightHelper.setDocument(rDoc, false); } void ScViewDataTable::WriteUserDataSequence(uno::Sequence & rSettings, const ScViewData& rViewData, SCTAB nTab) const @@ -838,21 +838,21 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) : for ( auto & xTabData : maTabData ) { if (xTabData) -xTabData->InitData( pDoc ); +xTabData->InitData( *pDoc ); } } CalcPPT(); } -void ScViewData::InitData( ScDocument* pDocument ) +void ScViewData::InitData(ScDocument& rDocument) { -pDoc = pDocument; +pDoc = &rDocument; *pOptions = pDoc->GetViewOptions(); for ( auto & xTabData
[Libreoffice-commits] core.git: vcl/source
vcl/source/font/fontcharmap.cxx |4 1 file changed, 4 insertions(+) New commits: commit a014c82522834c972e247a28d8e5f42998ae3c0e Author: Caolán McNamara AuthorDate: Tue Sep 15 16:36:17 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 20:06:56 2020 +0200 ofz#25684 keep ParseCMAP within legal area Change-Id: Iee18b5a9390b79efa67414ea2d229d2816c84e18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102776 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index 05a800fe1af7..a8a217ac9a5f 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -151,6 +151,10 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult ) continue; int nTmpOffset = GetUInt( p+4 ); + +if (nTmpOffset + 2 > nLength) +continue; + int nTmpFormat = GetUShort( pCmap + nTmpOffset ); if( nTmpFormat == 12 ) // 32bit code -> glyph map format nValue += 3; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/ui/app/drwtrans.cxx|2 +- sc/source/ui/app/transobj.cxx|5 ++--- sc/source/ui/docshell/docsh4.cxx |4 ++-- sc/source/ui/inc/viewdata.hxx| 10 ++ sc/source/ui/unoobj/docuno.cxx |3 +-- sc/source/ui/view/tabview.cxx|2 +- sc/source/ui/view/viewdata.cxx | 11 +++ 7 files changed, 24 insertions(+), 13 deletions(-) New commits: commit 957adc83e67276805c6dcd7be1ea23c142c49306 Author: Caolán McNamara AuthorDate: Mon Sep 14 16:36:48 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 20:07:35 2020 +0200 establish ScViewData always ctored from ScDocShell& or ScDocument& Change-Id: Ie4d9520fe2ce69bbfc5fa755cce165f01947a535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102752 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index dcb90a5e06ed..2c3c11ca6b9b 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -730,7 +730,7 @@ void ScDrawTransferObj::InitDocShell() aViewOpt.SetOption( VOPT_GRID, false ); rDestDoc.SetViewOptions( aViewOpt ); -ScViewData aViewData( pDocSh, nullptr ); +ScViewData aViewData( *pDocSh, nullptr ); aViewData.SetTabNo( 0 ); aViewData.SetScreen( aDestArea ); aViewData.SetCurX( 0 ); diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 3b2d355fb0b7..d296422ae84d 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -99,8 +99,7 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPr tools::Rectangle aBound( Point(), pDev->GetOutputSize() ); //! use size from clip area? -ScViewData aViewData(nullptr,nullptr); -aViewData.InitData( *pDoc ); +ScViewData aViewData(*pDoc); aViewData.SetTabNo( rBlock.aEnd.Tab() ); aViewData.SetScreen( rBlock.aStart.Col(), rBlock.aStart.Row(), @@ -757,7 +756,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize) pDestPool->CopyStyleFrom( pStylePool, aStyleName, SfxStyleFamily::Page ); } -ScViewData aViewData( pDocSh, nullptr ); +ScViewData aViewData( *pDocSh, nullptr ); aViewData.SetScreen( nStartX,nStartY, nEndX,nEndY ); aViewData.SetCurX( nStartX ); aViewData.SetCurY( nStartY ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 6f25468f716b..d4b8bf689208 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2132,7 +2132,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI if ( nAspect == ASPECT_THUMBNAIL ) { tools::Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL ); -ScViewData aTmpData( this, nullptr ); +ScViewData aTmpData( *this, nullptr ); aTmpData.SetTabNo(nVisTab); SnapVisArea( aBoundRect ); aTmpData.SetScreen( aBoundRect ); @@ -2142,7 +2142,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI { tools::Rectangle aOldArea = SfxObjectShell::GetVisArea(); tools::Rectangle aNewArea = aOldArea; -ScViewData aTmpData( this, nullptr ); +ScViewData aTmpData( *this, nullptr ); aTmpData.SetTabNo(nVisTab); SnapVisArea( aNewArea ); if ( aNewArea != aOldArea && (m_aDocument.GetPosLeft() > 0 || m_aDocument.GetPosTop() > 0) ) diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index d79d2e0b84ae..faebd6ee5aa6 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -345,12 +345,14 @@ private: SAL_DLLPRIVATE void EnsureTabDataSize(size_t nSize); SAL_DLLPRIVATE void UpdateCurrentTab(); -public: -ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ); -~ScViewData() COVERITY_NOEXCEPT_FALSE; - +ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ); voidInitData(ScDocument& rDocument); +public: +ScViewData( ScDocShell& rDocSh, ScTabViewShell* pViewSh ); +ScViewData( ScDocument& rDoc ); +~ScViewData() COVERITY_NOEXCEPT_FALSE; + ScDocShell* GetDocShell() const { return pDocShell; } ScDocFunc& GetDocFunc() const; ScDBFunc* GetView() const { return pView; } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 3ff67bb64af6..b99ed1692f13 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2080,8 +2080,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec tools::Rectangle aBound( Point(), pDev->GetOutputSize()); -ScViewData aViewData(nullptr,nullptr); -aViewData.InitData( rDoc ); +ScViewData aViewData(rDoc); aViewData.SetTabNo( aRange.aStart.Tab() ); aVie
[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - loleaflet/src
loleaflet/src/layer/tile/CanvasTileLayer.js |1 + 1 file changed, 1 insertion(+) New commits: commit 8ac9c59e39520cd0898431b6f74ce4180c812252 Author: Michael Meeks AuthorDate: Tue Sep 15 19:53:16 2020 +0100 Commit: Michael Meeks CommitDate: Tue Sep 15 19:53:16 2020 +0100 calc grid: re-render the canvas when we get grid details. Change-Id: I3d1d1485e561d8c807daa0dfe0a9f2cb5651d31b diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js index 5ab4b7ff2..075791d78 100644 --- a/loleaflet/src/layer/tile/CanvasTileLayer.js +++ b/loleaflet/src/layer/tile/CanvasTileLayer.js @@ -395,6 +395,7 @@ L.CanvasTileLayer = L.TileLayer.extend({ } this._map.on('resize zoomend', this._painter.update, this._painter); this._map.on('splitposchanged', this._painter.update, this._painter); + this._map.on('sheetgeometrychanged', this._painter.update, this._painter); this._map.on('move', this._syncTilePanePos, this); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'private/jmux/win-arm64' - 1448 commits - accessibility/inc accessibility/source android/source animations/source avmedia/inc avmedia/source basctl/inc basctl/Li
Rebased ref, commits from common ancestor: commit 5e454ce1ba8a93b9d17f3b7d38b4339ff0f2339b Author: Jan-Marek Glogowski AuthorDate: Sat Sep 12 18:17:08 2020 +0200 Commit: Jan-Marek Glogowski CommitDate: Tue Sep 15 20:51:58 2020 +0200 basic: use dummy DLL mgr for Windows Arm64 build This will need a real implementation to do system calls, but for the initial compilation the dummy is sufficient. Change-Id: Ia16e47fdb8fbf4855f7c5abb0d36d9c922cd1de7 diff --git a/basic/source/runtime/dllmgr.hxx b/basic/source/runtime/dllmgr.hxx index 08927843a98d..368fa3d10a2f 100644 --- a/basic/source/runtime/dllmgr.hxx +++ b/basic/source/runtime/dllmgr.hxx @@ -42,7 +42,7 @@ public: void FreeDll(OUString const & library); private: -#ifdef _WIN32 +#if defined(_WIN32) && !defined(_ARM64_) struct Impl; std::unique_ptr< Impl > impl_; commit e477dd05b8bf34accba7d58ffbc47ada529fc4f7 Author: Jan-Marek Glogowski AuthorDate: Wed Sep 2 15:32:44 2020 +0200 Commit: Jan-Marek Glogowski CommitDate: Tue Sep 15 20:51:58 2020 +0200 twain32shim: disable for Windows Arm64 build I know the platform can emulate x86 code, but have no idea, if this would include x86 TWAIN32 drivers, so disable the build for now. Change-Id: I22cb2ab81ade9f91097586f382cdd4855e27d827 diff --git a/Repository.mk b/Repository.mk index de0c26140fa3..3cc82b017463 100644 --- a/Repository.mk +++ b/Repository.mk @@ -151,7 +151,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ unoinfo \ unopkg \ unopkg_com \ - twain32shim \ + $(if $(filter-out ARM64,$(CPUNAME)),twain32shim) \ ) \ )) diff --git a/configure.ac b/configure.ac index be73281b3e05..bacae1c9a9b3 100644 --- a/configure.ac +++ b/configure.ac @@ -3814,7 +3814,8 @@ if test "$_os" = "WINNT"; then # Check for 32-bit compiler to use to build the 32-bit TWAIN shim # needed to support TWAIN scan on both 32- and 64-bit systems -if test "$WIN_HOST_ARCH" = "x64"; then +case "$WIN_HOST_ARCH" in +x64) AC_MSG_CHECKING([for a x86 compiler and libraries for 32-bit binaries required for TWAIN support]) if test -n "$WIN_MULTI_ARCH"; then BUILD_X86=TRUE @@ -3825,10 +3826,12 @@ if test "$_os" = "WINNT"; then AC_MSG_RESULT([not found]) AC_MSG_WARN([Installation set will not contain 32-bit binaries required for TWAIN support]) fi -else +;; +x86) BUILD_X86=TRUE CXX_X86_BINARY=$MSVC_CXX -fi +;; +esac AC_SUBST(BUILD_X86) AC_SUBST(CXX_X86_BINARY) fi commit a6893e150164e100e7fb52703bf29aae97bf8b15 Author: Jan-Marek Glogowski AuthorDate: Mon Aug 3 07:08:56 2020 +0200 Commit: Jan-Marek Glogowski CommitDate: Tue Sep 15 20:51:57 2020 +0200 jvmfwk: add vendorbase entry for Windows Arm64 Change-Id: Iea89befded02ecfd7513cc3d8f116dd6ac2913be diff --git a/jvmfwk/inc/vendorbase.hxx b/jvmfwk/inc/vendorbase.hxx index df536bc3477e..7e98a2409c35 100644 --- a/jvmfwk/inc/vendorbase.hxx +++ b/jvmfwk/inc/vendorbase.hxx @@ -39,6 +39,8 @@ namespace jfw_plugin #define JFW_PLUGIN_ARCH "sparc" #elif defined X86_64 #define JFW_PLUGIN_ARCH "amd64" +#elif defined ARM64 +#define JFW_PLUGIN_ARCH "arm64" #elif defined INTEL #define JFW_PLUGIN_ARCH "i386" #elif defined POWERPC64 commit e2a4303d72d7643ff4cab699a7f9f6584fc84f14 Author: Jan-Marek Glogowski AuthorDate: Mon Aug 3 07:06:36 2020 +0200 Commit: Jan-Marek Glogowski CommitDate: Tue Sep 15 20:51:57 2020 +0200 cli_ure: Disable .NET for Windows Arm64 build The current .NET 5.0 Arm64 preview doesn't have a mscoree.lib, so linking the climaker isn't possible. Change-Id: Ibbac88aa465a9ca2eb8fb0efaad91d20f358229b diff --git a/Repository.mk b/Repository.mk index 1443003e99f3..de0c26140fa3 100644 --- a/Repository.mk +++ b/Repository.mk @@ -546,7 +546,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_URE,ure, \ affine_uno_uno \ - $(if $(filter MSC,$(COM)),cli_uno) \ + $(if $(filter MSC,$(COM)),$(if $(filter-out ARM64,$(CPUNAME)),cli_uno)) \ i18nlangtag \ $(if $(ENABLE_JAVA), \ java_uno \ diff --git a/cli_ure/Module_cli_ure.mk b/cli_ure/Module_cli_ure.mk index d1ff09073a18..91863abb59c9 100644 --- a/cli_ure/Module_cli_ure.mk +++ b/cli_ure/Module_cli_ure.mk @@ -10,6 +10,7 @@ $(eval $(call gb_Module_Module,cli_ure)) ifeq ($(COM),MSC) +ifneq ($(CPUNAME),ARM64) $(eval $(call gb_Module_add_targets,cli_ure,\ CliLibrary_cli_basetypes \ CliLibrary_cli_ure \ @@ -22,5 +23,6 @@ $(eval $(call gb_Module_add_targets,cli_ure,\ Package_cli_basetypes_copy \ )) endif +endif # vim: set noet sw=4 ts=4: diff --git a/scp2/source/ooo/file_library_ooo.scp b/s
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - kit/ChildSession.cpp loleaflet/src test/httpwstest.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp
kit/ChildSession.cpp | 10 +-- loleaflet/src/core/Socket.js |3 ++ loleaflet/src/layer/tile/TileLayer.js |2 - test/httpwstest.cpp | 16 --- wsd/DocumentBroker.cpp| 27 +++ wsd/DocumentBroker.hpp|9 ++ wsd/LOOLWSD.cpp | 48 +- 7 files changed, 79 insertions(+), 36 deletions(-) New commits: commit ab162b6f9580315700a01c3bc10becd510a2ead4 Author: Szymon Kłos AuthorDate: Thu Sep 3 11:34:13 2020 +0200 Commit: Andras Timar CommitDate: Tue Sep 15 21:12:21 2020 +0200 Simplify download process Use hash to identify download and pass that to the client. This allows us to reduce parameters for download requests. DocBroker maps download ids to URL in the file system. Change-Id: I254d4f0ccaf3cff9f038a817c8162510ae228bc5 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101992 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice Tested-by: Michael Meeks Reviewed-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102227 Reviewed-by: Andras Timar diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 23224c3f8..a108ed6c0 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -883,7 +883,8 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int /*length*/, const std: // Prevent user inputting anything funny here. // A "name" should always be a name, not a path const Poco::Path filenameParam(name); -const std::string url = JAILED_DOCUMENT_ROOT + tmpDir + "/" + filenameParam.getFileName(); +const std::string urlToSend = tmpDir + "/" + filenameParam.getFileName(); +const std::string url = JAILED_DOCUMENT_ROOT + urlToSend; const std::string nameAnonym = anonymizeUrl(name); const std::string urlAnonym = JAILED_DOCUMENT_ROOT + tmpDir + "/" + Poco::Path(nameAnonym).getFileName(); @@ -899,7 +900,12 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int /*length*/, const std: filterOptions.empty() ? nullptr : filterOptions.c_str()); } -sendTextFrame("downloadas: jail=" + _jailId + " dir=" + tmpDir + " name=" + name + +// Register download id -> URL mapping in the DocumentBroker +std::string docBrokerMessage = "registerdownload: downloadid=" + tmpDir + " url=" + urlToSend; +_docManager.sendFrame(docBrokerMessage.c_str(), docBrokerMessage.length()); + +// Send download id to the client +sendTextFrame("downloadas: downloadid=" + tmpDir + " port=" + std::to_string(ClientPortNumber) + " id=" + id); return true; } diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index ec55e72b1..2711dda5e 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -956,6 +956,9 @@ L.Socket = L.Class.extend({ else if (tokens[i].substring(0, 4) === 'dir=') { command.dir = tokens[i].substring(4); } + else if (tokens[i].substring(0, 11) === 'downloadid=') { + command.downloadid = tokens[i].substring(11); + } else if (tokens[i].substring(0, 5) === 'name=') { command.name = tokens[i].substring(5); } diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index c70012314..c789dc484 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -589,7 +589,7 @@ L.TileLayer = L.GridLayer.extend({ wopiSrc = '?WOPISrc=' + this._map.options.wopiSrc; } var url = this._map.options.webserver + this._map.options.serviceRoot + '/' + this._map.options.urlPrefix + '/' + - encodeURIComponent(this._map.options.doc) + '/' + command.jail + '/' + command.dir + '/' + command.name + wopiSrc; + encodeURIComponent(this._map.options.doc) + '/download/' + command.downloadid + wopiSrc; this._map.hideBusy(); if (command.id === 'print') { diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp index 8fd886365..383f35cf5 100644 --- a/test/httpwstest.cpp +++ b/test/httpwstest.cpp @@ -1298,21 +1298,17 @@ void HTTPWSTest::testSlideShow() CPPUNIT_ASSERT_MESSAGE("did not receive a downloadas: message as expected", !response.empty()); Poco::StringTokenizer tokens(response.substr(11), " ", Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM); -// "downloadas: jail= dir= name=slideshow.svg port= id=slideshow" -const std::string jail = tokens[0].substr(std::string("jail=").size()); -const std::string dir = tokens[1
[Libreoffice-commits] core.git: sc/qa sc/source
sc/qa/unit/bugfix-test.cxx |6 sc/qa/unit/screenshots/screenshots.cxx |6 sc/qa/unit/tiledrendering/tiledrendering.cxx |4 sc/source/ui/Accessibility/AccessibleCell.cxx |2 sc/source/ui/Accessibility/AccessibleDocument.cxx | 17 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |2 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |2 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx |2 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx |2 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx |2 sc/source/ui/app/inputhdl.cxx | 46 - sc/source/ui/app/inputwin.cxx | 30 sc/source/ui/app/scmod.cxx |4 sc/source/ui/condformat/condformatdlg.cxx | 26 sc/source/ui/dbgui/PivotLayoutDialog.cxx |2 sc/source/ui/dbgui/consdlg.cxx | 43 - sc/source/ui/dbgui/dbnamdlg.cxx|2 sc/source/ui/dbgui/filtdlg.cxx |4 sc/source/ui/dbgui/foptmgr.cxx |2 sc/source/ui/dbgui/pfiltdlg.cxx|4 sc/source/ui/dbgui/scendlg.cxx |4 sc/source/ui/dbgui/sfiltdlg.cxx|2 sc/source/ui/dbgui/tpsort.cxx | 13 sc/source/ui/dbgui/tpsubt.cxx |4 sc/source/ui/drawfunc/drawsh.cxx |6 sc/source/ui/drawfunc/drawsh2.cxx |2 sc/source/ui/drawfunc/drawsh5.cxx |4 sc/source/ui/drawfunc/drtxtob.cxx |4 sc/source/ui/drawfunc/fuins1.cxx | 10 sc/source/ui/drawfunc/fuins2.cxx | 16 sc/source/ui/drawfunc/fupoor.cxx |2 sc/source/ui/drawfunc/fusel.cxx| 10 sc/source/ui/drawfunc/fusel2.cxx |2 sc/source/ui/drawfunc/futext3.cxx |2 sc/source/ui/formdlg/formula.cxx |4 sc/source/ui/inc/condformatdlg.hxx |2 sc/source/ui/inc/consdlg.hxx |2 sc/source/ui/inc/crnrdlg.hxx |2 sc/source/ui/inc/drawview.hxx |2 sc/source/ui/inc/highred.hxx |2 sc/source/ui/inc/namedlg.hxx |2 sc/source/ui/inc/olinewin.hxx |2 sc/source/ui/inc/viewdata.hxx |4 sc/source/ui/miscdlgs/acredlin.cxx |6 sc/source/ui/miscdlgs/anyrefdg.cxx | 20 sc/source/ui/miscdlgs/autofmt.cxx |6 sc/source/ui/miscdlgs/conflictsdlg.cxx |2 sc/source/ui/miscdlgs/crnrdlg.cxx | 92 +-- sc/source/ui/miscdlgs/datafdlg.cxx |4 sc/source/ui/miscdlgs/highred.cxx | 16 sc/source/ui/miscdlgs/instbdlg.cxx |2 sc/source/ui/namedlg/namedefdlg.cxx|2 sc/source/ui/namedlg/namedlg.cxx | 16 sc/source/ui/navipi/navcitem.cxx |2 sc/source/ui/navipi/navipi.cxx | 20 sc/source/ui/optdlg/tpusrlst.cxx |2 sc/source/ui/pagedlg/tphf.cxx |4 sc/source/ui/uitest/uiobject.cxx | 22 sc/source/ui/undo/undoblk.cxx |2 sc/source/ui/unoobj/docuno.cxx |6 sc/source/ui/unoobj/viewuno.cxx| 27 sc/source/ui/vba/vbanames.cxx |8 sc/source/ui/vba/vbanames.hxx |2 sc/source/ui/vba/vbaworksheets.cxx |2 sc/source/ui/view/auditsh.cxx |2 sc/source/ui/view/cellsh.cxx | 170 ++--- sc/source/ui/view/cellsh1.cxx | 164 ++--- sc/source/ui/view/cellsh2.cxx | 86 +- sc/source/ui/view/cellsh3.cxx | 28 sc/source/ui/
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/rangelst.hxx |2 +- sc/source/core/tool/rangelst.cxx | 16 sc/source/ui/miscdlgs/crnrdlg.cxx |4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 24ceb100883e5413b1e911bf1bc29df008972a5a Author: Caolán McNamara AuthorDate: Tue Sep 15 09:36:13 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 21:36:50 2020 +0200 CreateNameSortedArray never passed a null ScDocument* Change-Id: Ib5501d3b3eef77224ffb091df0e30ecab9859c8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102777 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 48a2b088065e..3ceb582baa6d 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -144,7 +144,7 @@ public: ScRangePair*Find( const ScAddress& ); ScRangePair*Find( const ScRange& ); std::vector -CreateNameSortedArray( ScDocument* ) const; +CreateNameSortedArray( ScDocument& ) const; voidRemove(size_t nPos); voidRemove(const ScRangePair & rAdr); diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 12d4e64678f4..c49e9694c0c8 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -1318,7 +1318,7 @@ namespace { class ScRangePairList_sortNameCompare { public: -ScRangePairList_sortNameCompare(ScDocument *pDoc) : mpDoc(pDoc) {} +ScRangePairList_sortNameCompare(ScDocument& rDoc) : mrDoc(rDoc) {} bool operator()( const ScRangePair *ps1, const ScRangePair* ps2 ) const { @@ -1330,8 +1330,8 @@ public: nComp = 0; else { -mpDoc->GetName( rStartPos1.Tab(), aStr1 ); -mpDoc->GetName( rStartPos2.Tab(), aStr2 ); +mrDoc.GetName( rStartPos1.Tab(), aStr1 ); +mrDoc.GetName( rStartPos2.Tab(), aStr2 ); nComp = ScGlobal::GetCollator()->compareString( aStr1, aStr2 ); } if (nComp < 0) @@ -1361,8 +1361,8 @@ public: nComp = 0; else { -mpDoc->GetName( rEndPos1.Tab(), aStr1 ); -mpDoc->GetName( rEndPos2.Tab(), aStr2 ); +mrDoc.GetName( rEndPos1.Tab(), aStr1 ); +mrDoc.GetName( rEndPos2.Tab(), aStr2 ); nComp = ScGlobal::GetCollator()->compareString( aStr1, aStr2 ); } if (nComp < 0) @@ -1388,7 +1388,7 @@ public: return false; } private: -ScDocument *mpDoc; +ScDocument& mrDoc; }; } @@ -1522,7 +1522,7 @@ Label_RangePair_Join: Append( r ); } -std::vector ScRangePairList::CreateNameSortedArray( ScDocument* pDoc ) const +std::vector ScRangePairList::CreateNameSortedArray( ScDocument& rDoc ) const { std::vector aSortedVec(maPairs.size()); size_t i = 0; @@ -1531,7 +1531,7 @@ std::vector ScRangePairList::CreateNameSortedArray( ScDocume aSortedVec[i++] = &rPair; } -std::sort( aSortedVec.begin(), aSortedVec.end(), ScRangePairList_sortNameCompare(pDoc) ); +std::sort( aSortedVec.begin(), aSortedVec.end(), ScRangePairList_sortNameCompare(rDoc) ); return aSortedVec; } diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 31dd29e9b879..a82d8d26762f 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -369,7 +369,7 @@ void ScColRowNameRangesDlg::UpdateNames() if ( xColNameRanges->size() > 0 ) { std::vector aSortArray(xColNameRanges->CreateNameSortedArray( - &rDoc )); + rDoc )); nCount = aSortArray.size(); for ( j=0; j < nCount; j++ ) { @@ -408,7 +408,7 @@ void ScColRowNameRangesDlg::UpdateNames() if ( xRowNameRanges->size() > 0 ) { std::vector aSortArray(xRowNameRanges->CreateNameSortedArray( - &rDoc )); + rDoc )); nCount = aSortArray.size(); for ( j=0; j < nCount; j++ ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/charthelper.hxx |2 +- sc/source/core/tool/charthelper.cxx | 10 +- sc/source/ui/drawfunc/fusel.cxx |2 +- sc/source/ui/view/viewfun3.cxx |2 +- sc/source/ui/view/viewfun7.cxx |4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) New commits: commit 8f78e5b82a87437877bdb883f003e571cc042094 Author: Caolán McNamara AuthorDate: Tue Sep 15 09:38:20 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 21:37:14 2020 +0200 CreateProtectedChartListenersAndNotify never passed a null ScDocument* Change-Id: I76efe00924938830f26e1901c22da04376c30ce9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102784 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/charthelper.hxx b/sc/inc/charthelper.hxx index 61da8d797a4a..1dc55ffd312a 100644 --- a/sc/inc/charthelper.hxx +++ b/sc/inc/charthelper.hxx @@ -48,7 +48,7 @@ public: static void AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, const ScDocument* pDocument, SdrObject* pObject ); static void FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, const ScDocument* pDocument, const SdrPage* pPage ); static void GetChartNames( ::std::vector< OUString >& rChartNames, const SdrPage* pPage ); -static void CreateProtectedChartListenersAndNotify( ScDocument* pDoc, const SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab, +static void CreateProtectedChartListenersAndNotify( ScDocument& rDoc, const SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab, const ScRangeListVector& rRangesVector, const ::std::vector< OUString >& rExcludedChartNames, bool bSameDoc = true ); }; diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index cb31f2c7468f..13bb73b86f8a 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -358,10 +358,10 @@ void ScChartHelper::GetChartNames( ::std::vector< OUString >& rChartNames, const } } -void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, const SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab, +void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument& rDoc, const SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab, const ScRangeListVector& rRangesVector, const ::std::vector< OUString >& rExcludedChartNames, bool bSameDoc ) { -if ( !(pDoc && pPage && pModelObj) ) +if ( !(pPage && pModelObj) ) return; size_t nRangeListCount = rRangesVector.size(); @@ -392,12 +392,12 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, co { if ( bSameDoc ) { -ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection(); +ScChartListenerCollection* pCollection = rDoc.GetChartListenerCollection(); if (pCollection && !pCollection->findByName(aChartName)) { ScRangeList aRangeList( rRangesVector[ nRangeList++ ] ); ScRangeListRef rRangeList( new ScRangeList( aRangeList ) ); -ScChartListener* pChartListener = new ScChartListener( aChartName, pDoc, rRangeList ); +ScChartListener* pChartListener = new ScChartListener( aChartName, &rDoc, rRangeList ); pCollection->insert( pChartListener ); pChartListener->StartListeningTo(); } @@ -415,7 +415,7 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, co if (pModelObj->HasChangesListeners()) { tools::Rectangle aRectangle = pSdrOle2Obj->GetSnapRect(); -ScRange aRange( pDoc->GetRange( nTab, aRectangle ) ); +ScRange aRange( rDoc.GetRange( nTab, aRectangle ) ); ScRangeList aChangeRanges( aRange ); uno::Sequence< beans::PropertyValue > aProperties( 1 ); diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index e592085d14de..72be7847faef 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -521,7 +521,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) if ( pModelObj ) { SCTAB nTab = rViewData.GetTabNo(); -ScChartHelper::CreateProtectedChartListenersAndNotify( &rDocument, pPage, pModelObj, nTab, +ScChartHelper::CreateProtectedChartListenersAndNotify( rDocument, pPage, pModelObj, nTab, aProtectedChartRangesVector, aExcludedChartNames ); } } diff --git a/s
[Libreoffice-commits] core.git: sc/source
sc/source/ui/view/viewfun2.cxx | 58 - 1 file changed, 29 insertions(+), 29 deletions(-) New commits: commit cee4736f545bd260a21bea8e3c306ec3b7482d5b Author: Caolán McNamara AuthorDate: Tue Sep 15 09:40:58 2020 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 15 21:37:37 2020 +0200 lcl_SeekAutoSumData never passed a null ScDocument* Change-Id: I5c651a444f6878a0a71eaf4e1c48cdc8306742f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102785 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index c7190a4084a7..1a2da8ecde40 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -259,10 +259,10 @@ enum ScAutoSum } -static ScAutoSum lcl_IsAutoSumData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, +static ScAutoSum lcl_IsAutoSumData( ScDocument& rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, ScDirection eDir, SCCOLROW& nExtend ) { -ScRefCellValue aCell(*pDoc, ScAddress(nCol, nRow, nTab)); +ScRefCellValue aCell(rDoc, ScAddress(nCol, nRow, nTab)); if (aCell.hasNumeric()) { if (aCell.meType == CELLTYPE_FORMULA) @@ -298,7 +298,7 @@ static ScAutoSum lcl_IsAutoSumData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, #define SC_AUTOSUM_MAXCOUNT 20 -static ScAutoSum lcl_SeekAutoSumData( ScDocument* pDoc, SCCOL& nCol, SCROW& nRow, +static ScAutoSum lcl_SeekAutoSumData( ScDocument& rDoc, SCCOL& nCol, SCROW& nRow, SCTAB nTab, ScDirection eDir, SCCOLROW& nExtend ) { sal_uInt16 nCount = 0; @@ -320,7 +320,7 @@ static ScAutoSum lcl_SeekAutoSumData( ScDocument* pDoc, SCCOL& nCol, SCROW& nRow } ScAutoSum eSum; if ( (eSum = lcl_IsAutoSumData( -pDoc, nCol, nRow, nTab, eDir, nExtend )) != ScAutoSumNone ) +rDoc, nCol, nRow, nTab, eDir, nExtend )) != ScAutoSumNone ) return eSum; ++nCount; } @@ -329,14 +329,14 @@ static ScAutoSum lcl_SeekAutoSumData( ScDocument* pDoc, SCCOL& nCol, SCROW& nRow #undef SC_AUTOSUM_MAXCOUNT -static bool lcl_FindNextSumEntryInColumn( ScDocument* pDoc, SCCOL nCol, SCROW& nRow, +static bool lcl_FindNextSumEntryInColumn( ScDocument& rDoc, SCCOL nCol, SCROW& nRow, SCTAB nTab, SCCOLROW& nExtend, SCROW nMinRow ) { const SCROW nTmp = nRow; ScAutoSum eSkip = ScAutoSumNone; for (;;) { -eSkip = lcl_IsAutoSumData( pDoc, nCol, nRow, nTab, DIR_TOP, nExtend ); +eSkip = lcl_IsAutoSumData( rDoc, nCol, nRow, nTab, DIR_TOP, nExtend ); if (eSkip != ScAutoSumData || nRow <= nMinRow ) break; --nRow; @@ -344,14 +344,14 @@ static bool lcl_FindNextSumEntryInColumn( ScDocument* pDoc, SCCOL nCol, SCROW& n return eSkip >= ScAutoSumSum && nRow < nTmp; } -static bool lcl_FindNextSumEntryInRow( ScDocument* pDoc, SCCOL& nCol, SCROW nRow, +static bool lcl_FindNextSumEntryInRow( ScDocument& rDoc, SCCOL& nCol, SCROW nRow, SCTAB nTab, SCCOLROW& nExtend, SCCOL nMinCol ) { const SCCOL nTmp = nCol; ScAutoSum eSkip = ScAutoSumNone; for (;;) { -eSkip = lcl_IsAutoSumData( pDoc, nCol, nRow, nTab, DIR_LEFT, nExtend ); +eSkip = lcl_IsAutoSumData( rDoc, nCol, nRow, nTab, DIR_LEFT, nExtend ); if (eSkip != ScAutoSumData || nCol <= nMinCol ) break; --nCol; @@ -359,7 +359,7 @@ static bool lcl_FindNextSumEntryInRow( ScDocument* pDoc, SCCOL& nCol, SCROW nRow return eSkip >= ScAutoSumSum && nCol < nTmp; } -static ScAutoSum lcl_GetAutoSumForColumnRange( ScDocument* pDoc, ScRangeList& rRangeList, const ScRange& rRange ) +static ScAutoSum lcl_GetAutoSumForColumnRange( ScDocument& rDoc, ScRangeList& rRangeList, const ScRange& rRange ) { const ScAddress aStart = rRange.aStart; const ScAddress aEnd = rRange.aEnd; @@ -373,7 +373,7 @@ static ScAutoSum lcl_GetAutoSumForColumnRange( ScDocument* pDoc, ScRangeList& rR SCROW nEndRow = aEnd.Row(); SCROW nStartRow = nEndRow; SCCOLROW nExtend = 0; -ScAutoSum eSum = lcl_IsAutoSumData( pDoc, nCol, nEndRow, nTab, DIR_TOP, nExtend /*out*/ ); +ScAutoSum eSum = lcl_IsAutoSumData( rDoc, nCol, nEndRow, nTab, DIR_TOP, nExtend /*out*/ ); if ( eSum >= ScAutoSumSum ) { @@ -382,7 +382,7 @@ static ScAutoSum lcl_GetAutoSumForColumnRange( ScDocument* pDoc, ScRangeList& rR { rRangeList.push_back( ScRange( nCol, nStartRow, nTab, nCol, nEndRow, nTab ) ); nEndRow = static_cast< SCROW >( nExtend ); -bContinue = lcl_FindNextSumEntryInColumn( pDoc, nCol, nEndRow /*inout*/, nTab, nExtend /*out*/, aStart.Row() ); +bContinue = lcl_FindNextSumEntryInColumn( rDoc, nCol, nEndRow /*inout*/, nTab, nExtend /*out*/, aStart.Row() ); if ( bContinue ) {
[Libreoffice-commits] core.git: desktop/source editeng/source sd/qa
desktop/source/lib/init.cxx |2 editeng/source/editeng/impedit.cxx| 289 -- editeng/source/editeng/impedit.hxx|2 editeng/source/editeng/impedit3.cxx |5 sd/qa/unit/tiledrendering/LOKitSearchTest.cxx |4 5 files changed, 144 insertions(+), 158 deletions(-) New commits: commit 8c18cd6823ddf4ef5ba67801a84cee26c9b5a9a6 Author: Marco Cecchetti AuthorDate: Wed Aug 26 09:06:59 2020 +0200 Commit: Andras Timar CommitDate: Tue Sep 15 21:54:22 2020 +0200 Online: selection highlight in Calc should follow font size changes. When user changes font size of selected text, markers and highlight rectangle should be updated. impedit3.cxx: Line had no effect, removed. Lokitsearchtest.cxx: Test had bug. Other changes: LOKit code is separated. Now callback_text_selection is fired when font size is changed (Calc). On Writer it already behaves that way. Change-Id: I9b7e3224ad162bfb7d8f0853b6cb17b4feafa0cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101193 Tested-by: Jenkins CollaboraOffice Reviewed-by: Marco Cecchetti Reviewed-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102465 Tested-by: Jenkins diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 3d9c835a78da..ea8567f6493a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1415,6 +1415,8 @@ void CallbackFlushHandler::queue(const int type, const char* data) type != LOK_CALLBACK_CURSOR_VISIBLE && type != LOK_CALLBACK_VIEW_CURSOR_VISIBLE && type != LOK_CALLBACK_TEXT_SELECTION && +type != LOK_CALLBACK_TEXT_SELECTION_START && +type != LOK_CALLBACK_TEXT_SELECTION_END && type != LOK_CALLBACK_REFERENCE_MARKS) { SAL_INFO("lok", "Skipping while painting [" << type << "]: [" << payload << "]."); diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index d90aa81be0c4..f6851b5f292f 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -311,6 +311,134 @@ void ImpEditView::SelectionChanged() } } +// This function is also called when a text's font || size is changed. Because its highlight rectangle must be updated. +void ImpEditView::lokSelectionCallback(std::unique_ptr &pPolyPoly, bool bStartHandleVisible, bool bEndHandleVisible) { +VclPtr pParent = pOutWin->GetParentWithLOKNotifier(); +vcl::Region aRegion( *pPolyPoly ); + +if (pParent && pParent->GetLOKWindowId() != 0) +{ +const long nX = pOutWin->GetOutOffXPixel() - pParent->GetOutOffXPixel(); +const long nY = pOutWin->GetOutOffYPixel() - pParent->GetOutOffYPixel(); + +std::vector aRectangles; +aRegion.GetRegionRectangles(aRectangles); + +std::vector v; +for (tools::Rectangle & rRectangle : aRectangles) +{ +rRectangle = pOutWin->LogicToPixel(rRectangle); +rRectangle.Move(nX, nY); +v.emplace_back(rRectangle.toString().getStr()); +} +OString sRectangle = comphelper::string::join("; ", v); + +const vcl::ILibreOfficeKitNotifier* pNotifier = pParent->GetLOKNotifier(); +std::vector aItems; +aItems.emplace_back("rectangles", sRectangle); +aItems.emplace_back("startHandleVisible", OString::boolean(bStartHandleVisible)); +aItems.emplace_back("endHandleVisible", OString::boolean(bEndHandleVisible)); +pNotifier->notifyWindow(pParent->GetLOKWindowId(), "text_selection", aItems); +} +else +{ +pOutWin->Push(PushFlags::MAPMODE); +if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::MapTwip) +{ +// Find the parent that is not right +// on top of us to use its offset. +vcl::Window* parent = pOutWin->GetParent(); +while (parent && +parent->GetOutOffXPixel() == pOutWin->GetOutOffXPixel() && +parent->GetOutOffYPixel() == pOutWin->GetOutOffYPixel()) +{ +parent = parent->GetParent(); +} + +if (parent) +{ +lcl_translateTwips(*parent, *pOutWin); +} +} + +bool bMm100ToTwip = !mpLOKSpecialPositioning && +(pOutWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM); + +Point aOrigin; +if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::MapTwip) +// Writer comments: they use editeng, but are separate widgets. +aOrigin = pOutWin->GetMapMode().GetOrigin(); + +OString sRectangle; +OString sRefPoint; +if (mpLOKSpecialPositioning) +sRefPoint = mpLOKSpecialPositioning->GetRefPoint().toString(); + +std::vector aRectangles; +aRegion.GetRe
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - desktop/source officecfg/registry sfx2/source sw/inc sw/sdi sw/source sw/uiconfig
desktop/source/lib/init.cxx |1 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 ++ sfx2/source/control/unoctitm.cxx |1 sw/inc/cmdid.h |1 sw/sdi/_annotsh.sdi |6 ++ sw/sdi/_textsh.sdi |5 + sw/sdi/swriter.sdi | 17 ++ sw/source/uibase/docvw/AnnotationMenuButton.cxx |6 ++ sw/source/uibase/docvw/AnnotationWin.cxx | 19 ++- sw/source/uibase/docvw/AnnotationWin2.cxx| 18 -- sw/source/uibase/docvw/PostItMgr.cxx | 27 +- sw/source/uibase/shells/annotsh.cxx | 15 + sw/source/uibase/shells/textfld.cxx | 11 +++- sw/uiconfig/sglobal/menubar/menubar.xml |1 sw/uiconfig/sglobal/popupmenu/annotation.xml |1 sw/uiconfig/swriter/menubar/menubar.xml |1 sw/uiconfig/swriter/popupmenu/annotation.xml |1 sw/uiconfig/swriter/ui/annotationmenu.ui | 16 + sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui|7 ++ 19 files changed, 152 insertions(+), 10 deletions(-) New commits: commit 047e40e0b1bf09c7fcc4d9b3ea83ed6011785802 Author: Pranam Lashkari AuthorDate: Mon Sep 14 12:56:21 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 22:04:25 2020 +0200 Added new command to resolve the comment thread Change-Id: I8a4e5f63ee6ea5e560fae8a5d3602178f2b58b36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102779 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c5f19c23eb93..ca825da01637 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2664,6 +2664,7 @@ static void doc_iniUnoCommands () OUString(".uno:DeleteAnnotation"), OUString(".uno:ReplyComment"), OUString(".uno:ResolveComment"), +OUString(".uno:ResolveCommentThread"), OUString(".uno:InsertRowsBefore"), OUString(".uno:InsertRowsAfter"), OUString(".uno:InsertColumnsBefore"), diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index c5d11c8206cc..e08845edb265 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -6293,6 +6293,14 @@ 1 + + + Resolved Thread + + + 1 + + Top diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 23e02481c120..ab10f33a5ca0 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1065,6 +1065,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "InsertAnnotation" || aEvent.FeatureURL.Path == "DeleteAnnotation" || aEvent.FeatureURL.Path == "ResolveAnnotation" || + aEvent.FeatureURL.Path == "ResolveAnnotationThread" || aEvent.FeatureURL.Path == "InsertRowsBefore" || aEvent.FeatureURL.Path == "InsertRowsAfter" || aEvent.FeatureURL.Path == "InsertColumnsBefore" || diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index c901e8304506..2da785572f61 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -731,6 +731,7 @@ #define FN_REPLY(FN_NOTES+7) #define FN_FORMAT_ALL_NOTES (FN_NOTES+8) #define FN_RESOLVE_NOTE (FN_NOTES+9) +#define FN_RESOLVE_NOTE_THREAD (FN_NOTES+10) // Region: Parameter #define FN_PARAM_MOVE_COUNT (FN_PARAM+2) diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi index 84f3aed0b007..fa1772a4c46e 100644 --- a/sw/sdi/_annotsh.sdi +++ b/sw/sdi/_annotsh.sdi @@ -66,6 +66,12 @@ interface _Annotation StateMethod = GetNoteState ; ] +FN_RESOLVE_NOTE_THREAD +[ +ExecMethod = NoteExec ; +StateMethod = GetNoteState ; +] + FN_POSTIT [ ExecMethod = NoteExec ; diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 6171ffdc5a74..864fac076efc 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -951,6 +951,11 @@ interface BaseText ExecMethod = ExecField ; StateMethod = StateField; ] +FN_RESOLVE_NOTE_THREAD +[
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - officecfg/registry sw/inc sw/sdi sw/source sw/uiconfig
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 +++ sw/inc/AnnotationWin.hxx |1 sw/inc/PostItMgr.hxx |1 sw/inc/cmdid.h |1 sw/sdi/_annotsh.sdi |6 ++ sw/sdi/_textsh.sdi |5 ++ sw/sdi/swriter.sdi | 17 +++ sw/source/uibase/docvw/AnnotationMenuButton.cxx |4 + sw/source/uibase/docvw/AnnotationWin.cxx | 16 ++ sw/source/uibase/docvw/AnnotationWin2.cxx|3 + sw/source/uibase/docvw/PostItMgr.cxx | 24 ++ sw/source/uibase/shells/annotsh.cxx |2 sw/source/uibase/shells/textfld.cxx | 16 ++ sw/uiconfig/sglobal/menubar/menubar.xml |1 sw/uiconfig/sglobal/popupmenu/annotation.xml |1 sw/uiconfig/swriter/menubar/menubar.xml |1 sw/uiconfig/swriter/popupmenu/annotation.xml |1 sw/uiconfig/swriter/ui/annotationmenu.ui |8 +++ sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui|7 ++ 19 files changed, 122 insertions(+), 1 deletion(-) New commits: commit 3f43df0d6d18cc22991677c0855a9f4f2ab3246f Author: Pranam Lashkari AuthorDate: Tue Sep 15 10:07:27 2020 +0530 Commit: Andras Timar CommitDate: Tue Sep 15 22:05:02 2020 +0200 Added new command to delete the comment thread Change-Id: I16d46787a6972afb0c3ab2e56482888082af1d27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102780 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index e08845edb265..a9c962b136e1 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -6285,6 +6285,14 @@ 1 + + + Delete Comment Thread + + + 1 + + Resolved diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index 5c0fb100b9c3..a785e72908f2 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -194,6 +194,7 @@ class SwAnnotationWin : public vcl::Window void SetResolved(bool resolved); void ToggleResolved(); void ToggleResolvedForThread(); +void DeleteThread(); bool IsResolved() const; bool IsThreadResolved(); diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index c660abef9385..56f107faacbc 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -204,6 +204,7 @@ class SwPostItMgr: public SfxListener void Delete(const OUString& aAuthor); void Delete(sal_uInt32 nPostItId); void Delete(); +void DeleteCommentThread(sal_uInt32 nPostItId); void ToggleResolved(sal_uInt32 nPostItId); void ToggleResolvedForThread(sal_uInt32 nPostItId); diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 2da785572f61..64b84b9ce9a1 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -732,6 +732,7 @@ #define FN_FORMAT_ALL_NOTES (FN_NOTES+8) #define FN_RESOLVE_NOTE (FN_NOTES+9) #define FN_RESOLVE_NOTE_THREAD (FN_NOTES+10) +#define FN_DELETE_COMMENT_THREAD(FN_NOTES+11) // Region: Parameter #define FN_PARAM_MOVE_COUNT (FN_PARAM+2) diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi index fa1772a4c46e..6397720e63e5 100644 --- a/sw/sdi/_annotsh.sdi +++ b/sw/sdi/_annotsh.sdi @@ -24,6 +24,12 @@ interface _Annotation StateMethod = GetNoteState ; ] +FN_DELETE_COMMENT_THREAD +[ +ExecMethod = NoteExec ; +StateMethod = GetNoteState ; +] + FN_DELETE_NOTE_AUTHOR [ ExecMethod = NoteExec ; diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 864fac076efc..ad353ad5e099 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -946,6 +946,11 @@ interface BaseText ExecMethod = ExecField ; StateMethod = StateField; ] +FN_DELETE_COMMENT_THREAD +[ +ExecMethod = ExecField ; +StateMethod = StateField; +] FN_RESOLVE_NOTE [ ExecMethod = ExecField ; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 15000529d5f7..68fe312b9105 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -7069,6 +7069,23 @@ SfxVoidItem DeleteComment FN_DELETE_COMMENT Group
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - icon-themes/colibre icon-themes/colibre_svg
icon-themes/colibre/cmd/32/color.png |binary icon-themes/colibre/cmd/32/de/numberformatdecdecimals.png |binary icon-themes/colibre/cmd/32/de/numberformatdecimal.png |binary icon-themes/colibre/cmd/32/de/numberformatincdecimals.png |binary icon-themes/colibre/cmd/32/numberformatthousands.png |binary icon-themes/colibre/cmd/32/resetattributes.png|binary icon-themes/colibre/cmd/de/lc_numberformatdecdecimals.png |binary icon-themes/colibre/cmd/de/lc_numberformatdecimal.png |binary icon-themes/colibre/cmd/de/lc_numberformatincdecimals.png |binary icon-themes/colibre/cmd/de/sc_numberformatdecdecimals.png |binary icon-themes/colibre/cmd/de/sc_numberformatdecimal.png |binary icon-themes/colibre/cmd/de/sc_numberformatincdecimals.png |binary icon-themes/colibre/cmd/lc_color.png |binary icon-themes/colibre/cmd/lc_numberformatthousands.png |binary icon-themes/colibre/cmd/sc_copy.png |binary icon-themes/colibre/cmd/sc_numberformatdecdecimals.png|binary icon-themes/colibre/cmd/sc_numberformatincdecimals.png|binary icon-themes/colibre/cmd/sc_numberformatthousands.png |binary icon-themes/colibre_svg/cmd/32/color.svg |2 +- icon-themes/colibre_svg/cmd/32/de/numberformatdecdecimals.svg |2 +- icon-themes/colibre_svg/cmd/32/de/numberformatdecimal.svg |2 +- icon-themes/colibre_svg/cmd/32/de/numberformatincdecimals.svg |2 +- icon-themes/colibre_svg/cmd/32/numberformatthousands.svg |3 ++- icon-themes/colibre_svg/cmd/32/resetattributes.svg|2 +- icon-themes/colibre_svg/cmd/de/lc_numberformatdecdecimals.svg |2 +- icon-themes/colibre_svg/cmd/de/lc_numberformatdecimal.svg |2 +- icon-themes/colibre_svg/cmd/de/lc_numberformatincdecimals.svg |2 +- icon-themes/colibre_svg/cmd/de/sc_numberformatdecdecimals.svg |3 ++- icon-themes/colibre_svg/cmd/de/sc_numberformatdecimal.svg |3 ++- icon-themes/colibre_svg/cmd/de/sc_numberformatincdecimals.svg |3 ++- icon-themes/colibre_svg/cmd/lc_color.svg |2 +- icon-themes/colibre_svg/cmd/lc_numberformatthousands.svg |3 ++- icon-themes/colibre_svg/cmd/sc_copy.svg |3 ++- icon-themes/colibre_svg/cmd/sc_numberformatdecdecimals.svg|3 ++- icon-themes/colibre_svg/cmd/sc_numberformatincdecimals.svg|3 ++- icon-themes/colibre_svg/cmd/sc_numberformatthousands.svg |3 ++- 36 files changed, 27 insertions(+), 18 deletions(-) New commits: commit b27137a7091104cce177791478e86d127680c9af Author: Rizal Muttaqin AuthorDate: Tue Sep 15 11:52:55 2020 +0700 Commit: Rizal Muttaqin CommitDate: Tue Sep 15 23:50:14 2020 +0200 Update comma in decimal icons, ^ font color Change-Id: I3cb10675d7220ea60c3ef1f6e931a84859126687 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102697 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin (cherry picked from commit e8e14a2289783135f60813e316fcfded48e5f598) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102643 Reviewed-by: Adolfo Jayme Barrientos diff --git a/icon-themes/colibre/cmd/32/color.png b/icon-themes/colibre/cmd/32/color.png index 39852ebc2868..fce0bc3056d3 100644 Binary files a/icon-themes/colibre/cmd/32/color.png and b/icon-themes/colibre/cmd/32/color.png differ diff --git a/icon-themes/colibre/cmd/32/de/numberformatdecdecimals.png b/icon-themes/colibre/cmd/32/de/numberformatdecdecimals.png index 6c9fab4a3adb..f35071a3f6e0 100644 Binary files a/icon-themes/colibre/cmd/32/de/numberformatdecdecimals.png and b/icon-themes/colibre/cmd/32/de/numberformatdecdecimals.png differ diff --git a/icon-themes/colibre/cmd/32/de/numberformatdecimal.png b/icon-themes/colibre/cmd/32/de/numberformatdecimal.png index 1e2e73c44c32..34cdd77a71b4 100644 Binary files a/icon-themes/colibre/cmd/32/de/numberformatdecimal.png and b/icon-themes/colibre/cmd/32/de/numberformatdecimal.png differ diff --git a/icon-themes/colibre/cmd/32/de/numberformatincdecimals.png b/icon-themes/colibre/cmd/32/de/numberformatincdecimals.png index db91c1cdf098..e85164c63fff 100644 Binary files a/icon-themes/colibre/cmd/32/de/numberformatincdecimals.png and b/icon-themes/colibre/cmd/32/de/numberformatincdecimals.png differ diff --git a/icon-themes/colibre/cmd/32/numberformatthousands.png b/icon-themes/colibre/cmd/32/numberformatthousands.png index 0775ed99c609..a806fa8f981e 100644 Binary files a/icon-themes/colibre/cmd/32/numberformatthousands.png and b/icon-themes/colibre/cmd/32/numberformatthousands.png differ diff --git a/icon-themes/colibre/cmd/32/resetattributes.png b/icon-themes/colibre/cmd/32/resetattributes.png index ee1841c2959b..0d0cb9779951 100644 Binary files a/icon-themes/colibre/cmd/32/resetattributes.png and b/icon-themes/colibre/cmd/32/resetattributes.png
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/layer/AnnotationManager.js| 10 ++ loleaflet/src/layer/tile/TileLayer.js |6 ++ loleaflet/src/layer/tile/WriterTileLayer.js |4 3 files changed, 20 insertions(+) New commits: commit 9749382a92c01eb5232133393f1f6efbc1c109c9 Author: Pranam Lashkari AuthorDate: Mon Sep 14 12:57:54 2020 +0530 Commit: Andras Timar CommitDate: Wed Sep 16 06:38:43 2020 +0200 leaflet: annotation: new option added to resolve thread Change-Id: Iba14345c782a6e28003845d238debe2935c54be6 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102781 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index d5d9f2264..7580884a8 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -647,6 +647,16 @@ L.AnnotationManager = L.Class.extend({ this._map.sendUnoCommand('.uno:ResolveComment', comment); }, + resolveThread: function (annotation) { + var comment = { + Id: { + type: 'string', + value: annotation._data.id + } + }; + this._map.sendUnoCommand('.uno:ResolveCommentThread', comment); + }, + updateResolvedState: function (annotation) { var threadIndexFirst = this.getRootIndexOf(annotation._data.id); if (this._items[threadIndexFirst]._data.resolved !== annotation._data.resolved) { diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index b5e4c0740..760620a1a 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -256,6 +256,12 @@ L.TileLayer = L.GridLayer.extend({ callback: function (key, options) { that.onAnnotationResolve.call(that, options.$trigger.get(0).annotation); } + }, + resolveThread: this._docType !== 'text' ? undefined : { + name: _('Resolve Thread'), + callback: function (key, options) { + that.onAnnotationResolveThread.call(that, options.$trigger.get(0).annotation); + } } }, events: { diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js index b41b7e58d..53a15bea6 100644 --- a/loleaflet/src/layer/tile/WriterTileLayer.js +++ b/loleaflet/src/layer/tile/WriterTileLayer.js @@ -70,6 +70,10 @@ L.WriterTileLayer = L.TileLayer.extend({ this._annotations.resolve(annotation); }, + onAnnotationResolveThread: function (annotation) { + this._annotations.resolveThread(annotation); + }, + onChangeAccept: function(id) { this._annotations.acceptChange(id); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src
loleaflet/src/layer/AnnotationManager.js| 12 loleaflet/src/layer/tile/TileLayer.js |6 ++ loleaflet/src/layer/tile/WriterTileLayer.js |4 3 files changed, 22 insertions(+) New commits: commit b3d481979beb62a393d86e8a3fcf2eacf468837b Author: Pranam Lashkari AuthorDate: Tue Sep 15 10:09:35 2020 +0530 Commit: Andras Timar CommitDate: Wed Sep 16 06:39:27 2020 +0200 leaflet: annotation: new option added to remove thread Change-Id: Ib1578af2e2b53d801b74c1d94be789f7a6bce84c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102782 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index 7580884a8..3c1198c7a 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -699,6 +699,18 @@ L.AnnotationManager = L.Class.extend({ this._map.focus(); }, + removeThread: function (id) { + var comment = { + Id: { + type: 'string', + value: id + } + }; + this._map.sendUnoCommand('.uno:DeleteCommentThread', comment); + this.unselect(); + this._map.focus(); + }, + _onRedlineAccept: function(e) { var command = { AcceptTrackedChange: { diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 760620a1a..0a5cd72b7 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -251,6 +251,12 @@ L.TileLayer = L.GridLayer.extend({ that.onAnnotationRemove.call(that, options.$trigger.get(0).annotation._data.id); } }, + removeThread: { + name: _('Remove Thread'), + callback: function (key, options) { + that.onAnnotationRemoveThread.call(that, options.$trigger.get(0).annotation._data.id); + } + }, resolve: this._docType !== 'text' ? undefined : { name: _('Resolve'), callback: function (key, options) { diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js index 53a15bea6..f32ea37ab 100644 --- a/loleaflet/src/layer/tile/WriterTileLayer.js +++ b/loleaflet/src/layer/tile/WriterTileLayer.js @@ -62,6 +62,10 @@ L.WriterTileLayer = L.TileLayer.extend({ this._annotations.remove(id); }, + onAnnotationRemoveThread: function (id) { + this._annotations.removeThread(id); + }, + onAnnotationReply: function (annotation) { this._annotations.reply(annotation); }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits