[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2020-04-06 Thread Caolán McNamara (via logerrit)
 svx/source/dialog/srchdlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit b888dff2f010ae20216c40f39cf6dee66d1fea14
Author: Caolán McNamara 
AuthorDate: Sat Apr 4 19:27:41 2020 +0100
Commit: Michael Stahl 
CommitDate: Mon Apr 6 11:23:36 2020 +0200

rhbz#1820868 deref of null xLayoutManager

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

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 1f95fbe21a7c..445bc318718b 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2440,6 +2440,8 @@ OUString SvxSearchDialogWrapper::GetSearchLabel()
 pViewFrame->GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
 css::uno::Reference< css::frame::XLayoutManager > xLayoutManager;
 xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager;
+if (!xLayoutManager.is())
+return OUString();
 css::uno::Reference< css::ui::XUIElement > xUIElement =
 xLayoutManager->getElement("private:resource/toolbar/findbar");
 if (!xUIElement.is())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2020-03-11 Thread Noel Grandin (via logerrit)
 svx/source/form/fmvwimp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05166fa824b09c6fa094b3596ebe9de2d7b9fe92
Author: Noel Grandin 
AuthorDate: Tue Mar 10 18:40:58 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 11 10:52:28 2020 +0100

tdf#131088 Automatic Control Focus not working

regression from
commit a361231b1363d072d737e9b1d411b71aa9550d84
Date:   Fri May 10 10:13:12 2019 +0200
fix wrong SET/QUERY flags passed to uno::Reference

Change-Id: Id0dd46c3d40f8acab980147c4c7f64911bc30d22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90293
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 17c467a66d799bda88d6cdb84b7fecbbd7d1fdf5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90277

diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index cc6bcef46f65..147eb1801db2 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -869,7 +869,7 @@ namespace
 continue;
 
 Reference< XChild > xModel( pFormObject->GetUnoControlModel(), 
UNO_QUERY_THROW );
-Reference< XInterface > xModelParent( xModel->getParent(), 
UNO_SET_THROW );
+Reference< XInterface > xModelParent( xModel->getParent(), 
UNO_QUERY );
 
 if ( xNormalizedForm.get() != xModelParent.get() )
 continue;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-12-17 Thread Gabor Kelemen (via logerrit)
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 261fef18ecef98bbe05de7422b6552f42b77176d
Author: Gabor Kelemen 
AuthorDate: Tue Nov 26 22:50:25 2019 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Dec 17 13:58:09 2019 +0100

tdf#111922 Fix Position sidebar Height/Width order of magnitude

Change-Id: Ib279199cdca58911b989a146d60ce764742e5008
Reviewed-on: https://gerrit.libreoffice.org/83843
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 
(cherry picked from commit a573829438bf4a3dc43e8774bfe4e29989e2e352)
Reviewed-on: https://gerrit.libreoffice.org/83980
Reviewed-by: László Németh 
(cherry picked from commit baa365141e8b3c619c7de0b01612ffe0cc3885c7)
Reviewed-on: https://gerrit.libreoffice.org/85236
Reviewed-by: Thorsten Behrens 

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 3e1c81430d32..c755e3daf9c5 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -1069,12 +1069,12 @@ void PosSizePropertyPanel::SetPosSizeMinMax()
 mpMtrPosY->SetMax(basegfx::fround64(fBottom));
 mpMtrPosY->SetLast(basegfx::fround64(fBottom));
 
-double fMaxWidth = maWorkArea.getWidth() - (maRect.getMinX() - fLeft);
-double fMaxHeight = maWorkArea.getHeight() - (maRect.getMinY() - fTop);
-mpMtrWidth->SetMax(basegfx::fround64(fMaxWidth));
-mpMtrWidth->SetLast(basegfx::fround64(fMaxWidth));
-mpMtrHeight->SetMax(basegfx::fround64(fMaxHeight));
-mpMtrHeight->SetLast(basegfx::fround64(fMaxHeight));
+double fMaxWidth = maWorkArea.getWidth() - (maRect.getWidth() - fLeft);
+double fMaxHeight = maWorkArea.getHeight() - (maRect.getHeight() - fTop);
+mpMtrWidth->SetMax(basegfx::fround64(fMaxWidth*100));
+mpMtrWidth->SetLast(basegfx::fround64(fMaxWidth*100));
+mpMtrHeight->SetMax(basegfx::fround64(fMaxHeight*100));
+mpMtrHeight->SetLast(basegfx::fround64(fMaxHeight*100));
 }
 
 void PosSizePropertyPanel::UpdateUIScale()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-12-17 Thread Thorsten Behrens (via logerrit)
 svx/source/inc/cell.hxx   |1 -
 svx/source/table/cell.cxx |6 --
 2 files changed, 7 deletions(-)

New commits:
commit 65eed7dec08f7ae35906a329e8011a40e194399e
Author: Thorsten Behrens 
AuthorDate: Sat Dec 14 20:21:41 2019 +0100
Commit: Katarina Behrens 
CommitDate: Tue Dec 17 13:46:59 2019 +0100

tdf#127481 don't override SdrText::GetItemSet() for cells

No point in overriding GetItemSet() with behaviour similar to parent
class (but less robustly so).

Change-Id: I2bdff44bfded0a5fa272964b4e0671cacb125f06
Reviewed-on: https://gerrit.libreoffice.org/85148
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit 4ddd76a7324c8b035e60a12ac06cf08339f6e366)
Reviewed-on: https://gerrit.libreoffice.org/85210
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 
(cherry picked from commit d99c2dad7f8479bbbef2a1c1883fadf580200d6a)
Reviewed-on: https://gerrit.libreoffice.org/85226
Reviewed-by: Katarina Behrens 

diff --git a/svx/source/inc/cell.hxx b/svx/source/inc/cell.hxx
index c17d878b5812..4480129c5dba 100644
--- a/svx/source/inc/cell.hxx
+++ b/svx/source/inc/cell.hxx
@@ -76,7 +76,6 @@ public:
 SVX_DLLPRIVATE virtual SfxStyleSheet* GetStyleSheet() const override;
 SVX_DLLPRIVATE void TakeTextAnchorRect(tools::Rectangle& rAnchorRect) 
const;
 
-SVX_DLLPRIVATE virtual const SfxItemSet& GetItemSet() const override;
 SVX_DLLPRIVATE void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, 
bool bClearAllItems);
 void SetMergedItem(const SfxPoolItem& rItem);
 
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 10b5a9d073a3..7809d3789b2e 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -693,12 +693,6 @@ void Cell::TakeTextAnchorRect(tools::Rectangle& 
rAnchorRect) const
 }
 
 
-const SfxItemSet& Cell::GetItemSet() const
-{
-return mpProperties->GetObjectItemSet();
-}
-
-
 void Cell::SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool 
bClearAllItems)
 {
 if( mpProperties )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-12-03 Thread Caolán McNamara (via logerrit)
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 162a9d7e625315bb7d2f7353bfe160dc2217defa
Author: Caolán McNamara 
AuthorDate: Tue Dec 3 15:54:27 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 3 22:14:11 2019 +0100

Resolves: tdf#99711 update metric for spinbuttons before setting their 
values

which avoids the rounding problem

Change-Id: I7e6a700037661ded1ba73d08009b9279ee12a140
Reviewed-on: https://gerrit.libreoffice.org/84364
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Jenkins

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index fd45c8cfaa41..3e1c81430d32 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -107,10 +107,10 @@ PosSizePropertyPanel::PosSizePropertyPanel(
 get( mpFlipTbx,   "selectrotationtype" );
 Initialize();
 
+mpBindings->Update( SID_ATTR_METRIC );
 mpBindings->Update( SID_ATTR_TRANSFORM_WIDTH );
 mpBindings->Update( SID_ATTR_TRANSFORM_HEIGHT );
 mpBindings->Update( SID_ATTR_TRANSFORM_PROTECT_SIZE );
-mpBindings->Update( SID_ATTR_METRIC );
 }
 
 PosSizePropertyPanel::~PosSizePropertyPanel()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-11-22 Thread Caolán McNamara (via logerrit)
 svx/source/dialog/linkwarn.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0e90cff24f5ed99ed718cfcaa05d0dafa2f2a5a6
Author: Caolán McNamara 
AuthorDate: Tue Nov 19 09:58:46 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Nov 22 16:08:58 2019 +0100

LinkWarnDialog "ask" checkbox should be aligned with content

there is a special argument to MessageDialogController to acheive that

Change-Id: I0990cdc1f07479c23184e9b70914e611708dbd96
Reviewed-on: https://gerrit.libreoffice.org/83202
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index 8d7c23d08e20..735b3c68e76f 100644
--- a/svx/source/dialog/linkwarn.cxx
+++ b/svx/source/dialog/linkwarn.cxx
@@ -23,7 +23,7 @@
 #include 
 
 SvxLinkWarningDialog::SvxLinkWarningDialog(weld::Widget* pParent, const 
OUString& _rFileName)
-: MessageDialogController(pParent, "svx/ui/linkwarndialog.ui", 
"LinkWarnDialog")
+: MessageDialogController(pParent, "svx/ui/linkwarndialog.ui", 
"LinkWarnDialog", "ask")
 , m_xWarningOnBox(m_xBuilder->weld_check_button("ask"))
 {
 // replace filename
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-11-21 Thread Caolán McNamara (via logerrit)
 svx/source/dialog/srchdlg.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit f5b74048d460de005335cb74f5c072410bf66b51
Author: Caolán McNamara 
AuthorDate: Mon Nov 18 12:42:41 2019 +
Commit: Christian Lohmaier 
CommitDate: Thu Nov 21 20:24:42 2019 +0100

rhbz#1773525 reducing the amount of saved search/replace entries didn't work

Change-Id: I1512ef507130718859271079e603a95cf2105c58
Reviewed-on: https://gerrit.libreoffice.org/83091
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index ce298c60e494..1f95fbe21a7c 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -150,7 +150,7 @@ struct SearchDlg_Impl
 }
 };
 
-static void ListToStrArr_Impl( sal_uInt16 nId, std::vector& rStrLst, 
weld::ComboBox& rCBox )
+static void ListToStrArr_Impl(sal_uInt16 nId, std::vector& rStrLst, 
weld::ComboBox& rCBox, sal_uInt16 nRememberSize)
 {
 const SfxStringListItem* pSrchItem =
 static_cast(SfxGetpApp()->GetItem( nId ));
@@ -159,6 +159,9 @@ static void ListToStrArr_Impl( sal_uInt16 nId, 
std::vector& rStrLst, w
 {
 std::vector aLst = pSrchItem->GetList();
 
+if (aLst.size() > nRememberSize)
+aLst.resize(nRememberSize);
+
 for (const OUString & s : aLst)
 {
 rStrLst.push_back(s);
@@ -378,9 +381,9 @@ void SvxSearchDialog::Construct_Impl()
 
 // Get stored search-strings from the application
 ListToStrArr_Impl(SID_SEARCHDLG_SEARCHSTRINGS,
-   aSearchStrings, *m_xSearchLB);
+   aSearchStrings, *m_xSearchLB, nRememberSize);
 ListToStrArr_Impl(SID_SEARCHDLG_REPLACESTRINGS,
-   aReplaceStrings, *m_xReplaceLB);
+   aReplaceStrings, *m_xReplaceLB, nRememberSize);
 
 InitControls_Impl();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-11-21 Thread Caolán McNamara (via logerrit)
 svx/source/dialog/srchdlg.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 611d7a2d07c6f2ee97bf3cec4b3b372bfb5b0f4c
Author: Caolán McNamara 
AuthorDate: Mon Nov 18 13:44:46 2019 +
Commit: Christian Lohmaier 
CommitDate: Thu Nov 21 20:21:56 2019 +0100

rhbz#1773525 wrong elements removed from saved entries when limit hit

Change-Id: Iaf8a012ffe927cbf38789e97b469d899e7cbf87b
Reviewed-on: https://gerrit.libreoffice.org/83096
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 8952e347c7cb..ce298c60e494 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -1581,16 +1581,16 @@ void SvxSearchDialog::Remember_Impl( const OUString 
, bool _bSearch )
 if (std::find(pArr->begin(), pArr->end(), rStr) != pArr->end())
 return;
 
+pArr->insert(pArr->begin(), rStr);
+pListBox->insert_text(0, rStr);
+
 // delete oldest entry at maximum occupancy (ListBox and Array)
-if(nRememberSize < pArr->size())
+size_t nArrSize = pArr->size();
+if (nArrSize > nRememberSize)
 {
-pListBox->remove(static_cast(nRememberSize - 1));
-(*pArr)[nRememberSize - 1] = rStr;
-pArr->erase(pArr->begin() + nRememberSize - 1);
+pListBox->remove(nArrSize - 1);
+pArr->erase(pArr->begin() + nArrSize - 1);
 }
-
-pArr->insert(pArr->begin(), rStr);
-pListBox->insert_text(0, rStr);
 }
 
 void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-11-05 Thread Armin Le Grand (via logerrit)
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx |   26 ++-
 1 file changed, 25 insertions(+), 1 deletion(-)

New commits:
commit e8720057aa0f4e612000d68f6de682f3afb8a1ea
Author: Armin Le Grand 
AuthorDate: Mon Nov 4 15:28:22 2019 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Nov 5 15:02:00 2019 +0100

tdf#121963 apply GridOffset in isPrimitiveVisible

Need to take evtl. GridOffset into account for Controls
in ViewObjectContactOfUnoControl::isPrimitiveVisible to
get same coordinates inside adjustControlGeometry_throw

Change-Id: Id6f0d1c7a4de4ee5908b50ee1a2217a0b078ecf5
Reviewed-on: https://gerrit.libreoffice.org/82031
Tested-by: Xisco Faulí 
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 
(cherry picked from commit fd2174d55dadc3b4dcf6b15b5789077bb2951698)
Reviewed-on: https://gerrit.libreoffice.org/82050
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx 
b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 9fcd285572e2..ae6ecf62623e 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -54,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 /*
@@ -1674,7 +1675,30 @@ namespace sdr { namespace contact {
 #endif
 
 if ( !rViewInformation.getViewport().isEmpty() )
-m_pImpl->positionAndZoomControl( 
rViewInformation.getObjectToViewTransformation() );
+{
+// tdf#121963 check and eventually pre-multiply 
ViewTransformation
+// with GridOffset transformation to avoid alternating 
positions of
+// FormControls which are victims of the non-linear calc 
ViewTransformation
+// aka GridOffset. For other paths (e.g. repaint) this is 
included already
+// as part of the object's sequence of B2DPrimitive - 
representation
+// (see ViewObjectContact::getPrimitive2DSequence and how 
getGridOffset is used there)
+basegfx::B2DHomMatrix 
aViewTransformation(rViewInformation.getObjectToViewTransformation());
+
+if(GetObjectContact().supportsGridOffsets())
+{
+const basegfx::B2DVector& rGridOffset(getGridOffset());
+
+if(0.0 != rGridOffset.getX() || 0.0 != rGridOffset.getY())
+{
+// pre-multiply: GridOffset needs to be applied 
directly to logic model data
+// of object coordinates, so multiply GridOffset from 
right to make it
+// work as 1st change - these objects may still be 
part of groups/hierarchies
+aViewTransformation = aViewTransformation * 
basegfx::utils::createTranslateB2DHomMatrix(rGridOffset);
+}
+}
+
+m_pImpl->positionAndZoomControl(aViewTransformation);
+}
 }
 
 return ViewObjectContactOfSdrObj::isPrimitiveVisible( _rDisplayInfo );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-11-01 Thread Tor Lillqvist (via logerrit)
 svx/source/table/tablecontroller.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 76c0741d1377274e5347c586ada4061ee157527b
Author: Tor Lillqvist 
AuthorDate: Wed Oct 30 17:30:14 2019 +0200
Commit: Tor Lillqvist 
CommitDate: Fri Nov 1 09:44:13 2019 +0100

tdf#128454: Make it possible to delete a table's single row or column

It is already possible to delete all rows or all columns when there
are multiple ones. So why it should be impossible to delete the single
row or column when there is just one I can't understand.

(This change is just one way to provide a workaround for the bug; the
ideal would be if it was possible to specifically delete a whole table
also in Impress documents, not just Writer ones.)

(The change is only for the LibreOfficeKit use case, but maybe it
should be in all cases.)

Change-Id: If9221d248d59e515a110ff94cfb96fdd76aecafb
Reviewed-on: https://gerrit.libreoffice.org/81801
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 
(cherry picked from commit f4594ae70f3bcde7a87ec606030ec5217ba53788)
Reviewed-on: https://gerrit.libreoffice.org/81868
Tested-by: Jenkins

diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index be279e41a8e9..57c9c1dbbeac 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -463,11 +463,11 @@ void SvxTableController::GetState( SfxItemSet& rSet )
 break;
 }
 case SID_TABLE_DELETE_ROW:
-if( !mxTable.is() || !hasSelectedCells() || 
(mxTable->getRowCount() <= 1) )
+if( !mxTable.is() || !hasSelectedCells() || 
(!comphelper::LibreOfficeKit::isActive() && mxTable->getRowCount() <= 1) )
 rSet.DisableItem(SID_TABLE_DELETE_ROW);
 break;
 case SID_TABLE_DELETE_COL:
-if( !mxTable.is() || !hasSelectedCells() || 
(mxTable->getColumnCount() <= 1) )
+if( !mxTable.is() || !hasSelectedCells() || 
(!comphelper::LibreOfficeKit::isActive() && mxTable->getColumnCount() <= 1) )
 rSet.DisableItem(SID_TABLE_DELETE_COL);
 break;
 case SID_TABLE_MERGE_CELLS:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-10-10 Thread Xisco Fauli (via logerrit)
 svx/source/sidebar/line/LineWidthPopup.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 4396bfa7c05b8578ed4ea54a6db85afc84e0a683
Author: Xisco Fauli 
AuthorDate: Fri Sep 27 09:04:56 2019 +0200
Commit: Miklos Vajna 
CommitDate: Thu Oct 10 10:47:27 2019 +0200

tdf#127676: avoid flickering in line width popup

Change-Id: Ie69a5b4d33d12316e6fd7e443b92851cffc95b8c
Reviewed-on: https://gerrit.libreoffice.org/79667
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 
(cherry picked from commit 25cc6dcef22e51c1bfa01e8fbed5046439bb1428)
Reviewed-on: https://gerrit.libreoffice.org/79748
Reviewed-by: Miklos Vajna 

diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx 
b/svx/source/sidebar/line/LineWidthPopup.cxx
index abcefb0fe231..813160616611 100644
--- a/svx/source/sidebar/line/LineWidthPopup.cxx
+++ b/svx/source/sidebar/line/LineWidthPopup.cxx
@@ -47,6 +47,11 @@ LineWidthPopup::LineWidthPopup(LinePropertyPanelBase& 
rParent)
 
 m_xVSWidth = VclPtr::Create(m_xBox);
 
+// Avoid flicker when hovering over the menu items.
+if (!IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus))
+// If NWF renders the focus rects itself, that breaks double-buffering.
+m_xMFWidth->RequestDoubleBuffering(true);
+
 m_xVSWidth->SetStyle(m_xVSWidth->GetStyle()| WB_3DLOOK |  
WB_NO_DIRECTSELECT);
 
 maStrUnits[0] = "0.5";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-09-25 Thread Noel Grandin (via logerrit)
 svx/source/stbctrls/zoomctrl.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 5e6d6c21be77ac9d05b306dde041a1ee1d1d552d
Author: Noel Grandin 
AuthorDate: Wed Sep 25 11:12:19 2019 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 25 20:57:51 2019 +0200

tdf#127701 Zoom factor percentage calculating fault

regression from
commit c53f3f8f58f55d0978fb968446975856d72a52f8
tdf#126819 Can't retrieve the mouse position written in the
statusbar

note that this is a workaround - we fire an sfx2 event when we choose
one of the "smart" zoom options, and normally we then receive another
sfx2 event to notify us of the real zoom value.
But when we choose the same smart option twice, we don't receive the
second sfx2 event.

Change-Id: I31c2e34ff31a4f4e03a447ffbd783589982edc57
Reviewed-on: https://gerrit.libreoffice.org/79516
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit e39ddbdb5b6f49e3585a03444dce077709b855e6)
Reviewed-on: https://gerrit.libreoffice.org/79557

diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index eac10c81fef6..601e79ef21e8 100644
--- a/svx/source/stbctrls/zoomctrl.cxx
+++ b/svx/source/stbctrls/zoomctrl.cxx
@@ -141,8 +141,12 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, 
SfxItemState eState,
 
 void SvxZoomStatusBarControl::ImplUpdateItemText()
 {
-OUString aStr(unicode::formatPercent(nZoom, 
Application::GetSettings().GetUILanguageTag()));
-GetStatusBar().SetItemText( GetId(), aStr );
+// workaround - don't bother updating when we don't have a real zoom value
+if (nZoom)
+{
+OUString aStr(unicode::formatPercent(nZoom, 
Application::GetSettings().GetUILanguageTag()));
+GetStatusBar().SetItemText( GetId(), aStr );
+}
 }
 
 void SvxZoomStatusBarControl::Paint( const UserDrawEvent& )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-09-08 Thread Michael Weghorn (via logerrit)
 svx/source/sdr/contact/viewcontactofsdrpathobj.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 859f49294ad95d3a6596e135e550253155d6517b
Author: Michael Weghorn 
AuthorDate: Thu Sep 5 19:09:09 2019 +0200
Commit: Thorsten Behrens 
CommitDate: Sun Sep 8 12:35:16 2019 +0200

tdf#126184 Use max paper dimensions to calculate clip region

Assuming at least A4 for the page size isn't enough if
e.g. A2 or larger is used, so too much was clipped in that case.

Therefore, use the the maximum paper width/height instead, which
is 6 m by default. This is still far from the 19 km that caused
tdf#63955 and I cannot reproduce tdf#63955 with that new limit.

A big thanks to Regina Henschel for the great analysis in
tdf#126184!

(Side note: Comments 18 and 19 in tdf#63955 suggest to do the whole
 clipping elsewhere, so if anybody wants to take a look at this...)

Change-Id: Iccacad621675df6c7b4477182d7332c4a3d67139
Reviewed-on: https://gerrit.libreoffice.org/78690
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1dccd6814f1fe7a06f3168d01d18d347269cd3c1)
Reviewed-on: https://gerrit.libreoffice.org/78759

diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx 
b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 082abb6a0e27..393676f9b4c7 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -19,6 +19,7 @@
 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -100,11 +101,14 @@ namespace sdr
 //would not over flow into a tiny clip region
 if (nPageWidth < SAL_MAX_INT32/2 && nPageHeight < 
SAL_MAX_INT32/2)
 {
-//But, see tdf#97276 and tdf#98366. Don't clip too much if 
the
+//But, see tdf#97276, tdf#126184 and tdf#98366. Don't clip 
too much if the
 //underlying page dimension is unknown or a paste document
 //where the page sizes use the odd default of 10x10
-nPageWidth = std::max(21000, nPageWidth);
-nPageHeight = std::max(29700, nPageHeight);
+const SvtOptionsDrawinglayer aDrawinglayerOpt;
+const sal_Int32 nMaxPaperWidth = 
aDrawinglayerOpt.GetMaximumPaperWidth() * 1000;
+const sal_Int32 nMaxPaperHeight = 
aDrawinglayerOpt.GetMaximumPaperHeight() * 1000;
+nPageWidth = std::max(nPageWidth, 
nMaxPaperWidth);
+nPageHeight = std::max(nPageHeight, 
nMaxPaperHeight);
 basegfx::B2DRange aClipRange(-nPageWidth, -nPageHeight,
  nPageWidth*2, nPageHeight*2);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-08-22 Thread Regina Henschel (via logerrit)
 svx/source/svdraw/svdopath.cxx |   71 +
 1 file changed, 44 insertions(+), 27 deletions(-)

New commits:
commit 6f9e19c85ffc290e600084b33d9a929db28c144d
Author: Regina Henschel 
AuthorDate: Wed Aug 21 14:11:23 2019 +0200
Commit: Caolán McNamara 
CommitDate: Thu Aug 22 16:36:14 2019 +0200

tdf#126271 Revert "tdf120965 Simplify SdrPathObj::AddToHdlList()"

This reverts commit 26001f4f84b0d921c8612d56613735ba5314.

Change-Id: Ib4df476b405e65be9203ab376c9c68b03198c040
Reviewed-on: https://gerrit.libreoffice.org/77882
Tested-by: Regina Henschel 
Reviewed-by: Regina Henschel 
(cherry picked from commit 59189f3e02acbdf4e5bbd35fc278252b30022f43)
Reviewed-on: https://gerrit.libreoffice.org/77939
Tested-by: Jenkins

diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 12a7b2c1af39..9b4e5f060310 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2008,45 +2008,62 @@ void SdrPathObj::AddToHdlList(SdrHdlList& rHdlList) 
const
 
 void SdrPathObj::AddToPlusHdlList(SdrHdlList& rHdlList, SdrHdl& rHdl) const
 {
-// exclude some error situations
-const XPolyPolygon aPathPolyPolygon(GetPathPoly());
+// keep old stuff to be able to keep old SdrHdl stuff, too
+const XPolyPolygon aOldPathPolygon(GetPathPoly());
+sal_uInt16 nPnt = static_cast(rHdl.GetPointNum());
 sal_uInt16 nPolyNum = static_cast(rHdl.GetPolyNum());
-if (nPolyNum>=aPathPolyPolygon.Count())
-return;
 
-const XPolygon& rXPoly = aPathPolyPolygon[nPolyNum];
-sal_uInt16 nPntCount = rXPoly.GetPointCount();
-if (nPntCount<=0)
+if (nPolyNum>=aOldPathPolygon.Count())
 return;
 
-sal_uInt16 nPnt = static_cast(rHdl.GetPointNum());
-if (nPnt>=nPntCount)
-return;
+const XPolygon& rXPoly = aOldPathPolygon[nPolyNum];
+sal_uInt16 nPntMax = rXPoly.GetPointCount();
 
-if (rXPoly.IsControl(nPnt))
+if (nPntMax<=0)
+return;
+nPntMax--;
+if (nPnt>nPntMax)
 return;
 
-// segment before
-if (nPnt==0 && IsClosed())
-nPnt=nPntCount-1;
-if (nPnt>0 && rXPoly.IsControl(nPnt-1))
+// calculate the number of plus points
+sal_uInt16 nCnt = 0;
+if (rXPoly.GetFlags(nPnt)!=PolyFlags::Control)
 {
-std::unique_ptr pHdl(new SdrHdlBezWgt());
-pHdl->SetPos(rXPoly[nPnt-1]);
-pHdl->SetPointNum(nPnt-1);
-pHdl->SetSourceHdlNum(rHdl.GetSourceHdlNum());
-pHdl->SetPlusHdl(true);
-rHdlList.AddHdl(std::move(pHdl));
+if (nPnt==0 && IsClosed())
+nPnt=nPntMax;
+if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==PolyFlags::Control)
+nCnt++;
+if (nPnt==nPntMax && IsClosed())
+nPnt=0;
+if (nPnt(rHdl.GetPointNum());
 std::unique_ptr pHdl(new SdrHdlBezWgt());
-pHdl->SetPos(rXPoly[nPnt+1]);
-pHdl->SetPointNum(nPnt+1);
+pHdl->SetPolyNum(rHdl.GetPolyNum());
+
+if (nPnt==0 && IsClosed())
+nPnt=nPntMax;
+if (nPnt>0 && rXPoly.GetFlags(nPnt-1)==PolyFlags::Control && 
nPlusNum==0)
+{
+pHdl->SetPos(rXPoly[nPnt-1]);
+pHdl->SetPointNum(nPnt-1);
+}
+else
+{
+if (nPnt==nPntMax && IsClosed())
+nPnt=0;
+if (nPntSetPos(rXPoly[nPnt+1]);
+pHdl->SetPointNum(nPnt+1);
+}
+}
+
 pHdl->SetSourceHdlNum(rHdl.GetSourceHdlNum());
 pHdl->SetPlusHdl(true);
 rHdlList.AddHdl(std::move(pHdl));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-06-28 Thread Xisco Fauli (via logerrit)
 svx/source/svdraw/svdotext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7903b2c1733c2ebb9f1059eb9d191befd1d36baf
Author: Xisco Fauli 
AuthorDate: Thu Jun 27 17:26:34 2019 +0200
Commit: Xisco Faulí 
CommitDate: Fri Jun 28 10:43:06 2019 +0200

tdf#126137: Do not dereference non-existing Object

Regression from dfefe448c41921f2f1e54d3f69b8b9e89031d055

Use same logic as in c28ec6d9fbb21b363102faac0171de2754ea5d75

Change-Id: Ia489eb61873d38c31729fedb853b11570e562123
Reviewed-on: https://gerrit.libreoffice.org/74811
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit b653f21313f3b8ff9da99897e3a0c2df4a685b60)
Reviewed-on: https://gerrit.libreoffice.org/74826
Reviewed-by: Xisco Faulí 

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 999d7fbfc57b..f042b3b9b60c 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1049,7 +1049,7 @@ SdrTextObj& SdrTextObj::operator=(const SdrTextObj& rObj)
 {
 pNewOutlinerParaObject = pEO->CreateParaObject();
 }
-else
+else if (nullptr != rObj.getActiveText()->GetOutlinerParaObject())
 {
 pNewOutlinerParaObject.reset( new 
OutlinerParaObject(*rObj.getActiveText()->GetOutlinerParaObject()) );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-06-18 Thread Jim Raykowski (via logerrit)
 svx/source/tbxctrls/tbcontrl.cxx|6 --
 svx/source/tbxctrls/tbunocontroller.cxx |5 -
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit d10b4015b07aa717b6377f46f58f29b9988ec84f
Author: Jim Raykowski 
AuthorDate: Sat May 25 16:08:40 2019 -0800
Commit: Xisco Faulí 
CommitDate: Tue Jun 18 14:10:02 2019 +0200

tdf#120170 Prevent escape key press focus to document

...from style, fontname, and fontsize comboboxes used in sidebar tool
boxes when sidebar is undocked

Windows build does not show this bug but Linux does for
SAL_USE_VCLPLUGIN's gen, gtk, and gtk3.

This patch checks the combobox parent object type for type sidebar tool
box and if so skips the release focus call that sets focus to the frames
container window which incorrectly sets focus to the document for Linux
build. Probably a lower level fix for this but I'm not at that level yet
:-)

Change-Id: Ie33ea4238f7e8715fbd0389efd9185598a528ced
Reviewed-on: https://gerrit.libreoffice.org/72970
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit c81055eb075efffa9cd123913a684ac3258903d5)
Reviewed-on: https://gerrit.libreoffice.org/74250
Reviewed-by: Xisco Faulí 

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 0b1c52b88acf..125d6d21432e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -898,7 +898,8 @@ bool SvxStyleBox_Impl::EventNotify( NotifyEvent& rNEvt )
 
 case KEY_ESCAPE:
 SelectEntryPos( nCurSel );
-ReleaseFocus();
+if ( typeid( *GetParent() ) != typeid( 
sfx2::sidebar::SidebarToolBox ) )
+ReleaseFocus();
 bHandled = true;
 break;
 }
@@ -1416,7 +1417,8 @@ bool SvxFontNameBox_Impl::EventNotify( NotifyEvent& rNEvt 
)
 
 case KEY_ESCAPE:
 SetText( aCurText );
-ReleaseFocus_Impl();
+if ( typeid( *GetParent() ) != typeid( 
sfx2::sidebar::SidebarToolBox ) )
+ReleaseFocus_Impl();
 EndPreview();
 break;
 }
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx 
b/svx/source/tbxctrls/tbunocontroller.cxx
index 96ff89a22a3c..628a9585e922 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -39,6 +39,8 @@
 
 #include 
 
+#include 
+
 using namespace ::com::sun::star;
 
 namespace {
@@ -230,7 +232,8 @@ bool SvxFontSizeBox_Impl::EventNotify( NotifyEvent& rNEvt )
 
 case KEY_ESCAPE:
 SetText( m_aCurText );
-ReleaseFocus_Impl();
+if ( typeid( *GetParent() ) != typeid( 
sfx2::sidebar::SidebarToolBox ) )
+ReleaseFocus_Impl();
 bHandled = true;
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-06-12 Thread Muhammet Kara (via logerrit)
 svx/source/tbxctrls/tbcontrl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9dbaac23a1596358ceb84c92ba0357b332e9d76d
Author: Muhammet Kara 
AuthorDate: Wed Jun 12 11:57:35 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Jun 13 07:34:41 2019 +0200

Resolves tdf#115858: More button should move the focus to 'Styles' window

Change-Id: I71c834733ff0f3d4b89ecaeecb12631609e84c1d
Reviewed-on: https://gerrit.libreoffice.org/73872
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
(cherry picked from commit a025132839b19ba952558b9dbec454c8a34c6489)
Reviewed-on: https://gerrit.libreoffice.org/73895
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index d9d9bf0d8248..0b1c52b88acf 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -760,7 +760,7 @@ IMPL_STATIC_LINK_NOARG(SvxStyleBox_Impl, ShowMoreHdl, 
void*, void)
 if (!pViewFrm)
 return;
 pViewFrm->ShowChildWindow(SID_SIDEBAR);
-::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel", 
pViewFrm->GetFrame().GetFrameInterface());
+::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel", 
pViewFrm->GetFrame().GetFrameInterface(), true);
 }
 
 void SvxStyleBox_Impl::Select()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-06-05 Thread Xisco Fauli (via logerrit)
 svx/source/unodraw/UnoGraphicExporter.cxx |   66 +++---
 1 file changed, 35 insertions(+), 31 deletions(-)

New commits:
commit 95ffc97e9dc1c7ba2f13f6b46e495608f70bbe96
Author: Xisco Fauli 
AuthorDate: Mon Jun 3 16:36:23 2019 +0200
Commit: Xisco Faulí 
CommitDate: Wed Jun 5 20:04:41 2019 +0200

tdf#125062: distort hairline borders only if selection is used

Regression from 046df0a876b3d948bb1e14443c00c180bc8cccaa

Use the fix for tdf#105998 only when 'selection' option is checked
in the save dialog

Change-Id: I8c4127c780736408e905ead48e0d3ee6ae149197
Reviewed-on: https://gerrit.libreoffice.org/73391
Reviewed-by: Xisco Faulí 
Tested-by: Xisco Faulí 
(cherry picked from commit 6c31c2b01dd32cc7ba1230f2c4a98b8f7def219b)
Reviewed-on: https://gerrit.libreoffice.org/73555
Tested-by: Jenkins

diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx 
b/svx/source/unodraw/UnoGraphicExporter.cxx
index 78a5585061b9..3b8b1d4fa183 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -180,7 +180,7 @@ namespace {
 
 /** creates a bitmap that is optionally transparent from a metafile
 */
-BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, const Size* pSize 
)
+BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf,bool bIsSelection, 
const Size* pSize )
 {
 // use new primitive conversion tooling
 basegfx::B2DRange aRange(basegfx::B2DPoint(0.0, 0.0));
@@ -213,35 +213,39 @@ namespace {
 
 if(!aRect.IsEmpty())
 {
-// tdf#105998 Correct the Metafile using information from it's 
real sizes measured
-// using rMtf.GetBoundRect above and a copy
-const Size aOnePixelInMtf(
-Application::GetDefaultDevice()->PixelToLogic(
-Size(1, 1),
-rMtf.GetPrefMapMode()));
 GDIMetaFile aMtf(rMtf);
-const Size aHalfPixelInMtf(
-(aOnePixelInMtf.getWidth() + 1) / 2,
-(aOnePixelInMtf.getHeight() + 1) / 2);
-const bool bHairlineBR(
-!aHairlineRect.IsEmpty() && (aRect.Right() == 
aHairlineRect.Right() || aRect.Bottom() == aHairlineRect.Bottom()));
-
-// Move the content to (0,0), usually TopLeft ist slightly
-// negative. For better visualization, add a half pixel, too
-aMtf.Move(
-aHalfPixelInMtf.getWidth() - aRect.Left(),
-aHalfPixelInMtf.getHeight() - aRect.Top());
-
-// Do not Scale, but set the PrefSize. Some levels deeper the
-// MetafilePrimitive will add a mapping to the decomposition
-// (and possibly a clipping) to map the graphic content to
-// a unit coordinate system.
-// Size is the measured size plus one pixel if needed (bHairlineBR)
-// and the moved half pixwel from above
-aMtf.SetPrefSize(
-Size(
-aRect.getWidth() + (bHairlineBR ? 
aOnePixelInMtf.getWidth() : 0) + aHalfPixelInMtf.getWidth(),
-aRect.getHeight() + (bHairlineBR ? 
aOnePixelInMtf.getHeight() : 0) + aHalfPixelInMtf.getHeight()));
+
+if (bIsSelection)
+{
+// tdf#105998 Correct the Metafile using information from it's 
real sizes measured
+// using rMtf.GetBoundRect above and a copy
+const Size aOnePixelInMtf(
+Application::GetDefaultDevice()->PixelToLogic(
+Size(1, 1),
+rMtf.GetPrefMapMode()));
+const Size aHalfPixelInMtf(
+(aOnePixelInMtf.getWidth() + 1) / 2,
+(aOnePixelInMtf.getHeight() + 1) / 2);
+const bool bHairlineBR(
+!aHairlineRect.IsEmpty() && (aRect.Right() == 
aHairlineRect.Right() || aRect.Bottom() == aHairlineRect.Bottom()));
+
+// Move the content to (0,0), usually TopLeft ist slightly
+// negative. For better visualization, add a half pixel, too
+aMtf.Move(
+aHalfPixelInMtf.getWidth() - aRect.Left(),
+aHalfPixelInMtf.getHeight() - aRect.Top());
+
+// Do not Scale, but set the PrefSize. Some levels deeper the
+// MetafilePrimitive will add a mapping to the decomposition
+// (and possibly a clipping) to map the graphic content to
+// a unit coordinate system.
+// Size is the measured size plus one pixel if needed 
(bHairlineBR)
+// and the moved half pixwel from above
+aMtf.SetPrefSize(
+Size(
+aRect.getWidth() + (bHairlineBR ? 
aOnePixelInMtf.getWidth() : 0) + aHalfPixelInMtf.getWidth(),
+

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source

2019-06-04 Thread heiko tietze (via logerrit)
 svx/source/dialog/srchdlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5cfac16dbd4af456a7fb6d52c8953c69a72ba2ba
Author: heiko tietze 
AuthorDate: Fri May 17 12:08:18 2019 +0200
Commit: Heiko Tietze 
CommitDate: Tue Jun 4 11:00:10 2019 +0200

Resolves tdf#125333 - Crash with FindReplaceRememberedSearches=0

Zero remembered searches crash the app when no result is found
minimum set to 1

Change-Id: Ib2b4b195d018f0f11238699458066f4d128f8997
Reviewed-on: https://gerrit.libreoffice.org/72459
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit def76a088dea12dfd9d9b796e975e742cbe44ce1)
Reviewed-on: https://gerrit.libreoffice.org/73431

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 07dd53d75708..791116324361 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -332,6 +332,8 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 
 //tdf#122322
 nRememberSize = 
officecfg::Office::Common::Misc::FindReplaceRememberedSearches::get();
+if (nRememberSize<1)
+nRememberSize = 1; //0 crashes with no results found
 
 auto nTermWidth = m_xSearchLB->get_approximate_digit_width() * 28;
 m_xSearchLB->set_size_request(nTermWidth, -1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits