View | Details | Raw Unified | Return to issue 17727
Collapse All | Expand All

(-)source/doc/doctempl.cxx (-38 / +38 lines)
Lines 252-258 Link Here
252
252
253
namespace DocTempl {
253
namespace DocTempl {
254
254
255
class EntryData_Impl
255
class DocTempl_EntryData_Impl
256
{
256
{
257
    RegionData_Impl*    mpParent;
257
    RegionData_Impl*    mpParent;
258
    SfxObjectShellLock  mxObjShell;
258
    SfxObjectShellLock  mxObjShell;
Lines 267-273 Link Here
267
    RegionData_Impl*    GetParent() const { return mpParent; }
267
    RegionData_Impl*    GetParent() const { return mpParent; }
268
268
269
public:
269
public:
270
                        EntryData_Impl( RegionData_Impl* pParent,
270
                        DocTempl_EntryData_Impl( RegionData_Impl* pParent,
271
                                        const OUString& rTitle );
271
                                        const OUString& rTitle );
272
272
273
    const OUString&     GetTitle() const { return maTitle; }
273
    const OUString&     GetTitle() const { return maTitle; }
Lines 288-301 Link Here
288
288
289
using namespace ::DocTempl;
289
using namespace ::DocTempl;
290
290
291
DECLARE_LIST( EntryList_Impl, EntryData_Impl* );
291
DECLARE_LIST( DocTempl_EntryList_Impl, DocTempl_EntryData_Impl* );
292
292
293
// ------------------------------------------------------------------------
293
// ------------------------------------------------------------------------
294
294
295
class RegionData_Impl
295
class RegionData_Impl
296
{
296
{
297
    const SfxDocTemplate_Impl*  mpParent;
297
    const SfxDocTemplate_Impl*  mpParent;
298
    EntryList_Impl              maEntries;
298
    DocTempl_EntryList_Impl     maEntries;
299
    OUString                    maTitle;
299
    OUString                    maTitle;
300
    OUString                    maOwnURL;
300
    OUString                    maOwnURL;
301
    OUString                    maTargetURL;
301
    OUString                    maTargetURL;
Lines 313-321 Link Here
313
    void                SetTargetURL( const OUString& rURL ) { maTargetURL = rURL; }
313
    void                SetTargetURL( const OUString& rURL ) { maTargetURL = rURL; }
314
    void                SetHierarchyURL( const OUString& rURL) { maOwnURL = rURL; }
314
    void                SetHierarchyURL( const OUString& rURL) { maOwnURL = rURL; }
315
315
316
    EntryData_Impl*     GetEntry( ULONG nIndex ) const;
316
    DocTempl_EntryData_Impl*     GetEntry( ULONG nIndex ) const;
317
    EntryData_Impl*     GetEntry( const OUString& rName ) const;
317
    DocTempl_EntryData_Impl*     GetEntry( const OUString& rName ) const;
318
    EntryData_Impl*     GetByTargetURL( const OUString& rName ) const;
318
    DocTempl_EntryData_Impl*     GetByTargetURL( const OUString& rName ) const;
319
319
320
    const OUString&     GetTitle() const { return maTitle; }
320
    const OUString&     GetTitle() const { return maTitle; }
321
    const OUString&     GetTargetURL();
321
    const OUString&     GetTargetURL();
Lines 635-641 Link Here
635
635
636
    if ( pImp->Construct() )
636
    if ( pImp->Construct() )
637
    {
637
    {
638
        EntryData_Impl  *pEntry = NULL;
638
        DocTempl_EntryData_Impl  *pEntry = NULL;
639
        RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
639
        RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
640
640
641
        if ( pRegion )
641
        if ( pRegion )
Lines 671-677 Link Here
671
    if ( !pImp->Construct() )
671
    if ( !pImp->Construct() )
672
        return String();
672
        return String();
673
673
674
    EntryData_Impl  *pEntry = NULL;
674
    DocTempl_EntryData_Impl  *pEntry = NULL;
675
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
675
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
676
676
677
    if ( pRegion )
677
    if ( pRegion )
Lines 710-716 Link Here
710
    if ( !pImp->Construct() )
710
    if ( !pImp->Construct() )
711
        return String();
711
        return String();
712
712
713
    EntryData_Impl  *pEntry = NULL;
713
    DocTempl_EntryData_Impl  *pEntry = NULL;
714
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
714
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
715
715
716
    if ( pRegion )
716
    if ( pRegion )
Lines 745-751 Link Here
745
    if ( !pImp->Construct() )
745
    if ( !pImp->Construct() )
746
        return String();
746
        return String();
747
747
748
    EntryData_Impl  *pEntry = NULL;
748
    DocTempl_EntryData_Impl  *pEntry = NULL;
749
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
749
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
750
750
751
    if ( pRegion )
751
    if ( pRegion )
Lines 799-805 Link Here
799
    // group
799
    // group
800
    // --**-- perhaps we have to create it ???
800
    // --**-- perhaps we have to create it ???
801
    RegionData_Impl *pRegion = pImp->GetRegion( 0L );
801
    RegionData_Impl *pRegion = pImp->GetRegion( 0L );
802
    EntryData_Impl  *pEntry = NULL;
802
    DocTempl_EntryData_Impl  *pEntry = NULL;
803
803
804
    if ( pRegion )
804
    if ( pRegion )
805
        pEntry = pRegion->GetEntry( rLongName );
805
        pEntry = pRegion->GetEntry( rLongName );
Lines 893-899 Link Here
893
    if ( ! pImp->Construct() )
893
    if ( ! pImp->Construct() )
894
        return;
894
        return;
895
895
896
    EntryData_Impl  *pEntry;
896
    DocTempl_EntryData_Impl  *pEntry;
897
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
897
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
898
898
899
    // do nothing if there is no region with that index
899
    // do nothing if there is no region with that index
Lines 983-989 Link Here
983
    if ( !pSourceRgn )
983
    if ( !pSourceRgn )
984
        return FALSE;
984
        return FALSE;
985
985
986
    EntryData_Impl *pSource = pSourceRgn->GetEntry( nSourceIdx );
986
    DocTempl_EntryData_Impl *pSource = pSourceRgn->GetEntry( nSourceIdx );
987
    if ( !pSource )
987
    if ( !pSource )
988
        return FALSE;
988
        return FALSE;
989
989
Lines 1133-1139 Link Here
1133
    if ( !pSourceRgn )
1133
    if ( !pSourceRgn )
1134
        return FALSE;
1134
        return FALSE;
1135
1135
1136
    EntryData_Impl *pSource = pSourceRgn->GetEntry( nIdx );
1136
    DocTempl_EntryData_Impl *pSource = pSourceRgn->GetEntry( nIdx );
1137
    if ( !pSource )
1137
    if ( !pSource )
1138
        return FALSE;
1138
        return FALSE;
1139
1139
Lines 1383-1389 Link Here
1383
    }
1383
    }
1384
    else
1384
    else
1385
    {
1385
    {
1386
        EntryData_Impl *pEntry = pRegion->GetEntry( nIdx );
1386
        DocTempl_EntryData_Impl *pEntry = pRegion->GetEntry( nIdx );
1387
1387
1388
        if ( !pEntry )
1388
        if ( !pEntry )
1389
            return FALSE;
1389
            return FALSE;
Lines 1479-1485 Link Here
1479
        return FALSE;
1479
        return FALSE;
1480
1480
1481
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
1481
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
1482
    EntryData_Impl *pEntry = NULL;
1482
    DocTempl_EntryData_Impl *pEntry = NULL;
1483
1483
1484
    if ( !pRegion )
1484
    if ( !pRegion )
1485
        return FALSE;
1485
        return FALSE;
Lines 1589-1595 Link Here
1589
        return NULL;
1589
        return NULL;
1590
1590
1591
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
1591
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
1592
    EntryData_Impl *pEntry = NULL;
1592
    DocTempl_EntryData_Impl *pEntry = NULL;
1593
1593
1594
    if ( pRegion )
1594
    if ( pRegion )
1595
        pEntry = pRegion->GetEntry( nIdx );
1595
        pEntry = pRegion->GetEntry( nIdx );
Lines 1632-1638 Link Here
1632
        return TRUE;
1632
        return TRUE;
1633
1633
1634
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
1634
    RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
1635
    EntryData_Impl *pEntry = NULL;
1635
    DocTempl_EntryData_Impl *pEntry = NULL;
1636
1636
1637
    if ( pRegion )
1637
    if ( pRegion )
1638
        pEntry = pRegion->GetEntry( nIdx );
1638
        pEntry = pRegion->GetEntry( nIdx );
Lines 1680-1686 Link Here
1680
    if ( ! pImp->Construct() )
1680
    if ( ! pImp->Construct() )
1681
        return FALSE;
1681
        return FALSE;
1682
1682
1683
    EntryData_Impl* pEntry = NULL;
1683
    DocTempl_EntryData_Impl* pEntry = NULL;
1684
    const USHORT nCount = GetRegionCount();
1684
    const USHORT nCount = GetRegionCount();
1685
1685
1686
    for ( USHORT i = 0; i < nCount; ++i )
1686
    for ( USHORT i = 0; i < nCount; ++i )
Lines 1744-1750 Link Here
1744
    OUString aPathTo = aFullPath.GetMainURL( INetURLObject::NO_DECODE );
1744
    OUString aPathTo = aFullPath.GetMainURL( INetURLObject::NO_DECODE );
1745
1745
1746
    RegionData_Impl *pData = NULL;
1746
    RegionData_Impl *pData = NULL;
1747
    EntryData_Impl  *pEntry = NULL;
1747
    DocTempl_EntryData_Impl  *pEntry = NULL;
1748
    sal_Bool         bFound = sal_False;
1748
    sal_Bool         bFound = sal_False;
1749
1749
1750
    ULONG nCount = GetRegionCount();
1750
    ULONG nCount = GetRegionCount();
Lines 1842-1848 Link Here
1842
// -----------------------------------------------------------------------
1842
// -----------------------------------------------------------------------
1843
// -----------------------------------------------------------------------
1843
// -----------------------------------------------------------------------
1844
// -----------------------------------------------------------------------
1844
// -----------------------------------------------------------------------
1845
EntryData_Impl::EntryData_Impl( RegionData_Impl* pParent,
1845
DocTempl_EntryData_Impl::DocTempl_EntryData_Impl( RegionData_Impl* pParent,
1846
                                const OUString& rTitle )
1846
                                const OUString& rTitle )
1847
{
1847
{
1848
    mpParent    = pParent;
1848
    mpParent    = pParent;
Lines 1852-1864 Link Here
1852
}
1852
}
1853
1853
1854
// -----------------------------------------------------------------------
1854
// -----------------------------------------------------------------------
1855
int EntryData_Impl::Compare( const OUString& rTitle ) const
1855
int DocTempl_EntryData_Impl::Compare( const OUString& rTitle ) const
1856
{
1856
{
1857
    return maTitle.compareTo( rTitle );
1857
    return maTitle.compareTo( rTitle );
1858
}
1858
}
1859
1859
1860
//------------------------------------------------------------------------
1860
//------------------------------------------------------------------------
1861
SfxObjectShellRef EntryData_Impl::CreateObjectShell()
1861
SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell()
1862
{
1862
{
1863
    if( ! mxObjShell.Is() )
1863
    if( ! mxObjShell.Is() )
1864
    {
1864
    {
Lines 1928-1934 Link Here
1928
}
1928
}
1929
1929
1930
//------------------------------------------------------------------------
1930
//------------------------------------------------------------------------
1931
BOOL EntryData_Impl::DeleteObjectShell()
1931
BOOL DocTempl_EntryData_Impl::DeleteObjectShell()
1932
{
1932
{
1933
    BOOL bRet = TRUE;
1933
    BOOL bRet = TRUE;
1934
1934
Lines 1963-1969 Link Here
1963
}
1963
}
1964
1964
1965
// -----------------------------------------------------------------------
1965
// -----------------------------------------------------------------------
1966
const OUString& EntryData_Impl::GetHierarchyURL()
1966
const OUString& DocTempl_EntryData_Impl::GetHierarchyURL()
1967
{
1967
{
1968
    if ( !maOwnURL.getLength() )
1968
    if ( !maOwnURL.getLength() )
1969
    {
1969
    {
Lines 1981-1987 Link Here
1981
}
1981
}
1982
1982
1983
// -----------------------------------------------------------------------
1983
// -----------------------------------------------------------------------
1984
const OUString& EntryData_Impl::GetTargetURL()
1984
const OUString& DocTempl_EntryData_Impl::GetTargetURL()
1985
{
1985
{
1986
    if ( !maTargetURL.getLength() )
1986
    if ( !maTargetURL.getLength() )
1987
    {
1987
    {
Lines 2017-2023 Link Here
2017
// -----------------------------------------------------------------------
2017
// -----------------------------------------------------------------------
2018
RegionData_Impl::~RegionData_Impl()
2018
RegionData_Impl::~RegionData_Impl()
2019
{
2019
{
2020
    EntryData_Impl *pData = maEntries.First();
2020
    DocTempl_EntryData_Impl *pData = maEntries.First();
2021
2021
2022
    while ( pData )
2022
    while ( pData )
2023
    {
2023
    {
Lines 2036-2042 Link Here
2036
2036
2037
    for ( i=0; i<nCount; i++ )
2037
    for ( i=0; i<nCount; i++ )
2038
    {
2038
    {
2039
        EntryData_Impl *pData = maEntries.GetObject( i );
2039
        DocTempl_EntryData_Impl *pData = maEntries.GetObject( i );
2040
2040
2041
        if ( pData->Compare( rTitle ) == 0 )
2041
        if ( pData->Compare( rTitle ) == 0 )
2042
        {
2042
        {
Lines 2057-2063 Link Here
2057
    long    nEnd = maEntries.Count() - 1;
2057
    long    nEnd = maEntries.Count() - 1;
2058
    long    nMid;
2058
    long    nMid;
2059
2059
2060
    EntryData_Impl* pMid;
2060
    DocTempl_EntryData_Impl* pMid;
2061
2061
2062
    rFound = sal_False;
2062
    rFound = sal_False;
2063
2063
Lines 2099-2105 Link Here
2099
                      INetURLObject::ENCODE_ALL );
2099
                      INetURLObject::ENCODE_ALL );
2100
    OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE );
2100
    OUString aLinkURL = aLinkObj.GetMainURL( INetURLObject::NO_DECODE );
2101
2101
2102
    EntryData_Impl *pEntry;
2102
    DocTempl_EntryData_Impl *pEntry;
2103
    sal_Bool        bFound = sal_False;
2103
    sal_Bool        bFound = sal_False;
2104
    long            nPos = GetEntryPos( rTitle, bFound );
2104
    long            nPos = GetEntryPos( rTitle, bFound );
2105
2105
Lines 2112-2118 Link Here
2112
        if ( pPos )
2112
        if ( pPos )
2113
            nPos = *pPos;
2113
            nPos = *pPos;
2114
2114
2115
        pEntry = new EntryData_Impl( this, rTitle );
2115
        pEntry = new DocTempl_EntryData_Impl( this, rTitle );
2116
        pEntry->SetTargetURL( rTargetURL );
2116
        pEntry->SetTargetURL( rTargetURL );
2117
        pEntry->SetHierarchyURL( aLinkURL );
2117
        pEntry->SetHierarchyURL( aLinkURL );
2118
        maEntries.Insert( pEntry, nPos );
2118
        maEntries.Insert( pEntry, nPos );
Lines 2167-2173 Link Here
2167
}
2167
}
2168
2168
2169
// -----------------------------------------------------------------------
2169
// -----------------------------------------------------------------------
2170
EntryData_Impl* RegionData_Impl::GetEntry( const OUString& rName ) const
2170
DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( const OUString& rName ) const
2171
{
2171
{
2172
    sal_Bool    bFound = sal_False;
2172
    sal_Bool    bFound = sal_False;
2173
    long        nPos = GetEntryPos( rName, bFound );
2173
    long        nPos = GetEntryPos( rName, bFound );
Lines 2179-2187 Link Here
2179
}
2179
}
2180
2180
2181
// -----------------------------------------------------------------------
2181
// -----------------------------------------------------------------------
2182
EntryData_Impl* RegionData_Impl::GetByTargetURL( const OUString& rName ) const
2182
DocTempl_EntryData_Impl* RegionData_Impl::GetByTargetURL( const OUString& rName ) const
2183
{
2183
{
2184
    EntryData_Impl *pEntry;
2184
    DocTempl_EntryData_Impl *pEntry;
2185
2185
2186
    ULONG nCount = maEntries.Count();
2186
    ULONG nCount = maEntries.Count();
2187
2187
Lines 2196-2202 Link Here
2196
}
2196
}
2197
2197
2198
// -----------------------------------------------------------------------
2198
// -----------------------------------------------------------------------
2199
EntryData_Impl* RegionData_Impl::GetEntry( ULONG nIndex ) const
2199
DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( ULONG nIndex ) const
2200
{
2200
{
2201
    return maEntries.GetObject( nIndex );
2201
    return maEntries.GetObject( nIndex );
2202
}
2202
}
Lines 2204-2210 Link Here
2204
// -----------------------------------------------------------------------
2204
// -----------------------------------------------------------------------
2205
void RegionData_Impl::DeleteEntry( ULONG nIndex )
2205
void RegionData_Impl::DeleteEntry( ULONG nIndex )
2206
{
2206
{
2207
    EntryData_Impl *pEntry = maEntries.GetObject( nIndex );
2207
    DocTempl_EntryData_Impl *pEntry = maEntries.GetObject( nIndex );
2208
2208
2209
    if ( pEntry )
2209
    if ( pEntry )
2210
    {
2210
    {
Lines 2457-2463 Link Here
2457
2457
2458
                OUString aId = xContentAccess->queryContentIdentifierString();
2458
                OUString aId = xContentAccess->queryContentIdentifierString();
2459
2459
2460
                EntryData_Impl* pEntry = pRegion->GetByTargetURL( aId );
2460
                DocTempl_EntryData_Impl* pEntry = pRegion->GetByTargetURL( aId );
2461
2461
2462
                if ( ! pEntry )
2462
                if ( ! pEntry )
2463
                {
2463
                {
(-)source/doc/doctemplates.cxx (-26 / +26 lines)
Lines 219-225 Link Here
219
219
220
class Updater_Impl;
220
class Updater_Impl;
221
class GroupList_Impl;
221
class GroupList_Impl;
222
class EntryData_Impl;
222
class DocTemplates_EntryData_Impl;
223
class GroupData_Impl;
223
class GroupData_Impl;
224
224
225
//=============================================================================
225
//=============================================================================
Lines 277-290 Link Here
277
    void                        addFsysGroup( GroupList_Impl& rList,
277
    void                        addFsysGroup( GroupList_Impl& rList,
278
                                              const OUString& rTitle,
278
                                              const OUString& rTitle,
279
                                              const OUString& rOwnURL );
279
                                              const OUString& rOwnURL );
280
    void                        removeFromHierarchy( EntryData_Impl *pData );
280
    void                        removeFromHierarchy( DocTemplates_EntryData_Impl *pData );
281
    void                        addToHierarchy( GroupData_Impl *pGroup,
281
    void                        addToHierarchy( GroupData_Impl *pGroup,
282
                                                EntryData_Impl *pData );
282
                                                DocTemplates_EntryData_Impl *pData );
283
283
284
    void                        removeFromHierarchy( GroupData_Impl *pGroup );
284
    void                        removeFromHierarchy( GroupData_Impl *pGroup );
285
    void                        addGroupToHierarchy( GroupData_Impl *pGroup );
285
    void                        addGroupToHierarchy( GroupData_Impl *pGroup );
286
286
287
    void                        updateData( EntryData_Impl *pData );
287
    void                        updateData( DocTemplates_EntryData_Impl *pData );
288
288
289
public:
289
public:
290
                                 SfxDocTplService_Impl( Reference< XMultiServiceFactory > xFactory );
290
                                 SfxDocTplService_Impl( Reference< XMultiServiceFactory > xFactory );
Lines 336-342 Link Here
336
336
337
//=============================================================================
337
//=============================================================================
338
338
339
class EntryData_Impl
339
class DocTemplates_EntryData_Impl
340
{
340
{
341
    OUString            maTitle;
341
    OUString            maTitle;
342
    OUString            maType;
342
    OUString            maType;
Lines 349-355 Link Here
349
    sal_Bool            mbUpdateLink    : 1;
349
    sal_Bool            mbUpdateLink    : 1;
350
350
351
public:
351
public:
352
                        EntryData_Impl( const OUString& rTitle );
352
                        DocTemplates_EntryData_Impl( const OUString& rTitle );
353
353
354
    void                setInUse() { mbInUse = sal_True; }
354
    void                setInUse() { mbInUse = sal_True; }
355
    void                setHierarchy( sal_Bool bInHierarchy ) { mbInHierarchy = bInHierarchy; }
355
    void                setHierarchy( sal_Bool bInHierarchy ) { mbInHierarchy = bInHierarchy; }
Lines 371-388 Link Here
371
    void                setType( const OUString& rType ) { maType = rType; }
371
    void                setType( const OUString& rType ) { maType = rType; }
372
};
372
};
373
373
374
DECLARE_LIST( EntryList_Impl, EntryData_Impl* );
374
DECLARE_LIST( DocTemplates_EntryList_Impl, DocTemplates_EntryData_Impl* );
375
375
376
//=============================================================================
376
//=============================================================================
377
377
378
class GroupData_Impl
378
class GroupData_Impl
379
{
379
{
380
    EntryList_Impl      maEntries;
380
    DocTemplates_EntryList_Impl      maEntries;
381
    OUString            maTitle;
381
    OUString                         maTitle;
382
    OUString            maHierarchyURL;
382
    OUString                         maHierarchyURL;
383
    OUString            maTargetURL;
383
    OUString                         maTargetURL;
384
    sal_Bool            mbInUse         : 1;
384
    sal_Bool                         mbInUse         : 1;
385
    sal_Bool            mbInHierarchy   : 1;
385
    sal_Bool                         mbInHierarchy   : 1;
386
386
387
public:
387
public:
388
                        GroupData_Impl( const OUString& rTitle );
388
                        GroupData_Impl( const OUString& rTitle );
Lines 399-410 Link Here
399
    const OUString&     getTargetURL() const { return maTargetURL; }
399
    const OUString&     getTargetURL() const { return maTargetURL; }
400
    const OUString&     getTitle() const { return maTitle; }
400
    const OUString&     getTitle() const { return maTitle; }
401
401
402
    EntryData_Impl*     addEntry( const OUString& rTitle,
402
    DocTemplates_EntryData_Impl*     addEntry( const OUString& rTitle,
403
                                  const OUString& rTargetURL,
403
                                  const OUString& rTargetURL,
404
                                  const OUString& rType,
404
                                  const OUString& rType,
405
                                  const OUString& rHierURL );
405
                                  const OUString& rHierURL );
406
    ULONG               count() { return maEntries.Count(); }
406
    ULONG               count() { return maEntries.Count(); }
407
    EntryData_Impl*     getEntry( ULONG nPos ) { return maEntries.GetObject( nPos ); }
407
    DocTemplates_EntryData_Impl*     getEntry( ULONG nPos ) { return maEntries.GetObject( nPos ); }
408
};
408
};
409
409
410
DECLARE_LIST( GroupList_Impl, GroupData_Impl* );
410
DECLARE_LIST( GroupList_Impl, GroupData_Impl* );
Lines 948-954 Link Here
948
                ULONG nCount = pGroup->count();
948
                ULONG nCount = pGroup->count();
949
                for ( ULONG i=0; i<nCount; i++ )
949
                for ( ULONG i=0; i<nCount; i++ )
950
                {
950
                {
951
                    EntryData_Impl *pData = pGroup->getEntry( i );
951
                    DocTemplates_EntryData_Impl *pData = pGroup->getEntry( i );
952
                    if ( ! pData->getInUse() )
952
                    if ( ! pData->getInUse() )
953
                    {
953
                    {
954
                        if ( pData->getInHierarchy() )
954
                        if ( pData->getInHierarchy() )
Lines 1817-1823 Link Here
1817
            while ( xResultSet->next() )
1817
            while ( xResultSet->next() )
1818
            {
1818
            {
1819
                BOOL             bUpdateType = sal_False;
1819
                BOOL             bUpdateType = sal_False;
1820
                EntryData_Impl  *pData;
1820
                DocTemplates_EntryData_Impl  *pData;
1821
1821
1822
                OUString aTitle( xRow->getString( 1 ) );
1822
                OUString aTitle( xRow->getString( 1 ) );
1823
                OUString aTargetDir( xRow->getString( 2 ) );
1823
                OUString aTargetDir( xRow->getString( 2 ) );
Lines 1961-1967 Link Here
1961
}
1961
}
1962
1962
1963
//-----------------------------------------------------------------------------
1963
//-----------------------------------------------------------------------------
1964
void SfxDocTplService_Impl::removeFromHierarchy( EntryData_Impl *pData )
1964
void SfxDocTplService_Impl::removeFromHierarchy( DocTemplates_EntryData_Impl *pData )
1965
{
1965
{
1966
    Content aTemplate;
1966
    Content aTemplate;
1967
1967
Lines 1973-1979 Link Here
1973
1973
1974
//-----------------------------------------------------------------------------
1974
//-----------------------------------------------------------------------------
1975
void SfxDocTplService_Impl::addToHierarchy( GroupData_Impl *pGroup,
1975
void SfxDocTplService_Impl::addToHierarchy( GroupData_Impl *pGroup,
1976
                                            EntryData_Impl *pData )
1976
                                            DocTemplates_EntryData_Impl *pData )
1977
{
1977
{
1978
    Content aGroup, aTemplate;
1978
    Content aGroup, aTemplate;
1979
1979
Lines 1999-2005 Link Here
1999
}
1999
}
2000
2000
2001
//-----------------------------------------------------------------------------
2001
//-----------------------------------------------------------------------------
2002
void SfxDocTplService_Impl::updateData( EntryData_Impl *pData )
2002
void SfxDocTplService_Impl::updateData( DocTemplates_EntryData_Impl *pData )
2003
{
2003
{
2004
    Content aTemplate;
2004
    Content aTemplate;
2005
2005
Lines 2042-2048 Link Here
2042
        ULONG nCount = pGroup->count();
2042
        ULONG nCount = pGroup->count();
2043
        for ( ULONG i=0; i<nCount; i++ )
2043
        for ( ULONG i=0; i<nCount; i++ )
2044
        {
2044
        {
2045
            EntryData_Impl *pData = pGroup->getEntry( i );
2045
            DocTemplates_EntryData_Impl *pData = pGroup->getEntry( i );
2046
            addToHierarchy( pGroup, pData ); // add entry to hierarchy
2046
            addToHierarchy( pGroup, pData ); // add entry to hierarchy
2047
        }
2047
        }
2048
    }
2048
    }
Lines 2072-2078 Link Here
2072
// -----------------------------------------------------------------------
2072
// -----------------------------------------------------------------------
2073
GroupData_Impl::~GroupData_Impl()
2073
GroupData_Impl::~GroupData_Impl()
2074
{
2074
{
2075
    EntryData_Impl *pData = maEntries.First();
2075
    DocTemplates_EntryData_Impl *pData = maEntries.First();
2076
    while ( pData )
2076
    while ( pData )
2077
    {
2077
    {
2078
        delete pData;
2078
        delete pData;
Lines 2081-2099 Link Here
2081
}
2081
}
2082
2082
2083
// -----------------------------------------------------------------------
2083
// -----------------------------------------------------------------------
2084
EntryData_Impl* GroupData_Impl::addEntry( const OUString& rTitle,
2084
DocTemplates_EntryData_Impl* GroupData_Impl::addEntry( const OUString& rTitle,
2085
                                          const OUString& rTargetURL,
2085
                                          const OUString& rTargetURL,
2086
                                          const OUString& rType,
2086
                                          const OUString& rType,
2087
                                          const OUString& rHierURL )
2087
                                          const OUString& rHierURL )
2088
{
2088
{
2089
    EntryData_Impl *pData = maEntries.First();
2089
    DocTemplates_EntryData_Impl *pData = maEntries.First();
2090
2090
2091
    while ( pData && pData->getTitle() != rTitle )
2091
    while ( pData && pData->getTitle() != rTitle )
2092
        pData = maEntries.Next();
2092
        pData = maEntries.Next();
2093
2093
2094
    if ( !pData )
2094
    if ( !pData )
2095
    {
2095
    {
2096
        pData = new EntryData_Impl( rTitle );
2096
        pData = new DocTemplates_EntryData_Impl( rTitle );
2097
        pData->setTargetURL( rTargetURL );
2097
        pData->setTargetURL( rTargetURL );
2098
        pData->setType( rType );
2098
        pData->setType( rType );
2099
        if ( rHierURL.getLength() )
2099
        if ( rHierURL.getLength() )
Lines 2119-2125 Link Here
2119
// -----------------------------------------------------------------------
2119
// -----------------------------------------------------------------------
2120
// -----------------------------------------------------------------------
2120
// -----------------------------------------------------------------------
2121
// -----------------------------------------------------------------------
2121
// -----------------------------------------------------------------------
2122
EntryData_Impl::EntryData_Impl( const OUString& rTitle )
2122
DocTemplates_EntryData_Impl::DocTemplates_EntryData_Impl( const OUString& rTitle )
2123
{
2123
{
2124
    maTitle         = rTitle;
2124
    maTitle         = rTitle;
2125
    mbInUse         = sal_False;
2125
    mbInUse         = sal_False;

Return to issue 17727