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 <svl/itempool.hxx>
21 : #include <txatbase.hxx>
22 : #include <fmtfld.hxx>
23 : #include <docufld.hxx>
24 :
25 18783 : SwTxtAttr::SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart )
26 : : m_pAttr( &rAttr )
27 : , m_nStart( nStart )
28 : , m_bDontExpand( false )
29 : , m_bLockExpandFlag( false )
30 : , m_bDontMoveAttr( false )
31 : , m_bCharFmtAttr( false )
32 : , m_bOverlapAllowedAttr( false )
33 : , m_bPriorityAttr( false )
34 : , m_bDontExpandStart( false )
35 : , m_bNesting( false )
36 : , m_bHasDummyChar( false )
37 : , m_bFormatIgnoreStart(false)
38 18783 : , m_bFormatIgnoreEnd(false)
39 : {
40 18783 : }
41 :
42 18770 : SwTxtAttr::~SwTxtAttr( )
43 : {
44 18770 : }
45 :
46 1935484 : xub_StrLen* SwTxtAttr::GetEnd()
47 : {
48 1935484 : return 0;
49 : }
50 :
51 18770 : void SwTxtAttr::Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool )
52 : {
53 37540 : if (!pToDestroy) return;
54 18770 : SfxPoolItem * const pAttr = pToDestroy->m_pAttr;
55 18770 : delete pToDestroy;
56 18770 : rPool.Remove( *pAttr );
57 : }
58 :
59 52235 : int SwTxtAttr::operator==( const SwTxtAttr& rAttr ) const
60 : {
61 52235 : return GetAttr() == rAttr.GetAttr();
62 : }
63 :
64 17716 : SwTxtAttrEnd::SwTxtAttrEnd( SfxPoolItem& rAttr,
65 : xub_StrLen nStart, xub_StrLen nEnd ) :
66 17716 : SwTxtAttr( rAttr, nStart ), m_nEnd( nEnd )
67 : {
68 17716 : }
69 :
70 1650055 : xub_StrLen* SwTxtAttrEnd::GetEnd()
71 : {
72 1650055 : return & m_nEnd;
73 : }
74 :
75 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|