LCOV - code coverage report
Current view: top level - sw/source/ui/fldui - flddb.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 271 0.0 %
Date: 2014-04-11 Functions: 0 23 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 <swmodule.hxx>
      21             : #include <view.hxx>
      22             : #include <wrtsh.hxx>
      23             : #include <globals.hrc>
      24             : #include <dbfld.hxx>
      25             : #include <fldtdlg.hxx>
      26             : #include <numrule.hxx>
      27             : 
      28             : #include <fldui.hrc>
      29             : #include <flddb.hxx>
      30             : #include <dbconfig.hxx>
      31             : #include <dbmgr.hxx>
      32             : 
      33             : #define USER_DATA_VERSION_1     "1"
      34             : #define USER_DATA_VERSION USER_DATA_VERSION_1
      35             : 
      36           0 : SwFldDBPage::SwFldDBPage(Window* pParent, const SfxItemSet& rCoreSet)
      37             :     : SwFldPage(pParent, "FldDbPage",
      38           0 :         "modules/swriter/ui/flddbpage.ui", rCoreSet)
      39             : {
      40           0 :     get(m_pTypeLB, "type");
      41           0 :     m_pTypeLB->SetStyle(m_pTypeLB->GetStyle() | WB_SORT);
      42           0 :     get(m_pDatabaseTLB, "select");
      43           0 :     get(m_pCondition, "condgroup");
      44           0 :     get(m_pConditionED, "condition");
      45           0 :     get(m_pValue, "recgroup");
      46           0 :     get(m_pValueED, "recnumber");
      47           0 :     get(m_pFormat, "formatframe");
      48           0 :     get(m_pAddDBPB, "browse");
      49           0 :     get(m_pDBFormatRB, "fromdatabasecb");
      50           0 :     get(m_pNewFormatRB, "userdefinedcb");
      51           0 :     get(m_pNumFormatLB, "numformat");
      52           0 :     get(m_pFormatLB, "format");
      53           0 :     m_pFormatLB->SetStyle(m_pFormatLB->GetStyle() | WB_SORT);
      54             : 
      55           0 :     long nHeight = m_pTypeLB->GetTextHeight() * 14;
      56           0 :     m_pTypeLB->set_height_request(nHeight);
      57           0 :     m_pDatabaseTLB->set_height_request(nHeight);
      58             : 
      59           0 :     long nWidth = m_pTypeLB->LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MAP_APPFONT)).Width();
      60           0 :     m_pTypeLB->set_width_request(nWidth);
      61           0 :     m_pDatabaseTLB->set_width_request(nWidth*2);
      62             : 
      63           0 :     m_aOldNumSelectHdl = m_pNumFormatLB->GetSelectHdl();
      64             : 
      65           0 :     m_pNumFormatLB->SetSelectHdl(LINK(this, SwFldDBPage, NumSelectHdl));
      66           0 :     m_pDatabaseTLB->SetSelectHdl(LINK(this, SwFldDBPage, TreeSelectHdl));
      67           0 :     m_pDatabaseTLB->SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl));
      68             : 
      69           0 :     m_pValueED->SetModifyHdl(LINK(this, SwFldDBPage, ModifyHdl));
      70           0 :     m_pAddDBPB->SetClickHdl(LINK(this, SwFldDBPage, AddDBHdl));
      71           0 : }
      72             : 
      73           0 : SwFldDBPage::~SwFldDBPage()
      74             : {
      75           0 : }
      76             : 
      77             : /*--------------------------------------------------------------------
      78             :     Description: initialise TabPage
      79             :  --------------------------------------------------------------------*/
      80           0 : void SwFldDBPage::Reset(const SfxItemSet&)
      81             : {
      82           0 :     Init(); // Allgemeine initialisierung
      83             : 
      84           0 :     m_pTypeLB->SetUpdateMode(false);
      85           0 :     const sal_Int32 nOldPos = m_pTypeLB->GetSelectEntryPos();
      86           0 :     m_sOldDBName = m_pDatabaseTLB->GetDBName(m_sOldTableName, m_sOldColumnName);
      87             : 
      88           0 :     m_pTypeLB->Clear();
      89             : 
      90           0 :     if (!IsFldEdit())
      91             :     {
      92             :         // initialise TypeListBox
      93           0 :         const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
      94             : 
      95           0 :         for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i)
      96             :         {
      97           0 :             const sal_uInt16 nTypeId = GetFldMgr().GetTypeId(i);
      98           0 :             const sal_Int32 nPos = m_pTypeLB->InsertEntry(GetFldMgr().GetTypeStr(i));
      99           0 :             m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
     100             :         }
     101             :     }
     102             :     else
     103             :     {
     104           0 :         const sal_uInt16 nTypeId = GetCurField()->GetTypeId();
     105             :         const sal_Int32 nPos = m_pTypeLB->InsertEntry(
     106           0 :             GetFldMgr().GetTypeStr(GetFldMgr().GetPos(nTypeId)));
     107           0 :         m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
     108             :     }
     109             : 
     110             :     // select old Pos
     111           0 :     if (GetTypeSel() != LISTBOX_ENTRY_NOTFOUND)
     112           0 :         m_pTypeLB->SelectEntryPos(GetTypeSel());
     113             : 
     114           0 :     m_pFormatLB->Clear();
     115             : 
     116           0 :     const sal_uInt16 nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, false, IsFldDlgHtmlMode());
     117           0 :     for( sal_uInt16 i = 0; i < nSize; ++i )
     118             :     {
     119           0 :         const sal_Int32 nEntryPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
     120           0 :         const sal_uInt16 nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
     121           0 :         m_pFormatLB->SetEntryData( nEntryPos, reinterpret_cast<void*>(nFmtId) );
     122           0 :         if( SVX_NUM_ARABIC == nFmtId )
     123           0 :             m_pFormatLB->SelectEntryPos( nEntryPos );
     124             :     }
     125             : 
     126           0 :     if (!IsFldEdit())
     127             :     {
     128           0 :         if (nOldPos != LISTBOX_ENTRY_NOTFOUND)
     129           0 :             m_pTypeLB->SelectEntryPos(nOldPos);
     130             : 
     131           0 :         if (!m_sOldDBName.isEmpty())
     132             :         {
     133           0 :             m_pDatabaseTLB->Select(m_sOldDBName, m_sOldTableName, m_sOldColumnName);
     134             :         }
     135             :         else
     136             :         {
     137           0 :             SwWrtShell *pSh = GetWrtShell();
     138           0 :             if(!pSh)
     139           0 :                 pSh = ::GetActiveWrtShell();
     140           0 :             if(pSh)
     141             :             {
     142           0 :                 SwDBData aTmp(pSh->GetDBData());
     143           0 :                 m_pDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, aEmptyOUStr);
     144             :             }
     145             :         }
     146             :     }
     147             : 
     148           0 :     if( !IsRefresh() )
     149             :     {
     150           0 :         OUString sUserData = GetUserData();
     151           0 :         if (sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
     152             :         {
     153           0 :             const sal_uInt16 nVal = (sal_uInt16)sUserData.getToken(1, ';').toInt32();
     154           0 :             if(nVal != USHRT_MAX)
     155             :             {
     156           0 :                 for (sal_Int32 i = 0; i < m_pTypeLB->GetEntryCount(); ++i)
     157           0 :                     if(nVal == (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(i))
     158             :                     {
     159           0 :                         m_pTypeLB->SelectEntryPos(i);
     160           0 :                         break;
     161             :                     }
     162             :             }
     163           0 :         }
     164             :     }
     165           0 :     TypeHdl(0);
     166             : 
     167           0 :     m_pTypeLB->SetUpdateMode(true);
     168           0 :     m_pTypeLB->SetSelectHdl(LINK(this, SwFldDBPage, TypeHdl));
     169           0 :     m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl));
     170             : 
     171           0 :     if (IsFldEdit())
     172             :     {
     173           0 :         m_pConditionED->SaveValue();
     174           0 :         m_pValueED->SaveValue();
     175           0 :         m_sOldDBName = m_pDatabaseTLB->GetDBName(m_sOldTableName, m_sOldColumnName);
     176           0 :         m_nOldFormat = GetCurField()->GetFormat();
     177           0 :         m_nOldSubType = GetCurField()->GetSubType();
     178             :     }
     179           0 : }
     180             : 
     181           0 : bool SwFldDBPage::FillItemSet(SfxItemSet& )
     182             : {
     183           0 :     OUString sTableName;
     184           0 :     OUString sColumnName;
     185           0 :     SwDBData aData;
     186             :     sal_Bool bIsTable;
     187           0 :     aData.sDataSource = m_pDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
     188           0 :     aData.sCommand = sTableName;
     189           0 :     aData.nCommandType = bIsTable ? 0 : 1;
     190           0 :     SwWrtShell *pSh = GetWrtShell();
     191           0 :     if(!pSh)
     192           0 :         pSh = ::GetActiveWrtShell();
     193             : 
     194           0 :     if (aData.sDataSource.isEmpty())
     195           0 :         aData = pSh->GetDBData();
     196             : 
     197           0 :     if(!aData.sDataSource.isEmpty())       // without database no new field command
     198             :     {
     199           0 :         const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
     200           0 :         sal_uLong nFormat = 0;
     201           0 :         sal_uInt16 nSubType = 0;
     202             : 
     203             :         OUString sDBName = aData.sDataSource
     204           0 :             + OUString(DB_DELIM)
     205           0 :             + aData.sCommand
     206           0 :             + OUString(DB_DELIM)
     207           0 :             + OUString::number(aData.nCommandType)
     208           0 :             + OUString(DB_DELIM);
     209           0 :         if (!sColumnName.isEmpty())
     210             :         {
     211           0 :             sDBName += sColumnName + OUString(DB_DELIM);
     212             :         }
     213           0 :         OUString aName = sDBName + m_pConditionED->GetText();
     214             : 
     215           0 :         switch (nTypeId)
     216             :         {
     217             :         case TYP_DBFLD:
     218           0 :             nFormat = m_pNumFormatLB->GetFormat();
     219           0 :             if (m_pNewFormatRB->IsEnabled() && m_pNewFormatRB->IsChecked())
     220           0 :                 nSubType = nsSwExtendedSubType::SUB_OWN_FMT;
     221           0 :             aName = sDBName;
     222           0 :             break;
     223             : 
     224             :         case TYP_DBSETNUMBERFLD:
     225             :             nFormat = (sal_uLong)m_pFormatLB->GetEntryData(
     226           0 :                                 m_pFormatLB->GetSelectEntryPos() );
     227           0 :             break;
     228             :         }
     229             : 
     230           0 :         const OUString aVal(m_pValueED->GetText());
     231           0 :         OUString sTempTableName;
     232           0 :         OUString sTempColumnName;
     233           0 :         OUString sTempDBName = m_pDatabaseTLB->GetDBName(sTempTableName, sTempColumnName);
     234           0 :         sal_Bool bDBListBoxChanged = m_sOldDBName != sTempDBName ||
     235           0 :             m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName;
     236           0 :         if (!IsFldEdit() ||
     237           0 :             m_pConditionED->GetSavedValue() != m_pConditionED->GetText() ||
     238           0 :             m_pValueED->GetSavedValue() != aVal ||
     239           0 :              bDBListBoxChanged ||
     240           0 :              m_nOldFormat != nFormat || m_nOldSubType != nSubType)
     241             :         {
     242           0 :             InsertFld( nTypeId, nSubType, aName, aVal, nFormat);
     243           0 :         }
     244             :     }
     245             : 
     246           0 :     return false;
     247             : }
     248             : 
     249           0 : SfxTabPage* SwFldDBPage::Create(    Window* pParent,
     250             :                         const SfxItemSet& rAttrSet )
     251             : {
     252           0 :     return ( new SwFldDBPage( pParent, rAttrSet ) );
     253             : }
     254             : 
     255           0 : sal_uInt16 SwFldDBPage::GetGroup()
     256             : {
     257           0 :     return GRP_DB;
     258             : }
     259             : 
     260           0 : IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
     261             : {
     262             :     // save old ListBoxPos
     263           0 :     const sal_Int32 nOld = GetTypeSel();
     264             : 
     265             :     // current ListBoxPos
     266           0 :     SetTypeSel(m_pTypeLB->GetSelectEntryPos());
     267             : 
     268           0 :     if(GetTypeSel() == LISTBOX_ENTRY_NOTFOUND)
     269             :     {
     270           0 :         SetTypeSel(0);
     271           0 :         m_pTypeLB->SelectEntryPos(0);
     272             :     }
     273             : 
     274           0 :     if (nOld != GetTypeSel())
     275             :     {
     276           0 :         SwWrtShell *pSh = GetWrtShell();
     277           0 :         if(!pSh)
     278           0 :             pSh = ::GetActiveWrtShell();
     279           0 :         sal_Bool bCond = sal_False, bSetNo = sal_False, bFormat = sal_False, bDBFormat = sal_False;
     280           0 :         const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
     281             : 
     282           0 :         m_pDatabaseTLB->ShowColumns(nTypeId == TYP_DBFLD);
     283             : 
     284           0 :         if (IsFldEdit())
     285             :         {
     286           0 :             SwDBData aData;
     287           0 :             OUString sColumnName;
     288           0 :             if (nTypeId == TYP_DBFLD)
     289             :             {
     290           0 :                 aData = ((SwDBField*)GetCurField())->GetDBData();
     291           0 :                 sColumnName = ((SwDBFieldType*)GetCurField()->GetTyp())->GetColumnName();
     292             :             }
     293             :             else
     294             :             {
     295           0 :                 aData = ((SwDBNameInfField*)GetCurField())->GetDBData(pSh->GetDoc());
     296             :             }
     297           0 :             m_pDatabaseTLB->Select(aData.sDataSource, aData.sCommand, sColumnName);
     298             :         }
     299             : 
     300           0 :         switch (nTypeId)
     301             :         {
     302             :             case TYP_DBFLD:
     303           0 :                 bFormat = sal_True;
     304           0 :                 bDBFormat = sal_True;
     305           0 :                 m_pNumFormatLB->Show();
     306           0 :                 m_pFormatLB->Hide();
     307             : 
     308           0 :                 if (pBox)   // type was changed by user
     309           0 :                     m_pDBFormatRB->Check();
     310             : 
     311           0 :                 if (IsFldEdit())
     312             :                 {
     313           0 :                     if (GetCurField()->GetFormat() != 0 && GetCurField()->GetFormat() != SAL_MAX_UINT32)
     314           0 :                         m_pNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
     315             : 
     316           0 :                     if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_OWN_FMT)
     317           0 :                         m_pNewFormatRB->Check();
     318             :                     else
     319           0 :                         m_pDBFormatRB->Check();
     320             :                 }
     321           0 :                 break;
     322             : 
     323             :             case TYP_DBNUMSETFLD:
     324           0 :                 bSetNo = sal_True;
     325             :                 // no break!
     326             :             case TYP_DBNEXTSETFLD:
     327           0 :                 bCond = sal_True;
     328           0 :                 if (IsFldEdit())
     329             :                 {
     330           0 :                     m_pConditionED->SetText(GetCurField()->GetPar1());
     331           0 :                     m_pValueED->SetText(GetCurField()->GetPar2());
     332             :                 }
     333           0 :                 break;
     334             : 
     335             :             case TYP_DBNAMEFLD:
     336           0 :                 break;
     337             : 
     338             :             case TYP_DBSETNUMBERFLD:
     339           0 :                 bFormat = sal_True;
     340           0 :                 m_pNewFormatRB->Check();
     341           0 :                 m_pNumFormatLB->Hide();
     342           0 :                 m_pFormatLB->Show();
     343           0 :                 if( IsFldEdit() )
     344             :                 {
     345           0 :                     for( sal_Int32 nI = m_pFormatLB->GetEntryCount(); nI; )
     346           0 :                         if( GetCurField()->GetFormat() == (sal_uLong)
     347           0 :                             m_pFormatLB->GetEntryData( --nI ))
     348             :                         {
     349           0 :                             m_pFormatLB->SelectEntryPos( nI );
     350           0 :                             break;
     351             :                         }
     352             :                 }
     353           0 :                 break;
     354             :         }
     355             : 
     356           0 :         m_pCondition->Enable(bCond);
     357           0 :         m_pValue->Enable(bSetNo);
     358           0 :         if (nTypeId != TYP_DBFLD)
     359             :         {
     360           0 :             m_pDBFormatRB->Enable(bDBFormat);
     361           0 :             m_pNewFormatRB->Enable(bDBFormat|bFormat);
     362           0 :             m_pNumFormatLB->Enable(bDBFormat);
     363           0 :             m_pFormatLB->Enable(bFormat);
     364             :         }
     365           0 :         m_pFormat->Enable(bDBFormat|bFormat);
     366             : 
     367           0 :         if (!IsFldEdit())
     368             :         {
     369           0 :             m_pValueED->SetText(aEmptyOUStr);
     370           0 :             if (bCond)
     371           0 :                 m_pConditionED->SetText("TRUE");
     372             :             else
     373           0 :                 m_pConditionED->SetText(aEmptyOUStr);
     374             :         }
     375             : 
     376           0 :         CheckInsert();
     377             :     }
     378             : 
     379           0 :     return 0;
     380             : }
     381             : 
     382           0 : IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB )
     383             : {
     384           0 :     m_pNewFormatRB->Check();
     385           0 :     m_aOldNumSelectHdl.Call(pLB);
     386             : 
     387           0 :     return 0;
     388             : }
     389             : 
     390           0 : void SwFldDBPage::CheckInsert()
     391             : {
     392           0 :     bool bInsert = true;
     393           0 :     const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
     394             : 
     395           0 :     SvTreeListEntry* pEntry = m_pDatabaseTLB->GetCurEntry();
     396             : 
     397           0 :     if (pEntry)
     398             :     {
     399           0 :         pEntry = m_pDatabaseTLB->GetParent(pEntry);
     400             : 
     401           0 :         if (nTypeId == TYP_DBFLD && pEntry)
     402           0 :             pEntry = m_pDatabaseTLB->GetParent(pEntry);
     403             : 
     404           0 :         bInsert &= pEntry != 0;
     405             :     }
     406             :     else
     407           0 :         bInsert = false;
     408             : 
     409           0 :     if (nTypeId == TYP_DBNUMSETFLD)
     410             :     {
     411           0 :         bool bHasValue = !m_pValueED->GetText().isEmpty();
     412             : 
     413           0 :         bInsert &= bHasValue;
     414             :     }
     415             : 
     416           0 :     EnableInsert(bInsert);
     417           0 : }
     418             : 
     419           0 : IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
     420             : {
     421             :     SvTreeListEntry* pColEntry;
     422           0 :     SvTreeListEntry* pEntry = pColEntry = pBox->GetCurEntry();
     423           0 :     if (pEntry)
     424             :     {
     425           0 :         const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
     426             : 
     427           0 :         pEntry = m_pDatabaseTLB->GetParent(pEntry);
     428             : 
     429           0 :         if (nTypeId == TYP_DBFLD && pEntry)
     430           0 :             pEntry = m_pDatabaseTLB->GetParent(pEntry);
     431             : 
     432           0 :         CheckInsert();
     433             : 
     434           0 :         if (nTypeId == TYP_DBFLD)
     435             :         {
     436           0 :             sal_Bool bNumFormat = sal_False;
     437             : 
     438           0 :             if (pEntry != 0)
     439             :             {
     440           0 :                 OUString sTableName;
     441           0 :                 OUString sColumnName;
     442             :                 sal_Bool bIsTable;
     443           0 :                 OUString sDBName = m_pDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
     444           0 :                 bNumFormat = GetFldMgr().IsDBNumeric(sDBName,
     445             :                             sTableName,
     446             :                             bIsTable,
     447           0 :                             sColumnName);
     448           0 :                 if (!IsFldEdit())
     449           0 :                     m_pDBFormatRB->Check();
     450             :             }
     451             : 
     452           0 :             m_pDBFormatRB->Enable(bNumFormat);
     453           0 :             m_pNewFormatRB->Enable(bNumFormat);
     454           0 :             m_pNumFormatLB->Enable(bNumFormat);
     455           0 :             m_pFormat->Enable(bNumFormat);
     456             :         }
     457             :     }
     458           0 :     return 0;
     459             : }
     460             : 
     461           0 : IMPL_LINK_NOARG(SwFldDBPage, AddDBHdl)
     462             : {
     463           0 :     OUString sNewDB = SwNewDBMgr::LoadAndRegisterDataSource();
     464           0 :     if(!sNewDB.isEmpty())
     465             :     {
     466           0 :         m_pDatabaseTLB->AddDataSource(sNewDB);
     467             :     }
     468           0 :     return 0;
     469             : }
     470             : 
     471             : /*--------------------------------------------------------------------
     472             :     Description: Modify
     473             :  --------------------------------------------------------------------*/
     474           0 : IMPL_LINK_NOARG(SwFldDBPage, ModifyHdl)
     475             : {
     476           0 :     CheckInsert();
     477           0 :     return 0;
     478             : }
     479             : 
     480           0 : void    SwFldDBPage::FillUserData()
     481             : {
     482           0 :     const sal_Int32 nEntryPos = m_pTypeLB->GetSelectEntryPos();
     483             :     const sal_uInt16 nTypeSel = ( LISTBOX_ENTRY_NOTFOUND == nEntryPos )
     484           0 :         ? USHRT_MAX : (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData( nEntryPos );
     485           0 :     SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel ));
     486           0 : }
     487             : 
     488           0 : void SwFldDBPage::ActivateMailMergeAddress()
     489             : {
     490           0 :     sal_uLong nData = TYP_DBFLD;
     491           0 :     m_pTypeLB->SelectEntryPos(m_pTypeLB->GetEntryPos( (const void*) nData ));
     492           0 :     m_pTypeLB->GetSelectHdl().Call(m_pTypeLB);
     493           0 :     const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
     494           0 :     m_pDatabaseTLB->Select(rData.sDataSource, rData.sCommand, aEmptyOUStr);
     495           0 : }
     496             : 
     497           0 : void SwFldDBPage::SetWrtShell(SwWrtShell& rSh)
     498             : {
     499           0 :     m_pDatabaseTLB->SetWrtShell(rSh);
     500           0 : }
     501             : 
     502             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10