Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include <osl/diagnose.h>
31 : :
32 : : #include "numrule.hxx"
33 : : #include "caption.hxx"
34 : :
35 : 855 : InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) :
36 : : bUseCaption(sal_False),
37 : : eObjType(eType),
38 : : nNumType(SVX_NUM_ARABIC),
39 : : sNumberSeparator(RTL_CONSTASCII_USTRINGPARAM((". "))),
40 : : nPos(1),
41 : : nLevel(0),
42 : : sSeparator( rtl::OUString(": ") ),
43 : : bIgnoreSeqOpts(sal_False),
44 [ + - ][ + - ]: 855 : bCopyAttributes(sal_False)
[ + - ][ + - ]
[ + - ]
45 : : {
46 [ + + ]: 855 : if (pOleId)
47 [ + - ]: 475 : aOleId = *pOleId;
48 : 855 : }
49 : :
50 [ # # ][ # # ]: 0 : InsCaptionOpt::InsCaptionOpt(const InsCaptionOpt& rOpt)
[ # # ][ # # ]
51 : : {
52 [ # # ]: 0 : *this = rOpt;
53 : 0 : }
54 : :
55 [ + - ][ + - ]: 360 : InsCaptionOpt::~InsCaptionOpt()
[ + - ][ + - ]
56 : : {
57 : 360 : }
58 : :
59 : 0 : InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
60 : : {
61 : 0 : bUseCaption = rOpt.bUseCaption;
62 : 0 : eObjType = rOpt.eObjType;
63 : 0 : aOleId = rOpt.aOleId;
64 : 0 : sCategory = rOpt.sCategory;
65 : 0 : nNumType = rOpt.nNumType;
66 : 0 : sNumberSeparator = rOpt.sNumberSeparator;
67 : 0 : sCaption = rOpt.sCaption;
68 : 0 : nPos = rOpt.nPos;
69 : 0 : nLevel = rOpt.nLevel;
70 : 0 : sSeparator = rOpt.sSeparator;
71 : 0 : bIgnoreSeqOpts = rOpt.bIgnoreSeqOpts;
72 : 0 : sCharacterStyle = rOpt.sCharacterStyle;
73 : 0 : bCopyAttributes = rOpt.bCopyAttributes;
74 : :
75 : 0 : return *this;
76 : : }
77 : :
78 : 0 : sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
79 : : {
80 : : return (eObjType == rOpt.eObjType &&
81 [ # # ][ # # ]: 0 : aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple
82 : : // times, don't compare against anything else.
83 : :
84 : :
85 : : }
86 : :
87 : :
88 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|