[Libreoffice-commits] core.git: cui/source svx/source

2022-06-19 Thread Gabor Kelemen (via logerrit)
 cui/source/tabpages/paragrph.cxx   |3 +--
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx |2 +-
 svx/source/sidebar/paragraph/ParaSpacingWindow.cxx |2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 352284e77f905bc5f09c1dfdab35059e0a3de6bf
Author: Gabor Kelemen 
AuthorDate: Sat Jun 18 19:45:02 2022 +0200
Commit: Thorsten Behrens 
CommitDate: Sun Jun 19 21:48:40 2022 +0200

tdf#68335 Increase default para spacing before/after to 56 cm

and fixed line spacing as well.
These may be set to 1584 pt in Word, but the UI incorrectly showed
even the correctly imported values as 10 cm.

Turns out this is only a UI limitation, so lift it for UX interop.
Save/reload already works fine to odt, docx, doc, rtf formats.

Change-Id: I69a772e860ad24a1b317dc041b0c55f0a9d461de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136102
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 0a0cb96487d8..b43c77cbd894 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -65,8 +65,7 @@ const WhichRangesContainer 
SvxExtParagraphTabPage::pExtRanges(svl::Items<
 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP// 10065 - 10066
 >);
 
-#define MAX_DURCH 5670  // 10 cm makes sense as maximum interline lead
-// according to BP
+#define MAX_DURCH 31680 // tdf#68335: 1584 pt for UX interoperability with 
Word
 #define FIX_DIST_DEF 283// standard fix distance 0,5 cm
 
 namespace {
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx 
b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 77962e065aeb..f4e2fd83bb52 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -38,7 +38,7 @@ using namespace css::uno;
 namespace svx::sidebar {
 #define DEFAULT_VALUE  0
 
-#define MAX_DURCH 5670
+#define MAX_DURCH   31680 // tdf#68335: 1584 pt for UX 
interoperability with Word
 
 #define MAX_SW  1709400
 #define MAX_SC_SD   116220200
diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx 
b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
index 917933018f9f..fa164dd024c6 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
@@ -28,7 +28,7 @@
 using namespace svx;
 
 #define DEFAULT_VALUE  0
-#define MAX_DURCH 5670
+#define MAX_DURCH   31680 // tdf#68335: 1584 pt for UX 
interoperability with Word
 #define MAX_SW  1709400
 #define MAX_SC_SD   116220200
 #define NEGA_MAXVALUE  -1000


[Libreoffice-commits] core.git: cui/source svx/source

2022-03-16 Thread Andreas Heinisch (via logerrit)
 cui/source/dialogs/cuicharmap.cxx |2 ++
 svx/source/dialog/charmap.cxx |   13 +
 2 files changed, 15 insertions(+)

New commits:
commit e7895fbacff945d38f679f504c179a417e3b9af1
Author: Andreas Heinisch 
AuthorDate: Sat Mar 12 17:50:33 2022 +0100
Commit: Andreas Heinisch 
CommitDate: Wed Mar 16 16:52:51 2022 +0100

tdf#109214 - Highlight the favorites in the grid of special characters

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index bda30b764f26..0e991d6dce16 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -421,6 +421,8 @@ void SvxCharacterMap::updateFavCharControl()
 }
 m_xShowSet->getFavCharacterList();
 m_xSearchSet->getFavCharacterList();
+// tdf#109214 - redraw highlight of the favorite characters
+m_xShowSet->Invalidate();
 }
 
 void SvxCharacterMap::deleteFavCharacterFromList(std::u16string_view sTitle, 
std::u16string_view rFont)
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 23b6cda06ec7..6b618d51f73b 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -567,6 +567,19 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& 
rRenderContext, int n1,
 aPointTxTy.AdjustX(nXHDelta - 1 );
 }
 
+// tdf#109214 - highlight the favorite characters
+if (isFavChar(aCharStr, mxVirDev->GetFont().GetFamilyName()))
+{
+const Color aLineCol = rRenderContext.GetLineColor();
+rRenderContext.SetLineColor(aHighlightColor);
+rRenderContext.SetFillColor(COL_TRANSPARENT);
+// Outer border
+rRenderContext.DrawRect(tools::Rectangle(Point(x - 1, y - 1), 
Size(nX + 3, nY + 3)));
+// Inner border
+rRenderContext.DrawRect(tools::Rectangle(Point(x, y), Size(nX + 1, 
nY + 1)));
+rRenderContext.SetLineColor(aLineCol);
+}
+
 Color aTextCol = rRenderContext.GetTextColor();
 if (i != nSelectedIndex)
 {


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

2021-05-05 Thread László Németh (via logerrit)
 cui/source/tabpages/tpline.cxx   |   12 +++
 svx/source/tbxctrls/linectrl.cxx |   13 +++
 sw/qa/uitest/writer_tests7/apply_line_cap.py |  102 +++
 3 files changed, 127 insertions(+)

New commits:
commit 134fb0fdecb898b1568f57e8c9dc8c3528b0d1e0
Author: László Németh 
AuthorDate: Wed Apr 21 22:45:48 2021 +0200
Commit: László Németh 
CommitDate: Wed May 5 13:48:48 2021 +0200

tdf#141935 svx cui: apply line cap setting of line styles

Only line dash pattern of the selected line style
was applied on the selected line or shape using the
1) Line Style popup menu of Drawing toolbar and
sidebar pane Properties and 2) Style popup menu
of Line pane of Line setting dialog window.

Now both line dash and line cap settings are applied,
supporting the usage of the new "rounded" preset
styles and the old not "rounded" versions.

Follow-up to commit b9b2c6a98fec798fc0ec76ec3cd407724f19dcac
"tdf#141933 add preset dash styles with round cap".

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

diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 796eda3c51f2..1edf9a56d0bf 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1312,6 +1312,18 @@ void SvxLineTabPage::ClickInvisibleHdl_Impl()
 }
 else
 {
+// set cap style associated to the line style
+sal_Int32 nPos = m_xLbLineStyle->get_active();
+if( nPos > 1 && m_pDashList->Count() > static_cast( nPos 
- 2 ) )
+{
+css::drawing::DashStyle eStyle =
+m_pDashList->GetDash( nPos - 2 )->GetDash().GetDashStyle();
+if ( eStyle == drawing::DashStyle_RECT || eStyle == 
drawing::DashStyle_RECTRELATIVE)
+m_xLBCapStyle->set_active(0);
+else
+m_xLBCapStyle->set_active(1);
+}
+
 m_xBoxColor->set_sensitive(true);
 m_xBoxWidth->set_sensitive(true);
 
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 509b54c1d786..1771e2f74649 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -34,6 +34,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -615,6 +616,18 @@ IMPL_LINK_NOARG(SvxLineBox, SelectHdl, ValueSet*, void)
 aLineDashItem.QueryValue ( a );
 aArgs[0].Value = a;
 mxControl->dispatchLineStyleCommand(".uno:LineDash", aArgs);
+
+// set also cap style using the toolbar line style selection 
popup
+css::drawing::DashStyle eStyle = 
pEntry->GetDash().GetDashStyle();
+XLineCapItem aLineCapItem(
+eStyle == drawing::DashStyle_RECT || eStyle == 
drawing::DashStyle_RECTRELATIVE
+? css::drawing::LineCap_BUTT
+: css::drawing::LineCap_ROUND );
+Sequence< PropertyValue > aArgs2( 1 );
+aArgs2[0].Name = "LineCap";
+aLineCapItem.QueryValue ( a );
+aArgs2[0].Value = a;
+mxControl->dispatchLineStyleCommand(".uno:LineCap", aArgs2);
 }
 }
 break;
diff --git a/sw/qa/uitest/writer_tests7/apply_line_cap.py 
b/sw/qa/uitest/writer_tests7/apply_line_cap.py
new file mode 100644
index ..5e7b42ca9a2f
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/apply_line_cap.py
@@ -0,0 +1,102 @@
+# -*- 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
+
+class apply_line_cap(UITestCase):
+
+def test_apply_line_cap(self):
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf127166_prstDash_Word97.docx"))
+
+# check FLAT -> ROUND cap style change by selecting the new 'Rounded' 
preset line styles
+
+# select second line shape (dashDot)
+writer_doc.getCurrentController().select(writer_doc.getDrawPage()[1])
+
+# wait for available line style setting
+self.ui_test.wait_until_child_is_available('metricfield')
+
+# line setting dialog window
+self.ui_test.execute_dialog_through_command(".uno:FormatLine")
+xFormatLineDlg = self.xUITest.getTopFocusWindow()
+
+# get cap style combo box
+xCapStyle = xFormatLineDlg.getChild("LB_CAP_STYLE")
+cap_style = get_state_as_dict(xCapStyle)['SelectEntryText']
+
+# get 

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

2021-04-22 Thread Caolán McNamara (via logerrit)
 cui/source/options/optaboutconfig.cxx   |2 -
 svx/source/sidebar/inspector/InspectorTextPanel.cxx |5 ++
 sw/qa/uitest/styleInspector/styleInspector.py   |   38 ++--
 sw/qa/uitest/styleInspector/tdf137513.py|4 +-
 4 files changed, 27 insertions(+), 22 deletions(-)

New commits:
commit 78df8f9dc1d28f5390aedb634b07817a22ce989c
Author: Caolán McNamara 
AuthorDate: Wed Apr 21 14:46:17 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Apr 22 10:57:02 2021 +0200

Resolves: tdf#141721 text from 1st col not clipped if 2nd col is empty

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

diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 4c8d3d8118a4..6a15fb3a1411 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -290,7 +290,7 @@ void CuiAboutConfigTabPage::FillItems(const Reference< 
XNameAccess >& xNameAcces
 OUString 
sId(OUString::number(reinterpret_cast(m_vectorUserData.back().get(;
 
 m_xPrefBox->insert(pParentEntry, -1, , , nullptr, 
nullptr, true, m_xScratchIter.get());
-//It is needed, without this the selection line will be 
truncated.
+// Necessary, without this the selection line will be 
truncated.
 m_xPrefBox->set_text(*m_xScratchIter, "", 1);
 m_xPrefBox->set_text(*m_xScratchIter, "", 2);
 m_xPrefBox->set_text(*m_xScratchIter, "", 3);
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx 
b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index fefc42727470..b1d2641335b9 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -120,6 +120,11 @@ static void FillBox_Impl(weld::TreeView& rListBoxStyles, 
const TreeNode& rCurren
 rListBoxStyles.set_sensitive(*pResult, !rCurrent.isGrey, 1);
 rListBoxStyles.set_text_emphasis(*pResult, false, 1);
 }
+else
+{
+// Necessary, without this the selection line will be truncated.
+rListBoxStyles.set_text(*pResult, "", 1);
+}
 
 for (const TreeNode& rChildNode : rCurrent.children)
 FillBox_Impl(rListBoxStyles, rChildNode, pResult.get());
diff --git a/sw/qa/uitest/styleInspector/styleInspector.py 
b/sw/qa/uitest/styleInspector/styleInspector.py
index 6d531e96793e..6afc4483e911 100644
--- a/sw/qa/uitest/styleInspector/styleInspector.py
+++ b/sw/qa/uitest/styleInspector/styleInspector.py
@@ -22,7 +22,7 @@ class styleNavigator(UITestCase):
 
 # The cursor is on text without formatting and default style
 self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
-self.assertEqual("Default Paragraph Style", 
get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
+self.assertEqual("Default Paragraph Style\t", 
get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
 self.assertEqual(136, 
len(xListBox.getChild('0').getChild('0').getChildren()))
 self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
 self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
@@ -32,7 +32,7 @@ class styleNavigator(UITestCase):
 
 # The cursor is on text with direct formatting
 self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
-self.assertEqual("Default Paragraph Style", 
get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
+self.assertEqual("Default Paragraph Style\t", 
get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
 self.assertEqual(136, 
len(xListBox.getChild('0').getChild('0').getChildren()))
 self.assertEqual(0, len(xListBox.getChild('1').getChildren()))
 self.assertEqual(0, len(xListBox.getChild('2').getChildren()))
@@ -50,7 +50,7 @@ class styleNavigator(UITestCase):
 
 # The cursor is on text with paragraph direct formatting
 self.assertEqual(1, len(xListBox.getChild('0').getChildren()))
-self.assertEqual("Default Paragraph Style", 
get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
+self.assertEqual("Default Paragraph Style\t", 
get_state_as_dict(xListBox.getChild('0').getChild('0'))['Text'])
 self.assertEqual(136, 
len(xListBox.getChild('0').getChild('0').getChildren()))
 
 xParDirFormatting = xListBox.getChild('1')
@@ -71,13 +71,13 @@ class styleNavigator(UITestCase):
 # The cursor is on text with 'Title' style
 xParStyle = xListBox.getChild('0')
 self.assertEqual(3, len(xParStyle.getChildren()))
-self.assertEqual("Default Paragraph Style", 
get_state_as_dict(xParStyle.getChild('0'))['Text'])
+self.assertEqual("Default Paragraph Style\t", 

[Libreoffice-commits] core.git: cui/source svx/source

2021-01-12 Thread Jim Raykowski (via logerrit)
 cui/source/tabpages/paragrph.cxx|6 ++
 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx |2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit ed6c5803cfe942932a1c7a6042808d68c2017559
Author: Jim Raykowski 
AuthorDate: Mon Jan 11 13:34:05 2021 -0900
Commit: Jim Raykowski 
CommitDate: Tue Jan 12 13:06:16 2021 +0100

tdf#83618 Make line spacing values agree crash fix

The intent of this patch is to fix the crash reported at https://
bugzilla.redhat.com/show_bug.cgi?id=1913828 by reverting changes made to
cui/source/tabpages/paragraph.cxx in commit
849b837d1a3b185a8dd893a8f6eaed53605bcab1 and changing the change made to
svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx to use the
already available pointer to the current SfxViewFrame instead of calling
the SfxViewFrame::Current function again.

Change-Id: I0c440c576c2afe4fb98ed54d51d91ea16a7f902a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109152
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 6ad843bdc9b3..eaa0daf23cfe 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -51,8 +51,6 @@
 #include 
 #include 
 
-#include 
-
 const sal_uInt16 SvxStdParagraphTabPage::pStdRanges[] =
 {
 SID_ATTR_PARA_LINESPACE,// 10033
@@ -232,7 +230,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
m_xLineDistAtMetricBox->get_value_changed_from_saved() ) )
 {
 nWhich = GetWhich( SID_ATTR_PARA_LINESPACE );
-MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( nWhich );
+MapUnit eUnit = pPool->GetMetric( nWhich );
 SvxLineSpacingItem aSpacing(
 static_cast(GetItemSet().Get( nWhich )) 
);
 
@@ -722,7 +720,7 @@ void SvxStdParagraphTabPage::SetLineSpacing_Impl
 const SvxLineSpacingItem 
 )
 {
-MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( 
rAttr.Which() );
+MapUnit eUnit = GetItemSet().GetPool()->GetMetric( rAttr.Which() );
 
 switch( rAttr.GetLineSpaceRule() )
 {
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx 
b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 3066d8f08e32..2efea182c0d4 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -115,7 +115,7 @@ void ParaLineSpacingControl::Initialize()
 
 if( eState >= SfxItemState::DEFAULT )
 {
-MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( 
currSPItem->Which() );
+MapUnit eUnit = pCurrent->GetPool().GetMetric(currSPItem->Which());
 meLNSpaceUnit = eUnit;
 
 switch( currSPItem->GetLineSpaceRule() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2020-12-31 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/transfrm.cxx |4 ++--
 svx/source/svdraw/svdedtv1.cxx   |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 9980eb71513d4c16ffaceace1a754a387c209d27
Author: Noel Grandin 
AuthorDate: Wed Dec 30 13:18:39 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 1 08:57:07 2021 +0100

use SdrAngleItem for SID_ATTR_TRANSFORM_SHEAR

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

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 8845af0d27cd..142bd46e4d9b 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -461,7 +461,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs)
 if (m_xMtrAngle->get_value_changed_from_saved())
 {
 sal_Int32 nValue = 
static_cast(m_xMtrAngle->get_value(FieldUnit::NONE));
-rAttrs->Put( SfxInt32Item( SID_ATTR_TRANSFORM_SHEAR, nValue ) );
+rAttrs->Put( SdrAngleItem( SID_ATTR_TRANSFORM_SHEAR, nValue ) );
 bModified = true;
 }
 
@@ -606,7 +606,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
 
 if( pItem )
 {
-m_xMtrAngle->set_value(static_cast(pItem)->GetValue(), FieldUnit::NONE);
+m_xMtrAngle->set_value(static_cast(pItem)->GetValue(), FieldUnit::NONE);
 }
 else
 {
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index a75bc8336eb8..9136ed35d83c 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1396,7 +1396,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
 nShearRefX=aRotateAxe.X();
 nShearRefY=aRotateAxe.Y();
 }
-
aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR,GetMarkedObjShear()));
+
aRetSet.Put(SdrAngleItem(SID_ATTR_TRANSFORM_SHEAR,GetMarkedObjShear()));
 aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_X,nShearRefX));
 aRetSet.Put(SfxInt32Item(SID_ATTR_TRANSFORM_SHEAR_Y,nShearRefY));
 
@@ -1620,7 +1620,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& 
rAttr)
 
 // shearing
 if 
(SfxItemState::SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,true,))
 {
-tools::Long nNewShearAngle=static_cast(pPoolItem)->GetValue();
+tools::Long nNewShearAngle=static_cast(pPoolItem)->GetValue();
 if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR;
 if (nNewShearAngle<-SDRMAXSHEAR) nNewShearAngle=-SDRMAXSHEAR;
 if (nNewShearAngle!=nOldShearAngle) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2020-11-24 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/numpages.cxx |6 +++---
 svx/source/tbxctrls/bulletsnumbering.cxx |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit badf34d439403cea5c7efa206f4535c5050de37c
Author: Caolán McNamara 
AuthorDate: Tue Nov 24 10:02:34 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 24 13:32:13 2020 +0100

tdf#138430 scrolled windows need to have auto scrolling disabled

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

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index f158be94773e..dd699b85428d 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -163,7 +163,7 @@ 
SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(weld::Container* pPage, weld::D
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
-, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
+, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -342,7 +342,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* 
pPage, weld::DialogC
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
-, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
+, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -491,7 +491,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(weld::Container* 
pPage, weld::DialogControl
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
 , bModified(false)
 , bPreset(false)
-, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
+, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx 
b/svx/source/tbxctrls/bulletsnumbering.cxx
index d30a6aabcfd0..7eeac2bd7202 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -68,7 +68,7 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& 
rController,
 : WeldToolbarPopup(rController.getFrameInterface(), pParent, 
"svx/ui/numberingwindow.ui", "NumberingWindow")
 , mePageType(ePageType)
 , mrController(rController)
-, mxValueSet(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
+, mxValueSet(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin", true)))
 , mxValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxValueSet))
 , mxMoreButton(m_xBuilder->weld_button("more"))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2020-11-23 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/numpages.cxx |6 +++---
 svx/source/tbxctrls/bulletsnumbering.cxx |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 03ce6e2e4c5435d145463e29385c0b0db841ce77
Author: Caolán McNamara 
AuthorDate: Mon Nov 23 16:40:23 2020 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 23 21:23:03 2020 +0100

tdf#138430 toolbar bullet dropdown should have a scrolledwindow

as should the matching dialog pages

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

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 35674698a6b7..f158be94773e 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -163,7 +163,7 @@ 
SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(weld::Container* pPage, weld::D
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
-, m_xExamplesVS(new SvxNumValueSet(nullptr))
+, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -342,7 +342,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* 
pPage, weld::DialogC
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
-, m_xExamplesVS(new SvxNumValueSet(nullptr))
+, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -491,7 +491,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(weld::Container* 
pPage, weld::DialogControl
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
 , bModified(false)
 , bPreset(false)
-, m_xExamplesVS(new SvxNumValueSet(nullptr))
+, m_xExamplesVS(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx 
b/svx/source/tbxctrls/bulletsnumbering.cxx
index 430ca197457d..d30a6aabcfd0 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -68,7 +68,7 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& 
rController,
 : WeldToolbarPopup(rController.getFrameInterface(), pParent, 
"svx/ui/numberingwindow.ui", "NumberingWindow")
 , mePageType(ePageType)
 , mrController(rController)
-, mxValueSet(new SvxNumValueSet(nullptr))
+, mxValueSet(new 
SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin")))
 , mxValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxValueSet))
 , mxMoreButton(m_xBuilder->weld_button("more"))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-13 Thread Szymon Kłos (via logerrit)
 cui/source/dialogs/splitcelldlg.cxx  |   35 ++---
 cui/source/factory/dlgfact.cxx   |2 
 cui/source/inc/splitcelldlg.hxx  |   20 -
 svx/source/table/tablecontroller.cxx |   71 +--
 sw/source/uibase/shells/tabsh.cxx|   33 +---
 5 files changed, 104 insertions(+), 57 deletions(-)

New commits:
commit 817a06d857bff5be35f8eb7bf830b75871556bc5
Author: Szymon Kłos 
AuthorDate: Wed Sep 30 10:49:12 2020 +0200
Commit: Szymon Kłos 
CommitDate: Fri Nov 13 09:38:36 2020 +0100

Make Split Table Cell dialog async

Change-Id: I4efbb24f721aa50cc4dbbe78ae1e7e6087f8c876
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103670
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105594
Tested-by: Jenkins

diff --git a/cui/source/dialogs/splitcelldlg.cxx 
b/cui/source/dialogs/splitcelldlg.cxx
index 58d6b7e4f8a0..f58b8cc0ece5 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -74,15 +74,40 @@ tools::Long SvxSplitTableDlg::GetCount() const
 return m_xCountEdit->get_value();
 }
 
-short SvxSplitTableDlg::Execute()
-{
-return run();
-}
-
 void SvxSplitTableDlg::SetSplitVerticalByDefault()
 {
 if( mnMaxVertical >= 2 )
 m_xVertBox->set_active(true); // tdf#60242
 }
 
+bool SvxAbstractSplitTableDialog_Impl::IsHorizontal() const
+{
+return m_xDlg->IsHorizontal();
+}
+
+bool SvxAbstractSplitTableDialog_Impl::IsProportional() const
+{
+return m_xDlg->IsProportional();
+}
+
+tools::Long SvxAbstractSplitTableDialog_Impl::GetCount() const
+{
+return m_xDlg->GetCount();
+}
+
+void SvxAbstractSplitTableDialog_Impl::SetSplitVerticalByDefault()
+{
+m_xDlg->SetSplitVerticalByDefault();
+}
+
+short SvxAbstractSplitTableDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
+bool SvxAbstractSplitTableDialog_Impl::StartExecuteAsync(AsyncContext& 
rContext)
+{
+return weld::DialogController::runAsync(m_xDlg, rContext.maEndDialogFn);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ea2675694f07..e43b027602c4 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1602,7 +1602,7 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxFormatCellsDia
 
 VclPtr 
AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, 
bool bIsTableVertical, tools::Long nMaxVertical)
 {
-return VclPtr::Create( pParent, bIsTableVertical, 
nMaxVertical, 99 );
+return VclPtr::Create( 
std::make_shared(pParent, bIsTableVertical, nMaxVertical, 99 
));
 }
 
 std::shared_ptr 
AbstractDialogFactory_Impl::CreateSvxNewTableDialog(weld::Window* pParent)
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index 88b1de85c9a7..5085c1938917 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -21,7 +21,7 @@
 #include 
 #include 
 
-class SvxSplitTableDlg : public SvxAbstractSplitTableDialog, public 
weld::GenericDialogController
+class SvxSplitTableDlg : public weld::GenericDialogController
 {
 private:
 std::unique_ptr m_xCountEdit;
@@ -37,12 +37,28 @@ public:
 
 DECL_LINK(ClickHdl, weld::Button&, void);
 
+virtual bool IsHorizontal() const;
+virtual bool IsProportional() const;
+virtual tools::Long GetCount() const;
+
+virtual void SetSplitVerticalByDefault();
+};
+
+class SvxAbstractSplitTableDialog_Impl : public SvxAbstractSplitTableDialog
+{
+std::shared_ptr m_xDlg;
+
+public:
+SvxAbstractSplitTableDialog_Impl(std::shared_ptr pDlg) : 
m_xDlg(std::move(pDlg)) {}
+
 virtual bool IsHorizontal() const override;
 virtual bool IsProportional() const override;
 virtual tools::Long GetCount() const override;
 
-virtual short Execute() override;
 virtual void SetSplitVerticalByDefault() override;
+
+virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext& rContext) override;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index c30f71201277..ee40835ec5d8 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1284,52 +1284,53 @@ void SvxTableController::SplitMarkedCells(const 
SfxRequest& rReq)
 return;
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
xDlg(pFact->CreateSvxSplitTableDialog(rReq.GetFrameWeld(), false, 99));
+VclPtr 
xDlg(pFact->CreateSvxSplitTableDialog(rReq.GetFrameWeld(), false, 99));
 
-if( !xDlg->Execute() )
-return;
+xDlg->StartExecuteAsync([xDlg, this](int) {
+const sal_Int32 nCount = xDlg->GetCount() - 1;
 
-const sal_Int32 nCount = xDlg->GetCount() - 1;
+if( nCount < 1 )
+

[Libreoffice-commits] core.git: cui/source svx/source

2020-03-05 Thread Henry Castro (via logerrit)
 cui/source/tabpages/tpline.cxx   |8 ++--
 svx/source/tbxctrls/linectrl.cxx |6 +-
 svx/source/tbxctrls/tbcontrl.cxx |8 ++--
 svx/source/xoutdev/xattr2.cxx|4 +++-
 svx/source/xoutdev/xtabdash.cxx  |5 -
 5 files changed, 24 insertions(+), 7 deletions(-)

New commits:
commit f75734ee0fa3ba75258a6e78846a7f5096502a99
Author: Henry Castro 
AuthorDate: Mon Feb 24 13:34:03 2020 -0400
Commit: Henry Castro 
CommitDate: Thu Mar 5 13:05:28 2020 +0100

lok: use "None" string item in the ListBox control

The string item "- none -" confuse mobile users,
it is preferable to use the "None" string

Change-Id: Ib9b5716aa796624255fed7fac5413db69e028bb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89839
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index c5a658f4fd71..98ce79ad80f1 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -62,6 +62,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define MAX_BMP_WIDTH   16
 #define MAX_BMP_HEIGHT  16
@@ -229,7 +230,8 @@ void SvxLineTabPage::FillListboxes()
 m_xLbLineStyle->set_active( nOldSelect );
 
 // Line end style
-OUString sNone( SvxResId( RID_SVXSTR_NONE ) );
+OUString sNone( comphelper::LibreOfficeKit::isActive() ? SvxResId( 
RID_SVXSTR_INVISIBLE )
+: SvxResId( RID_SVXSTR_NONE ) );
 nOldSelect = m_xLbStartStyle->get_active();
 m_xLbStartStyle->clear();
 m_xLbStartStyle->append_text(sNone);
@@ -291,7 +293,9 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
 *m_pnLineEndListState = ChangeType::NONE;
 
 nPos = m_xLbLineStyle->get_active();
-OUString sNone(SvxResId(RID_SVXSTR_NONE));
+OUString sNone( comphelper::LibreOfficeKit::isActive() ? SvxResId( 
RID_SVXSTR_INVISIBLE )
+: SvxResId( RID_SVXSTR_NONE ) );
+
 m_xLbStartStyle->clear();
 m_xLbStartStyle->append_text(sNone);
 
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index d0b984a0002f..7b2ccc2bb242 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -48,6 +48,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::util;
@@ -356,7 +358,9 @@ void SvxLineEndWindow::FillValueSet()
 // First entry: no line end.
 // An entry is temporarily added to get the UI bitmap
 basegfx::B2DPolyPolygon aNothing;
-mpLineEndList->Insert(std::make_unique(aNothing, 
SvxResId(RID_SVXSTR_NONE)));
+mpLineEndList->Insert(std::make_unique(aNothing,
+comphelper::LibreOfficeKit::isActive() ? SvxResId(RID_SVXSTR_INVISIBLE)
+: SvxResId(RID_SVXSTR_NONE)));
 const XLineEndEntry* pEntry = mpLineEndList->GetLineEnd(nCount);
 BitmapEx aBmp = mpLineEndList->GetUiBitmap( nCount );
 OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index c0398e5783d6..e49b73b5a1f6 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -119,6 +119,8 @@
 #include 
 #include 
 
+#include 
+
 #define MAX_MRU_FONTNAME_ENTRIES5
 
 // don't make more than 15 entries visible at once
@@ -1964,7 +1966,8 @@ namespace
 
 NamedColor GetNoneColor()
 {
-return std::make_pair(COL_NONE_COLOR, SvxResId(RID_SVXSTR_NONE));
+return std::make_pair(COL_NONE_COLOR, 
comphelper::LibreOfficeKit::isActive() ? SvxResId(RID_SVXSTR_INVISIBLE)
+: SvxResId(RID_SVXSTR_NONE));
 }
 }
 
@@ -2604,7 +2607,8 @@ 
SvxLineWindow_Impl::SvxLineWindow_Impl(SvxFrameToolBoxControl* pControl, weld::W
 m_xLineStyleLb->SetStyle( WinBits(WB_FLATVALUESET | WB_ITEMBORDER | 
WB_3DLOOK | WB_NO_DIRECTSELECT | WB_TABSTOP) );
 
 m_xLineStyleLb->SetSourceUnit( FieldUnit::TWIP );
-m_xLineStyleLb->SetNone( SvxResId(RID_SVXSTR_NONE) );
+m_xLineStyleLb->SetNone( comphelper::LibreOfficeKit::isActive() ? 
SvxResId(RID_SVXSTR_INVISIBLE)
+:SvxResId(RID_SVXSTR_NONE) );
 
 m_xLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( 
SvxBorderLineStyle::SOLID ), SvxBorderLineStyle::SOLID );
 m_xLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( 
SvxBorderLineStyle::DOTTED ), SvxBorderLineStyle::DOTTED );
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 7528f9a61ca4..cd18bd4b8818 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -47,6 +47,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 
 XLineTransparenceItem::XLineTransparenceItem(sal_uInt16 nLineTransparence) :
@@ -107,7 +109,7 @@ bool XLineJointItem::GetPresentation( SfxItemPresentation 
/*ePres*/, MapUnit /*e
 {
 case 

[Libreoffice-commits] core.git: cui/source svx/source

2019-07-04 Thread Jim Raykowski (via logerrit)
 cui/source/tabpages/paragrph.cxx|6 --
 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx |4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 849b837d1a3b185a8dd893a8f6eaed53605bcab1
Author: Jim Raykowski 
AuthorDate: Tue Jun 4 15:49:12 2019 -0800
Commit: Jim Raykowski 
CommitDate: Fri Jul 5 05:52:49 2019 +0200

tdf#83618 Make line spacing values agree

Change-Id: I372a673bbad442d28314498248b12ce7f86fce09
Reviewed-on: https://gerrit.libreoffice.org/73737
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 9c9bca1963c8..67e1817b1c0e 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -54,6 +54,8 @@
 #include 
 #include 
 
+#include 
+
 const sal_uInt16 SvxStdParagraphTabPage::pStdRanges[] =
 {
 SID_ATTR_PARA_LINESPACE,// 10033
@@ -228,7 +230,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
m_xLineDistAtMetricBox->get_value_changed_from_saved() ) )
 {
 nWhich = GetWhich( SID_ATTR_PARA_LINESPACE );
-MapUnit eUnit = pPool->GetMetric( nWhich );
+MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( nWhich );
 SvxLineSpacingItem aSpacing(
 static_cast(GetItemSet().Get( nWhich )) 
);
 
@@ -719,7 +721,7 @@ void SvxStdParagraphTabPage::SetLineSpacing_Impl
 const SvxLineSpacingItem 
 )
 {
-MapUnit eUnit = GetItemSet().GetPool()->GetMetric( rAttr.Which() );
+MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( 
rAttr.Which() );
 
 switch( rAttr.GetLineSpaceRule() )
 {
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx 
b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 7bd655740926..2f582d9d8335 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -30,6 +30,8 @@
 #include 
 #include 
 
+#include 
+
 #define DEFAULT_LINE_SPACING  200
 #define FIX_DIST_DEF  283
 #define LINESPACE_1   100
@@ -125,7 +127,7 @@ void ParaLineSpacingControl::Initialize()
 
 if( eState >= SfxItemState::DEFAULT )
 {
-MapUnit eUnit = MapUnit::Map100thMM;
+MapUnit eUnit = SfxViewFrame::Current()->GetPool().GetMetric( 
currSPItem->Which() );
 meLNSpaceUnit = eUnit;
 
 switch( currSPItem->GetLineSpaceRule() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: cui/source svx/source

2019-01-18 Thread Libreoffice Gerrit user
 cui/source/dialogs/srchxtra.cxx |2 +-
 svx/source/dialog/srchdlg.cxx   |4 
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 7eedbd6380d30de82427c159b05b9545bb57336d
Author: Jim Raykowski 
AuthorDate: Fri Jan 18 00:44:55 2019 -0900
Commit: Mike Kaganski 
CommitDate: Fri Jan 18 22:50:36 2019 +0100

tdf#105225 New background tab page for Search for formatting dialog

Change-Id: I3642ea9e474c06943ea8bfb88e4209749db1fd83
Reviewed-on: https://gerrit.libreoffice.org/66578
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index a63691256f19..ecd2b1697d35 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -44,7 +44,7 @@ SvxSearchFormatDialog::SvxSearchFormatDialog(weld::Window* 
pParent, const SfxIte
 AddTabPage("labelTP_PARA_ALIGN", SvxParaAlignTabPage::Create, nullptr);
 AddTabPage("labelTP_PARA_EXT", SvxExtParagraphTabPage::Create, nullptr);
 AddTabPage("labelTP_PARA_ASIAN", SvxAsianTabPage::Create, nullptr );
-AddTabPage("background", SvxBackgroundTabPage::Create, nullptr);
+AddTabPage("background", SvxBkgTabPage::Create, nullptr);
 
 // remove asian tabpages if necessary
 SvtCJKOptions aCJKOptions;
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index d005a1f5869a..4ab0bdf3147e 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -73,6 +73,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace com::sun::star::i18n;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::accessibility;
@@ -2007,6 +2009,8 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl, Button*, 
void)
 sal_uInt16 nBrushWhich = pSh->GetPool().GetWhich(SID_ATTR_BRUSH);
 aSet.MergeRange(nBrushWhich, nBrushWhich);
 
+aSet.MergeRange(XATTR_FILL_FIRST, XATTR_FILL_LAST);
+
 OUString aTxt;
 
 aSet.InvalidateAllItems();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2018-10-04 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |2 +-
 svx/source/items/numfmtsh.cxx  |   12 +++-
 2 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit e607f1da329a2d4dd91904053d7ff86ac05c77bf
Author: Eike Rathke 
AuthorDate: Wed Oct 3 00:00:08 2018 +0200
Commit: Eike Rathke 
CommitDate: Thu Oct 4 15:02:13 2018 +0200

Select the current format if multiple instead of first matching format code

This never worked..

Change-Id: I79b8687dde4faac383121abeda70931d0192b33d
Reviewed-on: https://gerrit.libreoffice.org/61290
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 4257799ae311..19d103c6fd71 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1489,7 +1489,7 @@ void SvxNumberFormatTabPage::EditHdl_Impl(const 
weld::Entry* pEdFormat)
 if (nTmpCurPos != sal_uInt16(-1))
 set_active_currency(nTmpCurPos);
 }
-short nPosi=pNumFmtShell->GetListPos4Entry(aFormat);
+short nPosi=pNumFmtShell->GetListPos4Entry( nCurKey);
 if(nPosi>=0)
 m_xLbFormat->select(static_cast(nPosi));
 
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 8d8547fce33b..8a92fba7b816 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -486,7 +486,17 @@ bool SvxNumberFormatShell::IsUserDefined( const OUString& 
rFmtString )
 bool SvxNumberFormatShell::FindEntry( const OUString& rFmtString, sal_uInt32* 
pAt /* = NULL */ )
 {
 bool bRes=false;
-sal_uInt32 nFound = pFormatter->TestNewString( rFmtString, eCurLanguage );
+
+sal_uInt32 nFound = NUMBERFORMAT_ENTRY_NOT_FOUND;
+// There may be multiple builtin entries with the same format code, first
+// try if the current key matches.
+const SvNumberformat* pEntry = pFormatter->GetEntry( nCurFormatKey);
+if (pEntry && pEntry->GetLanguage() == eCurLanguage && 
pEntry->GetFormatstring() == rFmtString)
+nFound = nCurFormatKey;
+
+if (nFound == NUMBERFORMAT_ENTRY_NOT_FOUND)
+// Find the first matching format code.
+nFound = pFormatter->TestNewString( rFmtString, eCurLanguage );
 
 if ( nFound == NUMBERFORMAT_ENTRY_NOT_FOUND )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2016-11-25 Thread Stephan Bergmann
 cui/source/tabpages/tpcolor.cxx  |6 --
 svx/source/tbxctrls/tbcontrl.cxx |5 -
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 8b718e3774f1ffb69f9aad565216556c798e95f4
Author: Stephan Bergmann 
Date:   Fri Nov 25 17:29:09 2016 +0100

Handle cases where last-used palette disappeared

...so PaletteManager::SetPalette(LISTBOX_ENTRY_NOTFOUND) would set
PaletteManager::mnCurrentPalette to 65535, and
PaletteManager::GetSelectedPalettePath would do out-of-bounds access into
PaletteManage::m_Palettes.

That the last-used palette (as stored under in the configuration under
/org.openoffice.Office.Common/UserColors/PaletteName) may become more common
with pending changes like 
"tdf#104047 Remove dispensable palettes".

Change-Id: I5641bae04f50fea8aa69027a75de08c22394c281

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index c31f57f..e4545b4 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -220,7 +220,10 @@ void SvxColorTabPage::FillPaletteLB()
 }
 OUString aPaletteName( 
officecfg::Office::Common::UserColors::PaletteName::get() );
 m_pSelectPalette->SelectEntry(aPaletteName);
-SelectPaletteLBHdl( *m_pSelectPalette );
+if (m_pSelectPalette->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND)
+{
+SelectPaletteLBHdl( *m_pSelectPalette );
+}
 }
 
 void SvxColorTabPage::Construct()
@@ -228,7 +231,6 @@ void SvxColorTabPage::Construct()
 if (pColorList.is())
 {
 FillPaletteLB();
-SelectPaletteLBHdl( *m_pSelectPalette );
 ImpColorCountChanged();
 }
 }
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 4855159..d2252e6 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1356,7 +1356,10 @@ SvxColorWindow::SvxColorWindow(const OUString&   
 rCommand,
 }
 OUString aPaletteName( 
officecfg::Office::Common::UserColors::PaletteName::get() );
 mpPaletteListBox->SelectEntry( aPaletteName );
-SelectPaletteHdl( *mpPaletteListBox );
+if (mpPaletteListBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND)
+{
+SelectPaletteHdl( *mpPaletteListBox );
+}
 
 mpButtonAutoColor->SetClickHdl( LINK( this, SvxColorWindow, 
AutoColorClickHdl ) );
 mpButtonNoneColor->SetClickHdl( LINK( this, SvxColorWindow, 
AutoColorClickHdl ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2016-11-15 Thread Justin Luth
 cui/source/tabpages/textattr.cxx |   10 +++---
 svx/source/svdraw/svdotext.cxx   |2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 098f7a4ac2b6f309a45d29f1b68bea18418b9ee7
Author: Justin Luth 
Date:   Wed Nov 9 19:53:49 2016 +0300

tdf#34467 - FitToFrame: stretch text to fill drawing obj

Help for Fit To Frame says "Resizes the text to fit the entire area
of the drawing or text object".

reverts commit b7628798ec1a966c97a64d7cf0aa9f3859b78bef
and partially addresses the problem of "Shrink font automatically
when text overflows" by treating text as "Autofit" while it is being
edited.
It's not WYSIWYG, but good enough, and maybe better.

Since that part of the change prevents any way of setting ::Autofit,
I also changed the default setting to Autofit instead of NONE, since there
is no good reason why text should be allowed to spill outside of a textbox.
For those who REALLY want that odd behaviour, they can use
.uno:TextFitToSize (Ctrl-Shift-F8) to toggle between "stretch" and "none".

Change-Id: I8313a82cbea82f11fad0f50d966fc77874977da9
Reviewed-on: https://gerrit.libreoffice.org/30727
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 3058bb9..912722a 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -312,7 +312,11 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
 {
 SdrFitToSizeType eFTS = (SdrFitToSizeType)
 static_cast( rAttrs->Get( 
SDRATTR_TEXT_FITTOSIZE ) ).GetValue();
-m_pTsbFitToSize->SetState( eFTS == SdrFitToSizeType::NONE ? 
TRISTATE_FALSE : TRISTATE_TRUE );
+if( eFTS == SdrFitToSizeType::Autofit || eFTS == 
SdrFitToSizeType::NONE )
+m_pTsbFitToSize->SetState( TRISTATE_FALSE );
+else
+m_pTsbFitToSize->SetState( TRISTATE_TRUE );
+
 m_pTsbFitToSize->EnableTriState( false );
 }
 else
@@ -410,8 +414,8 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
 default: ; //prevent warning
 OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled 
state!" );
 SAL_FALLTHROUGH;
-case TRISTATE_FALSE: eFTS = SdrFitToSizeType::NONE; break;
-case TRISTATE_TRUE: eFTS = SdrFitToSizeType::Autofit; break;
+case TRISTATE_FALSE: eFTS = SdrFitToSizeType::Autofit; break;
+case TRISTATE_TRUE: eFTS = SdrFitToSizeType::Proportional; break;
 }
 rAttrs->Put( SdrTextFitToSizeTypeItem( eFTS ) );
 }
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 7dd1b8d..f052d69 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1936,7 +1936,7 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* 
pEditStatus )
 {
 AdjustTextFrameWidthAndHeight();
 }
-else if (IsAutoFit() && !mbInDownScale)
+else if ( (IsAutoFit() || IsFitToSize()) && !mbInDownScale)
 {
 assert(pEdtOutl);
 mbInDownScale = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2016-07-21 Thread Rishabh Kumar
 cui/source/tabpages/tpgradnt.cxx |2 ++
 cui/source/tabpages/tphatch.cxx  |2 ++
 cui/source/tabpages/tppattern.cxx|2 ++
 svx/source/tbxctrls/SvxPresetListBox.cxx |   10 --
 4 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 6f2b129a8e327f4226314944bc86eca78e5b1797
Author: Rishabh Kumar 
Date:   Thu Jul 21 21:57:26 2016 +0530

Minor UI changes for SvxPresetListBox

1. Reduced item icon size.
2. Add slider depending on the number of entries.

Change-Id: I1fad15861438952664c2afe89fffa08051f6
Reviewed-on: https://gerrit.libreoffice.org/27389
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 0f3d0f5..7e9eba6 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -520,6 +520,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ClickAddHdl_Impl, 
Button*, void)
 Bitmap aBitmap = m_pGradientList->GetBitmapForPreview( nCount, 
m_pGradientLB->GetIconSize() );
 m_pGradientLB->InsertItem( nId + 1, Image(aBitmap), aName );
 m_pGradientLB->SelectItem( nId + 1 );
+m_pGradientLB->Resize();
 
 *m_pnGradientListState |= ChangeType::MODIFIED;
 
@@ -579,6 +580,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, 
ClickDeleteHdl_Impl, SvxPresetListBox*
 m_pGradientLB->RemoveItem( nId );
 nId = m_pGradientLB->GetItemId( 0 );
 m_pGradientLB->SelectItem( nId );
+m_pGradientLB->Resize();
 
 m_pCtlPreview->Invalidate();
 
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 941fe25..33eb0d3 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -584,6 +584,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickAddHdl_Impl, 
Button*, void)
 // Insert the new entry at the next ID
 m_pHatchLB->InsertItem( nId + 1, Image(aBitmap), aName );
 m_pHatchLB->SelectItem( nId + 1 );
+m_pHatchLB->Resize();
 
 *m_pnHatchingListState |= ChangeType::MODIFIED;
 
@@ -640,6 +641,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickDeleteHdl_Impl, 
SvxPresetListBox*, v
 m_pHatchLB->RemoveItem( nId );
 nId = m_pHatchLB->GetItemId(0);
 m_pHatchLB->SelectItem( nId );
+m_pHatchLB->Resize();
 
 m_pCtlPreview->Invalidate();
 
diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 48560ce6..4b2570b 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -552,6 +552,7 @@ IMPL_LINK_NOARG_TYPED(SvxPatternTabPage, ClickAddHdl_Impl, 
Button*, void)
 Bitmap aBitmap = m_pPatternList->GetBitmapForPreview( nCount, 
m_pPatternLB->GetIconSize() );
 m_pPatternLB->InsertItem( nId + 1, Image(aBitmap), aName );
 m_pPatternLB->SelectItem( nId + 1 );
+m_pPatternLB->Resize();
 
 *m_pnPatternListState |= ChangeType::MODIFIED;
 
@@ -672,6 +673,7 @@ IMPL_LINK_NOARG_TYPED(SvxPatternTabPage, 
ClickDeleteHdl_Impl, SvxPresetListBox*,
 m_pPatternLB->RemoveItem( nId );
 nId = m_pPatternLB->GetItemId(0);
 m_pPatternLB->SelectItem( nId );
+m_pPatternLB->Resize();
 
 m_pCtlPreview->Invalidate();
 m_pCtlPixel->Invalidate();
diff --git a/svx/source/tbxctrls/SvxPresetListBox.cxx 
b/svx/source/tbxctrls/SvxPresetListBox.cxx
index c93f969..1f73a4c 100644
--- a/svx/source/tbxctrls/SvxPresetListBox.cxx
+++ b/svx/source/tbxctrls/SvxPresetListBox.cxx
@@ -32,7 +32,7 @@ SvxPresetListBox::SvxPresetListBox(vcl::Window* pParent, 
WinBits nWinStyle)
 : ValueSet(pParent, nWinStyle),
   nColCount(2),
   nRowCount(5),
-  aIconSize( Size(100,60) )
+  aIconSize( Size(80,60) )
 {
 SetEdgeBlending(true);
 SetExtraSpacing(4);
@@ -45,13 +45,19 @@ VCL_BUILDER_DECL_FACTORY(SvxPresetListBox)
 OString sBorder = VclBuilder::extractCustomProperty(rMap);
 if(!sBorder.isEmpty())
 nWinBits |= WB_BORDER;
-nWinBits |= (WB_ITEMBORDER| WB_3DLOOK|WB_OWNERDRAWDECORATION|WB_VSCROLL);
+nWinBits |= (WB_ITEMBORDER| WB_3DLOOK|WB_OWNERDRAWDECORATION);
 rRet = VclPtr::Create(pParent, nWinBits);
 }
 
 void SvxPresetListBox::Resize()
 {
 DrawLayout();
+WinBits aWinBits(GetStyle());
+if( nColCount*nRowCount <  static_cast(GetItemCount()) )
+aWinBits |= WB_VSCROLL;
+else
+aWinBits &= ~WB_VSCROLL;
+SetStyle(aWinBits);
 ValueSet::Resize();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2016-07-02 Thread Rishabh Kumar
 cui/source/inc/cuitabarea.hxx |1 -
 cui/source/tabpages/tppattern.cxx |2 --
 svx/source/dialog/dlgctrl.cxx |2 +-
 3 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 527b88efbd9175e4fe376aa3617533f75ef99393
Author: Rishabh Kumar 
Date:   Sat Jul 2 19:20:12 2016 +0530

tdf#100728: Crash when area dialog is opened

Change-Id: I2246c5bf3a1d33e7a08fa9062e568a4c95fef571
Reviewed-on: https://gerrit.libreoffice.org/26875
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 
Reviewed-by: Rishabh Kumar 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index f0eee65..e3b8c9e 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -563,7 +563,6 @@ private:
 VclPtrm_pCtlPixel;
 VclPtrm_pLbColor;
 VclPtrm_pLbBackgroundColor;
-VclPtr  m_pLbPatternsHidden;
 VclPtr  m_pLbPatterns;
 VclPtrm_pCtlPreview;
 VclPtr m_pBtnAdd;
diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 3080d33..47dad34 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -77,7 +77,6 @@ SvxPatternTabPage::SvxPatternTabPage(  vcl::Window* pParent, 
const SfxItemSet& r
 get(m_pLbBackgroundColor,"LB_BACKGROUND_COLOR");
 get(m_pCtlPreview,"CTL_PREVIEW");
 get(m_pLbPatterns,"LB_PATTERN");
-get(m_pLbPatternsHidden,"FT_BITMAPS_HIDDEN");
 get(m_pBtnAdd,"BTN_ADD");
 get(m_pBtnModify,"BTN_MODIFY");
 get(m_pBtnDelete,"BTN_DELETE");
@@ -129,7 +128,6 @@ void SvxPatternTabPage::dispose()
 m_pCtlPixel.clear();
 m_pLbColor.clear();
 m_pLbBackgroundColor.clear();
-m_pLbPatternsHidden.clear();
 m_pLbPatterns.clear();
 m_pCtlPreview.clear();
 m_pBtnAdd.clear();
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 9c75ffa..3eb447b 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1527,7 +1527,7 @@ VCL_BUILDER_DECL_FACTORY(PatternLB)
 OString sBorder = VclBuilder::extractCustomProperty(rMap);
 if (!sBorder.isEmpty())
 nWinStyle |= WB_BORDER;
-VclPtrInstance pListBox(pParent, nWinStyle);
+VclPtrInstance pListBox(pParent, nWinStyle);
 pListBox->EnableAutoSize(true);
 rRet = pListBox;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2013-09-05 Thread Thomas Arnhold
 cui/source/options/optsave.cxx |3 +--
 svx/source/svdraw/svddrgv.cxx  |   12 ++--
 2 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 4c491c1253de0210dcd4d4ff593ee73562e4d958
Author: Thomas Arnhold tho...@arnhold.org
Date:   Thu Sep 5 10:04:02 2013 +0200

Make use replaceFirst

Change-Id: Ieedb318f36afc5d85fa90533578e847a1d9d6840

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 27f7b78..094f636 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -427,8 +427,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet )
 case  APP_MATH  : sReplace = 
com.sun.star.formula.FormulaProperties;break;
 default: OSL_FAIL(illegal user data);
 }
-OUString sTmp = sCommand.replaceFirst(%1, sReplace);
-sCommand = sTmp;
+sCommand = sCommand.replaceFirst(%1, sReplace);
 Reference XEnumeration  xList = 
xQuery-createSubSetEnumerationByQuery(sCommand);
 SequenceAsVector OUString  lList;
 SequenceAsVector sal_Bool  lAlienList;
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 9b1a15e..7c3bbc1 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -640,15 +640,9 @@ sal_Bool SdrDragView::ImpBegInsObjPoint(sal_Bool 
bIdxZwang, sal_uInt32 nIdx, con
 DBG_ASSERT( pInsPointUndo, svx::SdrDragView::BegInsObjPoint(), could 
not create correct undo object! );
 
 OUString aStr(ImpGetResStr(STR_DragInsertPoint));
-OUString aName(pMarkedObj-TakeObjNameSingul());
-sal_Int32 nPos(aStr.indexOf(%1));
 
-if(-1 != nPos)
-{
-aStr = aStr.replaceAt(nPos, 2, aName);
-}
+aInsPointUndoStr = aStr.replaceFirst(%1, 
pMarkedObj-TakeObjNameSingul() );
 
-aInsPointUndoStr = aStr;
 Point aPt(rPnt);
 
 if(bNewObj)
@@ -749,11 +743,9 @@ sal_Bool SdrDragView::BegInsGluePoint(const Point rPnt)
 pInsPointUndo= dynamic_cast SdrUndoGeoObj* ( 
GetModel()-GetSdrUndoFactory().CreateUndoGeoObject(*pObj) );
 DBG_ASSERT( pInsPointUndo, svx::SdrDragView::BegInsObjPoint(), could 
not create correct undo object! );
 OUString aStr(ImpGetResStr(STR_DragInsertGluePoint));
-OUString aName(pObj-TakeObjNameSingul());
 
-aStr = aStr.replaceFirst(%1, aName);
+aInsPointUndoStr = aStr.replaceFirst(%1, pObj-TakeObjNameSingul() );
 
-aInsPointUndoStr=aStr;
 SdrGluePointList* pGPL=pObj-ForceGluePointList();
 if (pGPL!=NULL)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source svx/source

2013-02-11 Thread Caolán McNamara
 cui/source/dialogs/multipat.cxx |2 +-
 cui/source/inc/radiobtnbox.hxx  |2 +-
 cui/source/options/certpath.cxx |2 +-
 cui/source/options/fontsubs.cxx |2 +-
 cui/source/options/fontsubs.hxx |2 +-
 cui/source/options/optjava.cxx  |2 +-
 svx/source/dialog/simptabl.cxx  |1 -
 7 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 4895dd454ccf3d403b2ed7aa4b19f726c28e6032
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Feb 11 11:10:25 2013 +

add borders to simpletablecontainer

Change-Id: I9215516c21ce1330cf1fef07cbd647a1c318e241

diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index c45337e..1b2f139 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -183,7 +183,7 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, 
sal_Bool bEmptyAllowed
 aPathFL ( this, CUI_RES( FL_MULTIPATH) ),
 aPathLB ( this, CUI_RES( LB_MULTIPATH ) ),
 m_aRadioLBContainer(this, CUI_RES(LB_RADIOBUTTON)),
-aRadioLB(m_aRadioLBContainer),
+aRadioLB(m_aRadioLBContainer, WB_BORDER),
 aRadioFT( this, CUI_RES( FT_RADIOBUTTON ) ),
 aAddBtn ( this, CUI_RES( BTN_ADD_MULTIPATH ) ),
 aDelBtn ( this, CUI_RES( BTN_DEL_MULTIPATH ) ),
diff --git a/cui/source/inc/radiobtnbox.hxx b/cui/source/inc/radiobtnbox.hxx
index c6c3b43..efa1579 100644
--- a/cui/source/inc/radiobtnbox.hxx
+++ b/cui/source/inc/radiobtnbox.hxx
@@ -38,7 +38,7 @@ protected:
 virtual voidKeyInput( const KeyEvent rKEvt );
 
 public:
-SvxRadioButtonListBox(SvxSimpleTableContainer rParent, WinBits nBits = 
WB_BORDER);
+SvxRadioButtonListBox(SvxSimpleTableContainer rParent, WinBits nBits);
 ~SvxRadioButtonListBox();
 
 voidHandleEntryChecked( SvTreeListEntry* _pEntry );
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index e567260..37719bc 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -50,7 +50,7 @@ CertPathDialog::CertPathDialog( Window* pParent ) :
 , m_aCertPathFL   ( this, CUI_RES( FL_CERTPATH ) )
 , m_aCertPathFT   ( this, CUI_RES( FT_CERTPATH ) )
 , m_aCertPathListContainer( this, CUI_RES( LB_CERTPATH ) )
-, m_aCertPathList( m_aCertPathListContainer )
+, m_aCertPathList( m_aCertPathListContainer, WB_BORDER )
 , m_aAddBtn   ( this, CUI_RES( PB_ADD ) )
 , m_aButtonsFL   ( this, CUI_RES( FL_BUTTONS ) )
 , m_aOKBtn   ( this, CUI_RES( PB_OK ) )
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 87afaf9..2f94e8b 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -63,7 +63,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
 pCheckLBContainer-set_width_request(aControlSize.Width());
 pCheckLBContainer-set_height_request(aControlSize.Height());
 
-m_pCheckLB = new SvxFontSubstCheckListBox(*pCheckLBContainer);
+m_pCheckLB = new SvxFontSubstCheckListBox(*pCheckLBContainer, 0);
 m_pCheckLB-SetHelpId(HID_OFA_FONT_SUBST_CLB);
 
 m_pCheckLB-SetStyle(m_pCheckLB-GetStyle()|WB_HSCROLL|WB_VSCROLL);
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index 775960a..fbc29de 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -41,7 +41,7 @@ class SvxFontSubstCheckListBox : public SvxSimpleTable
 virtual voidResize();
 
 public:
-SvxFontSubstCheckListBox(SvxSimpleTableContainer rParent, WinBits 
nBits = WB_BORDER)
+SvxFontSubstCheckListBox(SvxSimpleTableContainer rParent, WinBits 
nBits)
 : SvxSimpleTable(rParent, nBits)
 {
 }
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index a5389ca..47f1f9b 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -89,7 +89,7 @@ private:
 const OUString m_sAccessibilityText;
 public:
 SvxJavaListBox(SvxSimpleTableContainer rParent, const OUString 
rAccessibilityText)
-: SvxRadioButtonListBox(rParent)
+: SvxRadioButtonListBox(rParent, 0)
 , m_sAccessibilityText(rAccessibilityText)
 {
 }
diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx
index abed194..5fa4077 100644
--- a/svx/source/dialog/simptabl.cxx
+++ b/svx/source/dialog/simptabl.cxx
@@ -39,7 +39,6 @@ SvxSimpleTableContainer::SvxSimpleTableContainer(Window* 
pParent, WinBits nBits)
 : Control(pParent, nBits)
 , m_pTable(NULL)
 {
-SetBorderStyle(WINDOW_BORDER_NOBORDER);
 }
 
 extern C SAL_DLLPUBLIC_EXPORT Window* SAL_CALL 
makeSvxSimpleTableContainer(Window *pParent,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits