unoshape.cxx (a9ab3c7b) unoshape.cxx (28cc6868)
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

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

1308//----------------------------------------------------------------------
1309void SAL_CALL SvxShape::setSize( const awt::Size& rSize )
1310 throw(beans::PropertyVetoException, uno::RuntimeException)
1311{
1312 OGuard aGuard( Application::GetSolarMutex() );
1313
1314 if( mpObj.is() && mpModel)
1315 {
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

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

1308//----------------------------------------------------------------------
1309void SAL_CALL SvxShape::setSize( const awt::Size& rSize )
1310 throw(beans::PropertyVetoException, uno::RuntimeException)
1311{
1312 OGuard aGuard( Application::GetSolarMutex() );
1313
1314 if( mpObj.is() && mpModel)
1315 {
1316 Rectangle aRect( svx_getLogicRectHack(mpObj.get()) );
1316 // #123539# optimization for 3D chart object generation: do not use UNO
1317 // API commmands to get the range, this is too expensive since for 3D
1318 // scenes it may recalculate the whole scene since in AOO this depends
1319 // on the contained geometry (layouted to show all content)
1320 const bool b3DConstruction(dynamic_cast< E3dObject* >(mpObj.get()) && mpModel->isLocked());
1321 Rectangle aRect(
1322 b3DConstruction ?
1323 Rectangle(maPosition.X, maPosition.Y, maSize.Width, maSize.Height) :
1324 svx_getLogicRectHack(mpObj.get()) );
1317 Size aLocalSize( rSize.Width, rSize.Height );
1318 ForceMetricToItemPoolMetric(aLocalSize);
1319
1320 if(mpObj->GetObjInventor() == SdrInventor && mpObj->GetObjIdentifier() == OBJ_MEASURE )
1321 {
1322 Fraction aWdt(aLocalSize.Width(),aRect.Right()-aRect.Left());
1323 Fraction aHgt(aLocalSize.Height(),aRect.Bottom()-aRect.Top());
1324 Point aPt = mpObj->GetSnapRect().TopLeft();

--- 3164 unchanged lines hidden ---
1325 Size aLocalSize( rSize.Width, rSize.Height );
1326 ForceMetricToItemPoolMetric(aLocalSize);
1327
1328 if(mpObj->GetObjInventor() == SdrInventor && mpObj->GetObjIdentifier() == OBJ_MEASURE )
1329 {
1330 Fraction aWdt(aLocalSize.Width(),aRect.Right()-aRect.Left());
1331 Fraction aHgt(aLocalSize.Height(),aRect.Bottom()-aRect.Top());
1332 Point aPt = mpObj->GetSnapRect().TopLeft();

--- 3164 unchanged lines hidden ---