xref: /aoo42x/main/sw/source/core/txtnode/txatbase.cxx (revision 69a74367)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sw.hxx"
26 
27 
28 #include <svl/itempool.hxx>
29 #include <txatbase.hxx>
30 #include <fmtfld.hxx>
31 #include <docufld.hxx>
32 
SwTxtAttr(SfxPoolItem & rAttr,xub_StrLen nStart)33 SwTxtAttr::SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart )
34     : m_pAttr( &rAttr )
35     , m_nStart( nStart )
36     , m_bDontExpand( false )
37     , m_bLockExpandFlag( false )
38     , m_bDontMoveAttr( false )
39     , m_bCharFmtAttr( false )
40     , m_bOverlapAllowedAttr( false )
41     , m_bPriorityAttr( false )
42     , m_bDontExpandStart( false )
43     , m_bNesting( false )
44     , m_bHasDummyChar( false )
45     , m_bHasContent( false )
46 {
47 }
48 
~SwTxtAttr()49 SwTxtAttr::~SwTxtAttr( )
50 {
51 }
52 
GetEnd()53 xub_StrLen* SwTxtAttr::GetEnd()
54 {
55     return 0;
56 }
57 
Destroy(SwTxtAttr * pToDestroy,SfxItemPool & rPool)58 void SwTxtAttr::Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool )
59 {
60     if (!pToDestroy) return;
61     SfxPoolItem * const pAttr = pToDestroy->m_pAttr;
62     delete pToDestroy;
63     rPool.Remove( *pAttr );
64 }
65 
operator ==(const SwTxtAttr & rAttr) const66 int SwTxtAttr::operator==( const SwTxtAttr& rAttr ) const
67 {
68 	return GetAttr() == rAttr.GetAttr();
69 }
70 
SwTxtAttrEnd(SfxPoolItem & rAttr,xub_StrLen nStart,xub_StrLen nEnd)71 SwTxtAttrEnd::SwTxtAttrEnd( SfxPoolItem& rAttr,
72         xub_StrLen nStart, xub_StrLen nEnd ) :
73     SwTxtAttr( rAttr, nStart ), m_nEnd( nEnd )
74 {
75 }
76 
GetEnd()77 xub_StrLen* SwTxtAttrEnd::GetEnd()
78 {
79     return & m_nEnd;
80 }
81 
82