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 <osl/diagnose.h>
21 :
22 : #include "numrule.hxx"
23 : #include "caption.hxx"
24 :
25 810 : InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) :
26 : bUseCaption(false),
27 : eObjType(eType),
28 : nNumType(SVX_NUM_ARABIC),
29 : sNumberSeparator((". ")),
30 : nPos(1),
31 : nLevel(0),
32 : sSeparator( OUString(": ") ),
33 : bIgnoreSeqOpts(false),
34 810 : bCopyAttributes(false)
35 : {
36 810 : if (pOleId)
37 450 : aOleId = *pOleId;
38 810 : }
39 :
40 0 : InsCaptionOpt::InsCaptionOpt(const InsCaptionOpt& rOpt)
41 : {
42 0 : *this = rOpt;
43 0 : }
44 :
45 324 : InsCaptionOpt::~InsCaptionOpt()
46 : {
47 324 : }
48 :
49 0 : InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
50 : {
51 0 : bUseCaption = rOpt.bUseCaption;
52 0 : eObjType = rOpt.eObjType;
53 0 : aOleId = rOpt.aOleId;
54 0 : sCategory = rOpt.sCategory;
55 0 : nNumType = rOpt.nNumType;
56 0 : sNumberSeparator = rOpt.sNumberSeparator;
57 0 : sCaption = rOpt.sCaption;
58 0 : nPos = rOpt.nPos;
59 0 : nLevel = rOpt.nLevel;
60 0 : sSeparator = rOpt.sSeparator;
61 0 : bIgnoreSeqOpts = rOpt.bIgnoreSeqOpts;
62 0 : sCharacterStyle = rOpt.sCharacterStyle;
63 0 : bCopyAttributes = rOpt.bCopyAttributes;
64 :
65 0 : return *this;
66 : }
67 :
68 0 : bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
69 : {
70 0 : return (eObjType == rOpt.eObjType &&
71 0 : aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple
72 : // times, don't compare against anything else.
73 :
74 270 : }
75 :
76 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|