LCOV - code coverage report
Current view: top level - cui/source/tabpages - connect.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 249 0.0 %
Date: 2014-04-11 Functions: 0 17 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <cuires.hrc>
      21             : #include <dialmgr.hxx>
      22             : #include <sfx2/app.hxx>
      23             : #include <sfx2/module.hxx>
      24             : #include <sfx2/request.hxx>
      25             : #include <tools/shl.hxx>
      26             : 
      27             : #include <svx/connctrl.hxx>
      28             : #include <svx/dialogs.hrc>
      29             : #include <svx/dlgutil.hxx>
      30             : #include <svx/ofaitem.hxx>
      31             : #include <svx/svdattr.hxx>
      32             : #include <svx/svdoedge.hxx>
      33             : #include <svx/svdview.hxx>
      34             : #include <svx/sxekitm.hxx>
      35             : #include <svx/sxelditm.hxx>
      36             : #include <svx/sxenditm.hxx>
      37             : 
      38             : #include "connect.hxx"
      39             : #include "paragrph.hrc"
      40             : 
      41             : static sal_uInt16 pRanges[] =
      42             : {
      43             :     SDRATTR_EDGE_FIRST,
      44             :     SDRATTR_EDGE_LAST,
      45             :     0
      46             : };
      47             : 
      48             : /*************************************************************************
      49             : |*
      50             : |* dialog for changing connectors
      51             : |*
      52             : \************************************************************************/
      53             : 
      54           0 : SvxConnectionDialog::SvxConnectionDialog( Window* pParent, const SfxItemSet& rInAttrs,
      55             :                                 const SdrView* pSdrView )
      56           0 :     : SfxSingleTabDialog(pParent, rInAttrs)
      57             : {
      58           0 :     SvxConnectionPage* _pPage = new SvxConnectionPage( get_content_area(), rInAttrs );
      59             : 
      60           0 :     _pPage->SetView( pSdrView );
      61           0 :     _pPage->Construct();
      62             : 
      63           0 :     SetTabPage( _pPage );
      64           0 :     SetText(CUI_RESSTR( RID_SVXSTR_CONNECTOR ));
      65           0 : }
      66             : 
      67             : /*************************************************************************
      68             : |*
      69             : |* Dtor
      70             : |*
      71             : \************************************************************************/
      72             : 
      73           0 : SvxConnectionDialog::~SvxConnectionDialog()
      74             : {
      75           0 : }
      76             : 
      77             : /*************************************************************************
      78             : |*
      79             : |* page for changing connectors
      80             : |*
      81             : \************************************************************************/
      82             : 
      83           0 : SvxConnectionPage::SvxConnectionPage( Window* pWindow, const SfxItemSet& rInAttrs ) :
      84             :                 SfxTabPage      ( pWindow
      85             :                                  ,"ConnectorTabPage"
      86             :                                  ,"cui/ui/connectortabpage.ui"
      87             :                                  ,rInAttrs ),
      88             :         rOutAttrs               ( rInAttrs ),
      89           0 :         aAttrSet                ( *rInAttrs.GetPool() )
      90             : {
      91           0 :     get(m_pLbType,"LB_TYPE");
      92             : 
      93           0 :     get(m_pFtLine1,"FT_LINE_1");
      94           0 :     get(m_pMtrFldLine1,"MTR_FLD_LINE_1");
      95           0 :     get(m_pFtLine2,"FT_LINE_2");
      96           0 :     get(m_pMtrFldLine2,"MTR_FLD_LINE_2");
      97           0 :     get(m_pFtLine3,"FT_LINE_3");
      98           0 :     get(m_pMtrFldLine3,"MTR_FLD_LINE_3");
      99             : 
     100           0 :     get(m_pMtrFldHorz1,"MTR_FLD_HORZ_1");
     101           0 :     get(m_pMtrFldVert1,"MTR_FLD_VERT_1");
     102           0 :     get(m_pMtrFldHorz2,"MTR_FLD_HORZ_2");
     103           0 :     get(m_pMtrFldVert2,"MTR_FLD_VERT_2");
     104             : 
     105           0 :     get(m_pCtlPreview,"CTL_PREVIEW");
     106             : 
     107           0 :     SfxItemPool* pPool = rOutAttrs.GetPool();
     108             :     DBG_ASSERT( pPool, "Wo ist der Pool" );
     109           0 :     eUnit = pPool->GetMetric( SDRATTR_EDGENODE1HORZDIST );
     110             : 
     111           0 :     FillTypeLB();
     112             : 
     113           0 :     const FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs );
     114           0 :     SetFieldUnit( *m_pMtrFldHorz1, eFUnit );
     115           0 :     SetFieldUnit( *m_pMtrFldHorz2, eFUnit );
     116           0 :     SetFieldUnit( *m_pMtrFldVert1, eFUnit );
     117           0 :     SetFieldUnit( *m_pMtrFldVert2, eFUnit );
     118           0 :     SetFieldUnit( *m_pMtrFldLine1, eFUnit );
     119           0 :     SetFieldUnit( *m_pMtrFldLine2, eFUnit );
     120           0 :     SetFieldUnit( *m_pMtrFldLine3, eFUnit );
     121           0 :     if( eFUnit == FUNIT_MM )
     122             :     {
     123           0 :         m_pMtrFldHorz1->SetSpinSize( 50 );
     124           0 :         m_pMtrFldHorz2->SetSpinSize( 50 );
     125           0 :         m_pMtrFldVert1->SetSpinSize( 50 );
     126           0 :         m_pMtrFldVert2->SetSpinSize( 50 );
     127           0 :         m_pMtrFldLine1->SetSpinSize( 50 );
     128           0 :         m_pMtrFldLine2->SetSpinSize( 50 );
     129           0 :         m_pMtrFldLine3->SetSpinSize( 50 );
     130             :     }
     131             : 
     132             :     // disable 3D border
     133           0 :     m_pCtlPreview->SetBorderStyle(WINDOW_BORDER_MONO);
     134             : 
     135           0 :     Link aLink( LINK( this, SvxConnectionPage, ChangeAttrHdl_Impl ) );
     136           0 :     m_pMtrFldHorz1->SetModifyHdl( aLink );
     137           0 :     m_pMtrFldVert1->SetModifyHdl( aLink );
     138           0 :     m_pMtrFldHorz2->SetModifyHdl( aLink );
     139           0 :     m_pMtrFldVert2->SetModifyHdl( aLink );
     140           0 :     m_pMtrFldLine1->SetModifyHdl( aLink );
     141           0 :     m_pMtrFldLine2->SetModifyHdl( aLink );
     142           0 :     m_pMtrFldLine3->SetModifyHdl( aLink );
     143           0 :     m_pLbType->SetSelectHdl( aLink );
     144           0 : }
     145             : 
     146             : /*************************************************************************
     147             : |*
     148             : |* Dtor
     149             : |*
     150             : \************************************************************************/
     151             : 
     152           0 : SvxConnectionPage::~SvxConnectionPage()
     153             : {
     154           0 : }
     155             : 
     156             : /*************************************************************************
     157             : |*
     158             : |* reads passed Item-Set
     159             : |*
     160             : \************************************************************************/
     161             : 
     162           0 : void SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
     163             : {
     164           0 :     const SfxPoolItem* pItem = GetItem( rAttrs, SDRATTR_EDGENODE1HORZDIST );
     165           0 :     const SfxItemPool* pPool = rAttrs.GetPool();
     166             : 
     167             :     // SdrEdgeNode1HorzDistItem
     168           0 :     if( !pItem )
     169           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1HORZDIST );
     170           0 :     if( pItem )
     171             :     {
     172           0 :         long nValue = ( ( const SdrEdgeNode1HorzDistItem* )pItem )->GetValue();
     173           0 :         SetMetricValue( *m_pMtrFldHorz1, nValue, eUnit );
     174             :     }
     175             :     else
     176           0 :         m_pMtrFldHorz1->SetEmptyFieldValue();
     177             : 
     178           0 :     m_pMtrFldHorz1->SaveValue();
     179             : 
     180             :     // SdrEdgeNode2HorzDistItem
     181           0 :     pItem = GetItem( rAttrs, SDRATTR_EDGENODE2HORZDIST );
     182           0 :     if( !pItem )
     183           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2HORZDIST );
     184           0 :     if( pItem )
     185             :     {
     186           0 :         long nValue = ( ( const SdrEdgeNode2HorzDistItem* )pItem )->GetValue();
     187           0 :         SetMetricValue( *m_pMtrFldHorz2, nValue, eUnit );
     188             :     }
     189             :     else
     190           0 :         m_pMtrFldHorz2->SetEmptyFieldValue();
     191             : 
     192           0 :     m_pMtrFldHorz2->SaveValue();
     193             : 
     194             :     // SdrEdgeNode1VertDistItem
     195           0 :     pItem = GetItem( rAttrs, SDRATTR_EDGENODE1VERTDIST );
     196           0 :     if( !pItem )
     197           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1VERTDIST );
     198           0 :     if( pItem )
     199             :     {
     200           0 :         long nValue = ( ( const SdrEdgeNode1VertDistItem* )pItem )->GetValue();
     201           0 :         SetMetricValue( *m_pMtrFldVert1, nValue, eUnit );
     202             :     }
     203             :     else
     204           0 :         m_pMtrFldVert1->SetEmptyFieldValue();
     205             : 
     206           0 :     m_pMtrFldVert1->SaveValue();
     207             : 
     208             :     // SdrEdgeNode2VertDistItem
     209           0 :     pItem = GetItem( rAttrs, SDRATTR_EDGENODE2VERTDIST );
     210           0 :     if( !pItem )
     211           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2VERTDIST );
     212           0 :     if( pItem )
     213             :     {
     214           0 :         long nValue = ( ( const SdrEdgeNode2VertDistItem* )pItem )->GetValue();
     215           0 :         SetMetricValue( *m_pMtrFldVert2, nValue, eUnit );
     216             :     }
     217             :     else
     218           0 :         m_pMtrFldVert2->SetEmptyFieldValue();
     219             : 
     220           0 :     m_pMtrFldVert2->SaveValue();
     221             : 
     222             :     // SdrEdgeLine1DeltaItem
     223           0 :     pItem = GetItem( rAttrs, SDRATTR_EDGELINE1DELTA );
     224           0 :     if( !pItem )
     225           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE1DELTA );
     226           0 :     if( pItem )
     227             :     {
     228           0 :         long nValue = ( ( const SdrEdgeLine1DeltaItem* )pItem )->GetValue();
     229           0 :         SetMetricValue( *m_pMtrFldLine1, nValue, eUnit );
     230             :     }
     231             :     else
     232           0 :         m_pMtrFldLine1->SetEmptyFieldValue();
     233             : 
     234           0 :     m_pMtrFldLine1->SaveValue();
     235             : 
     236             :     // SdrEdgeLine2DeltaItem
     237           0 :     pItem = GetItem( rAttrs, SDRATTR_EDGELINE2DELTA );
     238           0 :     if( !pItem )
     239           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE2DELTA );
     240           0 :     if( pItem )
     241             :     {
     242           0 :         long nValue = ( ( const SdrEdgeLine2DeltaItem* )pItem )->GetValue();
     243           0 :         SetMetricValue( *m_pMtrFldLine2, nValue, eUnit );
     244             :     }
     245             :     else
     246           0 :         m_pMtrFldLine2->SetEmptyFieldValue();
     247             : 
     248           0 :     m_pMtrFldLine2->SaveValue();
     249             : 
     250             :     // SdrEdgeLine3DeltaItem
     251           0 :     pItem = GetItem( rAttrs, SDRATTR_EDGELINE3DELTA );
     252           0 :     if( !pItem )
     253           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE3DELTA );
     254           0 :     if( pItem )
     255             :     {
     256           0 :         long nValue = ( ( const SdrEdgeLine3DeltaItem* )pItem )->GetValue();
     257           0 :         SetMetricValue( *m_pMtrFldLine3, nValue, eUnit );
     258             :     }
     259             :     else
     260           0 :         m_pMtrFldLine3->SetEmptyFieldValue();
     261             : 
     262           0 :     m_pMtrFldLine3->SaveValue();
     263             : 
     264             :     // SdrEdgeLineDeltaAnzItem
     265           0 :     pItem = GetItem( rAttrs, SDRATTR_EDGELINEDELTAANZ );
     266           0 :     if( !pItem )
     267           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINEDELTAANZ );
     268           0 :     if( pItem )
     269             :     {
     270           0 :         sal_uInt16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue();
     271           0 :         if( nValue <= 2 )
     272             :         {
     273           0 :             m_pFtLine3->Enable( false );
     274           0 :             m_pMtrFldLine3->Enable( false );
     275           0 :             m_pMtrFldLine3->SetEmptyFieldValue();
     276             :         }
     277           0 :         if( nValue <= 1 )
     278             :         {
     279           0 :             m_pFtLine2->Enable( false );
     280           0 :             m_pMtrFldLine2->Enable( false );
     281           0 :             m_pMtrFldLine2->SetEmptyFieldValue();
     282             :         }
     283           0 :         if( nValue == 0 )
     284             :         {
     285           0 :             m_pFtLine1->Enable( false );
     286           0 :             m_pMtrFldLine1->Enable( false );
     287           0 :             m_pMtrFldLine1->SetEmptyFieldValue();
     288             :         }
     289             :     }
     290             : 
     291             :     // SdrEdgeKindItem
     292           0 :     pItem = GetItem( rAttrs, SDRATTR_EDGEKIND );
     293           0 :     if( !pItem )
     294           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
     295           0 :     if( pItem )
     296             :     {
     297           0 :         SdrEdgeKind nValue = ( ( const SdrEdgeKindItem* )pItem )->GetValue();
     298           0 :         m_pLbType->SelectEntryPos( sal::static_int_cast< sal_uInt16 >(nValue) );
     299             :     }
     300             :     else
     301           0 :         m_pLbType->SetNoSelection();
     302           0 :     m_pLbType->SaveValue();
     303           0 : }
     304             : 
     305             : /*************************************************************************
     306             : |*
     307             : |* fills the passed Item-Set width Dialogbox attributes
     308             : |*
     309             : \************************************************************************/
     310             : 
     311           0 : bool SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs)
     312             : {
     313           0 :     bool         bModified = false;
     314             :     sal_Int32    nValue;
     315             : 
     316           0 :     if( m_pMtrFldHorz1->GetText() != m_pMtrFldHorz1->GetSavedValue() )
     317             :     {
     318           0 :         nValue = GetCoreValue( *m_pMtrFldHorz1, eUnit );
     319           0 :         rAttrs.Put( SdrEdgeNode1HorzDistItem( nValue ) );
     320           0 :         bModified = true;
     321             :     }
     322             : 
     323           0 :     if( m_pMtrFldHorz2->GetText() != m_pMtrFldHorz2->GetSavedValue() )
     324             :     {
     325           0 :         nValue = GetCoreValue( *m_pMtrFldHorz2, eUnit );
     326           0 :         rAttrs.Put( SdrEdgeNode2HorzDistItem( nValue ) );
     327           0 :         bModified = true;
     328             :     }
     329             : 
     330           0 :     if( m_pMtrFldVert1->GetText() != m_pMtrFldVert1->GetSavedValue() )
     331             :     {
     332           0 :         nValue = GetCoreValue( *m_pMtrFldVert1, eUnit );
     333           0 :         rAttrs.Put( SdrEdgeNode1VertDistItem( nValue ) );
     334           0 :         bModified = true;
     335             :     }
     336             : 
     337           0 :     if( m_pMtrFldVert2->GetText() != m_pMtrFldVert2->GetSavedValue() )
     338             :     {
     339           0 :         nValue = GetCoreValue( *m_pMtrFldVert2, eUnit );
     340           0 :         rAttrs.Put( SdrEdgeNode2VertDistItem( nValue ) );
     341           0 :         bModified = true;
     342             :     }
     343             : 
     344           0 :     if( m_pMtrFldLine1->GetText() != m_pMtrFldLine1->GetSavedValue() )
     345             :     {
     346           0 :         nValue = GetCoreValue( *m_pMtrFldLine1, eUnit );
     347           0 :         rAttrs.Put( SdrEdgeLine1DeltaItem( nValue ) );
     348           0 :         bModified = true;
     349             :     }
     350             : 
     351           0 :     if( m_pMtrFldLine2->GetText() != m_pMtrFldLine2->GetSavedValue() )
     352             :     {
     353           0 :         nValue = GetCoreValue( *m_pMtrFldLine2, eUnit );
     354           0 :         rAttrs.Put( SdrEdgeLine2DeltaItem( nValue ) );
     355           0 :         bModified = true;
     356             :     }
     357             : 
     358           0 :     if( m_pMtrFldLine3->GetText() != m_pMtrFldLine3->GetSavedValue() )
     359             :     {
     360           0 :         nValue = GetCoreValue( *m_pMtrFldLine3, eUnit );
     361           0 :         rAttrs.Put( SdrEdgeLine3DeltaItem( nValue ) );
     362           0 :         bModified = true;
     363             :     }
     364             : 
     365             : 
     366           0 :     sal_Int32 nPos = m_pLbType->GetSelectEntryPos();
     367           0 :     if( nPos != m_pLbType->GetSavedValue() )
     368             :     {
     369           0 :         if( nPos != LISTBOX_ENTRY_NOTFOUND )
     370             :         {
     371           0 :             rAttrs.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) );
     372           0 :             bModified = true;
     373             :         }
     374             :     }
     375             : 
     376           0 :     return( bModified );
     377             : }
     378             : 
     379           0 : void SvxConnectionPage::Construct()
     380             : {
     381             :     DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
     382             : 
     383           0 :     m_pCtlPreview->SetView( pView );
     384           0 :     m_pCtlPreview->Construct();
     385           0 : }
     386             : 
     387             : /*************************************************************************
     388             : |*
     389             : |* creates the page
     390             : |*
     391             : \************************************************************************/
     392             : 
     393           0 : SfxTabPage* SvxConnectionPage::Create( Window* pWindow,
     394             :                 const SfxItemSet& rAttrs )
     395             : {
     396           0 :     return( new SvxConnectionPage( pWindow, rAttrs ) );
     397             : }
     398             : 
     399           0 : sal_uInt16* SvxConnectionPage::GetRanges()
     400             : {
     401           0 :     return( pRanges );
     402             : }
     403             : 
     404           0 : IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p )
     405             : {
     406           0 :     if( p == m_pMtrFldHorz1 )
     407             :     {
     408           0 :         sal_Int32 nValue = GetCoreValue( *m_pMtrFldHorz1, eUnit );
     409           0 :         aAttrSet.Put( SdrEdgeNode1HorzDistItem( nValue ) );
     410             :     }
     411             : 
     412           0 :     if( p == m_pMtrFldHorz2 )
     413             :     {
     414           0 :         sal_Int32 nValue = GetCoreValue( *m_pMtrFldHorz2, eUnit );
     415           0 :         aAttrSet.Put( SdrEdgeNode2HorzDistItem( nValue ) );
     416             :     }
     417             : 
     418           0 :     if( p == m_pMtrFldVert1 )
     419             :     {
     420           0 :         sal_Int32 nValue = GetCoreValue( *m_pMtrFldVert1, eUnit );
     421           0 :         aAttrSet.Put( SdrEdgeNode1VertDistItem( nValue ) );
     422             :     }
     423             : 
     424           0 :     if( p == m_pMtrFldVert2 )
     425             :     {
     426           0 :         sal_Int32 nValue = GetCoreValue( *m_pMtrFldVert2, eUnit );
     427           0 :         aAttrSet.Put( SdrEdgeNode2VertDistItem( nValue ) );
     428             :     }
     429             : 
     430           0 :     if( p == m_pMtrFldLine1 )
     431             :     {
     432           0 :         sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine1, eUnit );
     433           0 :         aAttrSet.Put( SdrEdgeLine1DeltaItem( nValue ) );
     434             :     }
     435             : 
     436           0 :     if( p == m_pMtrFldLine2 )
     437             :     {
     438           0 :         sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine2, eUnit );
     439           0 :         aAttrSet.Put( SdrEdgeLine2DeltaItem( nValue ) );
     440             :     }
     441             : 
     442           0 :     if( p == m_pMtrFldLine3 )
     443             :     {
     444           0 :         sal_Int32 nValue = GetCoreValue( *m_pMtrFldLine3, eUnit );
     445           0 :         aAttrSet.Put( SdrEdgeLine3DeltaItem( nValue ) );
     446             :     }
     447             : 
     448             : 
     449           0 :     if( p == m_pLbType )
     450             :     {
     451           0 :         sal_Int32 nPos = m_pLbType->GetSelectEntryPos();
     452           0 :         if( nPos != LISTBOX_ENTRY_NOTFOUND )
     453             :         {
     454           0 :             aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) );
     455             :         }
     456             :     }
     457             : 
     458           0 :     m_pCtlPreview->SetAttributes( aAttrSet );
     459             : 
     460           0 :     if( p == m_pLbType )
     461             :     {
     462             :         // get the number of line displacements
     463           0 :         sal_uInt16 nCount = m_pCtlPreview->GetLineDeltaAnz();
     464             : 
     465           0 :         m_pFtLine3->Enable( nCount > 2 );
     466           0 :         m_pMtrFldLine3->Enable( nCount > 2 );
     467           0 :         if( nCount > 2 )
     468           0 :             m_pMtrFldLine3->SetValue( m_pMtrFldLine3->GetValue() );
     469             :         else
     470           0 :             m_pMtrFldLine3->SetEmptyFieldValue();
     471             : 
     472           0 :         m_pFtLine2->Enable( nCount > 1 );
     473           0 :         m_pMtrFldLine2->Enable( nCount > 1 );
     474           0 :         if( nCount > 1 )
     475           0 :             m_pMtrFldLine2->SetValue( m_pMtrFldLine2->GetValue() );
     476             :         else
     477           0 :             m_pMtrFldLine2->SetEmptyFieldValue();
     478             : 
     479           0 :         m_pFtLine1->Enable( nCount > 0 );
     480           0 :         m_pMtrFldLine1->Enable( nCount > 0 );
     481           0 :         if( nCount > 0 )
     482           0 :             m_pMtrFldLine1->SetValue( m_pMtrFldLine1->GetValue() );
     483             :         else
     484           0 :             m_pMtrFldLine1->SetEmptyFieldValue();
     485             : 
     486             :     }
     487             : 
     488           0 :     return( 0L );
     489             : }
     490             : 
     491           0 : void SvxConnectionPage::FillTypeLB()
     492             : {
     493             :     // fill ListBox with connector names
     494           0 :     const SfxPoolItem* pItem = GetItem( rOutAttrs, SDRATTR_EDGEKIND );
     495           0 :     const SfxItemPool* pPool = rOutAttrs.GetPool();
     496             : 
     497           0 :     if( !pItem )
     498           0 :         pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
     499           0 :     if( pItem )
     500             :     {
     501           0 :         const SdrEdgeKindItem* pEdgeKindItem = (const SdrEdgeKindItem*) pItem;
     502           0 :         sal_uInt16 nCount = pEdgeKindItem->GetValueCount();
     503           0 :         OUString aStr;
     504             : 
     505           0 :         for( sal_uInt16 i = 0; i < nCount; i++ )
     506             :         {
     507           0 :             aStr = pEdgeKindItem->GetValueTextByPos( i );
     508           0 :             m_pLbType->InsertEntry( aStr );
     509           0 :         }
     510             :     }
     511           0 : }
     512           0 : void SvxConnectionPage::PageCreated (SfxAllItemSet aSet)
     513             : {
     514           0 :     SFX_ITEMSET_ARG(&aSet,pOfaPtrItem,OfaPtrItem,SID_OBJECT_LIST,false);
     515           0 :     if (pOfaPtrItem)
     516           0 :         SetView( static_cast<SdrView *>(pOfaPtrItem->GetValue()) );
     517             : 
     518           0 :     Construct();
     519           0 : }
     520             : 
     521             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10