[Libreoffice-commits] core.git: vcl/jsdialog

2021-01-21 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |   10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 12a78b0c6c3db1df823d90e0359d84a549f2e894
Author: Szymon Kłos 
AuthorDate: Tue Jan 19 14:08:35 2021 +0100
Commit: Szymon Kłos 
CommitDate: Fri Jan 22 08:50:58 2021 +0100

jsdialog: enqueue update on dialog weld

Change-Id: I01f14cdf0aa3ea16cd311aed9abe14423e2ec846
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109727
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 836c73f3edea..658ee5ae18d6 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -484,16 +484,8 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id)
 
 RememberWidget("__DIALOG__", pRet.get());
 
-const vcl::ILibreOfficeKitNotifier* pNotifier = 
pDialog->GetLOKNotifier();
-if (pNotifier)
-{
-tools::JsonWriter aJsonWriter;
-m_aOwnedToplevel->DumpAsPropertyTree(aJsonWriter);
-aJsonWriter.put("id", m_aOwnedToplevel->GetLOKWindowId());
-pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, 
aJsonWriter.extractData());
-}
-
 initializeSender(GetNotifierWindow(), GetContentWindow(), 
GetTypeOfJSON());
+sendFullUpdate();
 }
 
 return pRet;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2021-01-21 Thread Tomaž Vajngerl (via logerrit)
 vcl/source/gdi/vectorgraphicdata.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit ea3514e72961a6ee8b86413dbdbb69c61b368079
Author: Tomaž Vajngerl 
AuthorDate: Sat Jan 2 00:18:25 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 22 08:22:50 2021 +0100

vcl: rename ambiguious aSequence variable to aPropertySequence

There is maSequence already, which is totally different to this
variable, so rename it to aPropertySequence, which should hint
at what it is actually used for.

Change-Id: Ia202c5bd69ed17ebe80ffb522538e03de2a83f3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109601
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/source/gdi/vectorgraphicdata.cxx 
b/vcl/source/gdi/vectorgraphicdata.cxx
index 5a977191fef4..608251dc62c9 100644
--- a/vcl/source/gdi/vectorgraphicdata.cxx
+++ b/vcl/source/gdi/vectorgraphicdata.cxx
@@ -218,11 +218,11 @@ void VectorGraphicData::ensureSequenceAndRange()
 std::copy(maDataContainer.cbegin(), maDataContainer.cend(), 
aDataSequence.begin());
 const uno::Reference xInputStream(new 
comphelper::SequenceInputStream(aDataSequence));
 
-uno::Sequence< ::beans::PropertyValue > aSequence;
+uno::Sequence< ::beans::PropertyValue > aPropertySequence;
 
 if (mpExternalHeader)
 {
-aSequence = mpExternalHeader->getSequence();
+aPropertySequence = mpExternalHeader->getSequence();
 }
 
 if (xInputStream.is())
@@ -235,12 +235,12 @@ void VectorGraphicData::ensureSequenceAndRange()
 
 if (!mbEnableEMFPlus)
 {
-auto aVector = 
comphelper::sequenceToContainer>(aSequence);
+auto aVector = 
comphelper::sequenceToContainer>(aPropertySequence);
 
aVector.push_back(comphelper::makePropertyValue("EMFPlusEnable", 
uno::makeAny(false)));
-aSequence = comphelper::containerToSequence(aVector);
+aPropertySequence = 
comphelper::containerToSequence(aVector);
 }
 
-maSequence = 
comphelper::sequenceToContainer>>(xEmfParser->getDecomposition(xInputStream, 
OUString(), aSequence));
+maSequence = 
comphelper::sequenceToContainer>>(xEmfParser->getDecomposition(xInputStream, 
OUString(), aPropertySequence));
 }
 
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2021-01-21 Thread Michael Weghorn (via logerrit)
 sc/source/core/data/dociter.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fc3b904b671a71266db2e8b30cbeeef4f7981753
Author: Michael Weghorn 
AuthorDate: Wed Jan 20 12:41:47 2021 +0100
Commit: Noel Grandin 
CommitDate: Fri Jan 22 08:03:59 2021 +0100

Related tdf#139782 sc: Make sure column exists before accessing it

While the first fix (Change-Id
I12a780bf52024cef31188651813d3a93cc2b5ddd,
"tdf#139782 sc: Don't try to access unallocated column") makes
opening the simplified bugdoc I had attached to tdf#139782 work,
the original document I was given (which I can't share as is, but
from which the simplified bugdoc was created) had more formulas and
managed to hit another similar issue related to the fact that columns
are now dynamically allocated, and crashed trying to access one that
wasn't yet allocated.

Fix this place as well by making sure the column exists.

Backtrace:

"#0  __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:50\n"
"#1  0x77aa7537 in __GI_abort () at abort.c:79\n"
"#2  0x7794beb1 in std::__throw_bad_exception() () at 
/lib/x86_64-linux-gnu/libstdc++.so.6\n"
"#3  0x7fffa0b161dc in 
std::__debug::vector 
>, std::allocator > > 
>::operator[](unsigned long) (this=0x58827250, __n=84) at 
/usr/include/c++/10/debug/vector:427\n"
"#4  0x7fffa0c23935 in ScColContainer::operator[](unsigned long) 
(this=0x58827250, nIndex=84) at 
.../libreoffice/sc/inc/colcontainer.hxx:44\n"
"#5  0x7fffa0c76275 in ScQueryCellIterator::InitPos() 
(this=0x7fff8040) at .../libreoffice/sc/source/core/data/dociter.cxx:1082\n"
"#6  0x7fffa0c76c28 in ScQueryCellIterator::GetFirst() 
(this=0x7fff8040) at .../libreoffice/sc/source/core/data/dociter.cxx:1233\n"
"#7  0x7fffa0c76fb6 in 
ScQueryCellIterator::FindEqualOrSortedLastInRange(short&, int&) 
(this=0x7fff8040, nFoundCol=@0x7fff7f58: 1024, 
nFoundRow=@0x7fff7fb0: 1048576) at 
.../libreoffice/sc/source/core/data/dociter.cxx:1304\n"
"#8  0x7fffa11b1529 in ScInterpreter::ScMatch() 
(this=0x619f7fd0) at 
.../libreoffice/sc/source/core/tool/interpr1.cxx:5050\n"
"#9  0x7fffa121f653 in ScInterpreter::Interpret() 
(this=0x619f7fd0) at 
.../libreoffice/sc/source/core/tool/interpr4.cxx:4247\n"
"#10 0x7fffa0f03bf5 in 
ScFormulaCell::InterpretTail(ScInterpreterContext&, 
ScFormulaCell::ScInterpretTailParameter) (this=0x5e793030, rContext=..., 
eTailParam=ScFormulaCell::SCITP_NORMAL) at 
.../libreoffice/sc/source/core/data/formulacell.cxx:1952\n"
"#11 0x7fffa0f028b2 in ScFormulaCell::Interpret(int, int) 
(this=0x5e793030, nStartOffset=-1, nEndOffset=-1) at 
.../libreoffice/sc/source/core/data/formulacell.cxx:1644\n"
"#12 0x7fffa0be0274 in ScFormulaCell::MaybeInterpret() 
(this=0x5e793030) at .../libreoffice/sc/inc/formulacell.hxx:445\n"
"#13 0x7fffa0f07b34 in ScFormulaCell::GetErrCode() 
(this=0x5e793030) at 
.../libreoffice/sc/source/core/data/formulacell.cxx:2974\n"
"#14 0x7fffa10bac28 in ScCellFormat::GetString(ScRefCellValue 
const&, unsigned int, rtl::OUString&, Color const**, SvNumberFormatter&, 
ScDocument const&, bool, bool, bool) (rCell=..., nFormat=0, rString=\"\", 
ppColor=0x7fff87e8, rFormatter=..., rDoc=..., bNullVals=true, 
bFormula=false, bUseStarFormat=false) at 
.../libreoffice/sc/source/core/tool/cellform.cxx:77\n"
"#15 0x7fffa0bcb8f8 in 
ScColumn::UpdateScriptType(sc::CellTextAttr&, int, 
mdds::detail::mtv::iterator_base, mdds::mtv::noncopyable_managed_element_block<53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, 
ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait, 
mdds::detail::mtv::private_data_forward_update > >&) (this=0x5e793330, rAttr=..., 
nRow=1, itr=...) at .../libreoffice/sc/source/core/data/column3.cxx:794\n"
"#16 0x7fffa0b9e315 in 
ScColumn::GetRangeScriptType(mdds::detail::mtv::iterator_base >, mdds::detail::mtv::event_func>::iterator_trait, 
mdds::detail::mtv::private_data_forward_update > >&, int, int, 
mdds::detail::mtv::iterator_base, mdds::mtv::noncopyable_managed_element_block<53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, 
ScFormulaCell> >, sc::CellStoreEvent>::iterator_trait, 
mdds::detail::mtv::private_data_forward_update > > const&) (this=0x5e793330, 
itPos=..., nRow1=1, nRow2=1, itrCells_=...) at 
.../libreoffice/sc/source/core/data/column2.cxx:2089\n"
"#17 0x7fffa0b27563 in (anonymous 
namespace)::FindEditCellsHandler::operator()(size_t, ScFormulaCell const*) 
(this=0x7fff9180, nRow=1, p=0x5e793030) at 
.../libreoffice/sc/source/core/data/column.cxx:3091\n"
"#18 0x7fffa0b31267 in 
sc::CheckElem, 
mdds::multi_type_vector, mdds::mtv::noncopyable_managed_element_block

[Libreoffice-commits] core.git: sc/source

2021-01-21 Thread Michael Weghorn (via logerrit)
 sc/source/core/data/dociter.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3032cf9df042f50511a15c6a627c50f708a34238
Author: Michael Weghorn 
AuthorDate: Wed Jan 20 12:21:43 2021 +0100
Commit: Noel Grandin 
CommitDate: Fri Jan 22 08:03:16 2021 +0100

tdf#139782 sc: Don't try to access unallocated column

This fixes a regression from

commit 7282014e362a1529a36c88eb308df8ed359c2cfa
Date:   Fri Feb 1 15:15:16 2019 +0100

tdf#50916 Makes numbers of columns dynamic.

Change-Id: I12a780bf52024cef31188651813d3a93cc2b5ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109704
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index d4e565edf80e..686e426c8d52 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1798,6 +1798,10 @@ bool ScQueryCellIterator::BinarySearch()
 
 assert(nTab < rDoc.GetTableCount() && "index out of bounds, FIX IT");
 nCol = maParam.nCol1;
+
+if (nCol >= rDoc.maTabs[nTab]->GetAllocatedColumnsCount())
+return false;
+
 ScColumn* pCol = &(rDoc.maTabs[nTab])->aCol[nCol];
 if (pCol->IsEmptyData())
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/inc sc/sdi sc/source

2021-01-21 Thread Pranam Lashkari (via logerrit)
 sc/inc/sc.hrc |2 +-
 sc/sdi/cellsh.sdi |1 +
 sc/sdi/scalc.sdi  |   17 +
 sc/source/ui/view/cellsh1.cxx |   34 ++
 4 files changed, 53 insertions(+), 1 deletion(-)

New commits:
commit 820984cdd2bc8f1bd8675606ec92eb42e01fff75
Author: Pranam Lashkari 
AuthorDate: Tue Jan 5 20:43:57 2021 +0530
Commit: Pranam Lashkari 
CommitDate: Fri Jan 22 07:51:53 2021 +0100

Added uno command for formula range selection

Change-Id: I01cd06ed51197ffe21102fb1fd0fcdce88ab333b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108810
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit e8a9157878f156e599e66349d7fb60ca39e62514)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109746
Reviewed-by: Pranam Lashkari 

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 52b945ea9441..9ada93af7dfa 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -614,7 +614,7 @@
 #define FID_DELETE_ALL_NOTES(SID_NEW_SLOTS+104)
 #define SID_SCATTR_CELLPROTECTION(SID_NEW_SLOTS+105)
 #define SID_SELECT_UNPROTECTED_CELLS (SID_NEW_SLOTS+106)
-
+#define SID_CURRENT_FORMULA_RANGE  (SID_NEW_SLOTS+107)
 // idl parameter
 
 #define SID_SORT_BYROW  (SC_PARAM_START)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index e58ef8de34a8..5a257fe690ac 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -228,6 +228,7 @@ interface CellSelection
 SID_DEC_INDENT  [ ExecMethod = ExecuteEdit; 
StateMethod = GetState; ]
 SID_INC_INDENT  [ ExecMethod = ExecuteEdit; 
StateMethod = GetState; ]
 SID_SELECT_UNPROTECTED_CELLS[ ExecMethod = ExecuteEdit;]
+SID_CURRENT_FORMULA_RANGE   [ ExecMethod = ExecuteEdit;]
 
 SID_THESAURUS   [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
 SID_SPELL_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 23b9c72fbe0f..3f14637f3d4b 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -4436,6 +4436,23 @@ SfxVoidItem SelectUnprotectedCells 
SID_SELECT_UNPROTECTED_CELLS
 GroupId = SfxGroupId::Edit;
 ]
 
+SfxVoidItem CurrentFormulaRange SID_CURRENT_FORMULA_RANGE
+(SfxInt32Item StartCol FN_PARAM_1,SfxInt32Item StartRow 
FN_PARAM_2,SfxInt32Item EndCol FN_PARAM_3,SfxInt32Item EndRow FN_PARAM_4, 
SfxInt32Item Table FN_PARAM_5)
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = SfxGroupId::Edit;
+]
+
 SfxVoidItem SelectOLE SID_OLE_SELECT
 ()
 [
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 07e6ad15a44e..ccd17f217fa1 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2704,6 +2704,40 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 }
 break;
 
+case SID_CURRENT_FORMULA_RANGE:
+{
+const SfxInt32Item* param1 = 
rReq.GetArg(FN_PARAM_1);
+SCCOL colStart = param1 ? param1->GetValue() : 0;
+
+const SfxInt32Item* param2 = 
rReq.GetArg(FN_PARAM_2);
+SCROW rowStart = param2 ? param2->GetValue() : 0;
+
+const SfxInt32Item* param3 = 
rReq.GetArg(FN_PARAM_3);
+SCCOL colEnd = param3 ? param3->GetValue() : 0;
+
+const SfxInt32Item* param4 = 
rReq.GetArg(FN_PARAM_4);
+SCROW rowEnd = param4 ? param4->GetValue() : 0;
+
+const SfxInt32Item* param5 = 
rReq.GetArg(FN_PARAM_5);
+SCROW table = param5 ? param5->GetValue() : 0;
+
+ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
+
+if(param3 && param4 && pInputHdl && pTabViewShell)
+{
+ScViewData& rViewData = pTabViewShell->GetViewData();
+ScTabView* pTabView = dynamic_cast< ScTabView* >( 
rViewData.GetView() );
+
+if (param1 && param2)
+rViewData.SetRefStart(colStart, rowStart, table);
+
+pTabView->UpdateRef( colEnd, rowEnd, table ); // setup the 
end & refresh formula
+
+pInputHdl->UpdateLokReferenceMarks();
+}
+}
+break;
+
 default:
 OSL_FAIL("incorrect slot in ExecuteEdit");
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source

2021-01-21 Thread Tomaž Vajngerl (via logerrit)
 include/vcl/graph.hxx  |1 +
 vcl/inc/graphic/Manager.hxx|3 +++
 vcl/inc/impgraph.hxx   |1 +
 vcl/source/filter/ipdf/pdfread.cxx |6 +-
 vcl/source/gdi/graph.cxx   |5 +
 vcl/source/gdi/impgraph.cxx|   17 +
 vcl/source/graphic/Manager.cxx |8 
 7 files changed, 36 insertions(+), 5 deletions(-)

New commits:
commit 3adff41ab14ab27ca07cffef0f38471ac5321ee2
Author: Tomaž Vajngerl 
AuthorDate: Sat Jan 2 00:12:25 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 22 07:49:17 2021 +0100

vcl: support creating a Graphic with only GfxLink as swapped-out

This adds support to create a Graphic with only a GfxLink and the
Graphic is in a swapped-out state. This is similar to the prepared
state, but the prepared state is a special state of the Graphic.
In the future, all loading will probably be done in this way and
prepared state will go away, but for now this is only supported
for PDF and is used in PDFium import only.

The main reason is to avoid that a multi-page PDF is immediately
swapped out after loading, which just does unneeded work and
freezes the application for a while.

Change-Id: I409741d27a4ad309264cdf27b2ba03f2cf37ead9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109600
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 86d885a326ac..79083bb5a224 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -89,6 +89,7 @@ public:
 SAL_DLLPRIVATE ImpGraphic* ImplGetImpGraphic() const { return 
mxImpGraphic.get(); }
 
 Graphic();
+Graphic(std::shared_ptr const & rGfxLink, 
sal_Int32 nPageIndex = 0);
 Graphic( const GraphicExternalLink& rGraphicLink );
 Graphic( const Graphic& rGraphic );
 Graphic( Graphic&& rGraphic ) noexcept;
diff --git a/vcl/inc/graphic/Manager.hxx b/vcl/inc/graphic/Manager.hxx
index 098c8644ac61..4319620e21c4 100644
--- a/vcl/inc/graphic/Manager.hxx
+++ b/vcl/inc/graphic/Manager.hxx
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -60,6 +61,8 @@ public:
 std::shared_ptr copy(std::shared_ptr const& 
pImpGraphic);
 std::shared_ptr newInstance();
 std::shared_ptr newInstance(const BitmapEx& rBitmapEx);
+std::shared_ptr newInstance(std::shared_ptr const& 
rLink,
+sal_Int32 nPageIndex = 0);
 std::shared_ptr
 newInstance(const std::shared_ptr& 
rVectorGraphicDataPtr);
 std::shared_ptr newInstance(const Animation& rAnimation);
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 2ee0e9ef61ec..6287be0df1b1 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -90,6 +90,7 @@ public:
 ImpGraphic( const ImpGraphic& rImpGraphic );
 ImpGraphic( ImpGraphic&& rImpGraphic ) noexcept;
 ImpGraphic( const GraphicExternalLink& rExternalLink);
+ImpGraphic(std::shared_ptr const& rGfxLink, sal_Int32 nPageIndex 
= 0);
 ImpGraphic( const BitmapEx& rBmpEx );
 ImpGraphic(const std::shared_ptr& 
rVectorGraphicDataPtr);
 ImpGraphic( const Animation& rAnimation );
diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index 7a7d1c75aa38..f2730dbfe811 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -474,14 +474,10 @@ size_t ImportPDFUnloaded(const OUString& rURL, 
std::vector& rG
 tools::Long nPageWidth = convertTwipToMm100(aPageSize.getX() * 
pointToTwipconversionRatio);
 tools::Long nPageHeight = convertTwipToMm100(aPageSize.getY() * 
pointToTwipconversionRatio);
 
-auto aVectorGraphicDataPtr = std::make_shared(
-aDataContainer, VectorGraphicDataType::Pdf, nPageIndex);
-
 // Create the Graphic with the VectorGraphicDataPtr and link the 
original PDF stream.
 // We swap out this Graphic as soon as possible, and a later swap in
 // actually renders the correct Bitmap on demand.
-Graphic aGraphic(aVectorGraphicDataPtr);
-aGraphic.SetGfxLink(pGfxLink);
+Graphic aGraphic(pGfxLink, nPageIndex);
 
 auto pPage = pPdfDocument->openPage(nPageIndex);
 
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 033e5576ce20..74a61e871e78 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -177,6 +177,11 @@ Graphic::Graphic(Graphic&& rGraphic) noexcept
 {
 }
 
+Graphic::Graphic(std::shared_ptr const & rGfxLink, sal_Int32 
nPageIndex)
+: mxImpGraphic(vcl::graphic::Manager::get().newInstance(rGfxLink, 
nPageIndex))
+{
+}
+
 Graphic::Graphic(GraphicExternalLink const & rGraphicExternalLink)
 : 
mxImpGraphic(vcl::graphic::Manager::get().newInstance(rGraphicExternalLink))
 {
diff --git a/vcl/source/gdi/impgraph.c

[Libreoffice-commits] core.git: vcl/source

2021-01-21 Thread Tomaž Vajngerl (via logerrit)
 vcl/source/gdi/impgraph.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 4cde10d255ce9741ca8ea115078b104dc4d67057
Author: Tomaž Vajngerl 
AuthorDate: Sat Jan 2 00:03:33 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 22 07:48:53 2021 +0100

vcl: optimize copying size in px to ImpSwapInfo when swapping out

Calling getSizePixel can force to create a bitmap for vector
graphic, only for the purpuse to get the size of the graphic in
pixels. We use this when swapping out, which is not ideal as
we would force create a replacement bitmap just before we would
get rid of it. This optimization will just copy the size in pixels
to the ImpSwapInfo structure if a bitmap exists and otherwise
leave it empty.

Change-Id: I9ccb1af4ddc63e77e2a6ca536cb4f762d0b5f182
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109599
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 6fe065896d3f..5e53a900a60f 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -334,7 +334,11 @@ void ImpGraphic::createSwapInfo()
 if (isSwappedOut())
 return;
 
-maSwapInfo.maSizePixel = getSizePixel();
+if (!maBitmapEx.IsEmpty())
+maSwapInfo.maSizePixel = maBitmapEx.GetSizePixel();
+else
+maSwapInfo.maSizePixel = Size();
+
 maSwapInfo.maPrefMapMode = getPrefMapMode();
 maSwapInfo.maPrefSize = getPrefSize();
 maSwapInfo.mbIsAnimated = isAnimated();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/Library_vcl.mk vcl/source

2021-01-21 Thread Tomaž Vajngerl (via logerrit)
 vcl/Library_vcl.mk |1 +
 vcl/inc/graphic/VectorGraphicLoader.hxx|   24 
 vcl/source/gdi/impgraph.cxx|   29 ++---
 vcl/source/graphic/VectorGraphicLoader.cxx |   26 ++
 4 files changed, 73 insertions(+), 7 deletions(-)

New commits:
commit 9ae99dd8bcb682ca86e51ea89744f3a1c1de1d03
Author: Tomaž Vajngerl 
AuthorDate: Fri Jan 1 23:44:57 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 22 07:48:28 2021 +0100

vcl: create PDF from DataContainer, use that when swapping in

VectorGraphicLoader is a set of functions that "load" a vector
graphic (starting with PDF) from a BinaryDataContainer. Usually
this only needs to create VectorGraphicData and set the correct
type, as loading will be done on-demand.

Use the VectorGraphicLoader function when swapping-in so this is
an alternative to calling LoadNative on GfxLink, which loads
into a new Graphic via. GraphicFilter, which is something we
really want to avoid.

Change-Id: If529c8ddca2b31660da4ea28d8e75bb20bf3c778
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109598
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index e58e6b8b3d17..a27af8f6d031 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -337,6 +337,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/graphic/UnoGraphicProvider \
 vcl/source/graphic/UnoGraphicTransformer \
 vcl/source/graphic/VectorGraphicSearch \
+vcl/source/graphic/VectorGraphicLoader \
 vcl/source/bitmap/impvect \
 vcl/source/bitmap/bitmap \
 vcl/source/bitmap/BitmapEx \
diff --git a/vcl/inc/graphic/VectorGraphicLoader.hxx 
b/vcl/inc/graphic/VectorGraphicLoader.hxx
new file mode 100644
index ..b6f38120885c
--- /dev/null
+++ b/vcl/inc/graphic/VectorGraphicLoader.hxx
@@ -0,0 +1,24 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+
+namespace vcl
+{
+std::shared_ptr
+loadPdfFromDataContainer(BinaryDataContainer const& rDataContainer);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 794d5ca68a22..6fe065896d3f 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define GRAPHIC_MTFTOBMP_MAXEXT 2048
 #define GRAPHIC_STREAMBUFSIZE   8192UL
@@ -1422,16 +1423,30 @@ bool ImpGraphic::swapIn()
 }
 else if (mpGfxLink && mpGfxLink->IsNative())
 {
-Graphic aGraphic;
-if (!mpGfxLink->LoadNative(aGraphic))
-return false;
+if (mpGfxLink->GetType() == GfxLinkType::NativePdf)
+{
+maVectorGraphicData = 
vcl::loadPdfFromDataContainer(mpGfxLink->getDataContainer());
 
-ImpGraphic* pImpGraphic = aGraphic.ImplGetImpGraphic();
+// Set to 0, to force recalculation
+mnSizeBytes = 0;
+mnChecksum = 0;
 
-if (meType != pImpGraphic->meType)
-return false;
+restoreFromSwapInfo();
 
-updateFromLoadedGraphic(pImpGraphic);
+mbSwapOut = false;
+}
+else
+{
+Graphic aGraphic;
+if (!mpGfxLink->LoadNative(aGraphic))
+return false;
+
+ImpGraphic* pImpGraphic = aGraphic.ImplGetImpGraphic();
+if (meType != pImpGraphic->meType)
+return false;
+
+updateFromLoadedGraphic(pImpGraphic);
+}
 
 maLastUsed = std::chrono::high_resolution_clock::now();
 bReturn = true;
diff --git a/vcl/source/graphic/VectorGraphicLoader.cxx 
b/vcl/source/graphic/VectorGraphicLoader.cxx
new file mode 100644
index ..988c3db803be
--- /dev/null
+++ b/vcl/source/graphic/VectorGraphicLoader.cxx
@@ -0,0 +1,26 @@
+/* -*- 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 
+
+namespace vcl
+{
+std::shared_ptr
+loadPdfFromDataContainer(BinaryDataContainer const& rDataContainer)
+{
+if (rDataContainer.isEmpty())
+return std::shared_ptr();
+
+return std::make_shared(rDataContainer, 
VectorGraphicDataType::Pdf);
+}
+}
+
+/* vi

[Libreoffice-commits] core.git: filter/source offapi/com vcl/source

2021-01-21 Thread Tomaž Vajngerl (via logerrit)
 filter/source/pdf/pdfdecomposer.cxx|   14 ++
 offapi/com/sun/star/graphic/XPdfDecomposer.idl |7 ---
 vcl/source/gdi/vectorgraphicdata.cxx   |   11 +++
 3 files changed, 21 insertions(+), 11 deletions(-)

New commits:
commit 2d0cefae7a899e5ed62730468f4fb0f25d6297e3
Author: Tomaž Vajngerl 
AuthorDate: Thu Dec 31 21:10:27 2020 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 22 07:48:09 2021 +0100

[API CHANGE] change XPdfDecomposer to use XBinaryDataContainer

Using BinaryDataContainer doesn't require to copy the data as it
is compatible with what is used in Graphic, VectorGraphicData and
GfxLink.

Change-Id: I01589158ae6bf6ac407bde60f07952e3968e3970
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109597
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/filter/source/pdf/pdfdecomposer.cxx 
b/filter/source/pdf/pdfdecomposer.cxx
index ce1321a3ceb5..f4572f93742a 100644
--- a/filter/source/pdf/pdfdecomposer.cxx
+++ b/filter/source/pdf/pdfdecomposer.cxx
@@ -17,11 +17,14 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 #include 
 #include 
 #include 
+#include 
 
 using namespace css;
 
@@ -38,7 +41,7 @@ public:
 
 // XPdfDecomposer
 uno::Sequence> SAL_CALL
-getDecomposition(const uno::Sequence& xPdfData,
+getDecomposition(const uno::Reference& 
xDataContainer,
  const uno::Sequence& 
xDecompositionParameters) override;
 
 // XServiceInfo
@@ -49,8 +52,9 @@ public:
 
 XPdfDecomposer::XPdfDecomposer(uno::Reference const&) 
{}
 
-uno::Sequence> SAL_CALL 
XPdfDecomposer::getDecomposition(
-const uno::Sequence& xPdfData, const 
uno::Sequence& xParameters)
+uno::Sequence> SAL_CALL
+XPdfDecomposer::getDecomposition(const 
uno::Reference& xDataContainer,
+ const uno::Sequence& 
xParameters)
 {
 sal_Int32 nPageIndex = -1;
 
@@ -66,8 +70,10 @@ uno::Sequence> 
SAL_CALL XPdfDecomposer::ge
 if (nPageIndex < 0)
 nPageIndex = 0;
 
+BinaryDataContainer aDataContainer = 
vcl::convertUnoBinaryDataContainer(xDataContainer);
+
 std::vector aBitmaps;
-int rv = vcl::RenderPDFBitmaps(xPdfData.getConstArray(), 
xPdfData.getLength(), aBitmaps,
+int rv = vcl::RenderPDFBitmaps(aDataContainer.getData(), 
aDataContainer.getSize(), aBitmaps,
nPageIndex, 1);
 if (rv == 0)
 return {}; // happens if we do not have PDFium
diff --git a/offapi/com/sun/star/graphic/XPdfDecomposer.idl 
b/offapi/com/sun/star/graphic/XPdfDecomposer.idl
index 25bf8870c1ee..9976475d74cd 100644
--- a/offapi/com/sun/star/graphic/XPdfDecomposer.idl
+++ b/offapi/com/sun/star/graphic/XPdfDecomposer.idl
@@ -11,6 +11,7 @@
 #define __com_sun_star_graphic_XPdfDecomposer_idl__
 
 #include 
+#include 
 
 module com {  module sun {  module star {  module graphic {
 
@@ -26,15 +27,15 @@ interface XPdfDecomposer : ::com::sun::star::uno::XInterface
 {
 /** Retrieve decomposed list - in this case a bitmap with the rendered PDF.
 
-@param xPdfData
-The PDF data.
+@param xDataContainer
+The PDF data in a data container
 
 @param xDecompositionParameters
 Parameters for decomposition. Parameters include:
 
 sal_Int32 PageIndex - which page to use
  */
-sequence getDecomposition([in] sequence xPdfData,
+sequence getDecomposition([in] 
com::sun::star::util::XBinaryDataContainer xDataContainer,
 [in] 
sequence xDecompositionParameters);
 };
 
diff --git a/vcl/source/gdi/vectorgraphicdata.cxx 
b/vcl/source/gdi/vectorgraphicdata.cxx
index 2afe12e97fbd..5a977191fef4 100644
--- a/vcl/source/gdi/vectorgraphicdata.cxx
+++ b/vcl/source/gdi/vectorgraphicdata.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -40,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -249,10 +251,11 @@ void VectorGraphicData::ensureSequenceAndRange()
 uno::Sequence aDecompositionParameters = 
comphelper::InitPropertySequence({
 {"PageIndex", uno::makeAny(mnPageIndex)},
 });
-// TODO: change xPdfDecomposer to use BinaryDataContainer directly
-css::uno::Sequence 
aDataSequence(maDataContainer.getSize());
-std::copy(maDataContainer.cbegin(), maDataContainer.cend(), 
aDataSequence.begin());
-auto xPrimitive2D = 
xPdfDecomposer->getDecomposition(aDataSequence, aDecompositionParameters);
+
+auto* pUnoBinaryDataContainer = new 
UnoBinaryDataContainer(getBinaryDataContainer());
+uno::Reference xDataContainer = 
pUnoBinaryDataContainer;
+
+auto xPrimitive2D = 
xPdfDecomposer->getDecomposition(xDataContainer, aDecompositionParameters);
 maSequence = 
comphelper::sequenceToContainer>>(xPrimitive

[Libreoffice-commits] core.git: external/libcdr external/libqxp

2021-01-21 Thread Stephan Bergmann (via logerrit)
 external/libcdr/UnpackedTarball_libcdr.mk  |1 +
 external/libcdr/ax_gcc_func_attribute.m4.patch |   11 +++
 external/libqxp/UnpackedTarball_libqxp.mk  |3 +++
 external/libqxp/ax_gcc_func_attribute.m4.patch |   11 +++
 4 files changed, 26 insertions(+)

New commits:
commit 05aedcba6672979d317b540bbfa74f5c9b409402
Author: Stephan Bergmann 
AuthorDate: Thu Jan 21 23:19:20 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 22 07:31:49 2021 +0100

Fix use of -fvisibility=hidden with Clang in external/libcdr, 
external/libqxp

At least on macOS x86-64 you get a warning

> [build LNK] Library/libwpftdrawlo.dylib
> ld: warning: direct access in function 
'std::__1::__shared_ptr_pointer::__shared_ptr_default_delete, std::__1::allocator 
>::__get_deleter(std::type_info const&) const' from file 
'workdir/UnpackedTarball/libzmf/src/lib/.libs/libzmf-0.0.a(ZMFDocument.o)' to 
global weak symbol 'typeinfo for 
std::__1::shared_ptr::__shared_ptr_default_delete' from file 
'workdir/UnpackedTarball/libcdr/src/lib/.libs/libcdr-0.1.a(CDRDocument.o)' 
means the weak symbol cannot be overridden at runtime. This was likely caused 
by different translation units being compiled with different visibility 
settings.

The reason is that libzmf uses -fvisibility=hidden and generates

> $ nm -m workdir/UnpackedTarball/libzmf/src/lib/.libs/libzmf-0.0.a | grep 
__ZTINSt3__110shared_ptrIN10librevenge15RVNGInputStreamEE27__shared_ptr_default_deleteIS2_S2_EE
> 6dd8 (__DATA,__const) weak private external 
__ZTINSt3__110shared_ptrIN10librevenge15RVNGInputStreamEE27__shared_ptr_default_deleteIS2_S2_EE

while libcdr erroneously does not use -fvisibility=hidden and generates

> $ nm -m workdir/UnpackedTarball/libcdr/src/lib/.libs/libcdr-0.1.a | grep 
__ZTINSt3__110shared_ptrIN10librevenge15RVNGInputStreamEE27__shared_ptr_default_deleteIS2_S2_EE
> 72b8 (__DATA,__const) weak external 
__ZTINSt3__110shared_ptrIN10librevenge15RVNGInputStreamEE27__shared_ptr_default_deleteIS2_S2_EE

The reason for that error is as follows:
workdir/UnpackedTarball/libcdr/configure.ac uses, among other things, the 
result
of

  AX_GCC_FUNC_ATTRIBUTE([visibility])

when deciding whether to use -fvisibility=hidden.  And the old ("serial 5")
workdir/UnpackedTarball/libcdr/m4/ax_gcc_func_attribute.m4 decides "no" if 
its
test compilation generates any warning output.  But Clang on macOS generates

> conftest.cpp:34:56: warning: target does not support 'protected' 
visibility; using 'default' [-Wunsupported-visibility]
> int foo_pro( void ) 
__attribute__((visibility("protected")));
>^

and lots of

> conftest.cpp:2:9: warning: macro is not used [-Wunused-macros]
> #define PACKAGE_NAME "libcdr"
> ^

(because of -Wunused-macros set for Clang in
solenv/gbuild/platform/com_GCC_defs.mk).

Same issue with external/libqxp, which would cause

> [LNK] Library/libwpftdrawlo.dylib
> ld: warning: direct access in function 
'std::__1::__shared_ptr_pointer::__shared_ptr_default_delete, std::__1::allocator 
>::__get_deleter(std::type_info const&) const' from file 
'workdir/UnpackedTarball/libcdr/src/lib/.libs/libcdr-0.1.a(CDRDocument.o)' to 
global weak symbol 'typeinfo for 
std::__1::shared_ptr::__shared_ptr_default_delete' from file 
'workdir/UnpackedTarball/libqxp/src/lib/.libs/libqxp-0.0.a(QXPMacFileParser.o)' 
means the weak symbol cannot be overridden at runtime. This was likely caused 
by different translation units being compiled with different visibility 
settings.

 "ax_gcc_func_attribute: Revise 
the
detection of unknown attributes", even though it was apparently meant to fix
something different, nicely fixes this Clang issue, making 
AX_GCC_FUNC_ATTRIBUTE
correctly detect support for visibility now.

When building with Clang on Linux, there is no -Wunsupported-visibility 
about
__attribute__((visibility("protected"))), but all the -Wunused-macros are
present as well, which caused all the AX_GCC_FUNC_ATTRIBUTE checks to be 
mis-
detected as "no" there, too.

There are more uses of AX_GCC_FUNC_ATTRIBUTE in
workdir/UnpackedTarball/libcdr/configure.ac and
workdir/UnpackedTarball/libqxp/configure.ac, and there are many more
workdir/UnpackedTarball/*/m4/ax_gcc_func_attribute.m4 in other external 
projects,
all of which may cause similar AX_GCC_FUNC_ATTRIBUTE mis-detections.  
However,
they do not cause any noticeable traces like the "direct access" ld warning 
here,
so I left those alone for now.  (Ultimately, all the upstream external 
projects
should probably de

[Libreoffice-commits] core.git: sw/qa sw/source

2021-01-21 Thread Justin Luth (via logerrit)
 sw/qa/uitest/data/tdf138546.odt |binary
 sw/qa/uitest/writer_tests4/tdf138546.py |   46 
 sw/source/ui/frmdlg/column.cxx  |   16 +--
 sw/source/uibase/inc/column.hxx |2 -
 4 files changed, 55 insertions(+), 9 deletions(-)

New commits:
commit b84bcb4fd70ae920ac2f54f70919b773fa9b2e78
Author: Justin Luth 
AuthorDate: Tue Dec 22 17:36:54 2020 +0300
Commit: Mike Kaganski 
CommitDate: Fri Jan 22 05:25:52 2021 +0100

tdf#138546 sw PageDialog: fix bad reset of colwidth

The presence of border padding was causing the algorithm
to reset the overall width, which in page style triggered
an even redistribution of the columns. That should only
happen when the number of columns changes, or else one of
the 5 predefined column choices is selected.

My first python unit test is included.
make UITest_writer_tests4 \
UITEST_TEST_NAME=tdf138546.tdf138546.test_tdf138546

Change-Id: I650e429568f2ab794649cc557998a809479b6e82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108210
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/uitest/data/tdf138546.odt b/sw/qa/uitest/data/tdf138546.odt
new file mode 100644
index ..8bfa9f6e5a2d
Binary files /dev/null and b/sw/qa/uitest/data/tdf138546.odt differ
diff --git a/sw/qa/uitest/writer_tests4/tdf138546.py 
b/sw/qa/uitest/writer_tests4/tdf138546.py
new file mode 100644
index ..c94f7eed3d48
--- /dev/null
+++ b/sw/qa/uitest/writer_tests4/tdf138546.py
@@ -0,0 +1,46 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import change_measurement_unit
+from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import select_pos
+import org.libreoffice.unotest
+import pathlib
+def get_url_for_data_file(file_name):
+return 
pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+class tdf138546(UITestCase):
+def test_tdf138546(self):
+self.ui_test.load_file(get_url_for_data_file("tdf138546.odt"))
+xWriterDoc = self.xUITest.getTopFocusWindow()
+
+change_measurement_unit(self, "Centimeter")
+
+#dialog Columns
+self.ui_test.execute_dialog_through_command(".uno:FormatColumns")
+xDialog = self.xUITest.getTopFocusWindow()
+
+colsnf = xDialog.getChild("colsnf")
+width1mf = xDialog.getChild("width1mf")
+self.assertEqual(get_state_as_dict(colsnf)["Text"], "2")
+self.assertEqual((get_state_as_dict(width1mf)["Text"])[0:3], "2.0") 
#2.00 cm
+xOKBtn = xDialog.getChild("cancel")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+self.ui_test.execute_dialog_through_command(".uno:PageDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+tabcontrol = xDialog.getChild("tabcontrol")
+select_pos(tabcontrol, "7") #Columns
+colsnf = xDialog.getChild("colsnf")
+width1mf = xDialog.getChild("width1mf")
+self.assertEqual(get_state_as_dict(colsnf)["Text"], "2")
+self.assertEqual((get_state_as_dict(width1mf)["Text"])[0:3], "2.0") 
#2.00 cm
+xOKBtn = xDialog.getChild("cancel")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 4adf7cb34447..472ce06acb82 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -903,12 +903,12 @@ void SwColumnPage::SetLabels( sal_uInt16 nVis )
  * the column number overwrites potential user's width settings; all columns
  * are equally wide.
  */
-IMPL_LINK(SwColumnPage, ColModify, weld::SpinButton&, rEdit, void)
+IMPL_LINK_NOARG(SwColumnPage, ColModify, weld::SpinButton&, void)
 {
-ColModify(&rEdit);
+ColModify(/*bForceColReset=*/false);
 }
 
-void SwColumnPage::ColModify(const weld::SpinButton* pNF)
+void SwColumnPage::ColModify(bool bForceColReset)
 {
 m_nCols = static_cast(m_xCLNrEdt->get_value());
 //#107890# the handler is also called from LoseFocus()
@@ -916,10 +916,10 @@ void SwColumnPage::ColModify(const weld::SpinButton* pNF)
 // #i17816# changing the displayed types within the ValueSet
 //from two columns to two columns with different settings doesn't 
invalidate the
 // example windows in ::ColModify()
-if (pNF && m_xColMgr->GetCount() == m_nCols)
+if (!bForceColReset && m_xColMgr->GetCount() == m_nCols)
 return;
 
-if (pNF)
+if (!bForceColReset)
 m_aDefaultVS.SetNoSelection();
 tools::Long nDist = static_cast< tools:

[Libreoffice-commits] core.git: vcl/source

2021-01-21 Thread Mert Tumer (via logerrit)
 vcl/source/app/salvtables.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f72c5680b0e10ad59e2abf0ebc1e71c94c41d173
Author: Mert Tumer 
AuthorDate: Wed Dec 16 21:02:42 2020 +0300
Commit: Mert Tumer 
CommitDate: Fri Jan 22 05:17:06 2021 +0100

Fix MouseClick shoud be MouseLeft for drawing area

Change-Id: I4dd0c6862c6473d3cbfcc4535c2d2ebe4a0a238a
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108683
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109215
Tested-by: Jenkins

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 6183b1a3ac24..fe93e637a823 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5921,7 +5921,7 @@ OutputDevice& SalInstanceDrawingArea::get_ref_device() { 
return *m_xDrawingArea;
 
 void SalInstanceDrawingArea::click(const Point& rPos)
 {
-MouseEvent aEvent(rPos);
+MouseEvent aEvent(rPos, 1, MouseEventModifiers::NONE, MOUSE_LEFT, 0);
 m_xDrawingArea->MouseButtonDown(aEvent);
 m_xDrawingArea->MouseButtonUp(aEvent);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa uitest/uitest

2021-01-21 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests8/tdf118308.py |   58 ++
 uitest/uitest/test.py |   15 ++--
 2 files changed, 69 insertions(+), 4 deletions(-)

New commits:
commit 86c8c775bbefe333d684e12c99855a3c1de68051
Author: Xisco Fauli 
AuthorDate: Thu Jan 21 23:16:19 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 22 00:41:28 2021 +0100

tdf#118308: sc: Add UItest

Change-Id: I4d23b4eda9abeb0c062259601ba9bfb2179d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109775
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/uitest/calc_tests8/tdf118308.py 
b/sc/qa/uitest/calc_tests8/tdf118308.py
new file mode 100644
index ..313a2dc35ec8
--- /dev/null
+++ b/sc/qa/uitest/calc_tests8/tdf118308.py
@@ -0,0 +1,58 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+
+class tdf118308(UITestCase):
+
+def test_tdf118308(self):
+calc_doc = self.ui_test.create_doc_in_start_center("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+
+enter_text_to_cell(gridwin, "A1", "A")
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+self.xUITest.executeCommand(".uno:Copy")
+
+self.ui_test.close_doc()
+
+calc_doc = self.ui_test.load_empty_file("calc")
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+
+self.ui_test.execute_dialog_through_command(".uno:PasteSpecial")
+xDialog = self.xUITest.getTopFocusWindow()
+
+# Without the fix in place, this test would have failed here
+# since a different dialog would have been opened and the children
+# wouldn't have been found
+xText = xDialog.getChild("text")
+xNumbers = xDialog.getChild("numbers")
+xDatetime = xDialog.getChild("datetime")
+xFormats = xDialog.getChild("formats")
+
+self.assertEqual("true", get_state_as_dict(xText)["Selected"])
+self.assertEqual("true", get_state_as_dict(xNumbers)["Selected"])
+self.assertEqual("true", get_state_as_dict(xDatetime)["Selected"])
+self.assertEqual("false", get_state_as_dict(xFormats)["Selected"])
+
+xOkBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkBtn)
+
+self.assertEqual("A", get_cell_by_position(document, 0, 0, 
0).getString())
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
+
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index 556fb511cc97..a746643638bf 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -66,10 +66,14 @@ class UITest(object):
 time_ += DEFAULT_SLEEP
 time.sleep(DEFAULT_SLEEP)
 
-def load_file(self, url):
+def load_file(self, url, eventName="OnLoad"):
+target = "_default"
+if eventName == "OnNew":
+target = "_blank"
+
 desktop = self.get_desktop()
-with EventListener(self._xContext, "OnLoad") as event:
-component = desktop.loadComponentFromURL(url, "_default", 0, 
tuple())
+with EventListener(self._xContext, eventName) as event:
+component = desktop.loadComponentFromURL(url, target, 0, tuple())
 time_ = 0
 while time_ < MAX_WAIT:
 if event.executed:
@@ -81,6 +85,10 @@ class UITest(object):
 time_ += DEFAULT_SLEEP
 time.sleep(DEFAULT_SLEEP)
 
+def load_empty_file(self, app):
+url = "private:factory/s" + app
+return self.load_file(url, "OnNew")
+
 def execute_dialog_through_command(self, command, printNames=False):
 with EventListener(self._xContext, "DialogExecute", 
printNames=printNames) as event:
 if not self._xUITest.executeDialog(command):
@@ -149,7 +157,6 @@ class UITest(object):
 if event.executed:
 frames = self.get_frames()
 self.get_desktop().setActiveFrame(frames[0])
-print(len(frames))
 return
 time_ += DEFAULT_SLEEP
 time.sleep(DEFAULT_SLEEP)
___
Libreoffice-com

[Libreoffice-commits] core.git: canvas/source sd/qa

2021-01-21 Thread Andrea Gelmini (via logerrit)
 canvas/source/directx/dx_surfacebitmap.cxx |2 +-
 sd/qa/unit/import-tests-smartart.cxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b3d713e7be354712f8815c877eb3787ac38bdc11
Author: Andrea Gelmini 
AuthorDate: Wed Jan 20 12:59:14 2021 +0100
Commit: Andrea Gelmini 
CommitDate: Fri Jan 22 00:16:58 2021 +0100

Fix typos

Change-Id: Ie8d28702bbae6c76924745a5a773393f1b831012
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109706
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/canvas/source/directx/dx_surfacebitmap.cxx 
b/canvas/source/directx/dx_surfacebitmap.cxx
index a118b31db2d8..e8eb44566c8f 100644
--- a/canvas/source/directx/dx_surfacebitmap.cxx
+++ b/canvas/source/directx/dx_surfacebitmap.cxx
@@ -540,7 +540,7 @@ namespace dxcanvas
 // lock the directx surface to receive the pointer to the surface 
memory.
 D3DLOCKED_RECT aLockedRect;
 
if(FAILED(mpSurface->LockRect(&aLockedRect,nullptr,D3DLOCK_NOSYSLOCK|D3DLOCK_READONLY)))
-throw uno::RuntimeException("failed to lock direcrx surface to 
surface memory");
+throw uno::RuntimeException("failed to lock directx surface to 
surface memory");
 
 sal_uInt8 const *pSrc = reinterpret_cast(data.getConstArray());
 sal_uInt8 *pDst = (static_cast(aLockedRect.pBits)+(rect.Y1*aLockedRect.Pitch))+rect.X1;
diff --git a/sd/qa/unit/import-tests-smartart.cxx 
b/sd/qa/unit/import-tests-smartart.cxx
index ecd881330f63..e4bf1d4d2c63 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -1731,7 +1731,7 @@ void SdImportTestSmartArt::testSnakeRows()
 void SdImportTestSmartArt::testCompositeInferRight()
 {
 // Load a smartart which contains a composite algorithm.
-// One contraint says that the left of the text should be the right of the 
image.
+// One constraint says that the left of the text should be the right of 
the image.
 sd::DrawDocShellRef xDocShRef = loadURL(
 
m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/smartart-composite-infer-right.pptx"),
 PPTX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2021-01-21 Thread Andrea Gelmini (via logerrit)
 sw/qa/uitest/writer_tests5/titlePageWizard.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9b19c772b85e2b19dd6a1296767d99119d54002d
Author: Andrea Gelmini 
AuthorDate: Thu Jan 21 13:34:02 2021 +0100
Commit: Andrea Gelmini 
CommitDate: Fri Jan 22 00:16:14 2021 +0100

Fix typo

Change-Id: Id6594ea397f08e1b460d8ba94cb05e674dfa2ba0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109757
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/sw/qa/uitest/writer_tests5/titlePageWizard.py 
b/sw/qa/uitest/writer_tests5/titlePageWizard.py
index 24d3ff4c53cb..a04ebaf61eff 100644
--- a/sw/qa/uitest/writer_tests5/titlePageWizard.py
+++ b/sw/qa/uitest/writer_tests5/titlePageWizard.py
@@ -81,7 +81,7 @@ class tdf138907(UITestCase):
 self.ui_test.execute_dialog_through_command(".uno:TitlePageDialog")
 xDialog = self.xUITest.getTopFocusWindow()
 print(xDialog.getChildren())
-#Insert thre title/index pages at page two.
+#Insert the title/index pages at page two.
 xPageCount = xDialog.getChild("NF_PAGE_COUNT")
 for _ in range(0,2):
 xPageCount.executeAction("UP", tuple())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-01-21 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/ods/tdf122643.ods  |binary
 sc/qa/unit/subsequent_filters-test.cxx |   14 ++
 2 files changed, 14 insertions(+)

New commits:
commit 09192bc178f7f7b21ef63508f516f52790f3307d
Author: Xisco Fauli 
AuthorDate: Thu Jan 21 21:30:44 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 22:52:25 2021 +0100

tdf#122643: sc_subsequent_filters: Add unittest

Change-Id: I89aed7ffbe40ddda19baff569b08580f1e4f118d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109770
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/data/ods/tdf122643.ods 
b/sc/qa/unit/data/ods/tdf122643.ods
new file mode 100644
index ..7c1d5485531e
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf122643.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index dea5fa845d80..6635feb5e10b 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -254,6 +254,7 @@ public:
 void testTdf100709XLSX();
 void testTdf97598XLSX();
 void testTdf110440XLSX();
+void testTdf122643();
 void testTdf132278();
 void testTdf130959();
 void testTdf129410();
@@ -438,6 +439,7 @@ public:
 CPPUNIT_TEST(testTdf100709XLSX);
 CPPUNIT_TEST(testTdf97598XLSX);
 CPPUNIT_TEST(testTdf110440XLSX);
+CPPUNIT_TEST(testTdf122643);
 CPPUNIT_TEST(testTdf132278);
 CPPUNIT_TEST(testTdf130959);
 CPPUNIT_TEST(testTdf129410);
@@ -3842,6 +3844,18 @@ void ScFiltersTest::testTdf110440XLSX()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf122643()
+{
+// Would crash without the fix on loading
+ScDocShellRef xDocSh = loadDoc(u"tdf122643.", FORMAT_ODS);
+CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+rDoc.CalcAll(); // perform hard re-calculation.
+
+xDocSh->DoClose();
+}
+
 void ScFiltersTest::testTdf132278()
 {
 // Would crash without the fix on loading
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source include/avmedia sd/qa svx/source

2021-01-21 Thread Miklos Vajna (via logerrit)
 avmedia/source/framework/mediaitem.cxx |   13 +
 include/avmedia/mediaitem.hxx  |8 ++--
 sd/qa/unit/export-tests-ooxml1.cxx |   23 +++
 svx/source/svdraw/svdomedia.cxx|5 +
 svx/source/unodraw/unoprov.cxx |1 +
 svx/source/unodraw/unoshap4.cxx|   31 +--
 6 files changed, 77 insertions(+), 4 deletions(-)

New commits:
commit e2d46da076f43a7c0d56fc486b9f15339243f7c9
Author: Miklos Vajna 
AuthorDate: Thu Jan 21 15:08:13 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 21 21:40:20 2021 +0100

avmedia: add doc model for bitmap fill of slide narrations

This allows specifying a custom bitmap for a media shape. It's mostly
useful for audio-only streams where the additional bitmap may be e.g. a
speaker icon to indicate this a narration.

Change-Id: I21c1b492ac09b631cf6e3ec8120be8b82c01c26d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109763
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index f42065e8e81e..54db2e3bc6bf 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -62,6 +63,7 @@ struct MediaItem::Impl
 boolm_bLoop;
 boolm_bMute;
 css::media::ZoomLevel m_eZoom;
+Graphic m_aGraphic;
 
 explicit Impl(AVMediaSetMask nMaskSet)
 : m_nMaskSet( nMaskSet )
@@ -104,6 +106,7 @@ bool MediaItem::operator==( const SfxPoolItem& rItem ) const
 && m_pImpl->m_URL == rOther.m_pImpl->m_URL
 && m_pImpl->m_Referer == rOther.m_pImpl->m_Referer
 && m_pImpl->m_sMimeType == rOther.m_pImpl->m_sMimeType
+&& m_pImpl->m_aGraphic == rOther.m_pImpl->m_aGraphic
 && m_pImpl->m_eState == rOther.m_pImpl->m_eState
 && m_pImpl->m_fDuration == rOther.m_pImpl->m_fDuration
 && m_pImpl->m_fTime == rOther.m_pImpl->m_fTime
@@ -188,6 +191,9 @@ void MediaItem::merge( const MediaItem& rMediaItem )
 if( AVMediaSetMask::MIME_TYPE & nMaskSet )
 setMimeType( rMediaItem.getMimeType() );
 
+if (nMaskSet & AVMediaSetMask::GRAPHIC)
+setGraphic(rMediaItem.getGraphic());
+
 if( AVMediaSetMask::STATE & nMaskSet )
 setState( rMediaItem.getState() );
 
@@ -256,6 +262,13 @@ OUString MediaItem::getMimeType() const
 return !m_pImpl->m_sMimeType.isEmpty() ? m_pImpl->m_sMimeType : 
AVMEDIA_MIMETYPE_COMMON;
 }
 
+void MediaItem::setGraphic(const Graphic& rGraphic)
+{
+m_pImpl->m_nMaskSet |= AVMediaSetMask::GRAPHIC;
+m_pImpl->m_aGraphic = rGraphic;
+}
+
+Graphic MediaItem::getGraphic() const { return m_pImpl->m_aGraphic; }
 
 void MediaItem::setState( MediaState eState )
 {
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index 7246c9e7e2a1..9e3fb4cd4530 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -32,6 +32,7 @@ namespace com::sun::star::embed { class XStorage; }
 namespace com::sun::star::frame { class XModel; }
 namespace com::sun::star::io { class XInputStream; }
 namespace com::sun::star::io { class XStream; }
+class Graphic;
 
 enum class AVMediaSetMask
 {
@@ -45,11 +46,12 @@ enum class AVMediaSetMask
 ZOOM= 0x040,
 URL = 0x080,
 MIME_TYPE   = 0x100,
-ALL = 0x1ff,
+GRAPHIC = 0x200,
+ALL = 0x3ff,
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 
@@ -115,6 +117,8 @@ public:
 
 voidsetMimeType( const OUString& rMimeType );
 OUStringgetMimeType() const;
+void setGraphic(const Graphic& rGraphic);
+Graphic getGraphic() const;
 const OUString& getTempURL() const;
 
 const OUString& getReferer() const;
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 5784d00d112d..91ce68e20a50 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -53,6 +53,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 using namespace css;
 
@@ -1313,6 +1315,27 @@ void SdOOXMLExportTest1::testNarrationMimeType()
 assertXPath(pXmlDoc,
 
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/media1.m4a']",
 "ContentType", "audio/mp4");
+
+// Check if the bitmap of the media shape is exported correctly.
+xmlDocUniquePtr pSlideDoc = parseExport(aTempFile, 
"ppt/slides/slide1.xml");
+OUString aImageId = getXPath(pSlideDoc, 
"/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip", "embed");
+xmlDocUniquePtr pRelsDoc = parseExport(aTempFile, 
"ppt/slides/_rels/slide1.xml.rels");
+OUString aImagePath = "/rels

Re: Calc memory consumption

2021-01-21 Thread Michael Meeks


On 20/01/2021 10:29, Daniel A. Rodriguez wrote:
>>> Hi, exists some kind of formula to estimate how much RAM a spreadsheet
>>> could use? For instance 468K rows and columns from A to AG.
>
> Well, trying to do something with such file using an i3 based PC with
> 4Gb freezes the software completely.

Both Tor and Noel are right; but I collect the 'shape' of pathological
spreadsheets as a hobby =)

Can you tell me:

+ what data-type is in each column
+ whether the column is sparse (ie, are
  there 'holes' in the data)
+ what formulae are used - and what their shape is ?
+ hopefully formulae are normally
  non-confidential
+ what file format you're using.

But of course, this really doesn't belong on the dev list, but in a bug
if you have one ?

In case nothing jumps out of the above data, possibly running a
sampling profiler under Linux like 'perf' might show what's being slow,
though I imagine it sounds like a memory issue (perhaps even a transient
memory use) problem.

Thanks ! =)

Michael.

-- 
michael.me...@collabora.com <><, GM Collabora Productivity
Hangout: mejme...@gmail.com, Skype: mmeeks
(M) +44 7795 666 147 - timezone usually UK / Europe
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source

2021-01-21 Thread Andras Timar (via logerrit)
 sfx2/source/appl/appserv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bfe856e7cb191888b723e6bb115242dc6d73d334
Author: Andras Timar 
AuthorDate: Thu Jan 21 21:27:38 2021 +0100
Commit: Andras Timar 
CommitDate: Thu Jan 21 21:29:04 2021 +0100

Use the he...@collaboraoffice.com for user feedback

Change-Id: I8a779b98e60a9037188674a0ad6fd60aa8ea32ee

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 07f56777b5af..47fb7a5f92c7 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -562,7 +562,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 case SID_SEND_FEEDBACK:
 {
 OUString module = SfxHelp::GetCurrentModuleIdentifier();
-OUString 
sURL("mailto:supp...@collaboraoffice.com?Subject=Version:%20"; + 
utl::ConfigManager::getAboutBoxProductVersion() +
+OUString 
sURL("mailto:he...@collaboraoffice.com?Subject=Version:%20"; + 
utl::ConfigManager::getAboutBoxProductVersion() +
 ",%20Locale:%20" + utl::ConfigManager::getUILocale() + 
",%20Module:%20" + module.copy(module.lastIndexOf('.') + 1 )  );
 sfx2::openUriExternally(sURL, false);
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa sc/source

2021-01-21 Thread Xisco Fauli (via logerrit)
 dev/null  |binary
 sc/qa/uitest/calc_tests2/tdf118189.py |   47 --
 sc/qa/uitest/calc_tests4/tdf118207.py |   55 
 sc/qa/unit/uicalc/uicalc.cxx  |  113 +-
 sc/source/ui/inc/viewfunc.hxx |2 
 sc/source/ui/view/viewfun3.cxx|4 -
 6 files changed, 114 insertions(+), 107 deletions(-)

New commits:
commit 9fd193168fe092bf15edbc81b8b1a15ca6d7c032
Author: Xisco Fauli 
AuthorDate: Sun Jan 17 21:00:11 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 21:16:46 2021 +0100

tdf#118207: tdf#118189: sc: Move UItest to CppUnitTest

Change-Id: I1084aaf66d0c1943fa1457de7bb58c2b0b1b1189
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109481
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/uitest/calc_tests2/tdf118189.py 
b/sc/qa/uitest/calc_tests2/tdf118189.py
deleted file mode 100644
index bd5bd41bafec..
--- a/sc/qa/uitest/calc_tests2/tdf118189.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# 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/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-#Bug 118189 - EDITING Crashes on Undo after Cut conditional formatting data
-
-class tdf118189(UITestCase):
-def test_tdf118189(self):
-calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf118189.xlsx"))
-xCalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = xCalcDoc.getChild("grid_window")
-document = self.ui_test.get_component()
-#1. Open attached document
-#2. Copy Column A
-gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
-self.xUITest.executeCommand(".uno:SelectColumn")
-self.xUITest.executeCommand(".uno:Copy")
-#3. New Spreadsheet
-calc_doc2 = 
self.ui_test.load_file(get_url_for_data_file("emptyFile.ods"))
-gridwin2 = xCalcDoc.getChild("grid_window")
-document2 = self.ui_test.get_component()
-
-frames = self.ui_test.get_frames()
-frames[1].activate()
-#4. Paste it
-gridwin2.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
-self.xUITest.executeCommand(".uno:Paste")
-#5. Cut it
-self.xUITest.executeCommand(".uno:Cut")
-#6. Undo
-self.xUITest.executeCommand(".uno:Undo")
-
-#-> CRASH
-self.assertEqual(get_cell_by_position(document2, 0, 0, 0).getString(), 
"On Back Order")
-
-self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
diff --git a/sc/qa/uitest/calc_tests4/tdf118207.py 
b/sc/qa/uitest/calc_tests4/tdf118207.py
deleted file mode 100644
index 82e821c91094..
--- a/sc/qa/uitest/calc_tests4/tdf118207.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# 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/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-#Bug 118207 - CRASH: Cutting and pasting a conditional format column and 
undoing
-
-class tdf118207(UITestCase):
-def test_tdf118207(self):
-calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf118189.xlsx"))
-xCalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = xCalcDoc.getChild("grid_window")
-document = self.ui_test.get_component()
-#Make sure that tools-options-LibreOffice Calc-General-Input 
settings-Show overwrite warning when pasting data is NOT tagged.
-self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog")  
#optionsdialog
-xDialogOpt = self.xUITest.getTopFocusWindow()
-
-xPages = xDialogOpt.getChild("pages")
-xCalcEntry = xPages.getChild('3') # Calc
-xCalcEntry.executeAction("EXPAND", tuple())
-xCalcGeneralEntry = xCalcEntry.getChild('0')
-xCalcGeneralEntry.executeAction("SELECT", tuple())  #General / 
replwarncb
-xreplwarncb = xDialogOpt.getChild("replwarnc

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1-0' - cui/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 cui/source/options/optaboutconfig.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0565308bbb1d654dc129f200b08e475ae3a4f97a
Author: Caolán McNamara 
AuthorDate: Mon Jan 18 12:01:43 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 20:57:23 2021 +0100

tdf#139332 reduce height of expert config dialog

to about the height of help, options

Change-Id: Icf2bebb2f2cc5aabea3e1f702d7095de8c31d726
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109527
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 9a98581b1379c17719f75ae85d3afe20b653c0d7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109581
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index fdcef5cf853d..4c8d3d8118a4 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -141,7 +141,7 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* 
pParent)
 , m_bSorted(false)
 {
 m_xPrefBox->set_size_request(m_xPrefBox->get_approximate_digit_width() * 
100,
- m_xPrefBox->get_height_rows(28));
+ m_xPrefBox->get_height_rows(23));
 m_xPrefBox->connect_column_clicked(LINK(this, CuiAboutConfigTabPage, 
HeaderBarClick));
 
 m_xEditBtn->connect_clicked(LINK( this, CuiAboutConfigTabPage, 
StandardHdl_Impl));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basctl/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/basidesh.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 7357210723e4bd90ca9b2c554d5667eb0085c19e
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 09:37:12 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 20:56:37 2021 +0100

Resolves: tdf#133345 Macros Editor IDE: no dialogbox tabs

Revert "property browser appearing as a blank area when changing modules"

This reverts commit a07f0a57378a8901d647e3e5de8347445a82ea17.

I no longer see a stray property browser area with this reverted anyway.

Change-Id: Icbf7c59f582172a9baef9e512c7ddbf7fba0ff85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109752
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index 28fea6e3dcc1..a42722ca9816 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -698,15 +698,14 @@ void Shell::UpdateWindows()
 for ( sal_Int32 j = 0 ; j < nDlgCount ; j++ )
 {
 OUString aDlgName = pDlgNames[ j ];
+// this find only looks for non-suspended 
windows;
+// suspended windows are handled in 
CreateDlgWin
+VclPtr pWin = FindDlgWin( doc, 
aLibName, aDlgName );
+if ( !pWin )
+pWin = CreateDlgWin( doc, aLibName, 
aDlgName );
 if ( !pNextActiveWindow && pLibInfoItem && 
pLibInfoItem->GetCurrentName() == aDlgName &&
  pLibInfoItem->GetCurrentType() == 
TYPE_DIALOG )
 {
-// this find only looks for non-suspended 
windows;
-// suspended windows are handled in 
CreateDlgWin
-VclPtr pWin = FindDlgWin( 
doc, aLibName, aDlgName );
-if ( !pWin )
-pWin = CreateDlgWin( doc, aLibName, 
aDlgName );
-
 pNextActiveWindow = pWin;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-01-21 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 53fffaec2e47278e4deb9d4500f57bd158d31a6e
Author: Seth Chaiklin 
AuthorDate: Thu Jan 21 20:39:12 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 21 20:39:12 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 18c3e6381615108470e2a17a786b317cc326561f
  - Related to: tdf#55457  how to turn off highlighting after text selection

tdf#55457 displayed confusions about how to "turn off"
highlighting when typing continues from the end of
a highlighted selection.

Added an item in the procedure to explain how to turn
off highlighting in that case.

Change-Id: If670b4de19b25e31b83a12503904bf056c8aeed9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109744
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/helpcontent2 b/helpcontent2
index f3c6e11313b7..18c3e6381615 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f3c6e11313b763dbc88dead50e766e0ab25ab243
+Subproject commit 18c3e6381615108470e2a17a786b317cc326561f
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2021-01-21 Thread Seth Chaiklin (via logerrit)
 source/text/shared/02/0216.xhp |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 18c3e6381615108470e2a17a786b317cc326561f
Author: Seth Chaiklin 
AuthorDate: Thu Jan 21 13:27:08 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Thu Jan 21 20:39:12 2021 +0100

Related to: tdf#55457  how to turn off highlighting after text selection

tdf#55457 displayed confusions about how to "turn off"
highlighting when typing continues from the end of
a highlighted selection.

Added an item in the procedure to explain how to turn
off highlighting in that case.

Change-Id: If670b4de19b25e31b83a12503904bf056c8aeed9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109744
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/source/text/shared/02/0216.xhp 
b/source/text/shared/02/0216.xhp
index 26d510fad..2a207051f 100644
--- a/source/text/shared/02/0216.xhp
+++ b/source/text/shared/02/0216.xhp
@@ -59,7 +59,10 @@
   
  Click the 
Character Highlighting Color icon on the Formatting 
bar.
   
- 
+  
+ If you want to type 
after the selection without highligthing, click CommandCtrl+M.
+  
+
 For Multiple SelectionsUFI: see 
#112387#
 

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: accessibility/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 accessibility/source/extended/accessibleeditbrowseboxcell.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a8f6a8722457ec8b6c02f41b628b5cee75b330f1
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 12:55:29 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 20:38:28 2021 +0100

constant 'Focused object has invalid index in parent' a11y warning

clicking in a cell in the databrowser always produces a11y warnings,
the EditBrowseBoxTableCell parent was set to AccessibleBrowseBoxAccess
but AccessibleBrowseBoxAccess cannot find it as a child. It appears
to be constructed with an EditBrowseBoxTableCellAccess as parent,
changing this to reflect that ownership results in no more warnings

Change-Id: Icdbf7157511ab606bf564f2f48df3a02bd7ede88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109759
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx 
b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
index 7aefcc98bfad..06165071b621 100644
--- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
+++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
@@ -207,7 +207,7 @@ namespace accessibility
 css::uno::Reference< css::accessibility::XAccessibleContext > 
xInnerContext = m_xControlAccessible->getAccessibleContext();
 css::uno::Reference< css::accessibility::XAccessible > xMe( this );
 
-xMyContext = new EditBrowseBoxTableCell( m_xParent, xMe, 
xInnerContext, *m_pBrowseBox, m_xFocusWindow, m_nRowPos, m_nColPos );
+xMyContext = new EditBrowseBoxTableCell( xMe, m_xParent, 
xInnerContext, *m_pBrowseBox, m_xFocusWindow, m_nRowPos, m_nColPos );
 m_aContext = xMyContext;
 }
 return xMyContext;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl vcl/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 include/vcl/button.hxx |7 ++
 include/vcl/toolkit/button.hxx |2 
 vcl/source/control/button.cxx  |  142 +++--
 3 files changed, 62 insertions(+), 89 deletions(-)

New commits:
commit f9b2db53b111d59f3cf9704ab49321e148616897
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 14:50:48 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 20:36:41 2021 +0100

merge pair of duplicate blocks together into one function

Change-Id: Id43553befd79dc73683444312629f473a5747678
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109716
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 58cb4c1f81fd..6faf8dadc5b7 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -61,6 +61,13 @@ public:
 protected:
 explicitButton( WindowType nType );
 
+// for drawing RadioButton or CheckButton that has Text and/or Image
+SAL_DLLPRIVATE void ImplDrawRadioCheck(OutputDevice* pDev, WinBits 
nWinStyle, DrawFlags nDrawFlags,
+   const Point& rPos, const Size& 
rSize,
+   const Size& rImageSize, 
tools::Rectangle& rStateRect,
+   tools::Rectangle& rMouseRect);
+SAL_DLLPRIVATE tools::Long ImplGetImageToTextDistance() const;
+
 public:
 virtual~Button() override;
 virtual voiddispose() override;
diff --git a/include/vcl/toolkit/button.hxx b/include/vcl/toolkit/button.hxx
index 58000cf7b705..2ff1bdf40c6c 100644
--- a/include/vcl/toolkit/button.hxx
+++ b/include/vcl/toolkit/button.hxx
@@ -95,7 +95,6 @@ private:
 const Size& rImageSize, tools::Rectangle& 
rStateRect,
 tools::Rectangle& rMouseRect );
 SAL_DLLPRIVATE void ImplDrawCheckBox(vcl::RenderContext& 
rRenderContext );
-SAL_DLLPRIVATE tools::Long ImplGetImageToTextDistance() const;
 SAL_DLLPRIVATE Size ImplGetCheckImageSize() const;
 
 CheckBox(const CheckBox &) = delete;
@@ -191,7 +190,6 @@ private:
 SAL_DLLPRIVATE void ImplDrawRadioButton(vcl::RenderContext& 
rRenderContext );
 SAL_DLLPRIVATE void ImplUncheckAllOther();
 SAL_DLLPRIVATE Size ImplGetRadioImageSize() const;
-SAL_DLLPRIVATE tools::Long ImplGetImageToTextDistance() const;
 
 RadioButton(const RadioButton &) = delete;
 RadioButton& operator= (const RadioButton &) = 
delete;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 77d28a6ead49..6f0da1194208 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1980,6 +1980,54 @@ void 
RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext)
 }
 }
 
+// for drawing RadioButton or CheckButton that has Text and/or Image
+void Button::ImplDrawRadioCheck(OutputDevice* pDev, WinBits nWinStyle, 
DrawFlags nDrawFlags,
+const Point& rPos, const Size& rSize,
+const Size& rImageSize, tools::Rectangle& 
rStateRect,
+tools::Rectangle& rMouseRect)
+{
+DrawTextFlags nTextStyle = Button::ImplGetTextStyle( nWinStyle, nDrawFlags 
);
+
+const tools::Long nImageSep = GetDrawPixel( pDev, 
ImplGetImageToTextDistance() );
+Size aSize( rSize );
+Point aPos( rPos );
+aPos.AdjustX(rImageSize.Width() + nImageSep );
+aSize.AdjustWidth( -(rImageSize.Width() + nImageSep) );
+
+// if the text rect height is smaller than the height of the image
+// then for single lines the default should be centered text
+if( (nWinStyle & (WB_TOP|WB_VCENTER|WB_BOTTOM)) == 0 &&
+(rImageSize.Height() > rSize.Height() || ! (nWinStyle & WB_WORDBREAK) 
) )
+{
+nTextStyle &= ~DrawTextFlags(DrawTextFlags::Top|DrawTextFlags::Bottom);
+nTextStyle |= DrawTextFlags::VCenter;
+aSize.setHeight( rImageSize.Height() );
+}
+
+ImplDrawAlignedImage( pDev, aPos, aSize, 1, nTextStyle );
+
+rMouseRect = tools::Rectangle( aPos, aSize );
+rMouseRect.SetLeft( rPos.X() );
+
+rStateRect.SetLeft( rPos.X() );
+rStateRect.SetTop( rMouseRect.Top() );
+
+if ( aSize.Height() > rImageSize.Height() )
+rStateRect.AdjustTop(( aSize.Height() - rImageSize.Height() ) / 2 );
+else
+{
+rStateRect.AdjustTop( -(( rImageSize.Height() - aSize.Height() ) / 2) 
);
+if( rStateRect.Top() < 0 )
+rStateRect.SetTop( 0 );
+}
+
+rStateRect.SetRight( rStateRect.Left()+rImageSize.Width()-1 );
+rStateRect.SetBottom( rStateRect.Top()+rImageSize.Height()-1 );
+
+if ( rStateRect.Bottom() > rMouseRect.Bottom() )
+rMouseRect.SetBottom( rStateRect.Bottom() );
+}
+
 void RadioButton::ImplDra

[Libreoffice-commits] core.git: desktop/source

2021-01-21 Thread Pranam Lashkari (via logerrit)
 desktop/source/lib/init.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 1a13ba5927e5f2fdd8f1461bae568b48dd4abe0b
Author: Pranam Lashkari 
AuthorDate: Wed Jan 20 14:30:14 2021 +0530
Commit: Pranam Lashkari 
CommitDate: Thu Jan 21 19:42:47 2021 +0100

Do not skip cursor invalidation if hyperlink in payload

Change-Id: Iba08f9a52a282bdab890eeb4194222d0b576d64b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109664
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit f7b31b02f2fe28f75d2a70c0261897aba4a7b72d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109676
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c8090aeff672..fbbf450b6530 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1414,7 +1414,9 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 
 // Suppress invalid payloads.
 if (type == LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR &&
-payload.find(", 0, 0, ") != std::string::npos)
+payload.find(", 0, 0, ") != std::string::npos &&
+payload.find("\"hyperlink\":\"\"") == std::string::npos &&
+payload.find("\"hyperlink\": {}") == std::string::npos)
 {
 // The cursor position is often the relative coordinates of the widget
 // issuing it, instead of the absolute one that we expect.
___
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' - vcl/jsdialog

2021-01-21 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/executor.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit f14e38653fc2298471e4fa3326c47b84a9bc7520
Author: Szymon Kłos 
AuthorDate: Wed Jan 13 09:13:29 2021 +0100
Commit: Henry Castro 
CommitDate: Thu Jan 21 19:18:45 2021 +0100

jsdialog: TreeView row activation

Change-Id: I3d2884d456f8b6fa01d2dbe6c4d2f7d9e9528e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109261
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 72f1cbe59a90921ef74bfda5ffb7f4db6578a1af)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109736
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 63a8f9dd011f..834962561acb 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -235,7 +235,19 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 pTreeView->select(nRow);
 pTreeView->set_cursor(nRow);
 LOKTrigger::trigger_changed(*pTreeView);
-//LOKTrigger::trigger_row_activated(*pTreeView);
+return true;
+}
+else if (sAction == "activate")
+{
+OString nRowString
+= OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
+int nRow = std::atoi(nRowString.getStr());
+
+pTreeView->unselect(pTreeView->get_selected_index());
+pTreeView->select(nRow);
+pTreeView->set_cursor(nRow);
+LOKTrigger::trigger_changed(*pTreeView);
+LOKTrigger::trigger_row_activated(*pTreeView);
 return true;
 }
 else if (sAction == "expand")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-01-21 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1ef6d9ede57df21a975a8554f3f967adc5876f73
Author: Olivier Hallot 
AuthorDate: Thu Jan 21 14:52:58 2021 -0300
Commit: Gerrit Code Review 
CommitDate: Thu Jan 21 18:52:58 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to f3c6e11313b763dbc88dead50e766e0ab25ab243
  - Review Calc's Change Image Anchor help page

Change-Id: Ic37f8960a05c8207210efc688b2161833c433cda
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109725
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 702f5ffa247d..f3c6e11313b7 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 702f5ffa247d7ccc0b35b08eb5a7756e1e1867ed
+Subproject commit f3c6e11313b763dbc88dead50e766e0ab25ab243
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2021-01-21 Thread Olivier Hallot (via logerrit)
 source/text/scalc/guide/change_image_anchor.xhp |   85 +++-
 1 file changed, 40 insertions(+), 45 deletions(-)

New commits:
commit f3c6e11313b763dbc88dead50e766e0ab25ab243
Author: Olivier Hallot 
AuthorDate: Wed Jan 20 17:30:19 2021 -0300
Commit: Olivier Hallot 
CommitDate: Thu Jan 21 18:52:58 2021 +0100

Review Calc's Change Image Anchor help page

Change-Id: Ic37f8960a05c8207210efc688b2161833c433cda
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109725
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/scalc/guide/change_image_anchor.xhp 
b/source/text/scalc/guide/change_image_anchor.xhp
index 854e7d196..e5f712b67 100644
--- a/source/text/scalc/guide/change_image_anchor.xhp
+++ b/source/text/scalc/guide/change_image_anchor.xhp
@@ -1,45 +1,40 @@
-
-
-
-
-
-  
-Change Image Anchor in Calc
-/text/scalc/guide/change_image_anchor.xhp
-  
-
-
-  
-anchor;image
-
-
-Change Anchor of Image
-  
-When 
you insert an image in Calc, it gets anchored to the cell by default and does 
not resize when moved.
-
-The image could be anchored in three different ways:
-
-  
-
- To Cell: When the image is anchored to 
cell, the image will move along with the cell( while copying, sorting or 
inserting cells).
-
-To Cell(resize with cell): When resize 
with cell option is selected, the image would move along with the cell. Also 
the size of the image will be altered according to the size of the destination 
cell. The aspect ratio of original image is maintained as long as the image 
fits into the cell. 
-
-To Page: When the image is anchored to 
page, ordering of cells or pasting in other cells do not affect the image 
position in the page.
-
-  
-  
-  
-  To Change the anchor of an 
imageInsert 
Image Dialog - Anchor. Or,
-on the context menu of the image choose - Anchor
-
-   The original size of the 
image and cell is preserved while pasting the entire row or entire column for 
both "To Cell" and "To Cell(resize with cell)" option.
-
-
\ No newline at end of file
+
+
+
+
+
+  
+Changing Image Anchor in 
Calc
+/text/scalc/guide/change_image_anchor.xhp
+  
+
+
+  
+anchor;image
+image anchor;in Calc
+image anchor in Calc;changing
+
+Changing the Anchor of an Image
+  
+Images 
are inserted in a Calc spreadsheet anchored to cells by default and do not 
resize when the cell is moved.
+Images 
can be anchored in three different ways:
+  
+
+ To Cell: the image will move along with 
the cell, when copying, sorting or inserting and deleting cells 
before.
+
+To Cell(resize with cell): the image 
will move along with the cell. In addition, the image height and width will be 
resized if the cell holding the anchor is later resized. The aspect ratio of 
the image follows the later aspect ratio of the cell holding the 
anchor.
+
+To Page: the image position in the page 
is not affected by cells ordering or cells movements.
+
+  
+  To Change the anchor of an 
imageSelect the 
image and choose Format - Anchor, or, on the context menu 
of the image choose Anchor
+   The original size of the 
image and cell is preserved while pasting the entire row or entire column for 
both To Cell and To Cell(resize with cell) 
options.
+
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-01-21 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx |   37 +++--
 1 file changed, 19 insertions(+), 18 deletions(-)

New commits:
commit 77ae9bbff7ce7118d711f7110ec15dab908f398e
Author: Xisco Fauli 
AuthorDate: Thu Jan 21 10:31:20 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 18:33:12 2021 +0100

CppunitTest_sc_uicalc: Add local function to select range

Change-Id: If3d7102ef10935e85e263eb4d2dc56d8a29b4e57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109731
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 884ed31488df..efdcd7c7af6d 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -60,6 +61,16 @@ static void lcl_AssertCurrentCursorPosition(SCCOL nCol, 
SCROW nRow)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(nRow), 
ScDocShell::GetViewData()->GetCurY());
 }
 
+static void lcl_SelectRangeFromString(const ScDocument& rDoc, const OUString& 
rStr)
+{
+ScRange aRange;
+sal_Int32 nOffset = 0;
+ScRangeStringConverter::GetRangeFromString(aRange, rStr, rDoc,
+   
formula::FormulaGrammar::CONV_OOO, nOffset);
+
+ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aRange);
+}
+
 constexpr OUStringLiteral DATA_DIRECTORY = u"/sc/qa/unit/uicalc/data/";
 
 ScModelObj* ScUiCalcTest::createDoc(const char* pName)
@@ -107,17 +118,13 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf120660)
 aInputOption.SetReplaceCellsWarn(false);
 pMod->SetInputOptions(aInputOption);
 
-// Select A8:E8
-ScRange aMatRange(0, 7, 0, 4, 7, 0);
-ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aMatRange);
+lcl_SelectRangeFromString(*pDoc, "A8:E8");
 
 ScDocument aClipDoc(SCDOCMODE_CLIP);
 ScDocShell::GetViewData()->GetView()->CopyToClip(&aClipDoc, false, false, 
false, false);
 Scheduler::ProcessEventsToIdle();
 
-// Select A4:E4
-aMatRange = ScRange(0, 3, 0, 4, 3, 0);
-ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aMatRange);
+lcl_SelectRangeFromString(*pDoc, "A4:E4");
 
 
ScDocShell::GetViewData()->GetView()->PasteFromClip(InsertDeleteFlags::ALL, 
&aClipDoc);
 Scheduler::ProcessEventsToIdle();
@@ -130,16 +137,12 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf120660)
 CPPUNIT_ASSERT_EQUAL(2200.0, pDoc->GetValue(ScAddress(4, 3, 0)));
 CPPUNIT_ASSERT_EQUAL(900.0, pDoc->GetValue(ScAddress(4, 7, 0)));
 
-// Select A8:D8
-aMatRange = ScRange(0, 7, 0, 3, 7, 0);
-ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aMatRange);
+lcl_SelectRangeFromString(*pDoc, "A8:D8");
 
 ScDocShell::GetViewData()->GetView()->CopyToClip(&aClipDoc, false, false, 
false, false);
 Scheduler::ProcessEventsToIdle();
 
-// Select A4:D4
-aMatRange = ScRange(0, 3, 0, 3, 3, 0);
-ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aMatRange);
+lcl_SelectRangeFromString(*pDoc, "A4:D4");
 
 
ScDocShell::GetViewData()->GetView()->PasteFromClip(InsertDeleteFlags::ALL, 
&aClipDoc);
 Scheduler::ProcessEventsToIdle();
@@ -536,9 +539,8 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf71339)
 pDoc->SetString(ScAddress(0, 1, 0), "1");
 pDoc->SetString(ScAddress(0, 2, 0), "1");
 
-// A1:A3
-ScRange aMatRange(0, 0, 0, 0, 2, 0);
-ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aMatRange);
+lcl_SelectRangeFromString(*pDoc, "A1:A3");
+
 dispatchCommand(mxComponent, ".uno:AutoSum", {});
 
 CPPUNIT_ASSERT_EQUAL(2.0, pDoc->GetValue(ScAddress(0, 3, 0)));
@@ -569,8 +571,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf81351)
 ScDocShell::GetViewData()->SetCurY(0);
 lcl_AssertCurrentCursorPosition(0, 0);
 
-ScRange aMatRange(0, 0, 0, 5, 4, 0);
-ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aMatRange);
+lcl_SelectRangeFromString(*pDoc, "A1:F5");
 
 dispatchCommand(mxComponent, ".uno:SortAscending", {});
 dispatchCommand(mxComponent, ".uno:GoDown", {});
@@ -602,7 +603,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf81351)
 CPPUNIT_ASSERT_EQUAL(OUString(".uno:Save"), pDoc->GetString(ScAddress(0, 
3, 0)));
 CPPUNIT_ASSERT_EQUAL(OUString(".uno:Undo"), pDoc->GetString(ScAddress(0, 
4, 0)));
 
-ScDocShell::GetViewData()->GetMarkData().SetMarkArea(aMatRange);
+lcl_SelectRangeFromString(*pDoc, "A1:F5");
 
 dispatchCommand(mxComponent, ".uno:SortDescending", {});
 dispatchCommand(mxComponent, ".uno:GoDown", {});
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-01-21 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx |   63 +--
 1 file changed, 31 insertions(+), 32 deletions(-)

New commits:
commit 7c82a66bf7855e5fd082b6da53079a7fbbd6eb72
Author: Xisco Fauli 
AuthorDate: Thu Jan 21 10:05:21 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 18:24:02 2021 +0100

CppunitTest_sc_uicalc: rename function and make it local

Change-Id: Id1e3e1a26cc03abf23059479b6c3e72255fc74df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109730
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index b99c1496087d..884ed31488df 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -34,7 +34,6 @@ public:
 virtual void tearDown() override;
 
 ScModelObj* createDoc(const char* pName);
-void checkCurrentCell(SCCOL nCol, SCROW nRow);
 
 protected:
 uno::Reference mxComponent;
@@ -55,7 +54,7 @@ void ScUiCalcTest::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
-void ScUiCalcTest::checkCurrentCell(SCCOL nCol, SCROW nRow)
+static void lcl_AssertCurrentCursorPosition(SCCOL nCol, SCROW nRow)
 {
 CPPUNIT_ASSERT_EQUAL(sal_Int16(nCol), 
ScDocShell::GetViewData()->GetCurX());
 CPPUNIT_ASSERT_EQUAL(sal_Int32(nRow), 
ScDocShell::GetViewData()->GetCurY());
@@ -82,17 +81,17 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf122232)
 CPPUNIT_ASSERT(pDoc);
 
 //Start with from C6. Press tabulator to reach G6.
-checkCurrentCell(2, 5);
+lcl_AssertCurrentCursorPosition(2, 5);
 
 pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
 pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_TAB);
 Scheduler::ProcessEventsToIdle();
-checkCurrentCell(6, 5);
+lcl_AssertCurrentCursorPosition(6, 5);
 
 //without the fix, cursor would jump to C29 instead of C7.
 pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::RETURN);
 Scheduler::ProcessEventsToIdle();
-checkCurrentCell(2, 6);
+lcl_AssertCurrentCursorPosition(2, 6);
 }
 
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf120660)
@@ -254,25 +253,25 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455)
 ScDocument* pDoc = pModelObj->GetDocument();
 CPPUNIT_ASSERT(pDoc);
 
-checkCurrentCell(0, 4);
+lcl_AssertCurrentCursorPosition(0, 4);
 dispatchCommand(mxComponent, ".uno:GoRight", {});
-checkCurrentCell(1, 4);
+lcl_AssertCurrentCursorPosition(1, 4);
 dispatchCommand(mxComponent, ".uno:GoRight", {});
-checkCurrentCell(4, 4);
+lcl_AssertCurrentCursorPosition(4, 4);
 dispatchCommand(mxComponent, ".uno:GoRight", {});
-checkCurrentCell(5, 4);
+lcl_AssertCurrentCursorPosition(5, 4);
 dispatchCommand(mxComponent, ".uno:GoRight", {});
-checkCurrentCell(8, 4);
+lcl_AssertCurrentCursorPosition(8, 4);
 dispatchCommand(mxComponent, ".uno:GoRight", {});
-checkCurrentCell(9, 4);
+lcl_AssertCurrentCursorPosition(9, 4);
 dispatchCommand(mxComponent, ".uno:GoRight", {});
-checkCurrentCell(12, 4);
+lcl_AssertCurrentCursorPosition(12, 4);
 
 //Cursor can't move forward to the right
 for (size_t i = 0; i < 5; ++i)
 {
 dispatchCommand(mxComponent, ".uno:GoRight", {});
-checkCurrentCell(13, 4);
+lcl_AssertCurrentCursorPosition(13, 4);
 }
 
 CPPUNIT_ASSERT_EQUAL(sal_Int16(0), ScDocShell::GetViewData()->GetTabNo());
@@ -280,7 +279,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455)
 dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
 
 CPPUNIT_ASSERT_EQUAL(sal_Int16(1), ScDocShell::GetViewData()->GetTabNo());
-checkCurrentCell(0, 3);
+lcl_AssertCurrentCursorPosition(0, 3);
 
 // Go to row 9
 for (size_t i = 0; i < 6; ++i)
@@ -288,7 +287,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455)
 dispatchCommand(mxComponent, ".uno:GoDown", {});
 }
 
-checkCurrentCell(0, 9);
+lcl_AssertCurrentCursorPosition(0, 9);
 
 dispatchCommand(mxComponent, ".uno:SelectRow", {});
 dispatchCommand(mxComponent, ".uno:DeleteRows", {});
@@ -296,7 +295,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455)
 dispatchCommand(mxComponent, ".uno:JumpToPrevTable", {});
 
 CPPUNIT_ASSERT_EQUAL(sal_Int16(0), ScDocShell::GetViewData()->GetTabNo());
-checkCurrentCell(13, 4);
+lcl_AssertCurrentCursorPosition(13, 4);
 
 // Cursor can't move forward to the right
 // Without the fix in place, this test would have failed with
@@ -305,7 +304,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf131455)
 for (size_t i = 0; i < 5; ++i)
 {
 dispatchCommand(mxComponent, ".uno:GoRight", {});
-checkCurrentCell(13, 4);
+lcl_AssertCurrentCursorPosition(13, 4);
 }
 }
 
@@ -315,25 +314,25 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126904)
 ScDocument* pDoc = pModelObj->GetDocument();
 CPPUNIT_ASSERT(pDoc);
 
-checkCurrentCell(0, 4);
+lcl_AssertC

[Libreoffice-commits] core.git: vcl/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 vcl/source/control/button.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bf68a2012a580c94ed562c2c9b032e2e973e0980
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 14:26:25 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 18:08:55 2021 +0100

RadioButton tick in a different place than CheckBox tick

since...

commit 302a00a3190743f5e6d2b61e5b40e493c4744b7e
Date:   Thu Jun 6 17:14:53 2019 +0900

tdf#124947 fix hit area of the radio buttons, size in ios theme

so under gen in tools, options, load/save, microsoft office the radio in
export as: shading is much higher than the create mso lock file
checkmark

Change-Id: Ib057c0725352f6a178df006e92024fedf9b82b79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109715
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 5fd00612a1a5..77d28a6ead49 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2018,7 +2018,6 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 
 rMouseRect = tools::Rectangle(aPos, aSize);
 rMouseRect.SetLeft(rPos.X());
-rMouseRect.SetTop(rPos.Y());
 
 rStateRect.SetLeft( rPos.X() );
 rStateRect.SetTop( rMouseRect.Top() );
@@ -3039,8 +3038,9 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 
 ImplDrawAlignedImage( pDev, aPos, aSize, 1, nTextStyle );
 
-rMouseRect  = tools::Rectangle( aPos, aSize );
+rMouseRect = tools::Rectangle( aPos, aSize );
 rMouseRect.SetLeft( rPos.X() );
+
 rStateRect.SetLeft( rPos.X() );
 rStateRect.SetTop( rMouseRect.Top() );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl vcl/qa vcl/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 include/vcl/toolkit/button.hxx |2 +-
 vcl/qa/cppunit/lifecycle.cxx   |4 ++--
 vcl/source/window/builder.cxx  |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b1617acde182d1683bdfb529794d7456f8b4bf6d
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 14:22:52 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 18:08:33 2021 +0100

drop RadioButton arg defaults

the nBits arg in builder.cxx was in the wrong place

Change-Id: Id4d0dd6919444cb39cf0d9e593f46d324f343a31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109714
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/vcl/toolkit/button.hxx b/include/vcl/toolkit/button.hxx
index 1a294d12f016..58000cf7b705 100644
--- a/include/vcl/toolkit/button.hxx
+++ b/include/vcl/toolkit/button.hxx
@@ -220,7 +220,7 @@ public:
 
  true is fairly straightforward, false leads to trick situations and is 
the legacy case
 */
-explicitRadioButton(vcl::Window* pParent, bool bUsesExplicitGroup 
= true, WinBits nWinStyle = 0);
+explicitRadioButton(vcl::Window* pParent, bool bUsesExplicitGroup, 
WinBits nWinStyle);
 virtual ~RadioButton() override;
 virtual voiddispose() override;
 
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx
index 2c9967e8bb0c..e25b03d279e4 100644
--- a/vcl/qa/cppunit/lifecycle.cxx
+++ b/vcl/qa/cppunit/lifecycle.cxx
@@ -127,7 +127,7 @@ void LifecycleTest::testWidgets(vcl::Window *pParent)
 (void)aPtr; // silence unused variable warning
 }
 {
-ScopedVclPtrInstance< RadioButton > aPtr( pParent );
+ScopedVclPtrInstance< RadioButton > aPtr( pParent, true, 0 );
 (void)aPtr; // silence unused variable warning
 }
 }
@@ -299,7 +299,7 @@ void LifecycleTest::testLeakage()
 aObjects.push_back(LeakTestObject::Create(xParent));
 aObjects.push_back(LeakTestObject::Create(xParent));
 aObjects.push_back(LeakTestObject::Create(xParent));
-aObjects.push_back(LeakTestObject::Create(xParent));
+aObjects.push_back(LeakTestObject::Create(xParent, true, 0));
 
 { // something that looks like a dialog
 
aObjects.push_back(LeakTestObject::Create(xParent,WB_CLIPCHILDREN|WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE|WB_SIZEABLE));
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index cdadb60b279f..34799354ae3e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1772,7 +1772,7 @@ VclPtr VclBuilder::makeObject(vcl::Window 
*pParent, const OString &
 {
 extractGroup(id, rMap);
 WinBits nBits = WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER|WB_3DLOOK;
-VclPtr xButton = VclPtr::Create(pParent, 
nBits);
+VclPtr xButton = VclPtr::Create(pParent, 
true, nBits);
 xButton->SetImageAlign(ImageAlign::Left); //default to left
 xWindow = xButton;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: RepositoryExternal.mk

2021-01-21 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 5e6e87f1556e484c4d4be7e3b01ef668ab602f3c
Author: Michael Stahl 
AuthorDate: Thu Jan 21 14:26:01 2021 +0100
Commit: Michael Stahl 
CommitDate: Thu Jan 21 17:28:57 2021 +0100

postgresql: fix mistake in RepositoryExternal.mk

Apparently causes "ERROR: Source for postgresql.filelist not found!" on
non-WNT.

Change-Id: I79cf9074bc8e4948febe76fc963231c916a274cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109760
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 3d9ca8da5551..03099d4aeb1c 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3050,6 +3050,12 @@ endef
 
 else # !SYSTEM_POSTGRESQL
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
+   postgresql \
+))
+endif # WNT
+
 define gb_LinkTarget__use_postgresql
 
 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
@@ -3062,10 +3068,6 @@ $(call gb_LinkTarget_set_include,$(1),\
 
 ifeq ($(OS),WNT)
 
-$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
-   postgresql \
-))
-
 $(call gb_LinkTarget_add_libs,$(1),\
$(call 
gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: icon-themes/elementary icon-themes/elementary_svg

2021-01-21 Thread Rizal Muttaqin (via logerrit)
 icon-themes/elementary/cmd/32/chainframes.png  |binary
 icon-themes/elementary/cmd/32/choosecontrols.png   |binary
 icon-themes/elementary/cmd/32/dbaddrelation.png|binary
 icon-themes/elementary/cmd/32/dbrelationdesign.png |binary
 icon-themes/elementary/cmd/32/insertframeinteract.png  |binary
 icon-themes/elementary/cmd/32/modifyframe.png  |binary
 icon-themes/elementary/cmd/32/navigationbar.png|binary
 icon-themes/elementary/cmd/32/pushbutton.png   |binary
 icon-themes/elementary/cmd/32/tabdialog.png|binary
 icon-themes/elementary/cmd/32/unhainframes.png |binary
 icon-themes/elementary/cmd/32/wraptext.png |binary
 icon-themes/elementary/cmd/lc_chainframes.png  |binary
 icon-themes/elementary/cmd/lc_dbaddrelation.png|binary
 icon-themes/elementary/cmd/lc_imagebutton.png  |binary
 icon-themes/elementary/cmd/lc_insertframeinteract.png  |binary
 icon-themes/elementary/cmd/lc_modifyframe.png  |binary
 icon-themes/elementary/cmd/lc_navigationbar.png|binary
 icon-themes/elementary/cmd/lc_pushbutton.png   |binary
 icon-themes/elementary/cmd/lc_tabdialog.png|binary
 icon-themes/elementary/cmd/lc_unhainframes.png |binary
 icon-themes/elementary/cmd/lc_wraptext.png |binary
 icon-themes/elementary/cmd/sc_chainframes.png  |binary
 icon-themes/elementary/cmd/sc_dataform.png |binary
 icon-themes/elementary/cmd/sc_dbaddrelation.png|binary
 icon-themes/elementary/cmd/sc_dbrelationdesign.png |binary
 icon-themes/elementary/cmd/sc_imagebutton.png  |binary
 icon-themes/elementary/cmd/sc_insertframeinteract.png  |binary
 icon-themes/elementary/cmd/sc_inserttreecontrol.png|binary
 icon-themes/elementary/cmd/sc_modifyframe.png  |binary
 icon-themes/elementary/cmd/sc_navigationbar.png|binary
 icon-themes/elementary/cmd/sc_pushbutton.png   |binary
 icon-themes/elementary/cmd/sc_tabdialog.png|binary
 icon-themes/elementary/cmd/sc_unhainframes.png |binary
 icon-themes/elementary/cmd/sc_wraptext.png |binary
 icon-themes/elementary/links.txt   |9 +++--
 icon-themes/elementary/res/grafikde.png|binary
 icon-themes/elementary/res/hldocntp.png|binary
 icon-themes/elementary/res/im30823.png |binary
 icon-themes/elementary/res/javacomponent_16.png|binary
 icon-themes/elementary/res/javalibrary_16.png  |binary
 icon-themes/elementary/res/lx03125.png |binary
 icon-themes/elementary/res/lx03126.png |binary
 icon-themes/elementary/res/lx03127.png |binary
 icon-themes/elementary/res/lx03129.png |binary
 icon-themes/elementary/res/lx03132.png |binary
 icon-themes/elementary/res/lx03162.png |binary
 icon-themes/elementary/res/lx03163.png |binary
 icon-themes/elementary/res/savemodified_extralarge.png |binary
 icon-themes/elementary/res/savemodified_large.png  |binary
 icon-themes/elementary/res/savemodified_small.png  |binary
 icon-themes/elementary/res/script.png  |binary
 icon-themes/elementary/res/sx03125.png |binary
 icon-themes/elementary/res/sx03126.png |binary
 icon-themes/elementary/res/sx03127.png |binary
 icon-themes/elementary/res/sx03132.png |binary
 icon-themes/elementary/res/sx03162.png |binary
 icon-themes/elementary/res/sx03163.png |binary
 icon-themes/elementary/res/sx03201.png |binary
 icon-themes/elementary/sc/res/dropurl.png  |binary
 icon-themes/elementary/sc/res/lc26049.png  |binary
 icon-themes/elementary/sc/res/sf02.png |binary
 icon-themes/elementary_svg/cmd/32/chainframes.svg  |2 +-
 icon-themes/elementary_svg/cmd/32/choosecontrols.svg   |2 +-
 icon-themes/elementary_svg/cmd/32/dbaddrelation.svg|2 +-
 icon-themes/elementary_svg/cmd/32/dbrelationdesign.svg |2 +-
 icon-themes/elementary_svg/cmd/32/insertframeinteract.svg  |1 +
 icon-themes/elementary_svg/cmd/32/modifyframe.svg  |2 +-
 icon-themes/elementary_svg/cmd/32/navigationbar.svg|2 +-
 icon-themes/elementary_svg/cmd/32/pushbutton.svg   |2 +-
 icon-themes/elementary_svg/cmd/32/tabdialog.svg|2 +-
 icon-themes/elementary_svg/cmd/32/unhainframes.svg |2 +-
 icon-themes/elementary_svg/cmd/32/wraptext.svg |2 +-
 icon-themes/elementary_svg/cmd/lc_chainframes.svg  |2 +-
 ic

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/inc sw/source

2021-01-21 Thread Michael Stahl (via logerrit)
 sw/inc/SwNumberTree.hxx|   14 +++---
 sw/inc/doc.hxx |2 +-
 sw/inc/list.hxx|2 ++
 sw/source/core/doc/list.cxx|   19 +++
 sw/source/core/doc/poolfmt.cxx |9 -
 sw/source/filter/writer/writer.cxx |   10 --
 sw/source/filter/ww8/rtfexport.cxx |2 +-
 sw/source/filter/ww8/wrtw8num.cxx  |4 +++-
 sw/source/uibase/app/docstyle.cxx  |6 +++---
 9 files changed, 52 insertions(+), 16 deletions(-)

New commits:
commit 31d6684c9a0e366f82b7cc92e43576f4495aaef6
Author: Michael Stahl 
AuthorDate: Wed Jan 13 11:03:17 2021 +0100
Commit: Michael Stahl 
CommitDate: Thu Jan 21 16:59:44 2021 +0100

tdf#135014 sw: fix crash exporting numbering to DOCX

It can happen that the default SwNumRule of a SwList isn't used by
anything directly, but there are other SwNumRule associated with that
SwList and then the DOCX export needs to export it as an abstract
numbering definition.

(regression from 632ee9aae6d5f3cf08b6d6b2789310c20db713b7)

Change-Id: I6b1851980464aaa95bf731a60b7d11ab91cec7b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109303
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit cd1c9f5167e797807d6726219f06190657f58372)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109335
Reviewed-by: Caolán McNamara 
(cherry picked from commit e0be320cc790856df4d9a102d15de08aa16217fa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109336
Tested-by: Michael Stahl 

diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index ad3ffe845110..e3d93a27766f 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -334,6 +334,13 @@ public:
 void IsSane(bool bRecursive) const;
 #endif // DBG_UTIL
 
+/**
+   Returns how many children this node has got.
+
+   @return number of children
+ */
+tSwNumberTreeChildren::size_type GetChildCount() const;
+
 protected:
 /** the children */
 tSwNumberTreeChildren mChildren;
@@ -355,13 +362,6 @@ protected:
  */
 virtual bool IsNotificationEnabled() const = 0;
 
-/**
-   Returns how many children this node has got.
-
-   @return number of children
- */
-tSwNumberTreeChildren::size_type GetChildCount() const;
-
 // #i64010# - made pure virtual
 virtual bool HasCountedChildren() const = 0;
 
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index b80e1157a7c9..83651fc8fcb2 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -851,7 +851,7 @@ public:
 bool IsUsed( const SwModify& ) const;
 /// Query if table style is used.
 bool IsUsed( const SwTableAutoFormat& ) const;
-static bool IsUsed( const SwNumRule& );
+bool IsUsed( const SwNumRule& );
 
 // Set name of newly loaded document template.
 size_t SetDocPattern(const OUString& rPatternName);
diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx
index d8b3e16943ea..64d62faa9c93 100644
--- a/sw/inc/list.hxx
+++ b/sw/inc/list.hxx
@@ -58,6 +58,8 @@ class SwList
 
 bool IsListLevelMarked( const int nListLevel ) const;
 
+bool HasNodes() const;
+
 private:
 SwList( const SwList& ) = delete;
 SwList& operator=( const SwList& ) = delete;
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index c81eef636ff1..3651e706f4b7 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -39,6 +39,8 @@ class SwListImpl
 
 const OUString& GetDefaultListStyleName() const { return 
msDefaultListStyleName;}
 
+bool HasNodes() const;
+
 void InsertListItem( SwNodeNum& rNodeNum, bool isHiddenRedlines,
  const int nLevel );
 static void RemoveListItem( SwNodeNum& rNodeNum );
@@ -122,6 +124,18 @@ SwListImpl::~SwListImpl() COVERITY_NOEXCEPT_FALSE
 }
 }
 
+bool SwListImpl::HasNodes() const
+{
+for (auto const& rNumberTree : maListTrees)
+{
+if (rNumberTree.pRoot->GetChildCount() != 0)
+{
+return true;
+}
+}
+return false;
+}
+
 void SwListImpl::InsertListItem( SwNodeNum& rNodeNum, bool const 
isHiddenRedlines,
  const int nLevel )
 {
@@ -225,6 +239,11 @@ SwList::~SwList()
 {
 }
 
+bool SwList::HasNodes() const
+{
+return mpListImpl->HasNodes();
+}
+
 const OUString & SwList::GetListId() const
 {
 return mpListImpl->GetListId();
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index be521cfdccd7..b32dcab95c1c 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -25,6 +25,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -106,9 +108,14 @@ bool SwDoc::IsUsed( const SwTableAutoFormat& 
rTableAutoFormat) const
 // See if the NumRule is used
 bool SwDoc::IsUsed( const SwNumRule& rRule )
 {
+SwList const*cons

[Libreoffice-commits] core.git: vcl/quartz

2021-01-21 Thread Stephan Bergmann (via logerrit)
 vcl/quartz/salgdicommon.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4578b867c37abd9fb822d1d6f4935bd961403973
Author: Stephan Bergmann 
AuthorDate: Thu Jan 21 13:42:53 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Jan 21 16:54:53 2021 +0100

loplugin:doubleconvert (macOS)

Change-Id: I3225ec0916b793a322acb44010563052451f782e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109758
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 33ffc43741a1..f58cfecf712e 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -1046,7 +1046,7 @@ Color AquaSalGraphics::getPixel( tools::Long nX, 
tools::Long nY )
 if (!maLayer.isSet() || (nX < 0) || (nX >= mnWidth) ||
 (nY < 0) || (nY >= mnHeight))
 {
-return sal_uInt32(COL_BLACK);
+return COL_BLACK;
 }
 // prepare creation of matching a CGBitmapContext
 #if defined OSL_BIGENDIAN
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/qa sc/source

2021-01-21 Thread Attila Szűcs (via logerrit)
 sc/qa/unit/subsequent_export-test.cxx |   29 +
 sc/source/filter/xml/xmltabi.cxx  |   22 +-
 2 files changed, 42 insertions(+), 9 deletions(-)

New commits:
commit 88476a6f89f2908fc8083dbbb53391b75192c783
Author: Attila Szűcs 
AuthorDate: Thu Jan 14 15:01:13 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 16:37:23 2021 +0100

tdf#51022 sc import: fix lost print ranges of last sheet

of documents with external references.

Processing external sheets could remove (or extend) the
print ranges of the last non-external sheet (indexed by
nCurTab).

Co-authored-by: Tibor Nagy (NISZ)

Change-Id: Ifc44148875106dad791de61953f3b046b6f2b188
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109295
Tested-by: László Németh 
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit bd6214e2aa6f25e013eef769529b75c1e3b580cb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109741
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index e2da767d9bbb..a64a14ec96a9 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -273,6 +273,7 @@ public:
 void testTdf126305_DataValidatyErrorAlert();
 void testTdf76047_externalLink();
 void testTdf87973_externalLinkSkipUnuseds();
+void testTdf51022_lostPrintRange();
 void testTdf138741_externalLinkSkipUnusedsCrash();
 void testTdf138824_linkToParentDirectory();
 void testTdf129969();
@@ -450,6 +451,7 @@ public:
 CPPUNIT_TEST(testTdf126305_DataValidatyErrorAlert);
 CPPUNIT_TEST(testTdf76047_externalLink);
 CPPUNIT_TEST(testTdf87973_externalLinkSkipUnuseds);
+CPPUNIT_TEST(testTdf51022_lostPrintRange);
 CPPUNIT_TEST(testTdf138741_externalLinkSkipUnusedsCrash);
 CPPUNIT_TEST(testTdf138824_linkToParentDirectory);
 CPPUNIT_TEST(testTdf129969);
@@ -5669,6 +5671,33 @@ void ScExportTest::testTdf87973_externalLinkSkipUnuseds()
 pDocSh->DoClose();
 }
 
+void ScExportTest::testTdf51022_lostPrintRange()
+{
+ScDocShellRef pShell = loadDoc(u"tdf87973_externalLinkSkipUnuseds.", 
FORMAT_ODS);
+CPPUNIT_ASSERT(pShell.is());
+
+pShell->ReloadAllLinks();
+ScDocument& rDoc = pShell->GetDocument();
+
+//Add print ranges
+ScRange aRange1(1, 2, 0, 3, 4, 0);
+ScRange aRange2(1, 6, 0, 3, 7, 0);
+rDoc.AddPrintRange(0, aRange1);
+rDoc.AddPrintRange(0, aRange2);
+
+// save and load back
+ScDocShellRef pDocSh = saveAndReload(&(*pShell), FORMAT_ODS);
+CPPUNIT_ASSERT(pDocSh.is());
+
+// check if the same print ranges are present
+ScDocument& rDoc2 = pDocSh->GetDocument();
+CPPUNIT_ASSERT_EQUAL(static_cast(2), 
rDoc2.GetPrintRangeCount(0));
+CPPUNIT_ASSERT_EQUAL(aRange1, *rDoc2.GetPrintRange(0, 0));
+CPPUNIT_ASSERT_EQUAL(aRange2, *rDoc2.GetPrintRange(0, 1));
+
+pDocSh->DoClose();
+}
+
 void ScExportTest::testTdf138741_externalLinkSkipUnusedsCrash()
 {
 ScDocShellRef xShell = loadDoc("tdf138741_externalLinkSkipUnusedsCrash.", 
FORMAT_XLSX);
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 55394c370fe8..abc82e02746a 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -353,19 +353,23 @@ void SAL_CALL ScXMLTableContext::endFastElement(sal_Int32 
/*nElement*/)
 
 ScMyTables& rTables = rImport.GetTables();
 SCTAB nCurTab = rTables.GetCurrentSheet();
-if (!sPrintRanges.isEmpty())
+// tdf#51022 process only print ranges of internal sheets
+if (!pExternalRefInfo)
 {
-ScRangeList aRangeList;
-ScRangeStringConverter::GetRangeListFromString( aRangeList, 
sPrintRanges, *pDoc, ::formula::FormulaGrammar::CONV_OOO );
-size_t nCount = aRangeList.size();
-for (size_t i=0; i< nCount; i++ )
+if (!sPrintRanges.isEmpty())
 {
-pDoc->AddPrintRange( nCurTab, aRangeList[i] );
+ScRangeList aRangeList;
+ScRangeStringConverter::GetRangeListFromString(aRangeList, 
sPrintRanges, *pDoc, ::formula::FormulaGrammar::CONV_OOO);
+size_t nCount = aRangeList.size();
+for (size_t i = 0; i < nCount; i++)
+{
+pDoc->AddPrintRange(nCurTab, aRangeList[i]);
+}
 }
+else if (!bPrintEntireSheet)
+// Sheet has "print entire sheet" option by default.  Remove it.
+pDoc->ClearPrintRanges(nCurTab);
 }
-else if (!bPrintEntireSheet)
-// Sheet has "print entire sheet" option by default.  Remove it.
-pDoc->ClearPrintRanges(nCurTab);
 
 ScOutlineTable* pOutlineTable(pDoc->GetOutlineTable(nCurTab));
 if (pOutlineTable)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.

[Libreoffice-commits] core.git: editeng/source idl/inc idl/source include/editeng

2021-01-21 Thread siddheshpatil777 (via logerrit)
 editeng/source/outliner/outlin2.cxx |4 ++--
 idl/inc/database.hxx|4 ++--
 idl/source/objects/bastype.cxx  |2 +-
 idl/source/prj/database.cxx |   22 +++---
 idl/source/prj/parser.cxx   |4 ++--
 include/editeng/outliner.hxx|4 ++--
 6 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 5419b894a2e791de24d10f0c4433a807e175e7a0
Author: siddheshpatil777 
AuthorDate: Wed Jan 6 14:14:33 2021 +0400
Commit: Michael Stahl 
CommitDate: Thu Jan 21 16:36:00 2021 +0100

tdf#114441: Convert use of sal_uLong to better integer types

Change-Id: I14742675541a315e72191df4ee38c35373b39d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108842
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/editeng/source/outliner/outlin2.cxx 
b/editeng/source/outliner/outlin2.cxx
index ff3d1583a5f1..df2e50389d3f 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -313,7 +313,7 @@ bool Outliner::IsInUndo() const
 return pEditEngine->IsInUndo();
 }
 
-sal_uLong Outliner::GetLineCount( sal_Int32 nParagraph ) const
+sal_uInt32 Outliner::GetLineCount( sal_Int32 nParagraph ) const
 {
 return pEditEngine->GetLineCount( nParagraph );
 }
@@ -323,7 +323,7 @@ sal_Int32 Outliner::GetLineLen( sal_Int32 nParagraph, 
sal_Int32 nLine ) const
 return pEditEngine->GetLineLen( nParagraph, nLine );
 }
 
-sal_uLong Outliner::GetLineHeight( sal_Int32 nParagraph )
+sal_uInt32 Outliner::GetLineHeight( sal_Int32 nParagraph )
 {
 return pEditEngine->GetLineHeight( nParagraph );
 }
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 79d289bee697..dcdf935931c5 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -111,8 +111,8 @@ public:
 voidSetAndWriteError( SvTokenStream & rInStm, const 
OString& rError );
 voidPush( SvMetaObject * pObj );
 sal_uInt32  GetUniqueId() { return ++nUniqueId; }
-boolFindId( const OString& rIdName, sal_uLong * pVal );
-voidInsertId( const OString& rIdName, sal_uLong nVal );
+boolFindId( const OString& rIdName, sal_uInt32 * pVal 
);
+voidInsertId( const OString& rIdName, sal_uInt32 nVal 
);
 boolReadIdFile( std::string_view rFileName );
 
 SvMetaType *FindType( std::string_view rName );
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index 098d5323..c68fa513ef0f 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -83,7 +83,7 @@ void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
 
 if( rTok.IsIdentifier() )
 {
-sal_uLong n;
+sal_uInt32 n;
 if( !rBase.FindId( rTok.GetString(), &n ) )
 rBase.SetAndWriteError( rInStm, "no value for identifier <" + 
getString() + "> " );
 setString(rTok.GetString());
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 6075a2da5fbd..56e05665b7f8 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -108,7 +108,7 @@ void SvIdlDataBase::Push( SvMetaObject * pObj )
 GetStack().push_back( pObj );
 }
 
-bool SvIdlDataBase::FindId( const OString& rIdName, sal_uLong * pVal )
+bool SvIdlDataBase::FindId( const OString& rIdName, sal_uInt32 * pVal )
 {
 if( pIdTable )
 {
@@ -122,7 +122,7 @@ bool SvIdlDataBase::FindId( const OString& rIdName, 
sal_uLong * pVal )
 return false;
 }
 
-void SvIdlDataBase::InsertId( const OString& rIdName, sal_uLong nVal )
+void SvIdlDataBase::InsertId( const OString& rIdName, sal_uInt32 nVal )
 {
 if( !pIdTable )
 pIdTable.reset( new SvStringHashTable );
@@ -163,7 +163,7 @@ bool SvIdlDataBase::ReadIdFile( std::string_view rOFileName 
)
 throw SvParseException( "unexpected token after define", 
rTok );
 aDefName = rTok.GetString();
 
-sal_uLong nVal = 0;
+sal_uInt32 nVal = 0;
 bool bOk = true;
 while( bOk )
 {
@@ -183,7 +183,7 @@ bool SvIdlDataBase::ReadIdFile( std::string_view rOFileName 
)
 }
 else if( rTok.IsIdentifier() )
 {
-sal_uLong n;
+sal_uInt32 n;
 if( FindId( rTok.GetString(), &n ) )
 nVal += n;
 else
@@ -317,10 +317,10 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
 SvToken& rTok = rInStm.GetToken_Next();
 if( rTok.IsIdentifier() )
 {
-sal_uLong n;
+sal_uInt32 n;
 if( FindId( rTok.GetString(), &n ) )
 {
-for( sal_uLong i = 0; i < aSlotList.size(); i++ )
+for( size_t i = 0;

ESC meeting minutes: 2021-01-21

2021-01-21 Thread Miklos Vajna
* Present:
+ Heiko, Sophie, Cloph, Gabriel, Stephan, Caolan, Olivier, Michael S, 
Miklos, Thorsten

* Completed Action Items:
+ restrict master direct pushes in core.git, enforce going via gerrit 
(Cloph)
   + pushed for review
+ Thorsten to create a voting sheet for this year’s TDF tender budget
   + sheet is next to this minutes
+ file a TDF infra ticket on redmine for git master → main rename (Michael 
S)
  + get input from sysadmin, done at 


* Pending Action Items:
+ get GSoC 2021 application kicked off until 29th January (Thorsten)

* Release Engineering update (Cloph)
+ 7.1 status
  + everything is ready, tagging rc3/final next week
  + branding/tagline for Community is done
+ 7.0 status
  + 7.0.5 far away (week 7)
+ Remotes: Android, iOS
+ Android viewer

* TDF tender budget for 2021 (Heiko)
+ https://wiki.documentfoundation.org/Development/Budget2021
+ voting deadline was the start of today’s call
+ Thorsten will sort the results → post some link to review the results
 + problem: can’t have the results right now
 + ideas without time estimates will be excluded
 + propose: do the same sorting as last year (Miklos)
   + anybody objecting to accept those results as is?
 => no objections (all)

* Documentation (Olivier)
+ Helpcontent2
   + Many updates and fixes (Seth Chaiklin, Bala Muthu, buovjaga,
Kompilainenn,Johnny_M, ohallot…
   + Some refactor and fixes after translation cycle
   + Scriptforge Help pages (Rafael lima, LibreOfficiant, J.P. Ledure)
+ Guides
   + Work in progress, significant increase in volunteer participation

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
240(240) (topicUI) bugs open, 262(262) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week1 month3 months   12 months
 added  25(11)39(-7)  69(-5)171(-7)
 commented 146(44)   348(-28)   1018(4)4106(33)
   removed   0(0)  0(-4)   6(-2) 49(-3)
  resolved  18(-1)43(-9) 153(7) 505(9)
+ top 10 contributors:
  Telesto made 212 changes in 1 month, and 928 changes in 1 year
  Heiko Tietze made 168 changes in 1 month, and 2466 changes in 1 year
  Foote, V Stuart made 78 changes in 1 month, and 691 changes in 1 year
  Seth Chaiklin made 51 changes in 1 month, and 212 changes in 1 year
  Dieter Praas made 35 changes in 1 month, and 484 changes in 1 year
  Ilmari Lauhakangas made 34 changes in 1 month, and 304 changes in 1 
year
  Kaganski, Mike made 24 changes in 1 month, and 174 changes in 1 year
  Roman Kuznetsov made 16 changes in 1 month, and 249 changes in 1 year
  Kainz, Andreas made 16 changes in 1 month, and 459 changes in 1 year
  Budea, Áron made 10 changes in 1 month, and 34 changes in 1 year

 + 25 new tickets with needsUXEval Jan/14-21

   * On Writer's standard TB and Insert menu: replace current "Text Box"
 a draw shape (.uno:DrawText) with the interactive frame with column
 (.uno:InsertFrameInteract) control
 + https://bugs.documentfoundation.org/show_bug.cgi?id=139606

   * Should "Bullets and Numbering" in Writer become "Bullets and Lists",
 with consistent use of "List Style" in Writer UI?
 + https://bugs.documentfoundation.org/show_bug.cgi?id=139667

* Crash Testing (Caolan)
+ 14(+1) import failure, 1(+0) export failures
+ 0 coverity issues
+ 15 ossfuzz issues, 12 timeouts
  + reverted throwing an exception on reading of bad streams

* Crash Reporting (Xisco)
   + https://crashreport.libreoffice.org/stats/version/6.4.7.2
 + (+131) 1556 1425 476 1349 1232 1411 1286 944 803 568 343 0
   + https://crashreport.libreoffice.org/stats/version/7.0.3.1
 + (+198) 6244 6046 2302 7544 6347 6410 6208 4932 3472 1732 0
   + https://crashreport.libreoffice.org/stats/version/7.0.4.2
 + (+1860) 3893 2033 1027 0

+ 
https://crashreport.libreoffice.org/stats/signature/EditLine::CalcTextSize(ParaPortion%20&)
+ will investigate when the code was added for this (Xisco)
* Mentoring/easyhack update
  committer...   1 week 1 month 3 months12 months
  open 103(28) 125(-12)180(23)  182(23)
   reviews 640(100)   1386(172)   3620(254)   14646(46)
merged 421(100)   1186(90)3775(201)   17665(92)
 abandoned  15(-11) 64(2)  187(-3)  962(-7)
   own commits 346(86)1007(94)3131(167)   14590(63)
review commits 136(33) 372(56)1218(95) 4746(61)
contributor...   1 week  1 month 3 months12 months
  open   32(-12)124(-16)147(-5)  1

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - dbaccess/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/browser/unodatbr.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit c22c707743814e2fa199a0517b510c12abaebc92
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 16:24:25 2021 +
Commit: Michael Stahl 
CommitDate: Thu Jan 21 16:19:30 2021 +0100

tdf#139298 New created query doesn't show any row

regression from...

commit 5f7cf9ccba25a94c275ec67936dc29f0adb4129a
Author: Caolán McNamara 
Date:   Mon Aug 10 19:49:25 2020 +0100

use InterimDBTreeListBox

Change-Id: I755879699aa6fcc9b42b5845ae60406794e11cc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109688
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/dbaccess/source/ui/browser/unodatbr.cxx 
b/dbaccess/source/ui/browser/unodatbr.cxx
index b05ad037377f..2496ec8bc2b6 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1092,14 +1092,14 @@ std::unique_ptr 
SbaTableQueryBrowser::getObjectEntry(const OUStr
 
 weld::TreeView& rTreeView = m_pTreeView->GetWidget();
 
-if (ppDataSourceEntry)
-{
-// (caller wants to have it...)
-*ppDataSourceEntry = rTreeView.make_iterator(xDataSource.get());
-}
-
 if (xDataSource)
 {
+if (ppDataSourceEntry)
+{
+// (caller wants to have it...)
+*ppDataSourceEntry = 
rTreeView.make_iterator(xDataSource.get());
+}
+
 // expand if required so
 if (bExpandAncestors)
 rTreeView.expand_row(*xDataSource);
@@ -1121,14 +1121,14 @@ std::unique_ptr 
SbaTableQueryBrowser::getObjectEntry(const OUStr
 }
 }
 
-if (ppContainerEntry)
-{
-// (caller wants to have it...)
-*ppContainerEntry = 
rTreeView.make_iterator(xCommandType.get());
-}
-
 if (xCommandType)
 {
+if (ppContainerEntry)
+{
+// (caller wants to have it...)
+*ppContainerEntry = 
rTreeView.make_iterator(xCommandType.get());
+}
+
 rTreeView.make_unsorted();
 
 // expand if required so
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1-0' - solenv/flatpak-manifest.in

2021-01-21 Thread Stephan Bergmann (via logerrit)
 solenv/flatpak-manifest.in |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 0476ae4b146cb922c0facabb720356aaa97ded4f
Author: Stephan Bergmann 
AuthorDate: Mon Jan 18 17:42:22 2021 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Jan 21 16:07:51 2021 +0100

Adapt solenv/flatpak-manifest.in to recent download.lst changes

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109565
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 2197f69f1b91ff13d0dcd078685ab23466241197)
Merge conflicts:
solenv/flatpak-manifest.in
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109632
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 3360f84050c46ff3ed862c2415e71469f479ce2f)
Merge conflicts:
solenv/flatpak-manifest.in

Change-Id: I8e81fd375bd819a62a543960a2368e3bf965c8c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109728
Reviewed-by: Xisco Fauli 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index b4e31e620a03..e14c8ad016a5 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -381,10 +381,10 @@
 "dest-filename": 
"external/tarballs/liborcus-0.16.1.tar.bz2"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/poppler-0.82.0.tar.xz";,
-"sha256": 
"234f8e573ea57fb6a008e7c1e56bfae1af5d1adf0e65f47555e1ae103874e4df",
+"url": 
"https://dev-www.libreoffice.org/src/poppler-21.01.0.tar.xz";,
+"sha256": 
"016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3",
 "type": "file",
-"dest-filename": "external/tarballs/poppler-0.82.0.tar.xz"
+"dest-filename": "external/tarballs/poppler-21.01.0.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/postgresql-9.2.24.tar.bz2";,
@@ -579,10 +579,10 @@
 "dest-filename": 
"external/tarballs/libatomic_ops-7.6.8.tar.gz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/skia-m86-e1e24080421116cf5d63b55cd5042176bebc0a43.tar.xz";,
-"sha256": 
"d6fe401003854f0487473f5692a4d37998c5eb82b501b2e4de72ad263467a0e6",
+"url": 
"https://dev-www.libreoffice.org/src/skia-m88-59bafeeaa7de9eb753e3778c414e01dcf013dcd8.tar.xz";,
+"sha256": 
"f293656a15342a53bb407b932fc907c6894178a162f09728bd383e24d84b1301",
 "type": "file",
-"dest-filename": 
"external/tarballs/skia-m86-e1e24080421116cf5d63b55cd5042176bebc0a43.tar.xz"
+"dest-filename": 
"external/tarballs/skia-m88-59bafeeaa7de9eb753e3778c414e01dcf013dcd8.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/dtoa-20180411.tgz";,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1-0' - icon-themes/colibre setup_native/source

2021-01-21 Thread Heiko Tietze (via logerrit)
 icon-themes/colibre/brand/intro-highres.png|binary
 icon-themes/colibre/brand/intro.png|binary
 setup_native/source/packinfo/osxdndinstall.png |binary
 3 files changed

New commits:
commit 6a7688cc7c3d113dfd7f36cccacd91a7e70b72dd
Author: Heiko Tietze 
AuthorDate: Mon Jan 18 16:50:35 2021 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Jan 21 16:06:03 2021 +0100

Community splash screen without Edition

macOS installer shows also just Community now

Change-Id: Ia71d3b3a376f8e5e2254f2863ea61f065fb2d86f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109577
Reviewed-by: Heiko Tietze 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/icon-themes/colibre/brand/intro-highres.png 
b/icon-themes/colibre/brand/intro-highres.png
index 58feb7f1c262..aba1a53ae0bb 100644
Binary files a/icon-themes/colibre/brand/intro-highres.png and 
b/icon-themes/colibre/brand/intro-highres.png differ
diff --git a/icon-themes/colibre/brand/intro.png 
b/icon-themes/colibre/brand/intro.png
index a4f36cd3b65d..52499ada77db 100644
Binary files a/icon-themes/colibre/brand/intro.png and 
b/icon-themes/colibre/brand/intro.png differ
diff --git a/setup_native/source/packinfo/osxdndinstall.png 
b/setup_native/source/packinfo/osxdndinstall.png
index b31d1b52aa5c..79a92a525a3b 100644
Binary files a/setup_native/source/packinfo/osxdndinstall.png and 
b/setup_native/source/packinfo/osxdndinstall.png differ
___
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' - oox/inc oox/source sd/qa

2021-01-21 Thread Gülşah Köse (via logerrit)
 oox/inc/drawingml/fillproperties.hxx|3 +-
 oox/source/drawingml/fillproperties.cxx |   34 +++-
 oox/source/drawingml/shape.cxx  |2 -
 sd/qa/unit/data/pptx/tdf134210.pptx |binary
 sd/qa/unit/import-tests.cxx |   19 +
 5 files changed, 55 insertions(+), 3 deletions(-)

New commits:
commit 9ac58bf3a6d0a72c5452a9cc162554b3a667d2e0
Author: Gülşah Köse 
AuthorDate: Wed Jan 20 00:52:56 2021 +0300
Commit: Gülşah Köse 
CommitDate: Thu Jan 21 16:05:24 2021 +0100

tdf#134210 Import support for custom stretch values.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109658
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 
(cherry picked from commit 2c96bd26ec488d865370fe9d394e7c4e228e05ab)

Change-Id: I33ced8d667e37b7fb79f4c87b689f45966ac0097
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109739
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gülşah Köse 

diff --git a/oox/inc/drawingml/fillproperties.hxx 
b/oox/inc/drawingml/fillproperties.hxx
index 45f5c4b40272..e77885058d24 100644
--- a/oox/inc/drawingml/fillproperties.hxx
+++ b/oox/inc/drawingml/fillproperties.hxx
@@ -148,7 +148,8 @@ struct OOX_DLLPUBLIC FillProperties
 sal_Int32 nShapeRotation = 0,
 ::Color nPhClr = API_RGB_TRANSPARENT,
 bool bFlipH = false,
-bool bFlipV = false ) const;
+bool bFlipV = false,
+bool bIsCustomShape = false ) const;
 };
 
 } // namespace drawingml
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 863d3b846c60..b508f0f2ba77 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -93,6 +93,32 @@ Reference< XGraphic > 
lclRotateGraphic(uno::Reference const &
 return aReturnGraphic.GetXGraphic();
 }
 
+Reference< XGraphic > lclCropGraphic(uno::Reference const & 
xGraphic, geometry::IntegerRectangle2D aFillRect)
+{
+::Graphic aGraphic(xGraphic);
+::Graphic aReturnGraphic;
+
+assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+
+sal_Int32 nOrigHeight = aBitmapEx.GetSizePixel().Height();
+sal_Int32 nHeight = nOrigHeight;
+sal_Int32 nTopCorr  = nOrigHeight * -1 * static_cast(aFillRect.Y1) 
/ 10;
+nHeight += nTopCorr;
+sal_Int32 nBottomCorr = nOrigHeight * -1 * 
static_cast(aFillRect.Y2) / 10;
+nHeight += nBottomCorr;
+
+aBitmapEx.Scale(Size(aBitmapEx.GetSizePixel().Width(), nHeight));
+aBitmapEx.Crop(tools::Rectangle(Point(0, nTopCorr), 
Size(aBitmapEx.GetSizePixel().Width(), nOrigHeight)));
+
+aReturnGraphic = ::Graphic(aBitmapEx);
+aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+
+return aReturnGraphic.GetXGraphic();
+}
+
+
 Reference< XGraphic > lclCheckAndApplyChangeColorTransform(const 
BlipFillProperties &aBlipProps, uno::Reference const & 
xGraphic,
const 
GraphicHelper& rGraphicHelper, const ::Color nPhClr)
 {
@@ -278,7 +304,7 @@ Color FillProperties::getBestSolidColor() const
 
 void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
 const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation, ::Color 
nPhClr,
-bool bFlipH, bool bFlipV ) const
+bool bFlipH, bool bFlipV, bool bIsCustomShape) const
 {
 if( moFillType.has() )
 {
@@ -668,6 +694,12 @@ void FillProperties::pushToPropMap( ShapePropertyMap& 
rPropMap,
 if ( aFillRect.Y2 )
 aGraphCrop.Bottom = static_cast< sal_Int32 
>( ( static_cast< double >( aOriginalSize.Height ) * aFillRect.Y2 ) / 10 );
 rPropMap.setProperty(PROP_GraphicCrop, 
aGraphCrop);
+
+if(bIsCustomShape)
+{
+xGraphic = lclCropGraphic(xGraphic, 
aFillRect);
+
rPropMap.setProperty(ShapeProperty::FillBitmap, xGraphic);
+}
 }
 }
 }
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index bf75f2e5f8df..6deae9f4992d 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1065,7 +1065,7 @@ Reference< XShape > const & Shape::createAndInsert(
 if (getFillProperties().moFillType.has() && 
getFillProperties().moFillType.get() == XML_grpFill)
 getFillProperties().assignUsed(aFillProperties);
 if(!bIsCroppedGraphic)
-aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, 
mnRotation, nFillPhClr, mbFlipH, mbFlipV );
+aFillProperties.pushToPropMap( aShapePr

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - oox/source sd/qa

2021-01-21 Thread Mark Hung (via logerrit)
 oox/source/ppt/timenode.cxx |   57 ++--
 sd/qa/unit/data/pptx/tdf128550.pptx |binary
 sd/qa/unit/export-tests.cxx |   14 
 3 files changed, 63 insertions(+), 8 deletions(-)

New commits:
commit d56e4aea5fd5d777204f9f4e4b14cf0047348beb
Author: Mark Hung 
AuthorDate: Sat Jan 16 23:48:56 2021 +0800
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 15:30:11 2021 +0100

tdf#128550 set sub item on the ancestor node.

The target of a animation node may resolved to
a subitem. However it only has effect on a
iterate container or animate node, not on any
other containers. Subitem setting like background
and paragraph got ignored, so everything were shown
together.  The patch find the ancestor node
that is iterate container or animate, and set
the subitem on it.

Change-Id: Iaaa52aed3a34eb2d70b3b318b8336246e17e1e98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109444
Tested-by: Jenkins
Reviewed-by: Mark Hung 
(cherry picked from commit 9b19bf0283b569a5c134de6b5cce1d72d8f37879)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109679
Reviewed-by: Michael Stahl 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109754

diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
index 41fb39fba150..4071f8b6a8b8 100644
--- a/oox/source/ppt/timenode.cxx
+++ b/oox/source/ppt/timenode.cxx
@@ -51,8 +51,37 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::animations;
 using namespace ::com::sun::star::presentation;
 
-namespace oox::ppt {
+namespace {
+
+void lcl_setAncestorSubItem( const Reference& xParent, 
sal_Int16 nSubItem )
+{
+
+Reference xNode = xParent;
+
+while ( xNode.is() )
+{
+if ( xNode->getType() == AnimationNodeType::ANIMATE )
+{
+Reference xAnimate( xNode, UNO_QUERY );
+if ( xAnimate.is() )
+xAnimate->setSubItem( nSubItem );
+break;
+}
+else if ( xNode->getType() == AnimationNodeType::ITERATE )
+{
+Reference xIterateContainer( xNode, UNO_QUERY );
+if ( xIterateContainer.is() )
+xIterateContainer->setSubItem( nSubItem );
+break;
+}
+
+xNode.set( xNode->getParent(), UNO_QUERY );
+}
+}
+
+}
 
+namespace oox::ppt {
 OUString TimeNode::getServiceName( sal_Int16 nNodeType )
 {
 OUString sServiceName;
@@ -225,11 +254,17 @@ namespace oox::ppt {
 
 if( mpTarget )
 {
-sal_Int16 nSubType(0);
-maNodeProperties[ NP_TARGET ] = mpTarget->convert( pSlide, 
nSubType );
+sal_Int16 nSubItem(0);
+maNodeProperties[ NP_TARGET ] = mpTarget->convert( pSlide, 
nSubItem );
 if( mpTarget->mnType == XML_spTgt )
 {
-maNodeProperties[ NP_SUBITEM ] <<= nSubType;
+if ( xNode->getType() == AnimationNodeType::ANIMATE ||
+xNode->getType() == AnimationNodeType::ITERATE )
+{
+maNodeProperties[ NP_SUBITEM ] <<= nSubItem;
+}
+else
+lcl_setAncestorSubItem( xParent, nSubItem );
 }
 }
 
@@ -338,15 +373,21 @@ namespace oox::ppt {
 }
 break;
 case NP_SUBITEM:
-if( xAnimate.is() )
+if( aValue >>= nInt16 )
 {
-if( aValue >>= nInt16 )
+if( xAnimate.is() )
+{
 xAnimate->setSubItem( nInt16 );
-else
+}
+else if ( xIterateContainer.is() )
 {
-SAL_INFO("oox.ppt","any >>= failed " << 
__LINE__ );
+xIterateContainer->setSubItem( nInt16 );
 }
 }
+else
+{
+SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+}
 break;
 case NP_ATTRIBUTENAME:
 if( xAnimate.is() )
diff --git a/sd/qa/unit/data/pptx/tdf128550.pptx 
b/sd/qa/unit/data/pptx/tdf128550.pptx
new file mode 100755
index ..e2be342b2e51
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf128550.pptx differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index a2186fae62af..b5db56f0bf7a 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -76,6 +76,7 @@ public:
 void testTdf12

[Libreoffice-commits] core.git: sw/uiconfig

2021-01-21 Thread Jim Raykowski (via logerrit)
 sw/uiconfig/swriter/ui/editsectiondialog.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 21138573fcc6e300a446ffba8cfde00198fb249e
Author: Jim Raykowski 
AuthorDate: Wed Jan 20 23:17:19 2021 -0900
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 15:05:23 2021 +0100

rename grid8 to ddedepend

fixes missed rename in commit
83de497ae90f69118c35121bc228f15fbb5c5623

Change-Id: Ib344c7a5bb41f063ee5efc13a935b34c82a742d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109729
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/uiconfig/swriter/ui/editsectiondialog.ui 
b/sw/uiconfig/swriter/ui/editsectiondialog.ui
index e6d026196607..6a158c60847c 100644
--- a/sw/uiconfig/swriter/ui/editsectiondialog.ui
+++ b/sw/uiconfig/swriter/ui/editsectiondialog.ui
@@ -299,7 +299,7 @@
 
 
   
-  
+  
 True
 False
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2021-01-21 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/a11y/gtk3atkutil.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 16bb39c6d878a3c5402445ce6cb4b8b47f7585dd
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 10:06:37 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 15:04:15 2021 +0100

distinguish these two similarly worded warnings

Change-Id: I630cabf23c5d768329910668b65b1e3c755a260c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109753
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/a11y/gtk3atkutil.cxx 
b/vcl/unx/gtk3/a11y/gtk3atkutil.cxx
index f253eef8254f..08d98784f8bf 100644
--- a/vcl/unx/gtk3/a11y/gtk3atkutil.cxx
+++ b/vcl/unx/gtk3/a11y/gtk3atkutil.cxx
@@ -241,7 +241,7 @@ void DocumentFocusListener::notifyEvent( const 
accessibility::AccessibleEventObj
 }
 catch( const lang::IndexOutOfBoundsException& )
 {
-g_warning("Focused object has invalid index in parent");
+g_warning("DocumentFocusListener: Focused object has invalid index in 
parent");
 }
 }
 
@@ -681,7 +681,7 @@ static void WindowEventHandler(void *, VclSimpleEvent& 
rEvent)
 }
 catch (const lang::IndexOutOfBoundsException&)
 {
-g_warning("Focused object has invalid index in parent");
+g_warning("WindowEventHandler: Focused object has invalid index in 
parent");
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/ui-converter-skeleton.py dbaccess/uiconfig svtools/uiconfig svx/uiconfig sw/uiconfig

2021-01-21 Thread Caolán McNamara (via logerrit)
 bin/ui-converter-skeleton.py  |2 +-
 dbaccess/uiconfig/ui/deleteallrowsdialog.ui   |2 +-
 dbaccess/uiconfig/ui/designsavemodifieddialog.ui  |2 +-
 dbaccess/uiconfig/ui/migrwarndlg.ui   |2 +-
 dbaccess/uiconfig/ui/saveindexdialog.ui   |2 +-
 dbaccess/uiconfig/ui/savemodifieddialog.ui|2 +-
 dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui |2 +-
 svtools/uiconfig/ui/javadisableddialog.ui |2 +-
 svx/uiconfig/ui/savemodifieddialog.ui |2 +-
 sw/uiconfig/swriter/ui/asksearchdialog.ui |2 +-
 sw/uiconfig/swriter/ui/printmergedialog.ui|2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 7a35cff330c642af0bcdccbae48c5980ce3b17d3
Author: Caolán McNamara 
AuthorDate: Thu Jan 21 11:07:33 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 15:03:40 2021 +0100

_yes -> _Yes

Change-Id: Ie85ea2b8a2620d0a62f39b39ebbb2ac41ab85d61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109756
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/bin/ui-converter-skeleton.py b/bin/ui-converter-skeleton.py
index c9d6cc0daa1a..e16b4a7b6e09 100755
--- a/bin/ui-converter-skeleton.py
+++ b/bin/ui-converter-skeleton.py
@@ -70,7 +70,7 @@ def do_replace_button_use_stock(current, use_stock, 
use_underline, label, insert
   elif label.text == 'gtk-revert-to-saved':
 label.text = "_Reset"
   elif label.text == 'gtk-yes':
-label.text = "_yes"
+label.text = "_Yes"
   else:
 raise("unknown label")
 
diff --git a/dbaccess/uiconfig/ui/deleteallrowsdialog.ui 
b/dbaccess/uiconfig/ui/deleteallrowsdialog.ui
index c80b4a47131f..1c42f9926b8c 100644
--- a/dbaccess/uiconfig/ui/deleteallrowsdialog.ui
+++ b/dbaccess/uiconfig/ui/deleteallrowsdialog.ui
@@ -34,7 +34,7 @@
 
 
   
-_yes
+_Yes
 True
 True
 True
diff --git a/dbaccess/uiconfig/ui/designsavemodifieddialog.ui 
b/dbaccess/uiconfig/ui/designsavemodifieddialog.ui
index f062feb18cc4..57e781bb643d 100644
--- a/dbaccess/uiconfig/ui/designsavemodifieddialog.ui
+++ b/dbaccess/uiconfig/ui/designsavemodifieddialog.ui
@@ -35,7 +35,7 @@
 
 
   
-_yes
+_Yes
 True
 True
 True
diff --git a/dbaccess/uiconfig/ui/migrwarndlg.ui 
b/dbaccess/uiconfig/ui/migrwarndlg.ui
index 66cb3e9fbe29..5f0d2667120b 100644
--- a/dbaccess/uiconfig/ui/migrwarndlg.ui
+++ b/dbaccess/uiconfig/ui/migrwarndlg.ui
@@ -20,7 +20,7 @@
 False
 
   
-_yes
+_Yes
 True
 True
 True
diff --git a/dbaccess/uiconfig/ui/saveindexdialog.ui 
b/dbaccess/uiconfig/ui/saveindexdialog.ui
index 468f0d8f070d..861ce90fc64e 100644
--- a/dbaccess/uiconfig/ui/saveindexdialog.ui
+++ b/dbaccess/uiconfig/ui/saveindexdialog.ui
@@ -35,7 +35,7 @@
 
 
   
-_yes
+_Yes
 True
 True
 True
diff --git a/dbaccess/uiconfig/ui/savemodifieddialog.ui 
b/dbaccess/uiconfig/ui/savemodifieddialog.ui
index b80221abaac5..b90b4dd9a2d9 100644
--- a/dbaccess/uiconfig/ui/savemodifieddialog.ui
+++ b/dbaccess/uiconfig/ui/savemodifieddialog.ui
@@ -35,7 +35,7 @@
 
 
   
-_yes
+_Yes
 True
 True
 True
diff --git a/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui 
b/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui
index 2d51abb2cc17..ea0fdd5b01d5 100644
--- a/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui
+++ b/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui
@@ -35,7 +35,7 @@
 
 
   
-_yes
+_Yes
 True
 True
 True
diff --git a/svtools/uiconfig/ui/javadisableddialog.ui 
b/svtools/uiconfig/ui/javadisableddialog.ui
index e150f48887af..e10c4a530db4 100644
--- a/svtools/uiconfig/ui/javadisableddialog.ui
+++ b/svtools/uiconfig/ui/javadisableddialog.ui
@@ -35,7 +35,7 @@
 
 
   
-_yes
+_Yes
 True
 True
 True
diff --git a/svx/uiconfig/ui/savemodifieddialog.ui 
b/svx/uiconfig/ui/savemodifieddialog.ui
index 936b806930a1..51877e552163 100644
--- a/svx/uiconfig/ui/savemodifieddialog.ui
+++ b/svx/uiconfig/ui/savemodifieddialog.ui
@@ -35,7 +35,7 @@
 
 
   
-_yes
+_Yes
 True
 True
 True
diff --git a/sw/uiconfig/swriter/ui/a

[Libreoffice-commits] core.git: helpcontent2

2021-01-21 Thread Balaharipreetha Muthu (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bacf64408dc9e701194f2e4548a6c7c8a8ba24ba
Author: Balaharipreetha Muthu 
AuthorDate: Thu Jan 21 14:37:43 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 21 14:37:43 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 702f5ffa247d7ccc0b35b08eb5a7756e1e1867ed
  - tdf#131206 Comment 13 - 1.
-Remove section id=”selectnote”  (lines 155-157) from 
swriter/01/04090001.xhp
-add select id="selectnote" in swriter/01/04090003.xhp
-add embed in 04090004.xhp, 04090005.xhp, 04090006.xhp

Change-Id: I5e994d64ab05a3ea27e9aafd5870ffc0b5c19ae3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109734
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index e9b5c5c090e4..702f5ffa247d 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit e9b5c5c090e4874daf878dd555329bfed6c07229
+Subproject commit 702f5ffa247d7ccc0b35b08eb5a7756e1e1867ed
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2021-01-21 Thread Balaharipreetha Muthu (via logerrit)
 source/text/swriter/01/04090001.xhp |4 
 source/text/swriter/01/04090003.xhp |5 -
 source/text/swriter/01/04090004.xhp |2 +-
 source/text/swriter/01/04090005.xhp |2 +-
 source/text/swriter/01/04090006.xhp |2 +-
 5 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 702f5ffa247d7ccc0b35b08eb5a7756e1e1867ed
Author: Balaharipreetha Muthu 
AuthorDate: Wed Jan 20 21:43:28 2021 +0100
Commit: Olivier Hallot 
CommitDate: Thu Jan 21 14:37:42 2021 +0100

tdf#131206 Comment 13 - 1.
-Remove section id=”selectnote”  (lines 155-157) from 
swriter/01/04090001.xhp
-add select id="selectnote" in swriter/01/04090003.xhp
-add embed in 04090004.xhp, 04090005.xhp, 04090006.xhp

Change-Id: I5e994d64ab05a3ea27e9aafd5870ffc0b5c19ae3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/109734
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/swriter/01/04090001.xhp 
b/source/text/swriter/01/04090001.xhp
index df950f8e0..4fc1a0ce7 100644
--- a/source/text/swriter/01/04090001.xhp
+++ b/source/text/swriter/01/04090001.xhp
@@ -152,10 +152,6 @@
 
 To quickly insert a field from the 
Select list, double-click the field.
 
-
-The following fields can only be 
inserted if the corresponding field type is selected in the Type 
list.
-
-
 
 
 Format
diff --git a/source/text/swriter/01/04090003.xhp 
b/source/text/swriter/01/04090003.xhp
index ffadcb340..add0c8a30 100644
--- a/source/text/swriter/01/04090003.xhp
+++ b/source/text/swriter/01/04090003.xhp
@@ -114,7 +114,10 @@
 
 
 
-
+
+The following fields can only be 
inserted if the corresponding field type is selected in the Type 
list.
+
+
 
 Click the format that you 
want to apply to the selected field, or click "Additional formats" to define a 
custom format.
 
diff --git a/source/text/swriter/01/04090004.xhp 
b/source/text/swriter/01/04090004.xhp
index e84bf68c3..b99000f3b 100644
--- a/source/text/swriter/01/04090004.xhp
+++ b/source/text/swriter/01/04090004.xhp
@@ -128,7 +128,7 @@
 
 
 
-
+
 
 Lists the available fields 
for the field type selected in the Type list. To insert a field, 
click the field, and then click Insert.
 
diff --git a/source/text/swriter/01/04090005.xhp 
b/source/text/swriter/01/04090005.xhp
index a01eb37f7..3f01678a4 100644
--- a/source/text/swriter/01/04090005.xhp
+++ b/source/text/swriter/01/04090005.xhp
@@ -144,7 +144,7 @@
 
 
 In the Format list, 
define if the value is inserted as text or a number.
-Warns that 
following types depend on the selection in the Type list
+Warns that 
following types depend on the selection in the Type list
 In an HTML 
document, two additional fields are available for the "Set variable" field 
type: HTML_ON and HTML_OFF. The text that you type in the Value 
box is converted to an opening HTML tag () 
or to a closing HTML () tag when the file is saved as an HTML 
document, depending on the option that you select.
 DDE Statement
 taken from 
DDE in Section
diff --git a/source/text/swriter/01/04090006.xhp 
b/source/text/swriter/01/04090006.xhp
index a628c3b07..e9349a6a3 100644
--- a/source/text/swriter/01/04090006.xhp
+++ b/source/text/swriter/01/04090006.xhp
@@ -91,7 +91,7 @@
 
 
 
-
+
 
 Database Selection
 Select the database table or the 
database query that you want the field to refer to. You can include 
fields from more than one database or query in a document.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-01-21 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   58 +++
 1 file changed, 58 insertions(+)

New commits:
commit c0b283b50f3cb166f85fe77629fff3375b8a3545
Author: Dennis Francis 
AuthorDate: Tue Jan 19 19:39:39 2021 +0530
Commit: Dennis Francis 
CommitDate: Thu Jan 21 14:28:05 2021 +0100

unit test for row-height invalidations on pasting

... into a cell whose line-break attribute is set.

Change-Id: I82d021a262d6af48d5eaef5fefa0fe9098758a86
(cherry picked from commit dc2b3f50baa0e96e1073707574cce401e76ccf28)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109692
Tested-by: Jenkins
Reviewed-by: Dennis Francis 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index d849e3291820..bc91dd9608fa 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -40,6 +40,8 @@
 #include 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -109,6 +111,7 @@ public:
 void testDeleteCellMultilineContent();
 void testSpellOnlineParameter();
 void testSpellOnlineRenderParameter();
+void testPasteIntoWrapTextCell();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -155,6 +158,7 @@ public:
 CPPUNIT_TEST(testDeleteCellMultilineContent);
 CPPUNIT_TEST(testSpellOnlineParameter);
 CPPUNIT_TEST(testSpellOnlineRenderParameter);
+CPPUNIT_TEST(testPasteIntoWrapTextCell);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -468,6 +472,7 @@ public:
 OString m_sCellFormula;
 boost::property_tree::ptree m_aCommentCallbackResult;
 OString m_sInvalidateHeader;
+OString m_sInvalidateSheetGeometry;
 
 ViewCallback(bool bDeleteListenerOnDestruct=true)
 : m_bOwnCursorInvalidated(false),
@@ -577,6 +582,11 @@ public:
 {
 m_sInvalidateHeader = pPayload;
 }
+break;
+case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
+{
+m_sInvalidateSheetGeometry = pPayload;
+}
 }
 }
 };
@@ -2320,6 +2330,54 @@ void 
ScTiledRenderingTest::testDeleteCellMultilineContent()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testPasteIntoWrapTextCell()
+{
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setCompatFlag(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
+
+ScModelObj* pModelObj = createDoc("empty.ods");
+CPPUNIT_ASSERT(pModelObj);
+ScDocument* pDoc = pModelObj->GetDocument();
+
+// Set Wrap text in A3
+pDoc->ApplyAttr(0, 2, 0, ScLineBreakCell(true));
+const ScLineBreakCell* pItem = pDoc->GetAttr(0, 2, 0, ATTR_LINEBREAK);
+CPPUNIT_ASSERT(pItem->GetValue());
+
+ScViewData* pViewData = ScDocShell::GetViewData();
+CPPUNIT_ASSERT(pViewData);
+
+ViewCallback aView;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView);
+CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
+
+ScTabViewShell* pView = 
dynamic_cast(SfxViewShell::Current());
+CPPUNIT_ASSERT(pView);
+
+// Go to A2 and paste.
+pView->SetCursor(0, 1);
+Scheduler::ProcessEventsToIdle();
+aView.m_sInvalidateSheetGeometry = "";
+pView->GetViewFrame()->GetBindings().Execute(SID_PASTE);
+Scheduler::ProcessEventsToIdle();
+
+// No SG invalidations
+CPPUNIT_ASSERT_EQUAL(OString(""), aView.m_sInvalidateSheetGeometry);
+
+// Go to A3 and paste.
+pView->SetCursor(0, 2);
+Scheduler::ProcessEventsToIdle();
+aView.m_sInvalidateSheetGeometry = "";
+pView->GetViewFrame()->GetBindings().Execute(SID_PASTE);
+Scheduler::ProcessEventsToIdle();
+
+// SG invalidations for rows
+CPPUNIT_ASSERT_EQUAL(OString("rows"), aView.m_sInvalidateSheetGeometry);
+
+SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
+}
+
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2021-01-21 Thread Dennis Francis (via logerrit)
 sc/source/ui/view/cliputil.cxx |   20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

New commits:
commit ab59506f44db55f8c888dbc1bb947b624fefa311
Author: Dennis Francis 
AuthorDate: Tue Jan 19 10:56:04 2021 +0530
Commit: Dennis Francis 
CommitDate: Thu Jan 21 14:27:14 2021 +0100

lok: Send rows heights invalidation on paste

... when the dest cell has wrap-text option set.

Conflicts:
sc/source/ui/view/cliputil.cxx

Change-Id: I9f0dd157694701c96fd91e02b8232ed205f13ae4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109602
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 5fb8b1b2867af8dc5e55c769cf9923609709f914)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109670
Tested-by: Jenkins
Reviewed-by: Dennis Francis 

diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index 95378d76b545..d2db10b0a062 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -20,8 +21,10 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
+#include 
 
 namespace
 {
@@ -47,8 +50,11 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, 
ScTabViewShell* pTab
 {
 const ScTransferObj* pOwnClip = 
ScTransferObj::GetOwnClipboard(ScTabViewShell::GetClipData(rViewData.GetActiveWin()));
 ScDocument& rThisDoc = rViewData.GetDocument();
-ScDPObject* pDPObj = rThisDoc.GetDPAtCursor( rViewData.GetCurX(),
- rViewData.GetCurY(), rViewData.GetTabNo() );
+SCCOL nThisCol = rViewData.GetCurX();
+SCROW nThisRow = rViewData.GetCurY();
+SCTAB nThisTab = rViewData.GetTabNo();
+ScDPObject* pDPObj = rThisDoc.GetDPAtCursor( nThisCol, nThisRow, nThisTab 
);
+
 if ( pOwnClip && pDPObj )
 {
 // paste from Calc into DataPilot table: sort (similar to drag & drop)
@@ -90,6 +96,16 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, 
ScTabViewShell* pTab
 bShowDialog );  // allow warning dialog
 }
 }
+if (comphelper::LibreOfficeKit::isActive())
+{
+const ScLineBreakCell* pItem = rThisDoc.GetAttr(nThisCol, nThisRow, 
nThisTab, ATTR_LINEBREAK);
+if (pItem && pItem->GetValue())
+{
+ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+pTabViewShell, false /* bColumns */, true /* bRows */, true /* 
bSizes*/,
+true /* bHidden */, true /* bFiltered */, true /* bGroups */, 
nThisTab);
+}
+}
 pTabViewShell->CellContentChanged();// => PasteFromSystem() ???
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/qa

2021-01-21 Thread Henry Castro (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   39 +++-
 1 file changed, 38 insertions(+), 1 deletion(-)

New commits:
commit 033d732cf636aa4e81570864d40c541d7a1c6492
Author: Henry Castro 
AuthorDate: Fri Jan 15 16:13:29 2021 -0400
Commit: Henry Castro 
CommitDate: Thu Jan 21 12:50:13 2021 +0100

lok: unit test incorrect cursor position

Test to not send client side cursor position (0,0)
due to:

mpOutlinerView->SetOutputArea( PixelToLogic( tools::Rectangle(0,0,1,1) 
) );

Change-Id: Ib5cd7f1c0c45073c5d2039e8b889d3a6fd7ef70c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109417
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
(cherry picked from commit 08d45119cfb875fa8a5c03d6e946a47f0f680932)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109733
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 99fba50f14bb..8660906e5659 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -199,6 +199,7 @@ public:
 void testControlState();
 void testMetricField();
 void testMultiDocuments();
+void testJumpCursor();
 void testABI();
 
 CPPUNIT_TEST_SUITE(DesktopLOKTest);
@@ -262,6 +263,7 @@ public:
 CPPUNIT_TEST(testControlState);
 CPPUNIT_TEST(testMetricField);
 CPPUNIT_TEST(testMultiDocuments);
+CPPUNIT_TEST(testJumpCursor);
 CPPUNIT_TEST(testABI);
 CPPUNIT_TEST_SUITE_END();
 
@@ -1926,6 +1928,7 @@ class ViewCallback
 public:
 OString m_aCellFormula;
 bool m_bTilesInvalidated;
+bool m_bZeroCursor;
 tools::Rectangle m_aOwnCursor;
 boost::property_tree::ptree m_aCommentCallbackResult;
 boost::property_tree::ptree m_aCallbackWindowResult;
@@ -1933,7 +1936,8 @@ public:
 
 ViewCallback(LibLODocument_Impl* pDocument)
 : mpDocument(pDocument),
-  m_bTilesInvalidated(false)
+  m_bTilesInvalidated(false),
+  m_bZeroCursor(false)
 {
 mnView = SfxLokHelper::getView();
 mpDocument->m_pDocumentClass->registerCallback(pDocument, 
&ViewCallback::callback, this);
@@ -1970,6 +1974,9 @@ public:
 m_aOwnCursor.setY(aSeq[1].toInt32());
 m_aOwnCursor.setWidth(aSeq[2].toInt32());
 m_aOwnCursor.setHeight(aSeq[3].toInt32());
+
+if (m_aOwnCursor.getX() == 0 && m_aOwnCursor.getY() == 0)
+m_bZeroCursor = true;
 }
 break;
 case LOK_CALLBACK_COMMENT:
@@ -3080,6 +3087,36 @@ void DesktopLOKTest::testMetricField()
 CPPUNIT_ASSERT_EQUAL(aMap["VALUE"], aRet["Value"]);
 }
 
+void DesktopLOKTest::testJumpCursor()
+{
+comphelper::LibreOfficeKit::setTiledAnnotations(false);
+
+LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
+pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
+
+pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 'B', 0);
+pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 'o', 0);
+pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 'l', 0);
+pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 'i', 0);
+pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 'v', 0);
+pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 'i', 0);
+pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 'a', 0);
+pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 0, 
com::sun::star::awt::Key::ESCAPE);
+Scheduler::ProcessEventsToIdle();
+
+// There is a cursor jump to (0, 0) due to
+// mpOutlinerView->SetOutputArea( PixelToLogic( tools::Rectangle(0,0,1,1) 
) );
+// when creating a comment
+ViewCallback aView1(pDocument);
+
+pDocument->pClass->postUnoCommand(pDocument, ".uno:InsertAnnotation", 
nullptr, true);
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT(!aView1.m_bZeroCursor);
+
+comphelper::LibreOfficeKit::setTiledAnnotations(true);
+}
+
 namespace {
 
 constexpr size_t classOffset(int i)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: editeng/source include/editeng sw/source

2021-01-21 Thread Henry Castro (via logerrit)
 editeng/source/editeng/editview.cxx   |5 +
 editeng/source/outliner/outlvw.cxx|5 +
 include/editeng/editview.hxx  |1 +
 include/editeng/outliner.hxx  |1 +
 sw/source/uibase/docvw/AnnotationWin2.cxx |   12 ++--
 5 files changed, 18 insertions(+), 6 deletions(-)

New commits:
commit aadfeaff158316af1a868c66fa2fd78fb473c802
Author: Henry Castro 
AuthorDate: Fri Jan 15 10:14:50 2021 -0400
Commit: Henry Castro 
CommitDate: Thu Jan 21 12:49:35 2021 +0100

lok: fix incorrect invalidate cursor position

When the comment is created and it's shown in the "Writer"
application, it creates an initial output area:

mpOutlinerView->SetOutputArea( PixelToLogic( tools::Rectangle(0,0,1,1) ) );

Unfortunately, it causes that send to client side cursor position
and scroll to the beginning of the document.

Change-Id: I13e21c71328b7f05781e7cdeed082d6cc2b9d679
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109371
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
(cherry picked from commit 4618849a1cbba4e249ee13c3b6412337160a2816)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109732
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index f044671e1c17..901e29e756c6 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -701,6 +701,11 @@ void EditView::RegisterViewShell(OutlinerViewShell* 
pViewShell)
 pImpEditView->RegisterViewShell(pViewShell);
 }
 
+const OutlinerViewShell* EditView::GetViewShell()
+{
+return pImpEditView->GetViewShell();
+}
+
 void EditView::RegisterOtherShell(OutlinerViewShell* pOtherShell)
 {
 pImpEditView->RegisterOtherShell(pOtherShell);
diff --git a/editeng/source/outliner/outlvw.cxx 
b/editeng/source/outliner/outlvw.cxx
index 8ba3a28c87f0..487431995636 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1382,6 +1382,11 @@ void OutlinerView::RegisterViewShell(OutlinerViewShell* 
pViewShell)
 pEditView->RegisterViewShell(pViewShell);
 }
 
+const OutlinerViewShell* OutlinerView::GetViewShell()
+{
+return pEditView->GetViewShell();
+}
+
 Color const & OutlinerView::GetBackgroundColor() const
 {
 return pEditView->GetBackgroundColor();
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index debc7b6efe71..bcf031559bed 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -258,6 +258,7 @@ public:
 
 /// Informs this edit view about which view shell contains it.
 void RegisterViewShell(OutlinerViewShell* pViewShell);
+const OutlinerViewShell* GetViewShell();
 /// Informs this edit view about which other shell listens to it.
 void RegisterOtherShell(OutlinerViewShell* pOtherShell);
 
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 0ffa5721c203..cfcfe85191d6 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -258,6 +258,7 @@ public:
 
 /// Informs this edit view about which view shell contains it.
 void RegisterViewShell(OutlinerViewShell* pViewShell);
+const OutlinerViewShell* GetViewShell();
 
 SfxItemSet  GetAttribs();
 
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 3fe30564cc44..9a067038d773 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -530,12 +530,6 @@ void SwAnnotationWin::InitControls()
 
 mpOutlinerView->SetAttribs(DefaultItem());
 
-if (comphelper::LibreOfficeKit::isActive())
-{
-// If there is a callback already registered, inform the new outliner 
view about it.
-mpOutlinerView->RegisterViewShell(&mrView);
-}
-
 //create Scrollbars
 mpVScrollbar = VclPtr::Create(*this, WB_3DLOOK 
|WB_VSCROLL|WB_DRAG, mrView);
 mpVScrollbar->EnableNativeWidget(false);
@@ -931,6 +925,12 @@ void SwAnnotationWin::DoResize()
 }
 
 mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ;
+
+if (comphelper::LibreOfficeKit::isActive() && 
!mpOutlinerView->GetViewShell())
+{
+mpOutlinerView->RegisterViewShell(&mrView);
+}
+
 if (!mpVScrollbar->IsVisible())
 {   // if we do not have a scrollbar anymore, we want to see the complete 
text
 mpOutlinerView->SetVisArea( PixelToLogic( 
tools::Rectangle(0,0,aWidth,aHeight) ) );
___
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.2' - sc/source

2021-01-21 Thread Tamás Zolnai (via logerrit)
 sc/source/ui/app/inputhdl.cxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 5bb263f945abda08dc1a54748e9ca70c81cff7cc
Author: Tamás Zolnai 
AuthorDate: Wed Jan 13 05:30:53 2021 +0100
Commit: Tamás Zolnai 
CommitDate: Thu Jan 21 12:26:48 2021 +0100

lok: don't turn off online spelling by view change.

Since we don't exit editing for LOK inside this NotifyChange()
method, we should keep also spelling functionality alive. See
also the comment we have here: "As long as the content is not
edited, turn off online spelling." So it seems a good idea
to make this spelling modification dependent of bStopEditing flag.
This causes issues, during view switches.

Change-Id: Ic684073d129c1cac4b6f4d11f34cd64cb5db3295
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109206
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 6554d69871b0798ae38e5a406aefb5dd90f19ff0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109625

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index d182d3ae828b..48faf207b89e 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4051,16 +4051,17 @@ void ScInputHandler::NotifyChange( const 
ScInputHdlState* pState,
 
pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_ADDRESS, 
aPosStr.toUtf8().getStr());
 }
 
-if (bStopEditing)
+if (bStopEditing) {
 SfxGetpApp()->Broadcast( SfxHint( 
SfxHintId::ScKillEditView ) );
 
-//  As long as the content is not edited, turn off online 
spelling.
-//  Online spelling is turned back on in StartTable, after 
setting
-//  the right language from cell attributes.
+//  As long as the content is not edited, turn off online 
spelling.
+//  Online spelling is turned back on in StartTable, after 
setting
+//  the right language from cell attributes.
 
-EEControlBits nCntrl = mpEditEngine->GetControlWord();
-if ( nCntrl & EEControlBits::ONLINESPELLING )
-mpEditEngine->SetControlWord( nCntrl & 
~EEControlBits::ONLINESPELLING );
+EEControlBits nCntrl = mpEditEngine->GetControlWord();
+if ( nCntrl & EEControlBits::ONLINESPELLING )
+mpEditEngine->SetControlWord( nCntrl & 
~EEControlBits::ONLINESPELLING );
+}
 
 bModified = false;
 bSelIsRef = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com sc/qa sc/source

2021-01-21 Thread Balazs Varga (via logerrit)
 offapi/com/sun/star/sheet/FilterFieldValue.idl |7 +++
 sc/qa/uitest/autofilter/autofilter.py  |   31 +
 sc/qa/uitest/data/autofilter/tdf116818.xlsx|binary
 sc/source/filter/inc/autofilterbuffer.hxx  |4 +-
 sc/source/filter/oox/autofilterbuffer.cxx  |   45 +
 sc/source/filter/oox/autofiltercontext.cxx |2 -
 sc/source/ui/unoobj/datauno.cxx|   21 ++-
 7 files changed, 98 insertions(+), 12 deletions(-)

New commits:
commit 0e751d0cb816197f15a2448ec36c57df17387e40
Author: Balazs Varga 
AuthorDate: Wed Jan 13 16:17:30 2021 +0100
Commit: László Németh 
CommitDate: Thu Jan 21 11:34:53 2021 +0100

tdf#116818 sc,offapi,XLSX import: fix autofiltered date columns

by importing dateGroupItem.

Add property IsDateValue to com::sun::star::sheet::FilterFieldValue.

Note: ODS import/export and XLSX export haven't been supported, yet.

To check/show the fix manually, run the test with

$ (cd sc && make -srj8 UITest_autofilter 
UITEST_TEST_NAME="autofilter.AutofilterTest.test_tdf116818" 
SAL_USE_VCLPLUGIN=gen)

Change-Id: I033f1915c710589ff11fe97e9b39e45251976dfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109233
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/offapi/com/sun/star/sheet/FilterFieldValue.idl 
b/offapi/com/sun/star/sheet/FilterFieldValue.idl
index 5d1b40837476..2e3ba927dc97 100644
--- a/offapi/com/sun/star/sheet/FilterFieldValue.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldValue.idl
@@ -29,6 +29,13 @@ struct FilterFieldValue
 /** specifies a string value for the condition.
  */
 string StringValue;
+
+/** specifies whether the TableFilterFieldValue::StringValue
+is a string value or a date value.
+
+@since LibreOffice 7.2
+ */
+boolean IsDateValue;
 };
 
 }; }; }; };
diff --git a/sc/qa/uitest/autofilter/autofilter.py 
b/sc/qa/uitest/autofilter/autofilter.py
index bef8d43c6ef6..bc6360b2940c 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -200,5 +200,36 @@ class AutofilterTest(UITestCase):
 self.assertTrue(is_row_hidden(document, 1))
 self.assertFalse(is_row_hidden(document, 2))
 
+self.ui_test.close_doc()
+
+def test_tdf116818(self):
+doc = self.ui_test.load_file(get_url_for_data_file("tdf116818.xlsx"))
+
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "0", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_tree_box")
+self.assertEqual(3, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(5, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "2", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(3, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
 self.ui_test.close_doc()
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/autofilter/tdf116818.xlsx 
b/sc/qa/uitest/data/autofilter/tdf116818.xlsx
new file mode 100644
index ..060615cc0444
Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf116818.xlsx differ
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx 
b/sc/source/filter/inc/autofilterbuffer.hxx
index 469aacdce399..e0270336a10e 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -48,7 +48,7 @@ struct ApiFilterSettings
 
 void appendField( bool bAnd, sal_Int32 nOperator, double fValue );
 void appendField( bool bAnd, sal_Int32 nOperator, const OUString& rValue );
-void appendField( bool bAnd, const std::vector& rValues );
+void appendField( bool bAnd, const std::vector>& 
rValues );
 };
 
 /** Base class for specific filter settings for a column in a filtered range.
@@ -86,7 +86,7 @@ public:
 
 private:
 
-std::vector< OUString > maValues;
+std::vector> maValues; // first->values, 
second->bDat

[Libreoffice-commits] core.git: sc/source

2021-01-21 Thread Luboš Luňák (via logerrit)
 sc/source/ui/view/output2.cxx |   47 --
 1 file changed, 41 insertions(+), 6 deletions(-)

New commits:
commit d62ad3efe3c8778cfda00799f1cd7bb3349e0b75
Author: Luboš Luňák 
AuthorDate: Tue Jan 19 18:58:25 2021 +0100
Commit: Luboš Luňák 
CommitDate: Thu Jan 21 11:33:31 2021 +0100

cache SalLayoutGlyphs in ScOutputData::LayoutStrings()

OutputDevice::GetTextWidth() requires the layout, and DrawText()
requires it as well. Moreover GetTextWidth() may be called multiple
times (e.g. if the whole string doesn't fit the cell).
Cache up to 1000 layouts, they get cleaned up after LayoutStrings(),
and with larger cells there won't be that many of them, and with
smaller cells they should generally contain short strings.

Change-Id: I42defd275467078b2c02c7700ca9bbc2c6e65e15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109708
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 764919b9d37a..e7083ed2c45c 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -51,6 +51,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -74,6 +76,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -113,6 +116,7 @@ class ScDrawStringsVars
 tools::LongnExpWidth;
 
 ScRefCellValue  maLastCell;
+mutable o3tl::lru_map mCachedGlyphs;
 sal_uLong   nValueFormat;
 boolbLineBreak;
 boolbRepeat;
@@ -155,6 +159,7 @@ public:
 const OUString& GetString() const{ return aString; }
 const Size& GetTextSize() const  { return aTextSize; }
 tools::LongGetOriginalWidth() const { return 
nOriginalWidth; }
+tools::Long GetFmtTextWidth(const OUString& rString);
 
 // Get the effective number format, including formula result types.
 // This assumes that a formula cell has already been calculated.
@@ -175,6 +180,10 @@ public:
 
 boolHasEditCharacters() const;
 
+// ScOutputData::LayoutStrings() usually triggers a number of calls that 
require
+// to lay out the text, which is relatively slow, so cache that operation.
+const SalLayoutGlyphs*  GetLayoutGlyphs(const OUString& rString) const;
+
 private:
 tools::LongGetMaxDigitWidth(); // in logic units
 tools::LongGetSignWidth();
@@ -200,6 +209,7 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, 
bool bPTL) :
 nSignWidth( 0 ),
 nDotWidth( 0 ),
 nExpWidth( 0 ),
+mCachedGlyphs( 1000 ),
 nValueFormat( 0 ),
 bLineBreak  ( false ),
 bRepeat ( false ),
@@ -291,6 +301,7 @@ void ScDrawStringsVars::SetPattern(
 nSignWidth = 0;
 nDotWidth  = 0;
 nExpWidth  = 0;
+mCachedGlyphs.clear();
 
 pPattern = pNew;
 pCondSet = pSet;
@@ -445,6 +456,7 @@ void ScDrawStringsVars::SetPatternSimple( const 
ScPatternAttr* pNew, const SfxIt
 nSignWidth = 0;
 nDotWidth  = 0;
 nExpWidth  = 0;
+mCachedGlyphs.clear();
 
 // Is called, when the font variables do not change (!StringDiffer)
 
@@ -558,7 +570,7 @@ void ScDrawStringsVars::RepeatToFill( tools::Long nColWidth 
)
 if ( nRepeatPos == -1 || nRepeatPos > aString.getLength() )
 return;
 
-tools::Long nCharWidth = 
pOutput->pFmtDevice->GetTextWidth(OUString(nRepeatChar));
+tools::Long nCharWidth = GetFmtTextWidth(OUString(nRepeatChar));
 
 if ( nCharWidth < 1 || (bPixelToLogic && nCharWidth < 
pOutput->mpRefDevice->PixelToLogic(Size(1,0)).Width()) )
 return;
@@ -675,7 +687,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( 
ScRefCellValue& rCell, tools::Long
 aString = sTempOut;
 }
 
-tools::Long nActualTextWidth = pOutput->pFmtDevice->GetTextWidth(aString);
+tools::Long nActualTextWidth = GetFmtTextWidth(aString);
 if (nActualTextWidth > nWidth)
 {
 // Even after the decimal adjustment the text doesn't fit.  Give up.
@@ -693,7 +705,7 @@ void ScDrawStringsVars::SetAutoText( const OUString& 
rAutoText )
 
 OutputDevice* pRefDevice = pOutput->mpRefDevice;
 OutputDevice* pFmtDevice = pOutput->pFmtDevice;
-aTextSize.setWidth( pFmtDevice->GetTextWidth( aString ) );
+aTextSize.setWidth( GetFmtTextWidth( aString ) );
 aTextSize.setHeight( pFmtDevice->GetTextHeight() );
 
 if ( !pRefDevice->GetConnectMetaFile() || pRefDevice->GetOutDevType() == 
OUTDEV_PRINTER )
@@ -725,6 +737,7 @@ tools::Long ScDrawStringsVars::GetMaxDigitWidth()
 for (char i = 0; i < 10; ++i)
 {
 char cDigit = '0' + i;
+// Do not cache this with GetFmtTextWidth(), nMaxDigitWidth is already 
cached.
 tools::Long n = pOutput->pFmtDevice->GetTextWidth(OUString(cDigit));
 nMaxDigitWidth = ::std::max(nMaxDigitWidth, n);
 }
@@ 

[Libreoffice-commits] core.git: framework/source

2021-01-21 Thread Maxim Monastirsky (via logerrit)
 framework/source/uielement/popuptoolbarcontroller.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit da2b2c9b3d2b3165f237cdde589f44e7d19a2bc0
Author: Maxim Monastirsky 
AuthorDate: Wed Jan 20 17:38:29 2021 +0200
Commit: Maxim Monastirsky 
CommitDate: Thu Jan 21 11:31:18 2021 +0100

tdf#139696 Use getToolboxId to set item id

This code depends on ToolboxController::m_nToolBoxId being already set, 
which
is the case for toolbars, as passed by ToolBarManager::CreateControllers via
the "Identifier" property, but not for the notebookbar, as can be seen in
sfx2::sidebar::ControllerFactory::CreateToolBarController.

Avoid this problem by using getToolboxId, like in most other toolbar 
controls.

Change-Id: I5dfb1bda0886ce3542274a422f8c9111e7fdcf7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109722
Tested-by: Jenkins
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 

diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx 
b/framework/source/uielement/popuptoolbarcontroller.cxx
index efe2eb82f12c..36ad65f19cc2 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -149,12 +149,13 @@ void SAL_CALL PopupMenuToolbarController::initialize(
 }
 
 SolarMutexGuard aSolarLock;
-VclPtr< ToolBox > pToolBox = static_cast< ToolBox* >( 
VCLUnoHelper::GetWindow( getParent() ).get() );
-if ( pToolBox )
+ToolBox* pToolBox = nullptr;
+sal_uInt16 nItemId = 0;
+if ( getToolboxId( nItemId, &pToolBox ) )
 {
-ToolBoxItemBits nCurStyle( pToolBox->GetItemBits( m_nToolBoxId ) );
+ToolBoxItemBits nCurStyle( pToolBox->GetItemBits( nItemId ) );
 ToolBoxItemBits nSetStyle( getDropDownStyle() );
-pToolBox->SetItemBits( m_nToolBoxId,
+pToolBox->SetItemBits( nItemId,
m_bHasController ?
 nCurStyle | nSetStyle :
 nCurStyle & ~nSetStyle );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1-0' - sw/source

2021-01-21 Thread Justin Luth (via logerrit)
 sw/source/core/edit/autofmt.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 41bf539dfdec3640c8a03af0594ce1ff3846feab
Author: Justin Luth 
AuthorDate: Fri Jan 15 20:32:43 2021 +0300
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 11:21:23 2021 +0100

tdf#136704 sw autofmt: prevent crash if no nextNode

The second GetNextNode() was a nullptr
that was being dereferenced.

Now, when enter is pressed after some text followed by a colon,
that line is made into a heading3, and the new blank line is
properly using the text body paragraph style.

Change-Id: If10dc85e490ac57fc150b3d541f5033dfd5293bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109413
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Michael Stahl 
(cherry picked from commit fea7b531a4c9e8326a64426325b16585675a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109519
(cherry picked from commit 4ef34f805c5682594a76802fff98889bd6052c3c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109583
Reviewed-by: Xisco Fauli 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index bd0cfc1972fb..2a40b90d448f 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1896,11 +1896,14 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
 JoinPrevPara();
 
 DeleteLeadingTrailingBlanks( true, false );
-const SwTextFrame *const pNextFrame = GetNextNode(false);
-(void)DeleteJoinCurNextPara(pNextFrame, true);
-
+const SwTextFrame* pNextFrame = GetNextNode(false);
+if (pNextFrame->GetNext())
+{
+(void)DeleteJoinCurNextPara(pNextFrame, true);
+pNextFrame = GetNextNode(false);
+}
 m_aDelPam.DeleteMark();
-m_aDelPam.GetPoint()->nNode = 
*GetNextNode(false)->GetTextNodeForParaProps();
+m_aDelPam.GetPoint()->nNode = *pNextFrame->GetTextNodeForParaProps();
 m_aDelPam.GetPoint()->nContent.Assign( m_aDelPam.GetContentNode(), 0 );
 m_pDoc->SetTextFormatColl( m_aDelPam, &rNxtColl );
 }
___
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

2021-01-21 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/bitmap3.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 6d49ac8214b7d084d07469a6ce2414788f8ef9e0
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 09:19:25 2021 +
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 11:17:15 2021 +0100

rhbz#1918152 fix FTBFS

Change-Id: I5c03c810d3b2572b0e58c62293add49bd7025e70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109717
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index ec80b03c6008..8ea5c31bee3e 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/inc oox/source sd/qa

2021-01-21 Thread Gülşah Köse (via logerrit)
 oox/inc/drawingml/fillproperties.hxx|3 +-
 oox/source/drawingml/fillproperties.cxx |   34 +++-
 oox/source/drawingml/shape.cxx  |2 -
 sd/qa/unit/data/pptx/tdf134210.pptx |binary
 sd/qa/unit/import-tests.cxx |   19 +
 5 files changed, 55 insertions(+), 3 deletions(-)

New commits:
commit 2c96bd26ec488d865370fe9d394e7c4e228e05ab
Author: Gülşah Köse 
AuthorDate: Wed Jan 20 00:52:56 2021 +0300
Commit: Miklos Vajna 
CommitDate: Thu Jan 21 10:52:46 2021 +0100

tdf#134210 Import support for custom stretch values.

Change-Id: I33ced8d667e37b7fb79f4c87b689f45966ac0097
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109658
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/oox/inc/drawingml/fillproperties.hxx 
b/oox/inc/drawingml/fillproperties.hxx
index cf26acfc17d6..f308f6aaec0d 100644
--- a/oox/inc/drawingml/fillproperties.hxx
+++ b/oox/inc/drawingml/fillproperties.hxx
@@ -146,7 +146,8 @@ struct FillProperties
 sal_Int32 nShapeRotation = 0,
 ::Color nPhClr = API_RGB_TRANSPARENT,
 bool bFlipH = false,
-bool bFlipV = false ) const;
+bool bFlipV = false,
+bool bIsCustomShape = false ) const;
 };
 
 } // namespace oox::drawingml
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 3efd64878326..837578ebc807 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -87,6 +87,32 @@ Reference< XGraphic > 
lclRotateGraphic(uno::Reference const &
 return aReturnGraphic.GetXGraphic();
 }
 
+Reference< XGraphic > lclCropGraphic(uno::Reference const & 
xGraphic, geometry::IntegerRectangle2D aFillRect)
+{
+::Graphic aGraphic(xGraphic);
+::Graphic aReturnGraphic;
+
+assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+
+sal_Int32 nOrigHeight = aBitmapEx.GetSizePixel().Height();
+sal_Int32 nHeight = nOrigHeight;
+sal_Int32 nTopCorr  = nOrigHeight * -1 * static_cast(aFillRect.Y1) 
/ 10;
+nHeight += nTopCorr;
+sal_Int32 nBottomCorr = nOrigHeight * -1 * 
static_cast(aFillRect.Y2) / 10;
+nHeight += nBottomCorr;
+
+aBitmapEx.Scale(Size(aBitmapEx.GetSizePixel().Width(), nHeight));
+aBitmapEx.Crop(tools::Rectangle(Point(0, nTopCorr), 
Size(aBitmapEx.GetSizePixel().Width(), nOrigHeight)));
+
+aReturnGraphic = ::Graphic(aBitmapEx);
+aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+
+return aReturnGraphic.GetXGraphic();
+}
+
+
 Reference< XGraphic > lclCheckAndApplyChangeColorTransform(const 
BlipFillProperties &aBlipProps, uno::Reference const & 
xGraphic,
const 
GraphicHelper& rGraphicHelper, const ::Color nPhClr)
 {
@@ -272,7 +298,7 @@ Color FillProperties::getBestSolidColor() const
 
 void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
 const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation, ::Color 
nPhClr,
-bool bFlipH, bool bFlipV ) const
+bool bFlipH, bool bFlipV, bool bIsCustomShape) const
 {
 if( !moFillType.has() )
 return;
@@ -675,6 +701,12 @@ void FillProperties::pushToPropMap( ShapePropertyMap& 
rPropMap,
 if ( aFillRect.Y2 )
 aGraphCrop.Bottom = static_cast< sal_Int32 >( 
( static_cast< double >( aOriginalSize.Height ) * aFillRect.Y2 ) / 10 );
 rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
+
+if(bIsCustomShape)
+{
+xGraphic = lclCropGraphic(xGraphic, aFillRect);
+
rPropMap.setProperty(ShapeProperty::FillBitmap, xGraphic);
+}
 }
 }
 }
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index f5aa1c2cd9f2..37633abb8b87 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1058,7 +1058,7 @@ Reference< XShape > const & Shape::createAndInsert(
 if (getFillProperties().moFillType.has() && 
getFillProperties().moFillType.get() == XML_grpFill)
 getFillProperties().assignUsed(aFillProperties);
 if(!bIsCroppedGraphic)
-aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, 
mnRotation, nFillPhClr, mbFlipH, mbFlipV );
+aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, 
mnRotation, nFillPhClr, mbFlipH, mbFlipV, bIsCustomShape );
 LineProperties aLineProperties = getActualLineProperties(pTheme);
 aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr 
);
 Effec

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - icon-themes/elementary icon-themes/elementary_svg

2021-01-21 Thread Rizal Muttaqin (via logerrit)
 icon-themes/elementary/svx/res/markers.png |binary
 icon-themes/elementary_svg/svx/res/markers.svg |2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cd7c68f751d8106f3b2177d7b51094f3e11d2f68
Author: Rizal Muttaqin 
AuthorDate: Wed Jan 20 21:45:28 2021 +0700
Commit: Rizal Muttaqin 
CommitDate: Thu Jan 21 10:38:35 2021 +0100

elementary: tdf#125779, tdf#139056 update color to follow upstream brand

- Update object handlers
Change-Id: Ifb2f623858274c21c234db34ded9425c3215ffba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109713
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin 
(cherry picked from commit 51de39229d45259d2cdc13e2e102d3b73e436d06)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109735
Tested-by: Rizal Muttaqin 

diff --git a/icon-themes/elementary/svx/res/markers.png 
b/icon-themes/elementary/svx/res/markers.png
index 2667c0fd2d9b..ae3ecca170b5 100644
Binary files a/icon-themes/elementary/svx/res/markers.png and 
b/icon-themes/elementary/svx/res/markers.png differ
diff --git a/icon-themes/elementary_svg/svx/res/markers.svg 
b/icon-themes/elementary_svg/svx/res/markers.svg
index 1bdb34d04df4..3ca237d7d236 100644
--- a/icon-themes/elementary_svg/svx/res/markers.svg
+++ b/icon-themes/elementary_svg/svx/res/markers.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file

... etc. - the rest is truncated
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - oox/source sd/qa

2021-01-21 Thread Mark Hung (via logerrit)
 oox/source/ppt/timenode.cxx |   57 ++--
 sd/qa/unit/data/pptx/tdf128550.pptx |binary
 sd/qa/unit/export-tests.cxx |   14 
 3 files changed, 63 insertions(+), 8 deletions(-)

New commits:
commit 742b699335ca81626e79c937389efd6b5fdc15ed
Author: Mark Hung 
AuthorDate: Sat Jan 16 23:48:56 2021 +0800
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 10:35:46 2021 +0100

tdf#128550 set sub item on the ancestor node.

The target of a animation node may resolved to
a subitem. However it only has effect on a
iterate container or animate node, not on any
other containers. Subitem setting like background
and paragraph got ignored, so everything were shown
together.  The patch find the ancestor node
that is iterate container or animate, and set
the subitem on it.

Change-Id: Iaaa52aed3a34eb2d70b3b318b8336246e17e1e98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109444
Tested-by: Jenkins
Reviewed-by: Mark Hung 
(cherry picked from commit 9b19bf0283b569a5c134de6b5cce1d72d8f37879)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109679
Reviewed-by: Michael Stahl 

diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
index 3e08a6716d74..132c54b79f4a 100644
--- a/oox/source/ppt/timenode.cxx
+++ b/oox/source/ppt/timenode.cxx
@@ -51,8 +51,37 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::animations;
 using namespace ::com::sun::star::presentation;
 
-namespace oox::ppt {
+namespace {
+
+void lcl_setAncestorSubItem( const Reference& xParent, 
sal_Int16 nSubItem )
+{
+
+Reference xNode = xParent;
+
+while ( xNode.is() )
+{
+if ( xNode->getType() == AnimationNodeType::ANIMATE )
+{
+Reference xAnimate( xNode, UNO_QUERY );
+if ( xAnimate.is() )
+xAnimate->setSubItem( nSubItem );
+break;
+}
+else if ( xNode->getType() == AnimationNodeType::ITERATE )
+{
+Reference xIterateContainer( xNode, UNO_QUERY );
+if ( xIterateContainer.is() )
+xIterateContainer->setSubItem( nSubItem );
+break;
+}
+
+xNode.set( xNode->getParent(), UNO_QUERY );
+}
+}
+
+}
 
+namespace oox::ppt {
 OUString TimeNode::getServiceName( sal_Int16 nNodeType )
 {
 OUString sServiceName;
@@ -225,11 +254,17 @@ namespace oox::ppt {
 
 if( mpTarget )
 {
-sal_Int16 nSubType(0);
-maNodeProperties[ NP_TARGET ] = mpTarget->convert( pSlide, 
nSubType );
+sal_Int16 nSubItem(0);
+maNodeProperties[ NP_TARGET ] = mpTarget->convert( pSlide, 
nSubItem );
 if( mpTarget->mnType == XML_spTgt )
 {
-maNodeProperties[ NP_SUBITEM ] <<= nSubType;
+if ( xNode->getType() == AnimationNodeType::ANIMATE ||
+xNode->getType() == AnimationNodeType::ITERATE )
+{
+maNodeProperties[ NP_SUBITEM ] <<= nSubItem;
+}
+else
+lcl_setAncestorSubItem( xParent, nSubItem );
 }
 }
 
@@ -320,15 +355,21 @@ namespace oox::ppt {
 }
 break;
 case NP_SUBITEM:
-if( xAnimate.is() )
+if( aValue >>= nInt16 )
 {
-if( aValue >>= nInt16 )
+if( xAnimate.is() )
+{
 xAnimate->setSubItem( nInt16 );
-else
+}
+else if ( xIterateContainer.is() )
 {
-SAL_INFO("oox.ppt","any >>= failed " << 
__LINE__ );
+xIterateContainer->setSubItem( nInt16 );
 }
 }
+else
+{
+SAL_INFO("oox.ppt","any >>= failed " << __LINE__ );
+}
 break;
 case NP_ATTRIBUTENAME:
 if( xAnimate.is() )
diff --git a/sd/qa/unit/data/pptx/tdf128550.pptx 
b/sd/qa/unit/data/pptx/tdf128550.pptx
new file mode 100755
index ..e2be342b2e51
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf128550.pptx differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index e54e02ddecd5..96022e2fc118 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -78,6 +78,7 @@ public:
 void testSoftEdges();
 void testShadowBlur();
 void testRhbz1870501();
+void testTdf128550();

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - download.lst external/postgresql RepositoryExternal.mk solenv/flatpak-manifest.in

2021-01-21 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk  |   22 ++-
 download.lst   |4 
 external/postgresql/ExternalPackage_postgresql.mk  |   16 ++
 external/postgresql/ExternalProject_postgresql.mk  |   16 +-
 external/postgresql/Module_postgresql.mk   |6 
 external/postgresql/UnpackedTarball_postgresql.mk  |   11 -
 external/postgresql/config.pl  |1 
 external/postgresql/internal-zlib.patch.1  |   29 
 external/postgresql/postgres-msvc-build.patch.1|  110 +
 external/postgresql/postgresql-9.2.1-libreoffice.patch |   74 ---
 external/postgresql/postgresql-libs-leak.patch |   40 --
 external/postgresql/postgresql.exit.patch.0|8 -
 solenv/flatpak-manifest.in |6 
 13 files changed, 168 insertions(+), 175 deletions(-)

New commits:
commit ae6cc83827ca95cd2469b62ea818c70cc0ea0e40
Author: Michael Stahl 
AuthorDate: Tue Jan 19 15:38:05 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 10:35:13 2021 +0100

postgresql: upgrade to release 13.1

Fixes CVE-2020-25694, plus a bunch more CVE that don't look relevant.

* --with-krb5 no longer exists, neither does --disable-shared
* remove internal-zlib.patch.1:
  zlib is only used by pg_* tools / contrib/pgcrypto
* remove postgresql-libs-leak.patch:
  some relic from pre-gbuild times, not clear what the point is for
  static libs
* remove postgresql-9.2.1-libreoffice.patch:
  another dmake .mk file relic, and the win32 nmake build system was
  removed
* add postgres-msvc-build.patch.1 to fix Cygwin perl and openssl
* on WNT, libpq.dll is now built, no longer static lib

Change-Id: Ic0232a28801b2f604d9f4e33d5621ae3362defaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109640
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 234833f7823a1424b62c93e145f0cfe2c6b6efd5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109677
Reviewed-by: Caolán McNamara 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index c0cbceb9f5fc..8ede95168201 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3052,7 +3052,7 @@ else # !SYSTEM_POSTGRESQL
 
 define gb_LinkTarget__use_postgresql
 
-$(call gb_LinkTarget_use_external_project,$(1),postgresql)
+$(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
 
 $(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
@@ -3060,19 +3060,25 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
 )
 
+ifeq ($(OS),WNT)
+
+$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
+   postgresql \
+))
+
 $(call gb_LinkTarget_add_libs,$(1),\
-   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
 )
 
-ifeq ($(OS),WNT)
-$(call gb_LinkTarget_use_external,$(1),openssl)
+else # WNT
 
-$(call gb_LinkTarget_use_system_win32_libs,$(1),\
-   secur32 \
-   ws2_32 \
+$(call gb_LinkTarget_add_libs,$(1),\
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT)
 \
+   $(call 
gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT)
 \
 )
 
-endif
+endif # WNT
 
 endef
 
diff --git a/download.lst b/download.lst
index 84c8edda6b36..47829dc8c986 100644
--- a/download.lst
+++ b/download.lst
@@ -220,8 +220,8 @@ export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201f
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
 export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
 export POPPLER_TARBALL := poppler-21.01.0.tar.xz
-export POSTGRESQL_SHA256SUM := 
a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126
-export POSTGRESQL_TARBALL := postgresql-9.2.24.tar.bz2
+export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
+export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
5f41968a95afe9bc12192d7e6861aab31e80a46c46fa59d3d837def6a4cd4d37
 export PYTHON_TARBALL := Python-3.8.4.tar.xz
 export QRCODEGEN_SHA256SUM := 
fcdf9fd69fde07ae4dca2351d84271a9de8093002f733b77c70f52f1630f6e4a
diff --git a/external/postgresql/ExternalPackage_postgresql.mk 
b/external/postgresql/ExternalPackage_postgresql.mk
new file mode 100644
index ..ada8c4f38eba
--- /dev/null
+++ b/external/postgresql/ExternalPackage_postgresql.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOf

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - desktop/source include/desktop

2021-01-21 Thread Luboš Luňák (via logerrit)
 desktop/source/app/crashreport.cxx |  177 +
 include/desktop/crashreport.hxx|1 
 2 files changed, 178 insertions(+)

New commits:
commit 8d36791e1527ef5441c7023ebaf65cfa88778df9
Author: Luboš Luňák 
AuthorDate: Thu Jan 14 18:12:43 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 10:34:06 2021 +0100

make crashreports include info about the system (CPU,memory)

This may be useful when we again will be deciding on how well something
is or isn't supported (such as when we were making SSE2 required
on Windows).
Breakpad already kind of provides this information (as CPU family, model
and stepping), but that appears to be next to useless in practice
(on X86_64 it doesn't even say the CPU vendor).
So send as metadata CPU name, flags (SSE etc.) and system RAM, as these
may be possibly useful information.

Change-Id: I77ed935d78501d49f70e8b9769fab6be79f1db77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109358
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit ea610df36842305ef7e26d964ad0a1677be5f553)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109690
Reviewed-by: Caolán McNamara 

diff --git a/desktop/source/app/crashreport.cxx 
b/desktop/source/app/crashreport.cxx
index 432be67cdcd3..968734df4493 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -15,11 +15,13 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 
 #include 
+#include 
 
 
 #if HAVE_FEATURE_BREAKPAD
@@ -109,6 +111,8 @@ void CrashReporter::addKeyValue(const OUString& rKey, const 
OUString& rValue, tA
 
 void CrashReporter::writeCommonInfo()
 {
+writeSystemInfo();
+
 ucbhelper::InternetProxyDecider 
proxy_decider(::comphelper::getProcessComponentContext());
 
 const OUString protocol = "https";
@@ -243,6 +247,179 @@ std::string CrashReporter::getIniFileName()
 return aRet;
 }
 
+// Write system-specific information such as the CPU name and features.
+// This may allow us to get some statistics for decisions (such as when
+// deciding whether SSE2 can be made a hard-requirement for Windows).
+// Breakpad provides this information poorly or not at all.
+#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
+void CrashReporter::writeSystemInfo()
+{
+// Get 'model name' and 'flags' from /proc/cpuinfo.
+if( std::ifstream cpuinfo( "/proc/cpuinfo" ); cpuinfo )
+{
+bool haveModel = false;
+bool haveFlags = false;
+std::regex modelRegex( "^model name[ \t]*:[ \t]*(.*)$" );
+std::regex flagsRegex( "^flags[ \t]*:[ \t]*(.*)$" );
+for( std::string line; std::getline( cpuinfo, line ); )
+{
+std::smatch match;
+if( !haveModel && std::regex_match( line, match, modelRegex ) && 
match.size() == 2)
+{
+addKeyValue("CPUModelName", OUString::fromUtf8( match[ 1 
].str()), AddItem);
+haveModel = true;
+}
+if( !haveFlags && std::regex_match( line, match, flagsRegex ) && 
match.size() == 2)
+{
+addKeyValue("CPUFlags", OUString::fromUtf8( match[ 1 ].str()), 
AddItem);
+haveFlags = true;
+}
+if( haveModel && haveFlags )
+break;
+}
+}
+// Get 'MemTotal' from /proc/meminfo.
+if( std::ifstream meminfo( "/proc/meminfo" ); meminfo )
+{
+std::regex memTotalRegex( "^MemTotal[ \t]*:[ \t]*(.*)$" );
+for( std::string line; std::getline( meminfo, line ); )
+{
+std::smatch match;
+if( std::regex_match( line, match, memTotalRegex ) && match.size() 
== 2)
+{
+addKeyValue("MemoryTotal", OUString::fromUtf8( match[ 1 
].str()), AddItem);
+break;
+}
+}
+}
+}
+#elif defined _WIN32
+void CrashReporter::writeSystemInfo()
+{
+// Get CPU model name and flags.
+// See https://docs.microsoft.com/en-us/cpp/intrinsics/cpuid-cpuidex
+// and https://en.wikipedia.org/wiki/CPUID .
+int cpui[ 4 ];
+__cpuid( cpui, 0x8000 ); // Get the highest extended ID.
+int exIds = cpui[ 0 ];
+if( exIds >= 0x8004 )
+{
+int brand[ 16 ];
+__cpuidex( brand, 0x8002, 0 );
+__cpuidex( brand + 4, 0x8003, 0 );
+__cpuidex( brand + 8, 0x8004, 0 );
+brand[ 12 ] = 0;;
+addKeyValue( "CPUModelName", OUString::fromUtf8( reinterpret_cast< 
const char* >( brand )),
+AddItem );
+}
+__cpuid( cpui, 0 ); // Get the highest ID.
+int ids = cpui[ 0 ];
+unsigned int ecx1 = 0, edx1 = 0, ebx7 = 0, ecx7 = 0, ecx81 = 0, edx81 = 0;
+if( ids >= 0x1 )
+{
+__cpuidex( cpui, 0x1, 0 );
+ecx1 = cpui[ 2 ];
+edx1 = cpui[ 3 ];
+}
+if( ids >= 0x7 )
+{
+__

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1-0' - vcl/inc

2021-01-21 Thread Tor Lillqvist (via logerrit)
 vcl/inc/quartz/CGHelpers.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit adde1cf598f860660239f976334dbe609df3cca2
Author: Tor Lillqvist 
AuthorDate: Mon Jan 4 13:12:11 2021 +0200
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 10:29:20 2021 +0100

CGLayerHolder::getScale() can be const

(Will be required by upcoming bugfix.)

Change-Id: I727b2b5f1035ae70d62d3c5339a814161e3ec92a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108663
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109494
Tested-by: Adolfo Jayme Barrientos 
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109556
Reviewed-by: Michael Stahl 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/inc/quartz/CGHelpers.hxx b/vcl/inc/quartz/CGHelpers.hxx
index cbd9a5e785f4..c83477ead4fe 100644
--- a/vcl/inc/quartz/CGHelpers.hxx
+++ b/vcl/inc/quartz/CGHelpers.hxx
@@ -68,7 +68,7 @@ public:
 
 void set(CGLayerRef const& pLayer) { mpLayer = pLayer; }
 
-float getScale() { return mfScale; }
+float getScale() const { return mfScale; }
 
 void setScale(float fScale) { mfScale = fScale; }
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/browser/unodatbr.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit e2b3b0b36558c719795644bdfa2853db5a8d6db7
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 16:24:25 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 10:13:49 2021 +0100

tdf#139298 New created query doesn't show any row

regression from...

commit 5f7cf9ccba25a94c275ec67936dc29f0adb4129a
Author: Caolán McNamara 
Date:   Mon Aug 10 19:49:25 2020 +0100

use InterimDBTreeListBox

Change-Id: I755879699aa6fcc9b42b5845ae60406794e11cc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109720
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/browser/unodatbr.cxx 
b/dbaccess/source/ui/browser/unodatbr.cxx
index 67ae3cac0f6d..5bbfe7b298ef 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1092,14 +1092,14 @@ std::unique_ptr 
SbaTableQueryBrowser::getObjectEntry(const OUStr
 
 weld::TreeView& rTreeView = m_pTreeView->GetWidget();
 
-if (ppDataSourceEntry)
-{
-// (caller wants to have it...)
-*ppDataSourceEntry = rTreeView.make_iterator(xDataSource.get());
-}
-
 if (xDataSource)
 {
+if (ppDataSourceEntry)
+{
+// (caller wants to have it...)
+*ppDataSourceEntry = 
rTreeView.make_iterator(xDataSource.get());
+}
+
 // expand if required so
 if (bExpandAncestors)
 rTreeView.expand_row(*xDataSource);
@@ -1121,14 +1121,14 @@ std::unique_ptr 
SbaTableQueryBrowser::getObjectEntry(const OUStr
 }
 }
 
-if (ppContainerEntry)
-{
-// (caller wants to have it...)
-*ppContainerEntry = 
rTreeView.make_iterator(xCommandType.get());
-}
-
 if (xCommandType)
 {
+if (ppContainerEntry)
+{
+// (caller wants to have it...)
+*ppContainerEntry = 
rTreeView.make_iterator(xCommandType.get());
+}
+
 rTreeView.make_unsorted();
 
 // expand if required so
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svtools/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 svtools/source/brwbox/brwbox1.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 520058bbe9735da18a24986c6e0db59fc2c04415
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 17:14:36 2021 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 21 10:12:41 2021 +0100

keep the navigation bar control area the same size with hidden scrollbar

which is the way it historically worked before...

commit 7fd9bd4cdf4ffc03b2280964ef3f7e5917769bbd
Author: Caolán McNamara 
Date:   Mon Jul 27 11:43:12 2020 +0100

we want the position of the start of the scrollbar

which added a visibility check that we don't actually want as the
navigation bar spreads out in a ugly manner on a gridcontrol with
only a few columns

Change-Id: I9f24937c20dbab40e0d031195aa6e3e527cd52f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109721
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/svtools/source/brwbox/brwbox1.cxx 
b/svtools/source/brwbox/brwbox1.cxx
index b51b29cc91ad..7fbb0d08797f 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -2119,7 +2119,7 @@ bool BrowseBox::ReserveControlArea(sal_uInt16 nWidth)
 tools::Rectangle BrowseBox::GetControlArea() const
 {
 auto nHeight = aHScroll->GetSizePixel().Height();
-auto nEndRight = aHScroll->IsVisible() ? aHScroll->GetPosPixel().X() : 
GetOutputSizePixel().Width();
+auto nEndRight = aHScroll->GetPosPixel().X();
 
 return tools::Rectangle(
 Point( 0, GetOutputSizePixel().Height() - nHeight ),
___
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' - sc/qa

2021-01-21 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   93 +++
 1 file changed, 54 insertions(+), 39 deletions(-)

New commits:
commit f37ce0a08bc73d4d1e3cdee6553e637bd965ec1e
Author: Dennis Francis 
AuthorDate: Wed Jan 20 11:15:04 2021 +0530
Commit: Jan Holesovsky 
CommitDate: Thu Jan 21 09:39:03 2021 +0100

unit test: check for row height invalidations on sort

Change-Id: I5b4e690c48583dcb609eb139ef2bf8e62d146d30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109662
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 6eac84624142..158754d51ffc 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -71,7 +71,6 @@ public:
 
 void testRowColumnHeaders();
 void testRowColumnSelections();
-void testSortAscendingDescending();
 void testPartHash();
 void testDocumentSize();
 void testEmptyColumnSelection();
@@ -115,11 +114,12 @@ public:
 void testSpellOnlineParameter();
 void testSpellOnlineRenderParameter();
 void testPasteIntoWrapTextCell();
+void testSortAscendingDescending();
+
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
 CPPUNIT_TEST(testRowColumnSelections);
-CPPUNIT_TEST(testSortAscendingDescending);
 CPPUNIT_TEST(testPartHash);
 CPPUNIT_TEST(testDocumentSize);
 CPPUNIT_TEST(testEmptyColumnSelection);
@@ -163,6 +163,7 @@ public:
 CPPUNIT_TEST(testSpellOnlineParameter);
 CPPUNIT_TEST(testSpellOnlineRenderParameter);
 CPPUNIT_TEST(testPasteIntoWrapTextCell);
+CPPUNIT_TEST(testSortAscendingDescending);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -359,43 +360,6 @@ void ScTiledRenderingTest::testRowColumnSelections()
 CPPUNIT_ASSERT_EQUAL(aExpected, aResult);
 }
 
-void ScTiledRenderingTest::testSortAscendingDescending()
-{
-comphelper::LibreOfficeKit::setActive();
-ScModelObj* pModelObj = createDoc("sort-range.ods");
-ScDocument* pDoc = pModelObj->GetDocument();
-
-// select the values in the first column
-pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, 551, 129, 1, 
MOUSE_LEFT, 0);
-pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEMOVE, 820, 1336, 1, 
MOUSE_LEFT, 0);
-pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, 820, 1359, 1, 
MOUSE_LEFT, 0);
-Scheduler::ProcessEventsToIdle();
-
-// sort ascending
-uno::Sequence aArgs;
-comphelper::dispatchCommand(".uno:SortAscending", aArgs);
-
-// check it's sorted
-for (SCROW r = 0; r < 6; ++r)
-{
-CPPUNIT_ASSERT_EQUAL(double(r + 1), pDoc->GetValue(ScAddress(0, r, 
0)));
-}
-
-// sort descending
-comphelper::dispatchCommand(".uno:SortDescending", aArgs);
-
-// check it's sorted
-for (SCROW r = 0; r < 6; ++r)
-{
-CPPUNIT_ASSERT_EQUAL(double(6 - r), pDoc->GetValue(ScAddress(0, r, 
0)));
-}
-
-// nothing else was sorted
-CPPUNIT_ASSERT_EQUAL(double(1), pDoc->GetValue(ScAddress(1, 0, 0)));
-CPPUNIT_ASSERT_EQUAL(double(3), pDoc->GetValue(ScAddress(1, 1, 0)));
-CPPUNIT_ASSERT_EQUAL(double(2), pDoc->GetValue(ScAddress(1, 2, 0)));
-}
-
 void ScTiledRenderingTest::testPartHash()
 {
 comphelper::LibreOfficeKit::setActive();
@@ -2419,6 +2383,57 @@ void ScTiledRenderingTest::testPasteIntoWrapTextCell()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testSortAscendingDescending()
+{
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setCompatFlag(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
+ScModelObj* pModelObj = createDoc("sort-range.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+
+ViewCallback aView;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView);
+
+// select the values in the first column
+pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONDOWN, 551, 129, 1, 
MOUSE_LEFT, 0);
+pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEMOVE, 820, 1336, 1, 
MOUSE_LEFT, 0);
+pModelObj->postMouseEvent(LOK_MOUSEEVENT_MOUSEBUTTONUP, 820, 1359, 1, 
MOUSE_LEFT, 0);
+Scheduler::ProcessEventsToIdle();
+aView.m_sInvalidateSheetGeometry = "";
+
+// sort ascending
+uno::Sequence aArgs;
+comphelper::dispatchCommand(".uno:SortAscending", aArgs);
+
+// check it's sorted
+for (SCROW r = 0; r < 6; ++r)
+{
+CPPUNIT_ASSERT_EQUAL(double(r + 1), pDoc->GetValue(ScAddress(0, r, 
0)));
+}
+
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT_EQUAL(OString("rows"), aView.m_sInvalidateSheetGeometry);
+
+aView.m_sInvalidateSheetGeometry = "";
+// sort descending
+comphelper::dispatchCommand(".uno:SortDescending", aArgs);
+
+// check it's sorted
+for (

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/qa

2021-01-21 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   57 +++
 1 file changed, 57 insertions(+)

New commits:
commit f50e11c55e05506bba2c1a895f13d1a90ac54505
Author: Dennis Francis 
AuthorDate: Tue Jan 19 19:39:39 2021 +0530
Commit: Jan Holesovsky 
CommitDate: Thu Jan 21 09:33:11 2021 +0100

unit test for row-height invalidations on pasting

... into a cell whose line-break attribute is set.

Change-Id: I82d021a262d6af48d5eaef5fefa0fe9098758a86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109661
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index b6db96dc5473..6eac84624142 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -113,6 +114,7 @@ public:
 void testFunctionDlg();
 void testSpellOnlineParameter();
 void testSpellOnlineRenderParameter();
+void testPasteIntoWrapTextCell();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -160,6 +162,7 @@ public:
 CPPUNIT_TEST(testFunctionDlg);
 CPPUNIT_TEST(testSpellOnlineParameter);
 CPPUNIT_TEST(testSpellOnlineRenderParameter);
+CPPUNIT_TEST(testPasteIntoWrapTextCell);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -473,6 +476,7 @@ public:
 OString m_sCellFormula;
 boost::property_tree::ptree m_aCommentCallbackResult;
 OString m_sInvalidateHeader;
+OString m_sInvalidateSheetGeometry;
 
 ViewCallback(bool bDeleteListenerOnDestruct=true)
 : m_bOwnCursorInvalidated(false),
@@ -582,6 +586,11 @@ public:
 {
 m_sInvalidateHeader = pPayload;
 }
+break;
+case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
+{
+m_sInvalidateSheetGeometry = pPayload;
+}
 }
 }
 };
@@ -2362,6 +2371,54 @@ void 
ScTiledRenderingTest::testDeleteCellMultilineContent()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testPasteIntoWrapTextCell()
+{
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setCompatFlag(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
+
+ScModelObj* pModelObj = createDoc("empty.ods");
+CPPUNIT_ASSERT(pModelObj);
+ScDocument* pDoc = pModelObj->GetDocument();
+
+// Set Wrap text in A3
+pDoc->ApplyAttr(0, 2, 0, SfxBoolItem(ATTR_LINEBREAK, true));
+const SfxBoolItem* pItem = static_cast(pDoc->GetAttr(0, 2, 0, ATTR_LINEBREAK));
+CPPUNIT_ASSERT(pItem->GetValue());
+
+ScViewData* pViewData = ScDocShell::GetViewData();
+CPPUNIT_ASSERT(pViewData);
+
+ViewCallback aView;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView);
+CPPUNIT_ASSERT(!lcl_hasEditView(*pViewData));
+
+ScTabViewShell* pView = 
dynamic_cast(SfxViewShell::Current());
+CPPUNIT_ASSERT(pView);
+
+// Go to A2 and paste.
+pView->SetCursor(0, 1);
+Scheduler::ProcessEventsToIdle();
+aView.m_sInvalidateSheetGeometry = "";
+pView->GetViewFrame()->GetBindings().Execute(SID_PASTE);
+Scheduler::ProcessEventsToIdle();
+
+// No SG invalidations
+CPPUNIT_ASSERT_EQUAL(OString(""), aView.m_sInvalidateSheetGeometry);
+
+// Go to A3 and paste.
+pView->SetCursor(0, 2);
+Scheduler::ProcessEventsToIdle();
+aView.m_sInvalidateSheetGeometry = "";
+pView->GetViewFrame()->GetBindings().Execute(SID_PASTE);
+Scheduler::ProcessEventsToIdle();
+
+// SG invalidations for rows
+CPPUNIT_ASSERT_EQUAL(OString("rows"), aView.m_sInvalidateSheetGeometry);
+
+SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
+}
+
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-01-21 Thread diwanshu885 (via logerrit)
 sc/qa/uitest/calc_tests3/tdf81351.py |   77 ---
 sc/qa/unit/uicalc/uicalc.cxx |   76 ++
 2 files changed, 76 insertions(+), 77 deletions(-)

New commits:
commit 4e6f0f39854e2a0e6c3ea6e9f5d80b2c9dcab3c6
Author: diwanshu885 
AuthorDate: Sat Jan 9 01:14:44 2021 +0530
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 09:31:18 2021 +0100

tdf#131407: Move UITest to Cppunit

Change-Id: Ib3afe3ac26a348f47aa566e7b2e7986c42112a0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108991
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/uitest/calc_tests3/tdf81351.py 
b/sc/qa/uitest/calc_tests3/tdf81351.py
deleted file mode 100644
index afe320559871..
--- a/sc/qa/uitest/calc_tests3/tdf81351.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# 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/.
-#
-
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-from uitest.framework import UITestCase
-from libreoffice.calc.document import get_column
-from libreoffice.calc.document import get_cell_by_position
-from uitest.uihelper.common import get_url_for_data_file
-
-class tdf81351(UITestCase):
-
-def test_tdf81351(self):
-calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf81351.ods"))
-xTopWindow = self.xUITest.getTopFocusWindow()
-document = self.ui_test.get_component()
-gridwin = xTopWindow.getChild("grid_window")
-
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Paste")
-
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:F5"}))
-
-self.xUITest.executeCommand(".uno:SortAscending")
-
-gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B7"}))
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Bold")
-
-self.xUITest.executeCommand(".uno:Undo")
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Paste")
-
-gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B7"}))
-
-def test_tdf81351_comment4(self):
-calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf81351.ods"))
-xTopWindow = self.xUITest.getTopFocusWindow()
-document = self.ui_test.get_component()
-
-gridwin = xTopWindow.getChild("grid_window")
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:F5"}))
-
-
-self.xUITest.executeCommand(".uno:SortAscending")
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Bold")
-
-gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B7"}))
-
-self.xUITest.executeCommand(".uno:Undo")
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Paste")
-
-self.xUITest.executeCommand(".uno:Redo")
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Bold")
-
-def test_sort_descending(self):
-calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf81351.ods"))
-xTopWindow = self.xUITest.getTopFocusWindow()
-document = self.ui_test.get_component()
-
-gridwin = xTopWindow.getChild("grid_window")
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:F5"}))
-
-self.xUITest.executeCommand(".uno:SortDescending")
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Undo")
-
-gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "B7"}))
-
-self.xUITest.executeCommand(".uno:Undo")
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Paste")
-
-self.xUITest.executeCommand(".uno:Redo")
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
".uno:Undo")
-
-self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf81351.ods 
b/sc/qa/unit/uicalc/data/tdf81351.ods
similarity index 100%
rename from sc/qa/uitest/data/tdf81351.ods
rename to sc/qa/unit/uicalc/data/tdf81351.ods
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 94881e92b72f..b99c1496087d 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -553,6 +553,82 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf71339)
 CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A1:A3)"), aFormula);
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf81351)
+{
+ScModelObj* pModelObj = createDoc("tdf81351.ods");
+CPPUNIT_ASSERT(pModelObj);
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+CPPUNIT_ASSERT_EQUAL(OUString(".uno:Paste"), pDoc->GetString(ScAddr

[Libreoffice-commits] core.git: sc/CppunitTest_sc_uicalc.mk sc/qa

2021-01-21 Thread Xisco Fauli (via logerrit)
 sc/CppunitTest_sc_uicalc.mk   |1 
 sc/qa/uitest/calc_tests7/tdf120660.py |   60 
 sc/qa/unit/uicalc/uicalc.cxx  |   71 +-
 3 files changed, 70 insertions(+), 62 deletions(-)

New commits:
commit 47966dfb6ddab661f93d63be6eb34ef00e24ac90
Author: Xisco Fauli 
AuthorDate: Wed Jan 20 21:09:14 2021 +0100
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 09:30:12 2021 +0100

tdf#120660: sc: Move UItest to CppUnitTest

Change-Id: I80f95d4a76250a39ccb3942e63e93ef4cb4c51d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109723
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/CppunitTest_sc_uicalc.mk b/sc/CppunitTest_sc_uicalc.mk
index 842b8b5556e3..15ab85a47dcd 100644
--- a/sc/CppunitTest_sc_uicalc.mk
+++ b/sc/CppunitTest_sc_uicalc.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_uicalc, \
 cppuhelper \
 sal \
 sc \
+sfx \
 test \
 tl \
 unotest \
diff --git a/sc/qa/uitest/calc_tests7/tdf120660.py 
b/sc/qa/uitest/calc_tests7/tdf120660.py
deleted file mode 100644
index 4fcef5787b06..
--- a/sc/qa/uitest/calc_tests7/tdf120660.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# 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/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_sheet_from_doc
-from libreoffice.calc.conditional_format import 
get_conditional_format_from_sheet
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-#Bug 120660 - cells not recalculated after copy/paste different range of cells
-
-class tdf120660(UITestCase):
-def test_tdf120660_undo_recalculate(self):
-calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf120660.ods"))
-xCalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = xCalcDoc.getChild("grid_window")
-document = self.ui_test.get_component()
-
-#Make sure that tools-options-LibreOffice Calc-General-Input 
settings-Show overwrite warning when pasting data is unselected
-#turn off message: You are pasting data into cells that already 
contain data
-self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog")  
#optionsdialog
-xDialogOpt = self.xUITest.getTopFocusWindow()
-
-xPages = xDialogOpt.getChild("pages")
-xWriterEntry = xPages.getChild('3') # Calc
-xWriterEntry.executeAction("EXPAND", tuple())
-xWriterGeneralEntry = xWriterEntry.getChild('0')
-xWriterGeneralEntry.executeAction("SELECT", tuple())  #General 
/ replwarncb
-xreplwarncb = xDialogOpt.getChild("replwarncb")
-if (get_state_as_dict(xreplwarncb)["Selected"]) == "true":
-xreplwarncb.executeAction("CLICK", tuple())
-xOKBtn = xDialogOpt.getChild("ok")
-self.ui_test.close_dialog_through_button(xOKBtn)
-
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A8:E8"}))
-self.xUITest.executeCommand(".uno:Copy")
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A4:E4"}))
-self.xUITest.executeCommand(".uno:Paste")
-self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 
1200)
-
-self.xUITest.executeCommand(".uno:Undo")
-self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 
2200)
-
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A8:D8"}))
-self.xUITest.executeCommand(".uno:Copy")
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A4:D4"}))
-self.xUITest.executeCommand(".uno:Paste")
-self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 
1200)
-
-self.xUITest.executeCommand(".uno:Undo")
-self.assertEqual(get_cell_by_position(document, 0, 4, 3).getValue(), 
2200)
-
-self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
diff --git a/sc/qa/uitest/data/tdf120660.ods 
b/sc/qa/unit/uicalc/data/tdf120660.ods
similarity index 100%
rename from sc/qa/uitest/data/tdf120660.ods
rename to sc/qa/unit/uicalc/data/tdf120660.ods
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 418cd531db02..94881e92b72f 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -20,6 +20,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -93,6 +95,73 @@ CPPUNIT_TEST_

[Libreoffice-commits] core.git: sw/qa sw/source

2021-01-21 Thread Justin Luth (via logerrit)
 sw/qa/uitest/writer_tests5/titlePageWizard.py |   83 +-
 sw/source/ui/misc/titlepage.cxx   |   47 ++
 2 files changed, 116 insertions(+), 14 deletions(-)

New commits:
commit 22ee887346ef870fbf9b758fe2bcaa9aeae04a82
Author: Justin Luth 
AuthorDate: Mon Dec 28 17:15:06 2020 +0300
Commit: Miklos Vajna 
CommitDate: Thu Jan 21 09:20:16 2021 +0100

tdf#138907 sw TitlePageDlg: Goto correct (existing) page

If the starting page for the new Title pages is
beyond the end of the document, then insert the
new pages after the last page.
Also, handle the "physical" blank pages
which threw off calculations for Index pages.

1.) It was wrongly inserting before the last page.
2.) Cap InsertPosition() to document-end.
3.) An odd/even blank filler page would cause
missing or mis-applied styles.

NOTE: The wizard is still completely useless
when adding pages, because GotoPage does not
recognize that the document has inserted pages,
and so it goes by pre-wizard page coordinates.
This is just the first step in correcting
the overall problem (which I don't know how
to do).

make UITest_writer_tests5 UITEST_TEST_NAME=\
titlePageWizard.tdf138907.test_tdf138907

Change-Id: Ie138c4ab3126bc6d3fae16028b41a80bda329f1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108332
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/uitest/writer_tests5/titlePageWizard.py 
b/sw/qa/uitest/writer_tests5/titlePageWizard.py
index ca391a6d4010..24d3ff4c53cb 100644
--- a/sw/qa/uitest/writer_tests5/titlePageWizard.py
+++ b/sw/qa/uitest/writer_tests5/titlePageWizard.py
@@ -8,7 +8,9 @@ from uitest.framework import UITestCase
 from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
-# This tests the Format->Title Page wizard, specifically the reset page number 
portion.
+# This tests the Format->Title Page wizard, specifically the reset page number 
portion,
+# replacing some pages with title pages,
+# and inserting at the very end of the document.
 class tdf138907(UITestCase):
 def test_tdf138907(self):
 
self.ui_test.load_file(get_url_for_data_file("tdf138907_titlePageDialog.odt"))
@@ -23,6 +25,16 @@ class tdf138907(UITestCase):
 Para2 = Paragraphs.nextElement()
 self.assertEqual(Para2.String, "7")
 self.assertEqual(Para2.PageDescName, None)
+Para3 = Paragraphs.nextElement()
+self.assertEqual(Para3.String, "8")
+self.assertEqual(Para3.PageDescName, None)
+Para4 = Paragraphs.nextElement()
+self.assertEqual(Para4.String, "9")
+self.assertEqual(Para4.PageDescName, None)
+Para5 = Paragraphs.nextElement()
+self.assertEqual(Para5.String, "10")
+self.assertEqual(Para5.PageDescName, None)
+
 
 #dialog Title Page
 self.ui_test.execute_dialog_through_command(".uno:TitlePageDialog")
@@ -54,7 +66,7 @@ class tdf138907(UITestCase):
 # Without this fix, re-running the wizard was failing with the title 
page restarting at page 2.
 Paragraphs = document.Text.createEnumeration()
 Para1 = Paragraphs.nextElement()
-#self.assertEqual(Para1.String, "6")
+self.assertEqual(Para1.String, "6")
 self.assertEqual(Para1.PageDescName, "First Page")
 Para2 = Paragraphs.nextElement()
 self.assertEqual(Para2.String, "2")
@@ -63,6 +75,73 @@ class tdf138907(UITestCase):
 #Note: 6 virtual pages, including blank, even page seen in book view
 self.assertEqual(document.CurrentController.PageCount, 6)
 
+#Now test replacing several pages with title and index styles
+
+#dialog Title Page
+self.ui_test.execute_dialog_through_command(".uno:TitlePageDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+print(xDialog.getChildren())
+#Insert thre title/index pages at page two.
+xPageCount = xDialog.getChild("NF_PAGE_COUNT")
+for _ in range(0,2):
+xPageCount.executeAction("UP", tuple())
+xUseStartingPage = xDialog.getChild("RB_PAGE_START")
+xUseStartingPage.executeAction("CLICK", tuple())
+xStartingPage = xDialog.getChild("NF_PAGE_START")
+xStartingPage.executeAction("UP", tuple()) #Start at page 2.
+
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+Paragraphs = document.Text.createEnumeration()
+Para1 = Paragraphs.nextElement()
+self.assertEqual(Para1.String, "6")
+self.assertEqual(Para1.PageDescName, "First Page")
+# Without the fix, the following results are all off by one.
+Para2 = Paragraphs.nextElement()
+self.assertEqual(Para2.String, "6")
+self.assertEqual(Para2.PageDescName,

[Libreoffice-commits] core.git: include/vcl vcl/source

2021-01-21 Thread Miklos Vajna (via logerrit)
 include/vcl/filter/PDFiumLibrary.hxx   |1 +
 vcl/source/graphic/VectorGraphicSearch.cxx |   18 +-
 2 files changed, 6 insertions(+), 13 deletions(-)

New commits:
commit 47fbbdaf091ea0ec0fb692340ad11f0d4c0f2d5c
Author: Miklos Vajna 
AuthorDate: Wed Jan 20 21:14:53 2021 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jan 21 09:14:09 2021 +0100

pdfium: use PDFiumDocument in VectorGraphicSearch::Implementation

Which means no need to manually close the doc in the dtor.

Change-Id: Icf1357f162313a845d7694323d546a6fccad344e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109724
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index 2774e1328ebf..f0ef24b348ea 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -242,6 +242,7 @@ private:
 public:
 PDFiumDocument(FPDF_DOCUMENT pPdfDocument);
 ~PDFiumDocument();
+FPDF_DOCUMENT getPointer() { return mpPdfDocument; }
 
 // Page size in points
 basegfx::B2DSize getPageSize(int nIndex);
diff --git a/vcl/source/graphic/VectorGraphicSearch.cxx 
b/vcl/source/graphic/VectorGraphicSearch.cxx
index c5e04060bc1b..40dcbad0da10 100644
--- a/vcl/source/graphic/VectorGraphicSearch.cxx
+++ b/vcl/source/graphic/VectorGraphicSearch.cxx
@@ -203,23 +203,16 @@ class VectorGraphicSearch::Implementation
 {
 public:
 std::shared_ptr mpPDFium;
-FPDF_DOCUMENT mpPdfDocument;
+std::unique_ptr mpPdfDocument;
 
 std::unique_ptr mpSearchContext;
 
 Implementation()
 : mpPDFium(vcl::pdf::PDFiumLibrary::get())
-, mpPdfDocument(nullptr)
 {
 }
 
-~Implementation()
-{
-mpSearchContext.reset();
-
-if (mpPdfDocument)
-FPDF_CloseDocument(mpPdfDocument);
-}
+~Implementation() { mpSearchContext.reset(); }
 };
 
 VectorGraphicSearch::VectorGraphicSearch(Graphic const& rGraphic)
@@ -251,9 +244,8 @@ bool VectorGraphicSearch::search(OUString const& 
rSearchString,
 
 bool VectorGraphicSearch::searchPDF(std::shared_ptr const& 
rData)
 {
-mpImplementation->mpPdfDocument
-= FPDF_LoadMemDocument(rData->getBinaryDataContainer().getData(),
-   rData->getBinaryDataContainer().getSize(), 
/*password=*/nullptr);
+mpImplementation->mpPdfDocument = mpImplementation->mpPDFium->openDocument(
+rData->getBinaryDataContainer().getData(), 
rData->getBinaryDataContainer().getSize());
 
 if (!mpImplementation->mpPdfDocument)
 {
@@ -283,7 +275,7 @@ bool 
VectorGraphicSearch::searchPDF(std::shared_ptr const& rD
 sal_Int32 nPageIndex = std::max(rData->getPageIndex(), sal_Int32(0));
 
 mpImplementation->mpSearchContext.reset(
-new SearchContext(mpImplementation->mpPdfDocument, nPageIndex));
+new SearchContext(mpImplementation->mpPdfDocument->getPointer(), 
nPageIndex));
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits