View | Details | Raw Unified | Return to issue 119457
Collapse All | Expand All

(-)oox/source/drawingml/chart/titleconverter.cxx (-2 / +18 lines)
Lines 35-40 Link Here
35
#include "oox/drawingml/chart/datasourceconverter.hxx"
35
#include "oox/drawingml/chart/datasourceconverter.hxx"
36
#include "oox/drawingml/chart/titlemodel.hxx"
36
#include "oox/drawingml/chart/titlemodel.hxx"
37
#include "oox/helper/containerhelper.hxx"
37
#include "oox/helper/containerhelper.hxx"
38
#include <com/sun/star/chart2/RelativePosition.hpp>
39
#include <com/sun/star/drawing/Alignment.hpp>
38
40
39
namespace oox {
41
namespace oox {
40
namespace drawingml {
42
namespace drawingml {
Lines 49-54 Link Here
49
51
50
using ::oox::core::XmlFilterBase;
52
using ::oox::core::XmlFilterBase;
51
using ::rtl::OUString;
53
using ::rtl::OUString;
54
using namespace ::com::sun::star::drawing;
52
55
53
// ============================================================================
56
// ============================================================================
54
57
Lines 209-214 Link Here
209
        // predefined legend position and expansion
212
        // predefined legend position and expansion
210
        cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_CUSTOM;
213
        cssc2::LegendPosition eLegendPos = cssc2::LegendPosition_CUSTOM;
211
        cssc::ChartLegendExpansion eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
214
        cssc::ChartLegendExpansion eLegendExpand = cssc::ChartLegendExpansion_CUSTOM;
215
		RelativePosition eRelPos;
212
        switch( mrModel.mnPosition )
216
        switch( mrModel.mnPosition )
213
        {
217
        {
214
            case XML_l:
218
            case XML_l:
Lines 216-224 Link Here
216
                eLegendExpand = cssc::ChartLegendExpansion_HIGH;
220
                eLegendExpand = cssc::ChartLegendExpansion_HIGH;
217
            break;
221
            break;
218
            case XML_r:
222
            case XML_r:
223
		  eLegendPos = cssc2::LegendPosition_LINE_END;
224
                eLegendExpand = cssc::ChartLegendExpansion_HIGH;
225
                break;
219
            case XML_tr:    // top-right not supported
226
            case XML_tr:    // top-right not supported
220
                eLegendPos = cssc2::LegendPosition_LINE_END;
227
                
221
                eLegendExpand = cssc::ChartLegendExpansion_HIGH;
228
				eLegendPos = LegendPosition_CUSTOM;
229
				eRelPos.Primary = 1;
230
				eRelPos.Secondary =0;
231
				eRelPos.Anchor = Alignment_TOP_RIGHT;
232
222
            break;
233
            break;
223
            case XML_t:
234
            case XML_t:
224
                eLegendPos = cssc2::LegendPosition_PAGE_START;
235
                eLegendPos = cssc2::LegendPosition_PAGE_START;
Lines 242-247 Link Here
242
        // set position and expansion properties
253
        // set position and expansion properties
243
        aPropSet.setProperty( PROP_AnchorPosition, eLegendPos );
254
        aPropSet.setProperty( PROP_AnchorPosition, eLegendPos );
244
        aPropSet.setProperty( PROP_Expansion, eLegendExpand );
255
        aPropSet.setProperty( PROP_Expansion, eLegendExpand );
256
257
		if(eLegendPos == LegendPosition_CUSTOM)
258
		{
259
			aPropSet.setProperty( PROP_RelativePosition , makeAny(eRelPos));//CREATE_OUSTRING( "RelativePosition" )
260
		}
245
    }
261
    }
246
    catch( Exception& )
262
    catch( Exception& )
247
    {
263
    {

Return to issue 119457