[Libreoffice-commits] core.git: 2 commits - cui/uiconfig svx/source
Caolán McNamara
caolanm at redhat.com
Fri Aug 2 13:09:13 PDT 2013
cui/uiconfig/ui/linetabpage.ui | 32 ++++++++++--------
svx/source/dialog/dlgctrl.cxx | 72 ++++++++++++++++++++---------------------
2 files changed, 55 insertions(+), 49 deletions(-)
New commits:
commit ae0493ccfe7c232557fb87eef4d0444709d8b729
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Aug 2 22:07:59 2013 +0200
got the ctors the wrong way around, fix resid loaded previews
Change-Id: I0a00a5bbd4616fd72e947cacd72ef23d38147638
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index c8d1e39..ba848b9 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1838,32 +1838,19 @@ SvxXLinePreview::SvxXLinePreview( Window* pParent, const ResId& rResId )
{
InitSettings( sal_True, sal_True );
- mpLineObjA = new SdrPathObj(OBJ_LINE);
- mpLineObjA->SetModel(&getModel());
-
- mpLineObjB = new SdrPathObj(OBJ_PLIN);
- mpLineObjB->SetModel(&getModel());
-
- mpLineObjC = new SdrPathObj(OBJ_PLIN);
- mpLineObjC->SetModel(&getModel());
-}
-
-void SvxXLinePreview::Resize()
-{
- SvxPreviewBase::Resize();
-
const Size aOutputSize(GetOutputSize());
const sal_Int32 nDistance(500L);
const sal_Int32 nAvailableLength(aOutputSize.Width() - (4 * nDistance));
- // create DrawObectA
+ // create DrawObjectA
const sal_Int32 aYPosA(aOutputSize.Height() / 2);
const basegfx::B2DPoint aPointA1( nDistance, aYPosA);
const basegfx::B2DPoint aPointA2( aPointA1.getX() + ((nAvailableLength * 14) / 20), aYPosA );
basegfx::B2DPolygon aPolygonA;
aPolygonA.append(aPointA1);
aPolygonA.append(aPointA2);
- mpLineObjA->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonA));
+ mpLineObjA = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygonA));
+ mpLineObjA->SetModel(&getModel());
// create DrawObectB
const sal_Int32 aYPosB1((aOutputSize.Height() * 3) / 4);
@@ -1875,42 +1862,37 @@ void SvxXLinePreview::Resize()
aPolygonB.append(aPointB1);
aPolygonB.append(aPointB2);
aPolygonB.append(aPointB3);
- mpLineObjB->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonB));
+ mpLineObjB = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonB));
+ mpLineObjB->SetModel(&getModel());
// create DrawObectC
- basegfx::B2DPolygon aPolygonC;
const basegfx::B2DPoint aPointC1( aPointB3.getX() + nDistance, aYPosB1);
const basegfx::B2DPoint aPointC2( aPointC1.getX() + ((nAvailableLength * 1) / 20), aYPosB2 );
const basegfx::B2DPoint aPointC3( aPointC2.getX() + ((nAvailableLength * 1) / 20), aYPosB1 );
+ basegfx::B2DPolygon aPolygonC;
aPolygonC.append(aPointC1);
aPolygonC.append(aPointC2);
aPolygonC.append(aPointC3);
- mpLineObjC->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonC));
+ mpLineObjC = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonC));
+ mpLineObjC->SetModel(&getModel());
}
-SvxXLinePreview::SvxXLinePreview( Window* pParent)
-: SvxPreviewBase( pParent ),
-mpLineObjA( 0L ),
-mpLineObjB( 0L ),
-mpLineObjC( 0L ),
-mpGraphic( 0L ),
-mbWithSymbol( sal_False )
+void SvxXLinePreview::Resize()
{
- const Size aOutputSize(GetOutputSize());
- InitSettings( true, true );
+ SvxPreviewBase::Resize();
+ const Size aOutputSize(GetOutputSize());
const sal_Int32 nDistance(500L);
const sal_Int32 nAvailableLength(aOutputSize.Width() - (4 * nDistance));
- // create DrawObjectA
+ // create DrawObectA
const sal_Int32 aYPosA(aOutputSize.Height() / 2);
const basegfx::B2DPoint aPointA1( nDistance, aYPosA);
const basegfx::B2DPoint aPointA2( aPointA1.getX() + ((nAvailableLength * 14) / 20), aYPosA );
basegfx::B2DPolygon aPolygonA;
aPolygonA.append(aPointA1);
aPolygonA.append(aPointA2);
- mpLineObjA = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygonA));
- mpLineObjA->SetModel(&getModel());
+ mpLineObjA->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonA));
// create DrawObectB
const sal_Int32 aYPosB1((aOutputSize.Height() * 3) / 4);
@@ -1922,26 +1904,44 @@ mbWithSymbol( sal_False )
aPolygonB.append(aPointB1);
aPolygonB.append(aPointB2);
aPolygonB.append(aPointB3);
- mpLineObjB = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonB));
- mpLineObjB->SetModel(&getModel());
+ mpLineObjB->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonB));
// create DrawObectC
+ basegfx::B2DPolygon aPolygonC;
const basegfx::B2DPoint aPointC1( aPointB3.getX() + nDistance, aYPosB1);
const basegfx::B2DPoint aPointC2( aPointC1.getX() + ((nAvailableLength * 1) / 20), aYPosB2 );
const basegfx::B2DPoint aPointC3( aPointC2.getX() + ((nAvailableLength * 1) / 20), aYPosB1 );
- basegfx::B2DPolygon aPolygonC;
aPolygonC.append(aPointC1);
aPolygonC.append(aPointC2);
aPolygonC.append(aPointC3);
- mpLineObjC = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonC));
+ mpLineObjC->SetPathPoly(basegfx::B2DPolyPolygon(aPolygonC));
+}
+
+SvxXLinePreview::SvxXLinePreview(Window* pParent)
+ : SvxPreviewBase(pParent)
+ , mpLineObjA(NULL)
+ , mpLineObjB(NULL)
+ , mpLineObjC(NULL)
+ , mpGraphic(NULL)
+ , mbWithSymbol(false)
+{
+ InitSettings( true, true );
+
+ mpLineObjA = new SdrPathObj(OBJ_LINE);
+ mpLineObjA->SetModel(&getModel());
+
+ mpLineObjB = new SdrPathObj(OBJ_PLIN);
+ mpLineObjB->SetModel(&getModel());
+
+ mpLineObjC = new SdrPathObj(OBJ_PLIN);
mpLineObjC->SetModel(&getModel());
}
+
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxXLinePreview(Window *pParent, VclBuilder::stringmap &)
{
return new SvxXLinePreview(pParent);
}
-
SvxXLinePreview::~SvxXLinePreview()
{
SdrObject *pFoo = mpLineObjA;
commit d7c82096e74123a9bd8325592bec78a4675b777c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Aug 2 21:53:32 2013 +0200
adjust widget sizes of line tabpage a bit
Change-Id: I07471551ab61caa3a8454090f7cb6192acd7c849
diff --git a/cui/uiconfig/ui/linetabpage.ui b/cui/uiconfig/ui/linetabpage.ui
index fd5841e..8c5128b 100644
--- a/cui/uiconfig/ui/linetabpage.ui
+++ b/cui/uiconfig/ui/linetabpage.ui
@@ -12,9 +12,7 @@
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">12</property>
- <property name="margin_top">6</property>
- <property name="spacing">12</property>
+ <property name="spacing">18</property>
<child>
<object class="GtkFrame" id="FL_LINE">
<property name="visible">True</property>
@@ -123,6 +121,7 @@
<object class="GtkSpinButton" id="MTR_FLD_LINE_WIDTH:0cm">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="invisible_char">â¢</property>
<property name="adjustment">adjustmentWIDTH</property>
<property name="digits">2</property>
@@ -152,6 +151,7 @@
<object class="GtkSpinButton" id="MTR_LINE_TRANSPARENT:0%">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="invisible_char">â¢</property>
<property name="adjustment">adjustmentPERCENT</property>
</object>
@@ -300,6 +300,7 @@
<object class="GtkSpinButton" id="MTR_FLD_START_WIDTH:0cm">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="invisible_char">â¢</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustmentWIDTH</property>
@@ -361,6 +362,7 @@
<object class="GtkSpinButton" id="MTR_FLD_END_WIDTH:0cm">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">start</property>
<property name="invisible_char">â¢</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustmentWIDTH</property>
@@ -619,7 +621,7 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
@@ -639,9 +641,6 @@
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<object class="GtkSpinButton" id="MF_SYMBOL_HEIGHT:0cm">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -689,12 +688,13 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
@@ -722,14 +722,14 @@
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustmentWIDTH">
- <property name="upper">50</property>
- <property name="step_increment">0.050000000000000003</property>
- <property name="page_increment">10</property>
+ <property name="upper">5</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustmentWIDTH_SYMBOL">
- <property name="upper">1999</property>
+ <property name="upper">19.989999999999998</property>
<property name="step_increment">0.050000000000000003</property>
- <property name="page_increment">10</property>
+ <property name="page_increment">1</property>
</object>
<object class="GtkListStore" id="liststoreCAP_STYLE">
<columns>
@@ -823,4 +823,10 @@
</object>
</child>
</object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="MTR_FLD_LINE_WIDTH:0cm"/>
+ <widget name="MTR_LINE_TRANSPARENT:0%"/>
+ </widgets>
+ </object>
</interface>
More information about the Libreoffice-commits
mailing list