[Libreoffice-commits] core.git: 2 commits - sd/source sd/uiconfig
Katarina Behrens
bubli at bubli.org
Mon Jun 9 15:12:28 PDT 2014
sd/source/ui/dlg/dlgsnap.cxx | 4 ++--
sd/source/ui/func/fusnapln.cxx | 4 ++--
sd/uiconfig/sdraw/ui/dlgsnap.ui | 14 ++++++++++++++
3 files changed, 18 insertions(+), 4 deletions(-)
New commits:
commit 25678ae57d01ff8d07760d8bf9b98ed5da9b349c
Author: Katarina Behrens <bubli at bubli.org>
Date: Tue Jun 10 00:02:25 2014 +0200
fdo#77987, part 2: snap line coordinates can be negative
thus, use signed integers here
Change-Id: I8de1662680bd6e5dc9d42d633fa591dacc260a9b
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 5afafe3..089c472 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -102,8 +102,8 @@ SdSnapLineDlg::SdSnapLineDlg(
m_pMtrFldY->SetLast( nValue );
// set values
- nXValue = ((const SfxUInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_X)).GetValue();
- nYValue = ((const SfxUInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_Y)).GetValue();
+ nXValue = ((const SfxInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_X)).GetValue();
+ nYValue = ((const SfxInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_Y)).GetValue();
nXValue = Fraction(nXValue) / aUIScale;
nYValue = Fraction(nYValue) / aUIScale;
SetMetricValue( *m_pMtrFldX, nXValue, SFX_MAPUNIT_100TH_MM);
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 79f438a..8e3548e 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -109,8 +109,8 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
pPV->LogicToPagePos(aLinePos);
bLineExist = true;
}
- aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
- aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y()));
+ aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
+ aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y()));
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
boost::scoped_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg( NULL, aNewAttr, mpView ) : 0);
commit 64992cc56e0e8a480e33b847d3a327f8229535d2
Author: Katarina Behrens <bubli at bubli.org>
Date: Mon Jun 9 23:51:28 2014 +0200
fdo#77987, part 1: set min&max values of spinboxes
by attaching adjustments to them. This restores pre-ui behaviour,
as without proper initial minimum value, one can't enter values < 0
into the dialog
I just copied the numbers as they were in .src file, but they were
prolly completely made up (and they're adjusted later anyway
according to size/position of workspace)
Change-Id: Ic09fdd9e947f04d6f2151e9d7a8714f4f1d29552
diff --git a/sd/uiconfig/sdraw/ui/dlgsnap.ui b/sd/uiconfig/sdraw/ui/dlgsnap.ui
index 335eec1..f671d40 100644
--- a/sd/uiconfig/sdraw/ui/dlgsnap.ui
+++ b/sd/uiconfig/sdraw/ui/dlgsnap.ui
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">-5000000</property>
+ <property name="upper">5000000</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="lower">-5000000</property>
+ <property name="upper">5000000</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkDialog" id="SnapObjectDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
@@ -113,6 +125,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
+ <property name="adjustment">adjustment1</property>
<property name="digits">2</property>
</object>
<packing>
@@ -127,6 +140,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
+ <property name="adjustment">adjustment2</property>
<property name="digits">2</property>
</object>
<packing>
More information about the Libreoffice-commits
mailing list