summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@edx.srv.br>2013-09-11 21:34:32 -0300
committerCaolán McNamara <caolanm@redhat.com>2013-09-12 15:51:39 +0000
commit9e5afc4e1be0ae76af3b66bc981d63b1a93c0a70 (patch)
treedfabea4efd22065425158a6c77625200779644ac
parent6056965245915d3aeb84e8ccd065133bdf21d806 (diff)
Convert connector tab page to widget UI
Also: * Rename dimensionline.ui to dimensionlinetabpage for naming consistency * Fix connector and measure dialogs for connectors and dimension lines Change-Id: I921890b33a5f9807a6e12341ef7f374312abfc8b Reviewed-on: https://gerrit.libreoffice.org/5920 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/UIConfig_cui.mk3
-rw-r--r--cui/source/factory/dlgfact.cxx11
-rw-r--r--cui/source/inc/connect.hxx41
-rw-r--r--cui/source/inc/cuires.hrc3
-rw-r--r--cui/source/inc/helpid.hrc2
-rw-r--r--cui/source/inc/measure.hxx2
-rw-r--r--cui/source/tabpages/connect.cxx268
-rw-r--r--cui/source/tabpages/connect.hrc39
-rw-r--r--cui/source/tabpages/connect.src233
-rw-r--r--cui/source/tabpages/measure.cxx17
-rw-r--r--cui/source/tabpages/strings.src8
-rw-r--r--cui/uiconfig/ui/connectortabpage.ui392
-rw-r--r--cui/uiconfig/ui/dimensionlinestabpage.ui (renamed from cui/uiconfig/ui/dimensionlines.ui)2
-rw-r--r--extras/source/glade/libreoffice-catalog.xml.in3
-rw-r--r--include/svx/connctrl.hxx11
-rw-r--r--svx/source/dialog/connctrl.cxx155
17 files changed, 670 insertions, 521 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index edd487590e5e..e82b4e0e0f6c 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -65,7 +65,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/tabpages/autocdlg.src \
cui/source/tabpages/bbdlg.src \
cui/source/tabpages/border.src \
- cui/source/tabpages/connect.src \
cui/source/tabpages/dstribut.src \
cui/source/tabpages/frmdirlbox.src \
cui/source/tabpages/grfpage.src \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index d325fd376110..5d3538b867d6 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -30,8 +30,9 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/comment \
+ cui/uiconfig/ui/connectortabpage \
cui/uiconfig/ui/cuiimapdlg \
- cui/uiconfig/ui/dimensionlines \
+ cui/uiconfig/ui/dimensionlinestabpage \
cui/uiconfig/ui/editdictionarydialog \
cui/uiconfig/ui/formatnumberdialog \
cui/uiconfig/ui/gradientpage \
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 1b099ab70b33..75f61fd6e8dc 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1630,14 +1630,17 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
sal_uInt32 nResId
)
{
+
+// TODO will fix this ugly hack when all cases are in SfxSingleTabDialog
SfxNoLayoutSingleTabDialog* pDlg=NULL;
+ SfxSingleTabDialog* pDlg1=NULL;
switch ( nResId )
{
case RID_SVXPAGE_MEASURE :
- pDlg = new SvxMeasureDialog( pParent, rAttr, pView );
+ pDlg1 = new SvxMeasureDialog( pParent, rAttr, pView );
break;
case RID_SVXPAGE_CONNECTION :
- pDlg = new SvxConnectionDialog( pParent, rAttr, pView );
+ pDlg1 = new SvxConnectionDialog( pParent, rAttr, pView );
break;
case RID_SFXPAGE_DBREGISTER :
pDlg = new DatabaseRegistrationDialog( pParent, rAttr );
@@ -1648,6 +1651,10 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
if ( pDlg )
return new CuiAbstractSfxDialog_Impl( pDlg );
+
+ if ( pDlg1 )
+ return new CuiAbstractSfxDialog_Impl( pDlg1 );
+
return 0;
}
diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx
index d9cf630a9b04..2439478abbfd 100644
--- a/cui/source/inc/connect.hxx
+++ b/cui/source/inc/connect.hxx
@@ -33,28 +33,21 @@ class SdrView;
class SvxConnectionPage : public SfxTabPage
{
private:
- FixedText aFtType;
- ListBox aLbType;
-
- FixedLine aFlDelta;
- FixedText aFtLine1;
- MetricField aMtrFldLine1;
- FixedText aFtLine2;
- MetricField aMtrFldLine2;
- FixedText aFtLine3;
- MetricField aMtrFldLine3;
-
- FixedLine aFlDistance;
- FixedText aFtHorz1;
- MetricField aMtrFldHorz1;
- FixedText aFtVert1;
- MetricField aMtrFldVert1;
- FixedText aFtHorz2;
- MetricField aMtrFldHorz2;
- FixedText aFtVert2;
- MetricField aMtrFldVert2;
-
- SvxXConnectionPreview aCtlPreview;
+ ListBox* m_pLbType;
+
+ FixedText* m_pFtLine1;
+ MetricField* m_pMtrFldLine1;
+ FixedText* m_pFtLine2;
+ MetricField* m_pMtrFldLine2;
+ FixedText* m_pFtLine3;
+ MetricField* m_pMtrFldLine3;
+
+ MetricField* m_pMtrFldHorz1;
+ MetricField* m_pMtrFldVert1;
+ MetricField* m_pMtrFldHorz2;
+ MetricField* m_pMtrFldVert2;
+
+ SvxXConnectionPreview* m_pCtlPreview;
const SfxItemSet& rOutAttrs;
SfxItemSet aAttrSet;
@@ -63,7 +56,7 @@ private:
void FillTypeLB();
- DECL_LINK( ChangeAttrHdl_Impl, void * );
+ DECL_LINK( ChangeAttrHdl_Impl, void * );
public:
@@ -83,7 +76,7 @@ public:
/* Derived from SfxNoLayoutSingleTabDialog, in order to be informed about
virtual methods by the control. */
-class SvxConnectionDialog : public SfxNoLayoutSingleTabDialog
+class SvxConnectionDialog : public SfxSingleTabDialog
{
public:
SvxConnectionDialog( Window* pParent, const SfxItemSet& rAttr,
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 29fc645fc590..1985724e766a 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -94,7 +94,8 @@
#define RID_SVXSTR_ASK_DEL_COLOR (RID_SVX_START + 217)
#define RID_SVXSTR_ASK_CHANGE_COLOR (RID_SVX_START + 218)
#define RID_SVXSTR_TABLE (RID_SVX_START + 220)
-
+#define RID_SVXSTR_CONNECTOR (RID_SVX_START + 221)
+#define RID_SVXSTR_DIMENSION_LINE (RID_SVX_START + 222)
#define RID_SVXSTR_CHARNAME_TRANSPARENT (RID_SVX_START + 237)
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 882b10c57601..4aa58c644922 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -217,7 +217,7 @@
#define HID_TPCOLOR_CMYK_2 "CUI_HID_TPCOLOR_CMYK_2"
#define HID_TPCOLOR_CMYK_3 "CUI_HID_TPCOLOR_CMYK_3"
#define HID_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS"
-#define HID_PAGE_CONNECTION "CUI_HID_PAGE_CONNECTION"
+
#define HID_PAGE_CONNECTION_CTL_PREVIEW "CUI_HID_PAGE_CONNECTION_CTL_PREVIEW"
#define HID_PAGE_DISTRIBUTE "CUI_HID_PAGE_DISTRIBUTE"
#define HID_SVXPAGE_GRFCROP "CUI_HID_SVXPAGE_GRFCROP"
diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx
index 5a15a6595574..315aa9783a3a 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -83,7 +83,7 @@ public:
/* Derived from SfxNoLayoutSingleTabDialog, in order to be able to be
informed about virtual methods by the control. */
-class SvxMeasureDialog : public SfxNoLayoutSingleTabDialog
+class SvxMeasureDialog : public SfxSingleTabDialog
{
public:
SvxMeasureDialog( Window* pParent, const SfxItemSet& rAttr,
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 2db5c338fea7..79d99995c7b2 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -35,7 +35,6 @@
#include <svx/sxelditm.hxx>
#include <svx/sxenditm.hxx>
-#include "connect.hrc"
#include "connect.hxx"
#include "paragrph.hrc"
@@ -53,16 +52,16 @@ static sal_uInt16 pRanges[] =
\************************************************************************/
SvxConnectionDialog::SvxConnectionDialog( Window* pParent, const SfxItemSet& rInAttrs,
- const SdrView* pSdrView ) :
- SfxNoLayoutSingleTabDialog( pParent, rInAttrs, RID_SVXPAGE_CONNECTION )
+ const SdrView* pSdrView )
+ : SfxSingleTabDialog(pParent, rInAttrs)
{
- SvxConnectionPage* _pPage = new SvxConnectionPage( this, rInAttrs );
+ SvxConnectionPage* _pPage = new SvxConnectionPage( get_content_area(), rInAttrs );
_pPage->SetView( pSdrView );
_pPage->Construct();
- SetTabPage( _pPage );
- SetText( _pPage->GetText() );
+ setTabPage( _pPage );
+ SetText(CUI_RESSTR( RID_SVXSTR_CONNECTOR ));
}
/*************************************************************************
@@ -82,37 +81,28 @@ SvxConnectionDialog::~SvxConnectionDialog()
\************************************************************************/
SvxConnectionPage::SvxConnectionPage( Window* pWindow, const SfxItemSet& rInAttrs ) :
- SfxTabPage ( pWindow, CUI_RES( RID_SVXPAGE_CONNECTION ),
- rInAttrs ),
-
- aFtType ( this, CUI_RES( FT_TYPE ) ),
- aLbType ( this, CUI_RES( LB_TYPE ) ),
-
- aFlDelta ( this, CUI_RES( FL_DELTA ) ),
- aFtLine1 ( this, CUI_RES( FT_LINE_1 ) ),
- aMtrFldLine1 ( this, CUI_RES( MTR_FLD_LINE_1 ) ),
- aFtLine2 ( this, CUI_RES( FT_LINE_2 ) ),
- aMtrFldLine2 ( this, CUI_RES( MTR_FLD_LINE_2 ) ),
- aFtLine3 ( this, CUI_RES( FT_LINE_3 ) ),
- aMtrFldLine3 ( this, CUI_RES( MTR_FLD_LINE_3 ) ),
-
- aFlDistance ( this, CUI_RES( FL_DISTANCE ) ),
- aFtHorz1 ( this, CUI_RES( FT_HORZ_1 ) ),
- aMtrFldHorz1 ( this, CUI_RES( MTR_FLD_HORZ_1 ) ),
- aFtVert1 ( this, CUI_RES( FT_VERT_1 ) ),
- aMtrFldVert1 ( this, CUI_RES( MTR_FLD_VERT_1 ) ),
- aFtHorz2 ( this, CUI_RES( FT_HORZ_2 ) ),
- aMtrFldHorz2 ( this, CUI_RES( MTR_FLD_HORZ_2 ) ),
- aFtVert2 ( this, CUI_RES( FT_VERT_2 ) ),
- aMtrFldVert2 ( this, CUI_RES( MTR_FLD_VERT_2 ) ),
-
- aCtlPreview ( this, CUI_RES( CTL_PREVIEW ), rInAttrs ),
+ SfxTabPage ( pWindow
+ ,"ConnectorTabPage"
+ ,"cui/ui/connectortabpage.ui"
+ ,rInAttrs ),
rOutAttrs ( rInAttrs ),
aAttrSet ( *rInAttrs.GetPool() )
{
- FreeResource();
+ get(m_pLbType,"LB_TYPE");
- aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE)));
+ get(m_pFtLine1,"FT_LINE_1");
+ get(m_pMtrFldLine1,"MTR_FLD_LINE_1");
+ get(m_pFtLine2,"FT_LINE_2");
+ get(m_pMtrFldLine2,"MTR_FLD_LINE_2");
+ get(m_pFtLine3,"FT_LINE_3");
+ get(m_pMtrFldLine3,"MTR_FLD_LINE_3");
+
+ get(m_pMtrFldHorz1,"MTR_FLD_HORZ_1");
+ get(m_pMtrFldVert1,"MTR_FLD_VERT_1");
+ get(m_pMtrFldHorz2,"MTR_FLD_HORZ_2");
+ get(m_pMtrFldVert2,"MTR_FLD_VERT_2");
+
+ get(m_pCtlPreview,"CTL_PREVIEW");
SfxItemPool* pPool = rOutAttrs.GetPool();
DBG_ASSERT( pPool, "Wo ist der Pool" );
@@ -121,36 +111,36 @@ SvxConnectionPage::SvxConnectionPage( Window* pWindow, const SfxItemSet& rInAttr
FillTypeLB();
const FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs );
- SetFieldUnit( aMtrFldHorz1, eFUnit );
- SetFieldUnit( aMtrFldHorz2, eFUnit );
- SetFieldUnit( aMtrFldVert1, eFUnit );
- SetFieldUnit( aMtrFldVert2, eFUnit );
- SetFieldUnit( aMtrFldLine1, eFUnit );
- SetFieldUnit( aMtrFldLine2, eFUnit );
- SetFieldUnit( aMtrFldLine3, eFUnit );
+ SetFieldUnit( *m_pMtrFldHorz1, eFUnit );
+ SetFieldUnit( *m_pMtrFldHorz2, eFUnit );
+ SetFieldUnit( *m_pMtrFldVert1, eFUnit );
+ SetFieldUnit( *m_pMtrFldVert2, eFUnit );
+ SetFieldUnit( *m_pMtrFldLine1, eFUnit );
+ SetFieldUnit( *m_pMtrFldLine2, eFUnit );
+ SetFieldUnit( *m_pMtrFldLine3, eFUnit );
if( eFUnit == FUNIT_MM )
{
- aMtrFldHorz1.SetSpinSize( 50 );
- aMtrFldHorz2.SetSpinSize( 50 );
- aMtrFldVert1.SetSpinSize( 50 );
- aMtrFldVert2.SetSpinSize( 50 );
- aMtrFldLine1.SetSpinSize( 50 );
- aMtrFldLine2.SetSpinSize( 50 );
- aMtrFldLine3.SetSpinSize( 50 );
+ m_pMtrFldHorz1->SetSpinSize( 50 );
+ m_pMtrFldHorz2->SetSpinSize( 50 );
+ m_pMtrFldVert1->SetSpinSize( 50 );
+ m_pMtrFldVert2->SetSpinSize( 50 );
+ m_pMtrFldLine1->SetSpinSize( 50 );
+ m_pMtrFldLine2->SetSpinSize( 50 );
+ m_pMtrFldLine3->SetSpinSize( 50 );
}
// disable 3D border
- aCtlPreview.SetBorderStyle(WINDOW_BORDER_MONO);
+ m_pCtlPreview->SetBorderStyle(WINDOW_BORDER_MONO);
Link aLink( LINK( this, SvxConnectionPage, ChangeAttrHdl_Impl ) );
- aMtrFldHorz1.SetModifyHdl( aLink );
- aMtrFldVert1.SetModifyHdl( aLink );
- aMtrFldHorz2.SetModifyHdl( aLink );
- aMtrFldVert2.SetModifyHdl( aLink );
- aMtrFldLine1.SetModifyHdl( aLink );
- aMtrFldLine2.SetModifyHdl( aLink );
- aMtrFldLine3.SetModifyHdl( aLink );
- aLbType.SetSelectHdl( aLink );
+ m_pMtrFldHorz1->SetModifyHdl( aLink );
+ m_pMtrFldVert1->SetModifyHdl( aLink );
+ m_pMtrFldHorz2->SetModifyHdl( aLink );
+ m_pMtrFldVert2->SetModifyHdl( aLink );
+ m_pMtrFldLine1->SetModifyHdl( aLink );
+ m_pMtrFldLine2->SetModifyHdl( aLink );
+ m_pMtrFldLine3->SetModifyHdl( aLink );
+ m_pLbType->SetSelectHdl( aLink );
}
/*************************************************************************
@@ -180,12 +170,12 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
long nValue = ( ( const SdrEdgeNode1HorzDistItem* )pItem )->GetValue();
- SetMetricValue( aMtrFldHorz1, nValue, eUnit );
+ SetMetricValue( *m_pMtrFldHorz1, nValue, eUnit );
}
else
- aMtrFldHorz1.SetEmptyFieldValue();
+ m_pMtrFldHorz1->SetEmptyFieldValue();
- aMtrFldHorz1.SaveValue();
+ m_pMtrFldHorz1->SaveValue();
// SdrEdgeNode2HorzDistItem
pItem = GetItem( rAttrs, SDRATTR_EDGENODE2HORZDIST );
@@ -194,12 +184,12 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
long nValue = ( ( const SdrEdgeNode2HorzDistItem* )pItem )->GetValue();
- SetMetricValue( aMtrFldHorz2, nValue, eUnit );
+ SetMetricValue( *m_pMtrFldHorz2, nValue, eUnit );
}
else
- aMtrFldHorz2.SetEmptyFieldValue();
+ m_pMtrFldHorz2->SetEmptyFieldValue();
- aMtrFldHorz2.SaveValue();
+ m_pMtrFldHorz2->SaveValue();
// SdrEdgeNode1VertDistItem
pItem = GetItem( rAttrs, SDRATTR_EDGENODE1VERTDIST );
@@ -208,12 +198,12 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
long nValue = ( ( const SdrEdgeNode1VertDistItem* )pItem )->GetValue();
- SetMetricValue( aMtrFldVert1, nValue, eUnit );
+ SetMetricValue( *m_pMtrFldVert1, nValue, eUnit );
}
else
- aMtrFldVert1.SetEmptyFieldValue();
+ m_pMtrFldVert1->SetEmptyFieldValue();
- aMtrFldVert1.SaveValue();
+ m_pMtrFldVert1->SaveValue();
// SdrEdgeNode2VertDistItem
pItem = GetItem( rAttrs, SDRATTR_EDGENODE2VERTDIST );
@@ -222,12 +212,12 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
long nValue = ( ( const SdrEdgeNode2VertDistItem* )pItem )->GetValue();
- SetMetricValue( aMtrFldVert2, nValue, eUnit );
+ SetMetricValue( *m_pMtrFldVert2, nValue, eUnit );
}
else
- aMtrFldVert2.SetEmptyFieldValue();
+ m_pMtrFldVert2->SetEmptyFieldValue();
- aMtrFldVert2.SaveValue();
+ m_pMtrFldVert2->SaveValue();
// SdrEdgeLine1DeltaItem
pItem = GetItem( rAttrs, SDRATTR_EDGELINE1DELTA );
@@ -236,12 +226,12 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
long nValue = ( ( const SdrEdgeLine1DeltaItem* )pItem )->GetValue();
- SetMetricValue( aMtrFldLine1, nValue, eUnit );
+ SetMetricValue( *m_pMtrFldLine1, nValue, eUnit );
}
else
- aMtrFldLine1.SetEmptyFieldValue();
+ m_pMtrFldLine1->SetEmptyFieldValue();
- aMtrFldLine1.SaveValue();
+ m_pMtrFldLine1->SaveValue();
// SdrEdgeLine2DeltaItem
pItem = GetItem( rAttrs, SDRATTR_EDGELINE2DELTA );
@@ -250,12 +240,12 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
long nValue = ( ( const SdrEdgeLine2DeltaItem* )pItem )->GetValue();
- SetMetricValue( aMtrFldLine2, nValue, eUnit );
+ SetMetricValue( *m_pMtrFldLine2, nValue, eUnit );
}
else
- aMtrFldLine2.SetEmptyFieldValue();
+ m_pMtrFldLine2->SetEmptyFieldValue();
- aMtrFldLine2.SaveValue();
+ m_pMtrFldLine2->SaveValue();
// SdrEdgeLine3DeltaItem
pItem = GetItem( rAttrs, SDRATTR_EDGELINE3DELTA );
@@ -264,12 +254,12 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
long nValue = ( ( const SdrEdgeLine3DeltaItem* )pItem )->GetValue();
- SetMetricValue( aMtrFldLine3, nValue, eUnit );
+ SetMetricValue( *m_pMtrFldLine3, nValue, eUnit );
}
else
- aMtrFldLine3.SetEmptyFieldValue();
+ m_pMtrFldLine3->SetEmptyFieldValue();
- aMtrFldLine3.SaveValue();
+ m_pMtrFldLine3->SaveValue();
// SdrEdgeLineDeltaAnzItem
pItem = GetItem( rAttrs, SDRATTR_EDGELINEDELTAANZ );
@@ -280,21 +270,21 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
sal_uInt16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue();
if( nValue <= 2 )
{
- aFtLine3.Enable( sal_False );
- aMtrFldLine3.Enable( sal_False );
- aMtrFldLine3.SetEmptyFieldValue();
+ m_pFtLine3->Enable( sal_False );
+ m_pMtrFldLine3->Enable( sal_False );
+ m_pMtrFldLine3->SetEmptyFieldValue();
}
if( nValue <= 1 )
{
- aFtLine2.Enable( sal_False );
- aMtrFldLine2.Enable( sal_False );
- aMtrFldLine2.SetEmptyFieldValue();
+ m_pFtLine2->Enable( sal_False );
+ m_pMtrFldLine2->Enable( sal_False );
+ m_pMtrFldLine2->SetEmptyFieldValue();
}
if( nValue == 0 )
{
- aFtLine1.Enable( sal_False );
- aMtrFldLine1.Enable( sal_False );
- aMtrFldLine1.SetEmptyFieldValue();
+ m_pFtLine1->Enable( sal_False );
+ m_pMtrFldLine1->Enable( sal_False );
+ m_pMtrFldLine1->SetEmptyFieldValue();
}
}
@@ -305,11 +295,11 @@ void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
SdrEdgeKind nValue = ( ( const SdrEdgeKindItem* )pItem )->GetValue();
- aLbType.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(nValue) );
+ m_pLbType->SelectEntryPos( sal::static_int_cast< sal_uInt16 >(nValue) );
}
else
- aLbType.SetNoSelection();
- aLbType.SaveValue();
+ m_pLbType->SetNoSelection();
+ m_pLbType->SaveValue();
}
/*************************************************************************
@@ -323,58 +313,58 @@ sal_Bool SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs)
sal_Bool bModified = sal_False;
sal_Int32 nValue;
- if( aMtrFldHorz1.GetText() != aMtrFldHorz1.GetSavedValue() )
+ if( m_pMtrFldHorz1->GetText() != m_pMtrFldHorz1->GetSavedValue() )
{
- nValue = GetCoreValue( aMtrFldHorz1, eUnit );
+ nValue = GetCoreValue( *m_pMtrFldHorz1, eUnit );
rAttrs.Put( SdrEdgeNode1HorzDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldHorz2.GetText() != aMtrFldHorz2.GetSavedValue() )
+ if( m_pMtrFldHorz2->GetText() != m_pMtrFldHorz2->GetSavedValue() )
{
- nValue = GetCoreValue( aMtrFldHorz2, eUnit );
+ nValue = GetCoreValue( *m_pMtrFldHorz2, eUnit );
rAttrs.Put( SdrEdgeNode2HorzDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldVert1.GetText() != aMtrFldVert1.GetSavedValue() )
+ if( m_pMtrFldVert1->GetText() != m_pMtrFldVert1->GetSavedValue() )
{
- nValue = GetCoreValue( aMtrFldVert1, eUnit );
+ nValue = GetCoreValue( *m_pMtrFldVert1, eUnit );
rAttrs.Put( SdrEdgeNode1VertDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldVert2.GetText() != aMtrFldVert2.GetSavedValue() )
+ if( m_pMtrFldVert2->GetText() != m_pMtrFldVert2->GetSavedValue() )
{
- nValue = GetCoreValue( aMtrFldVert2, eUnit );
+ nValue = GetCoreValue( *m_pMtrFldVert2, eUnit );
rAttrs.Put( SdrEdgeNode2VertDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldLine1.GetText() != aMtrFldLine1.GetSavedValue() )
+ if( m_pMtrFldLine1->GetText() != m_pMtrFldLine1->GetSavedValue() )
{
- nValue = GetCoreValue( aMtrFldLine1, eUnit );
+ nValue = GetCoreValue( *m_pMtrFldLine1, eUnit );
rAttrs.Put( SdrEdgeLine1DeltaItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldLine2.GetText() != aMtrFldLine2.GetSavedValue() )
+ if( m_pMtrFldLine2->GetText() != m_pMtrFldLine2->GetSavedValue() )
{
- nValue = GetCoreValue( aMtrFldLine2, eUnit );
+ nValue = GetCoreValue( *m_pMtrFldLine2, eUnit );
rAttrs.Put( SdrEdgeLine2DeltaItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldLine3.GetText() != aMtrFldLine3.GetSavedValue() )
+ if( m_pMtrFldLine3->GetText() != m_pMtrFldLine3->GetSavedValue() )
{
- nValue = GetCoreValue( aMtrFldLine3, eUnit );
+ nValue = GetCoreValue( *m_pMtrFldLine3, eUnit );
rAttrs.Put( SdrEdgeLine3DeltaItem( nValue ) );
bModified = sal_True;
}
- sal_uInt16 nPos = aLbType.GetSelectEntryPos();
- if( nPos != aLbType.GetSavedValue() )
+ sal_uInt16 nPos = m_pLbType->GetSelectEntryPos();
+ if( nPos != m_pLbType->GetSavedValue() )
{
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -390,8 +380,8 @@ void SvxConnectionPage::Construct()
{
DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
- aCtlPreview.SetView( pView );
- aCtlPreview.Construct();
+ m_pCtlPreview->SetView( pView );
+ m_pCtlPreview->Construct();
}
/*************************************************************************
@@ -413,85 +403,85 @@ sal_uInt16* SvxConnectionPage::GetRanges()
IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p )
{
- if( p == &aMtrFldHorz1 )
+ if( p == m_pMtrFldHorz1 )
{
- sal_Int32 nValue = GetCoreValue( aMtrFldHorz1, eUnit );
+ sal_Int32 nValue = GetCoreValue( *m_pMtrFldHorz1, eUnit );
aAttrSet.Put( SdrEdgeNode1HorzDistItem( nValue ) );
}
- if( p == &aMtrFldHorz2 )
+ if( p == m_pMtrFldHorz2 )
{
- sal_Int32 nValue = GetCoreValue( aMtrFldHorz2, eUnit );
+ sal_Int32 nValue = GetCoreValue( *m_pMtrFldHorz2, eUnit );
aAttrSet.Put( SdrEdgeNode2HorzDistItem( nValue ) );
}
- if( p == &aMtrFldVert1 )
+ if( p == m_pMtrFldVert1 )
{
- sal_Int32 nValue = GetCoreValue( aMtrFldVert1, eUnit );
+ sal_Int32 nValue = GetCoreValue( *m_pMtrFldVert1, eUnit );
aAttrSet.Put( SdrEdgeNode1VertDistItem( nValue ) );
}
- if( p == &aMtrFldVert2 )
+ if( p == m_pMtrFldVert2 )
{
- sal_Int32 nValue = GetCoreValue( aMtrFldVert2, eUnit );
+ sal_Int32 nValue = GetCoreValue( *m_pMtrFldVert2, eUnit );
aAttrSet.Put( SdrEdgeNode2VertDistItem( nValue ) );
}
- if( p == &aMtrFldLine1 )
+ if( p == m_pMtrFldLine1 )
{
- sal_Int32 nValue = GetCoreValue( aMtrFldLine1, eUnit );
+ sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine1, eUnit );
aAttrSet.Put( SdrEdgeLine1DeltaItem( nValue ) );
}
- if( p == &aMtrFldLine2 )
+ if( p == m_pMtrFldLine2 )
{
- sal_Int32 nValue = GetCoreValue( aMtrFldLine2, eUnit );
+ sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine2, eUnit );
aAttrSet.Put( SdrEdgeLine2DeltaItem( nValue ) );
}
- if( p == &aMtrFldLine3 )
+ if( p == m_pMtrFldLine3 )
{
- sal_Int32 nValue = GetCoreValue( aMtrFldLine3, eUnit );
+ sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine3, eUnit );
aAttrSet.Put( SdrEdgeLine3DeltaItem( nValue ) );
}
- if( p == &aLbType )
+ if( p == m_pLbType )
{
- sal_uInt16 nPos = aLbType.GetSelectEntryPos();
+ sal_uInt16 nPos = m_pLbType->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) );
}
}
- aCtlPreview.SetAttributes( aAttrSet );
+ m_pCtlPreview->SetAttributes( aAttrSet );
- if( p == &aLbType )
+ if( p == m_pLbType )
{
// get the number of line displacements
- sal_uInt16 nCount = aCtlPreview.GetLineDeltaAnz();
+ sal_uInt16 nCount = m_pCtlPreview->GetLineDeltaAnz();
- aFtLine3.Enable( nCount > 2 );
- aMtrFldLine3.Enable( nCount > 2 );
+ m_pFtLine3->Enable( nCount > 2 );
+ m_pMtrFldLine3->Enable( nCount > 2 );
if( nCount > 2 )
- aMtrFldLine3.SetValue( aMtrFldLine3.GetValue() );
+ m_pMtrFldLine3->SetValue( m_pMtrFldLine3->GetValue() );
else
- aMtrFldLine3.SetEmptyFieldValue();
+ m_pMtrFldLine3->SetEmptyFieldValue();
- aFtLine2.Enable( nCount > 1 );
- aMtrFldLine2.Enable( nCount > 1 );
+ m_pFtLine2->Enable( nCount > 1 );
+ m_pMtrFldLine2->Enable( nCount > 1 );
if( nCount > 1 )
- aMtrFldLine2.SetValue( aMtrFldLine2.GetValue() );
+ m_pMtrFldLine2->SetValue( m_pMtrFldLine2->GetValue() );
else
- aMtrFldLine2.SetEmptyFieldValue();
+ m_pMtrFldLine2->SetEmptyFieldValue();
- aFtLine1.Enable( nCount > 0 );
- aMtrFldLine1.Enable( nCount > 0 );
+ m_pFtLine1->Enable( nCount > 0 );
+ m_pMtrFldLine1->Enable( nCount > 0 );
if( nCount > 0 )
- aMtrFldLine1.SetValue( aMtrFldLine1.GetValue() );
+ m_pMtrFldLine1->SetValue( m_pMtrFldLine1->GetValue() );
else
- aMtrFldLine1.SetEmptyFieldValue();
+ m_pMtrFldLine1->SetEmptyFieldValue();
}
@@ -515,7 +505,7 @@ void SvxConnectionPage::FillTypeLB()
for( sal_uInt16 i = 0; i < nCount; i++ )
{
aStr = pEdgeKindItem->GetValueTextByPos( i );
- aLbType.InsertEntry( aStr );
+ m_pLbType->InsertEntry( aStr );
}
}
}
diff --git a/cui/source/tabpages/connect.hrc b/cui/source/tabpages/connect.hrc
deleted file mode 100644
index f3df146725c9..000000000000
--- a/cui/source/tabpages/connect.hrc
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#define FL_DISTANCE 1
-#define FL_DELTA 2
-#define FT_LINE_1 1
-#define FT_LINE_2 2
-#define FT_LINE_3 3
-#define MTR_FLD_LINE_1 1
-#define MTR_FLD_LINE_2 2
-#define MTR_FLD_LINE_3 3
-#define FT_HORZ_1 4
-#define FT_HORZ_2 5
-#define MTR_FLD_HORZ_1 4
-#define MTR_FLD_HORZ_2 5
-#define MTR_FLD_VERT_1 6
-#define MTR_FLD_VERT_2 7
-#define FT_VERT_2 7
-#define FT_VERT_1 6
-#define FT_TYPE 8
-#define LB_TYPE 1
-#define CTL_PREVIEW 1
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/connect.src b/cui/source/tabpages/connect.src
deleted file mode 100644
index 94629d698e2e..000000000000
--- a/cui/source/tabpages/connect.src
+++ /dev/null
@@ -1,233 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svtools/controldims.hrc>
-#include "connect.hrc"
-#include <cuires.hrc>
-#include "helpid.hrc"
-#include <svx/dialogs.hrc>
-
- // RID_SVXPAGE_CONNECTION ------------------------------------------------
-TabPage RID_SVXPAGE_CONNECTION
-{
- HelpId = HID_PAGE_CONNECTION ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- Text [ en-US ] = "Connector" ;
- FixedText FT_TYPE
- {
- Pos = MAP_APPFONT ( 6 , 8 ) ;
- Size = MAP_APPFONT ( 25 , 8 ) ;
- Text [ en-US ] = "~Type" ;
- };
- ListBox LB_TYPE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_CONNECTION:LB_TYPE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 37 , 6 ) ;
- Size = MAP_APPFONT ( 83 , 54 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- };
- FixedLine FL_DELTA
- {
- Pos = MAP_APPFONT ( 6 , 24 ) ;
- Size = MAP_APPFONT ( 120 , RSC_CD_FIXEDLINE_HEIGHT ) ;
- Text [ en-US ] = "Line skew" ;
- };
- FixedText FT_LINE_1
- {
- Pos = MAP_APPFONT ( 12 , 37 ) ;
- Size = MAP_APPFONT ( 66 , 8 ) ;
- Text [ en-US ] = "Line ~1" ;
- };
- MetricField MTR_FLD_LINE_1
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_LINE_1";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 79 , 35 ) ;
- Size = MAP_APPFONT ( 41 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Repeat = TRUE ;
- DecimalDigits = 2 ;
- Minimum = -10000 ;
- First = -10000 ;
- Maximum = 10000 ;
- Last = 10000 ;
- SpinSize = 10 ;
- Unit = FUNIT_CM ;
- };
- FixedText FT_LINE_2
- {
- Pos = MAP_APPFONT ( 12 , 53 ) ;
- Size = MAP_APPFONT ( 66 , 8 ) ;
- Text [ en-US ] = "Line ~2" ;
- };
- MetricField MTR_FLD_LINE_2
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_LINE_2";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 79 , 51 ) ;
- Size = MAP_APPFONT ( 41 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Repeat = TRUE ;
- DecimalDigits = 2 ;
- Minimum = -10000 ;
- First = -10000 ;
- Maximum = 10000 ;
- Last = 10000 ;
- SpinSize = 10 ;
- Unit = FUNIT_CM ;
- };
- FixedText FT_LINE_3
- {
- Pos = MAP_APPFONT ( 12 , 69 ) ;
- Size = MAP_APPFONT ( 66 , 8 ) ;
- Text [ en-US ] = "Line ~3" ;
- };
- MetricField MTR_FLD_LINE_3
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_LINE_3";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 79 , 67 ) ;
- Size = MAP_APPFONT ( 41 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Repeat = TRUE ;
- DecimalDigits = 2 ;
- Minimum = -10000 ;
- First = -10000 ;
- Maximum = 10000 ;
- Last = 10000 ;
- SpinSize = 10 ;
- Unit = FUNIT_CM ;
- };
- FixedLine FL_DISTANCE
- {
- Pos = MAP_APPFONT ( 6 , 85 ) ;
- Size = MAP_APPFONT ( 120 , RSC_CD_FIXEDLINE_HEIGHT ) ;
- Text [ en-US ] = "Line spacing" ;
- };
- FixedText FT_HORZ_1
- {
- Pos = MAP_APPFONT ( 12 , 98 ) ;
- Size = MAP_APPFONT ( 66 , 8 ) ;
- Text [ en-US ] = "~Begin horizontal" ;
- };
- MetricField MTR_FLD_HORZ_1
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_HORZ_1";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 79 , 96 ) ;
- Size = MAP_APPFONT ( 41 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Repeat = TRUE ;
- DecimalDigits = 2 ;
- Minimum = -10000 ;
- First = -10000 ;
- Maximum = 10000 ;
- Last = 10000 ;
- SpinSize = 10 ;
- Unit = FUNIT_CM ;
- };
- FixedText FT_HORZ_2
- {
- Pos = MAP_APPFONT ( 12 , 130 ) ;
- Size = MAP_APPFONT ( 66 , 8 ) ;
- Text [ en-US ] = "End ~horizontal" ;
- };
- MetricField MTR_FLD_HORZ_2
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_HORZ_2";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 79 , 128 ) ;
- Size = MAP_APPFONT ( 41 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Repeat = TRUE ;
- DecimalDigits = 2 ;
- Minimum = -10000 ;
- First = -10000 ;
- Maximum = 10000 ;
- Last = 10000 ;
- SpinSize = 10 ;
- Unit = FUNIT_CM ;
- };
- FixedText FT_VERT_1
- {
- Pos = MAP_APPFONT ( 12 , 114 ) ;
- Size = MAP_APPFONT ( 66 , 8 ) ;
- Text [ en-US ] = "Begin ~vertical" ;
- };
- MetricField MTR_FLD_VERT_1
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_VERT_1";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 79 , 112 ) ;
- Size = MAP_APPFONT ( 41 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Repeat = TRUE ;
- DecimalDigits = 2 ;
- Minimum = -10000 ;
- First = -10000 ;
- Maximum = 10000 ;
- Last = 10000 ;
- SpinSize = 10 ;
- Unit = FUNIT_CM ;
- };
- FixedText FT_VERT_2
- {
- Pos = MAP_APPFONT ( 12 , 146 ) ;
- Size = MAP_APPFONT ( 66 , 8 ) ;
- Text [ en-US ] = "~End vertical" ;
- };
- MetricField MTR_FLD_VERT_2
- {
- HelpID = "cui:MetricField:RID_SVXPAGE_CONNECTION:MTR_FLD_VERT_2";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 79 , 144 ) ;
- Size = MAP_APPFONT ( 41 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Repeat = TRUE ;
- DecimalDigits = 2 ;
- Minimum = -10000 ;
- First = -10000 ;
- Maximum = 10000 ;
- Last = 10000 ;
- SpinSize = 10 ;
- Unit = FUNIT_CM ;
- };
- Control CTL_PREVIEW
- {
- HelpId = HID_PAGE_CONNECTION_CTL_PREVIEW ;
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 + 120 + RSC_SP_FLGR_SPACE_Y + RSC_SP_FLGR_INNERBORDER_LEFT , 35 ) ;
- Size = MAP_APPFONT ( 118 , 121 ) ;
- QuickHelpText [ en-US ] = "Preview";
- };
-};
- // ******************************************************************* EOF
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index f9bb3712caca..18e1103838e0 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -61,16 +61,16 @@ static sal_uInt16 pRanges[] =
\************************************************************************/
SvxMeasureDialog::SvxMeasureDialog( Window* pParent, const SfxItemSet& rInAttrs,
- const SdrView* pSdrView ) :
- SfxNoLayoutSingleTabDialog( pParent, rInAttrs, RID_SVXPAGE_MEASURE )
+ const SdrView* pSdrView )
+ : SfxSingleTabDialog(pParent, rInAttrs)
{
- SvxMeasurePage* _pPage = new SvxMeasurePage( this, rInAttrs );
+ SvxMeasurePage* _pPage = new SvxMeasurePage( get_content_area(), rInAttrs );
_pPage->SetView( pSdrView );
_pPage->Construct();
- SetTabPage( _pPage );
- SetText( _pPage->GetText() );
+ setTabPage(_pPage );
+ SetText(CUI_RESSTR(RID_SVXSTR_DIMENSION_LINE));
}
/*************************************************************************
@@ -91,12 +91,9 @@ SvxMeasureDialog::~SvxMeasureDialog()
SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) :
SvxTabPage ( pWindow
- ,"DimensionLines"
- ,"cui/ui/dimensionlines.ui"
+ ,"DimensionLinesTabPage"
+ ,"cui/ui/dimensionlinestabpage.ui"
,rInAttrs ),
-
-// aCtlPreview ( this, CUI_RES( CTL_PREVIEW ), rInAttrs ),
-
rOutAttrs ( rInAttrs ),
aAttrSet ( *rInAttrs.GetPool() ),
pView( 0 ),
diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src
index dbc16cc6a432..b823ae8ec032 100644
--- a/cui/source/tabpages/strings.src
+++ b/cui/source/tabpages/strings.src
@@ -199,5 +199,13 @@ String RID_SVXSTR_DEL_SPACES_BETWEEN_LINES
{
Text [ en-US ] = "Delete spaces and tabs at end and start of line";
};
+String RID_SVXSTR_CONNECTOR
+{
+ Text [en-US ] = "Connector";
+};
+String RID_SVXSTR_DIMENSION_LINE
+{
+ Text [en-US ] = "Dimension line";
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/connectortabpage.ui b/cui/uiconfig/ui/connectortabpage.ui
new file mode 100644
index 000000000000..fc3f139bb797
--- /dev/null
+++ b/cui/uiconfig/ui/connectortabpage.ui
@@ -0,0 +1,392 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkBox" id="ConnectorTabPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="FT_TYPE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Type</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">LB_TYPE</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="LB_TYPE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="FL_DELTA">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="FT_LINE_1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">LIne _1</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MTR_FLD_LINE_1:0.00cm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="FT_LINE_2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Line _2</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MTR_FLD_LINE_2:0.00cm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="FT_LINE_3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Line _3</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MTR_FLD_LINE_3:0.00cm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MTR_FLD_LINE_1:0.00cm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MTR_FLD_LINE_2:0.00cm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MTR_FLD_LINE_3:0.00cm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Line skewa</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="FL_DISTANCE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="FT_HORZ_1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Begin horizontal</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MTR_FLD_HORZ_1:0.00mm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="FT_HORZ_2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">End _horizontal</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MTR_FLD_HORZ_2:0.00mm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="FT_VERT_1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Begin _vertical</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MTR_FLD_VERT_1:0.00mm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="FT_VERT_2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_End verticalaa</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MTR_FLD_VERT_2:0.00mm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MTR_FLD_HORZ_1:0.00mm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MTR_FLD_HORZ_2:0.00mm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MTR_FLD_VERT_1:0.00mm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MTR_FLD_VERT_2:0.00mm">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Line spacing</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svxlo-SvxXConnectionPreview" id="CTL_PREVIEW:border">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Preview</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="FT_TYPE"/>
+ <widget name="FT_LINE_1"/>
+ <widget name="FT_LINE_2"/>
+ <widget name="FT_LINE_3"/>
+ <widget name="FT_HORZ_1"/>
+ <widget name="FT_HORZ_2"/>
+ <widget name="FT_VERT_1"/>
+ <widget name="FT_VERT_2"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/cui/uiconfig/ui/dimensionlines.ui b/cui/uiconfig/ui/dimensionlinestabpage.ui
index 07646e526ac7..1d193cf3dc39 100644
--- a/cui/uiconfig/ui/dimensionlines.ui
+++ b/cui/uiconfig/ui/dimensionlinestabpage.ui
@@ -13,7 +13,7 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
- <object class="GtkBox" id="DimensionLines">
+ <object class="GtkBox" id="DimensionLinesTabPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 90d875be2925..e07917fb1e0f 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -251,6 +251,9 @@
<glade-widget-class title="SvxXMeasurePreview" name="svxlo-SvxXMeasurePreview"
generic-name="Dimension Line Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
+ <glade-widget-class title="SvxXConnectionPreview" name="svxlo-SvxXConnectionPreview"
+ generic-name="Connector Line Preview Window" parent="GtkDrawingArea"
+ icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Shadow Preview" name="svxlo-SvxXShadowPreview"
generic-name="Shadow Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
diff --git a/include/svx/connctrl.hxx b/include/svx/connctrl.hxx
index a559f615c14c..945746d28a7f 100644
--- a/include/svx/connctrl.hxx
+++ b/include/svx/connctrl.hxx
@@ -37,22 +37,23 @@ class SVX_DLLPUBLIC SvxXConnectionPreview : public Control
friend class SvxConnectionPage;
private:
- const SfxItemSet& rAttrs;
SdrEdgeObj* pEdgeObj;
SdrObjList* pObjList;
const SdrView* pView;
SVX_DLLPRIVATE void SetStyles();
+ SVX_DLLPRIVATE void AdaptSize();
public:
- SvxXConnectionPreview( Window* pParent, const ResId& rResId,
- const SfxItemSet& rInAttrs );
- ~SvxXConnectionPreview();
+ SvxXConnectionPreview( Window* pParent, WinBits nStyle);
+ virtual ~SvxXConnectionPreview();
virtual void Paint( const Rectangle& rRect );
+ virtual void Resize();
+ virtual Size GetOptimalSize() const;
virtual void MouseButtonDown( const MouseEvent& rMEvt );
void SetAttributes( const SfxItemSet& rInAttrs );
- sal_uInt16 GetLineDeltaAnz();
+ sal_uInt16 GetLineDeltaAnz();
void Construct();
void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index 65c386cb680b..fa38393787ad 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -32,86 +32,53 @@
#include <svx/sxelditm.hxx>
#include <svx/sxmkitm.hxx>
-SvxXConnectionPreview::SvxXConnectionPreview( Window* pParent, const ResId& rResId,
- const SfxItemSet& rInAttrs ) :
- Control ( pParent, rResId ),
- rAttrs ( rInAttrs ),
- pEdgeObj( NULL ),
- pObjList( NULL ),
- pView ( NULL )
+#include <vcl/builder.hxx>
+
+SvxXConnectionPreview::SvxXConnectionPreview( Window* pParent, WinBits nStyle)
+ : Control(pParent, nStyle)
+ , pEdgeObj(NULL)
+ , pObjList(NULL)
+ , pView(NULL)
{
SetMapMode( MAP_100TH_MM );
SetStyles();
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxXConnectionPreview(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ WinBits nWinStyle = 0;
+ OString sBorder = VclBuilder::extractCustomProperty(rMap);
+ if (!sBorder.isEmpty())
+ nWinStyle |= WB_BORDER;
+ return new SvxXConnectionPreview(pParent, nWinStyle);
+}
+
SvxXConnectionPreview::~SvxXConnectionPreview()
{
delete pObjList;
}
-void SvxXConnectionPreview::Construct()
+void SvxXConnectionPreview::Resize()
{
- DBG_ASSERT( pView, "No valid view is passed on! ");
-
- const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- sal_uIntPtr nMarkCount = rMarkList.GetMarkCount();
-
- if( nMarkCount >= 1 )
- {
- bool bFound = false;
- const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-
-
- for( sal_uInt16 i = 0; i < nMarkCount && !bFound; i++ )
- {
- pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
- sal_uInt32 nInv = pObj->GetObjInventor();
- sal_uInt16 nId = pObj->GetObjIdentifier();
- if( nInv == SdrInventor && nId == OBJ_EDGE )
- {
- bFound = true;
- SdrEdgeObj* pTmpEdgeObj = (SdrEdgeObj*) pObj;
- pEdgeObj = (SdrEdgeObj*) pTmpEdgeObj->Clone();
-
- SdrObjConnection& rConn1 = (SdrObjConnection&)pEdgeObj->GetConnection( sal_True );
- SdrObjConnection& rConn2 = (SdrObjConnection&)pEdgeObj->GetConnection( sal_False );
-
- rConn1 = pTmpEdgeObj->GetConnection( sal_True );
- rConn2 = pTmpEdgeObj->GetConnection( sal_False );
+ Control::Resize();
- SdrObject* pTmpObj1 = pTmpEdgeObj->GetConnectedNode( sal_True );
- SdrObject* pTmpObj2 = pTmpEdgeObj->GetConnectedNode( sal_False );
-
- // potential memory leak here (!). Create SdrObjList only when there is
- // not yet one.
- if(!pObjList)
- {
- pObjList = new SdrObjList( pView->GetModel(), NULL );
- }
+ AdaptSize();
- if( pTmpObj1 )
- {
- SdrObject* pObj1 = pTmpObj1->Clone();
- pObjList->InsertObject( pObj1 );
- pEdgeObj->ConnectToNode( sal_True, pObj1 );
- }
- if( pTmpObj2 )
- {
- SdrObject* pObj2 = pTmpObj2->Clone();
- pObjList->InsertObject( pObj2 );
- pEdgeObj->ConnectToNode( sal_False, pObj2 );
- }
- pObjList->InsertObject( pEdgeObj );
- }
- }
- }
+ Invalidate();
+}
- if( !pEdgeObj )
- pEdgeObj = new SdrEdgeObj();
+Size SvxXConnectionPreview::GetOptimalSize() const
+{
+ return LogicToPixel(Size(118 , 121), MapMode(MAP_APPFONT));
+}
+void SvxXConnectionPreview::AdaptSize()
+{
// Adapt size
if( pObjList )
{
+ SetMapMode( MAP_100TH_MM );
+
OutputDevice* pOD = pView->GetFirstOutputDevice(); // GetWin( 0 );
Rectangle aRect = pObjList->GetAllObjBoundRect();
@@ -161,13 +128,75 @@ void SvxXConnectionPreview::Construct()
aDisplayMap.SetOrigin( aNewPos );
SetMapMode( aDisplayMap );
-
Point aPos;
MouseEvent aMEvt( aPos, 1, 0, MOUSE_RIGHT );
MouseButtonDown( aMEvt );
}
}
+void SvxXConnectionPreview::Construct()
+{
+ DBG_ASSERT( pView, "No valid view is passed on! ");
+
+ const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
+ sal_uIntPtr nMarkCount = rMarkList.GetMarkCount();
+
+ if( nMarkCount >= 1 )
+ {
+ bool bFound = false;
+ const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+
+
+ for( sal_uInt16 i = 0; i < nMarkCount && !bFound; i++ )
+ {
+ pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nId = pObj->GetObjIdentifier();
+ if( nInv == SdrInventor && nId == OBJ_EDGE )
+ {
+ bFound = true;
+ SdrEdgeObj* pTmpEdgeObj = (SdrEdgeObj*) pObj;
+ pEdgeObj = (SdrEdgeObj*) pTmpEdgeObj->Clone();
+
+ SdrObjConnection& rConn1 = (SdrObjConnection&)pEdgeObj->GetConnection( sal_True );
+ SdrObjConnection& rConn2 = (SdrObjConnection&)pEdgeObj->GetConnection( sal_False );
+
+ rConn1 = pTmpEdgeObj->GetConnection( sal_True );
+ rConn2 = pTmpEdgeObj->GetConnection( sal_False );
+
+ SdrObject* pTmpObj1 = pTmpEdgeObj->GetConnectedNode( sal_True );
+ SdrObject* pTmpObj2 = pTmpEdgeObj->GetConnectedNode( sal_False );
+
+ // potential memory leak here (!). Create SdrObjList only when there is
+ // not yet one.
+ if(!pObjList)
+ {
+ pObjList = new SdrObjList( pView->GetModel(), NULL );
+ }
+
+ if( pTmpObj1 )
+ {
+ SdrObject* pObj1 = pTmpObj1->Clone();
+ pObjList->InsertObject( pObj1 );
+ pEdgeObj->ConnectToNode( sal_True, pObj1 );
+ }
+ if( pTmpObj2 )
+ {
+ SdrObject* pObj2 = pTmpObj2->Clone();
+ pObjList->InsertObject( pObj2 );
+ pEdgeObj->ConnectToNode( sal_False, pObj2 );
+ }
+ pObjList->InsertObject( pEdgeObj );
+ }
+ }
+ }
+
+ if( !pEdgeObj )
+ pEdgeObj = new SdrEdgeObj();
+
+ AdaptSize();
+}
+
void SvxXConnectionPreview::Paint( const Rectangle& )
{
if( pObjList )