textparagraph.cxx (ca5ec200) textparagraph.cxx (7fe2509e)
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

--- 32 unchanged lines hidden (view full) ---

41TextParagraph::TextParagraph()
42{
43}
44
45TextParagraph::~TextParagraph()
46{
47}
48
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

--- 32 unchanged lines hidden (view full) ---

41TextParagraph::TextParagraph()
42{
43}
44
45TextParagraph::~TextParagraph()
46{
47}
48
49void lcl_getBulletclr(Color& bulletClr,
50 const TextRunVector& rRuns)
51{
52 // color of closest text in runs
53 if (rRuns.begin() != rRuns.end() && ((*rRuns.begin())->getTextCharacterProperties()).maCharColor.isUsed())
54 {
55 bulletClr = ((*rRuns.begin())->getTextCharacterProperties()).maCharColor;
56 }
57}
58
49void TextParagraph::insertAt(
50 const ::oox::core::XmlFilterBase& rFilterBase,
51 const Reference < XText > &xText,
52 const Reference < XTextCursor > &xAt,
53 const TextCharacterProperties& rTextStyleProperties,
54 const TextListStyle& rTextListStyle, bool bFirst) const
55{
56 try {

--- 39 unchanged lines hidden (view full) ---

96 PropertyMap aioBulletList;
97 Reference< XPropertySet > xProps( xStart, UNO_QUERY);
98 float fCharacterSize = 18;
99 if ( pTextParagraphStyle.get() )
100 {
101 pTextParagraphStyle->pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize );
102 fCharacterSize = pTextParagraphStyle->getCharHeightPoints( 18 );
103 }
59void TextParagraph::insertAt(
60 const ::oox::core::XmlFilterBase& rFilterBase,
61 const Reference < XText > &xText,
62 const Reference < XTextCursor > &xAt,
63 const TextCharacterProperties& rTextStyleProperties,
64 const TextListStyle& rTextListStyle, bool bFirst) const
65{
66 try {

--- 39 unchanged lines hidden (view full) ---

106 PropertyMap aioBulletList;
107 Reference< XPropertySet > xProps( xStart, UNO_QUERY);
108 float fCharacterSize = 18;
109 if ( pTextParagraphStyle.get() )
110 {
111 pTextParagraphStyle->pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize );
112 fCharacterSize = pTextParagraphStyle->getCharHeightPoints( 18 );
113 }
114
115 // bullet color inherits from closest text
116 if (maProperties.getBulletList().maBulletColorPtr && !(maProperties.getBulletList().maBulletColorPtr)->isUsed())
117 {
118 Color bulletClr;
119 lcl_getBulletclr(bulletClr, maRuns);
120 (maProperties.getBulletList().maBulletColorPtr)->assignIfUsed(bulletClr);
121 }
122
104 maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize );
105
106 // empty paragraphs do not have bullets in ppt
107 if ( !nParagraphSize )
108 {
109 const OUString sNumberingLevel( CREATE_OUSTRING( "NumberingLevel" ) );
110 xProps->setPropertyValue( sNumberingLevel, Any( static_cast< sal_Int16 >( -1 ) ) );
111 }

--- 15 unchanged lines hidden ---
123 maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize );
124
125 // empty paragraphs do not have bullets in ppt
126 if ( !nParagraphSize )
127 {
128 const OUString sNumberingLevel( CREATE_OUSTRING( "NumberingLevel" ) );
129 xProps->setPropertyValue( sNumberingLevel, Any( static_cast< sal_Int16 >( -1 ) ) );
130 }

--- 15 unchanged lines hidden ---