svdoole2.cxx (86e1cf34) svdoole2.cxx (34b4c3b7)
1/**************************************************************
1/**************************************************************
2 *
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
9 * with the License. You may obtain a copy of the License at
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
9 * with the License. You may obtain a copy of the License at
10 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_svx.hxx"
26
27#include <svx/svdoole2.hxx>

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

237
238//--------------------------------------------------------------------
239void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException )
240{
241 // TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
242
243 ::vos::OGuard aGuard( Application::GetSolarMutex() );
244
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_svx.hxx"
26
27#include <svx/svdoole2.hxx>

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

237
238//--------------------------------------------------------------------
239void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException )
240{
241 // TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl
242
243 ::vos::OGuard aGuard( Application::GetSolarMutex() );
244
245 // the code currently makes sence only in case there is no other client
245 // the code currently makes sense only in case there is no other client
246 if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName.equalsAscii("OnVisAreaChanged")
247 && mpObj->GetObjRef().is() && mpObj->GetObjRef()->getClientSite() == uno::Reference< embed::XEmbeddedClient >( this ) )
248 {
249 try
250 {
251 MapUnit aContainerMapUnit( MAP_100TH_MM );
252 uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
253 if ( xParentVis.is() )

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

888
889// -----------------------------------------------------------------------------
890void SdrOle2Obj::SetAspect( sal_Int64 nAspect )
891{
892 xObjRef.SetViewAspect( nAspect );
893}
894
895// -----------------------------------------------------------------------------
246 if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName.equalsAscii("OnVisAreaChanged")
247 && mpObj->GetObjRef().is() && mpObj->GetObjRef()->getClientSite() == uno::Reference< embed::XEmbeddedClient >( this ) )
248 {
249 try
250 {
251 MapUnit aContainerMapUnit( MAP_100TH_MM );
252 uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
253 if ( xParentVis.is() )

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

888
889// -----------------------------------------------------------------------------
890void SdrOle2Obj::SetAspect( sal_Int64 nAspect )
891{
892 xObjRef.SetViewAspect( nAspect );
893}
894
895// -----------------------------------------------------------------------------
896bool SdrOle2Obj::isInplaceActive() const
897{
898 return xObjRef.is() && embed::EmbedStates::INPLACE_ACTIVE == xObjRef->getCurrentState();
896bool SdrOle2Obj::isInplaceActive() const
897{
898 return xObjRef.is() && embed::EmbedStates::INPLACE_ACTIVE == xObjRef->getCurrentState();
899}
900
901// -----------------------------------------------------------------------------
899}
900
901// -----------------------------------------------------------------------------
902bool SdrOle2Obj::isUiActive() const
903{
904 return xObjRef.is() && embed::EmbedStates::UI_ACTIVE == xObjRef->getCurrentState();
902bool SdrOle2Obj::isUiActive() const
903{
904 return xObjRef.is() && embed::EmbedStates::UI_ACTIVE == xObjRef->getCurrentState();
905}
906
907// -----------------------------------------------------------------------------
908
909void SdrOle2Obj::SetGraphic_Impl(const Graphic* pGrf)
910{
911 if ( pGraphic )
912 {

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

1287 if ( pModel && mpImpl->aPersistName.Len() )
1288 {
1289 if( pModel->IsInDestruction() )
1290 {
1291 // TODO/LATER: here we must assume that the destruction of the model is enough to make clear that we will not
1292 // remove the object from the container, even if the DrawingObject itself is not destroyed (unfortunately this
1293 // There is no real need to do the following removing of the object from the container
1294 // in case the model has correct persistence, but in case of problems such a removing
905}
906
907// -----------------------------------------------------------------------------
908
909void SdrOle2Obj::SetGraphic_Impl(const Graphic* pGrf)
910{
911 if ( pGraphic )
912 {

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

1287 if ( pModel && mpImpl->aPersistName.Len() )
1288 {
1289 if( pModel->IsInDestruction() )
1290 {
1291 // TODO/LATER: here we must assume that the destruction of the model is enough to make clear that we will not
1292 // remove the object from the container, even if the DrawingObject itself is not destroyed (unfortunately this
1293 // There is no real need to do the following removing of the object from the container
1294 // in case the model has correct persistence, but in case of problems such a removing
1295 // would make the behaviour of the office more stable
1295 // would make the behavior of the office more stable
1296
1297 comphelper::EmbeddedObjectContainer* pContainer = xObjRef.GetContainer();
1298 if ( pContainer )
1299 {
1300 pContainer->CloseEmbeddedObject( xObjRef.GetObject() );
1301 xObjRef.AssignToContainer( NULL, mpImpl->aPersistName );
1302 }
1303

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

1364 mpImpl->mbConnected = false;
1365}
1366
1367// -----------------------------------------------------------------------------
1368
1369SdrObject* SdrOle2Obj::createSdrGrafObjReplacement(bool bAddText, bool bUseHCGraphic) const
1370{
1371 Graphic* pOLEGraphic = GetGraphic();
1296
1297 comphelper::EmbeddedObjectContainer* pContainer = xObjRef.GetContainer();
1298 if ( pContainer )
1299 {
1300 pContainer->CloseEmbeddedObject( xObjRef.GetObject() );
1301 xObjRef.AssignToContainer( NULL, mpImpl->aPersistName );
1302 }
1303

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

1364 mpImpl->mbConnected = false;
1365}
1366
1367// -----------------------------------------------------------------------------
1368
1369SdrObject* SdrOle2Obj::createSdrGrafObjReplacement(bool bAddText, bool bUseHCGraphic) const
1370{
1371 Graphic* pOLEGraphic = GetGraphic();
1372
1372
1373 if(bUseHCGraphic && Application::GetSettings().GetStyleSettings().GetHighContrastMode())
1374 {
1375 pOLEGraphic = getEmbeddedObjectRef().GetHCGraphic();
1376 }
1377
1378 if(pOLEGraphic)
1379 {
1380 // #i118485# allow creating a SdrGrafObj representation
1381 SdrGrafObj* pClone = new SdrGrafObj(*pOLEGraphic);
1382 pClone->SetModel(GetModel());
1373 if(bUseHCGraphic && Application::GetSettings().GetStyleSettings().GetHighContrastMode())
1374 {
1375 pOLEGraphic = getEmbeddedObjectRef().GetHCGraphic();
1376 }
1377
1378 if(pOLEGraphic)
1379 {
1380 // #i118485# allow creating a SdrGrafObj representation
1381 SdrGrafObj* pClone = new SdrGrafObj(*pOLEGraphic);
1382 pClone->SetModel(GetModel());
1383
1383
1384 // copy transformation
1385 basegfx::B2DHomMatrix aMatrix;
1386 basegfx::B2DPolyPolygon aPolyPolygon;
1387
1388 TRGetBaseGeometry(aMatrix, aPolyPolygon);
1389 pClone->TRSetBaseGeometry(aMatrix, aPolyPolygon);
1390
1391 // copy all attributes to support graphic styles for OLEs
1392 pClone->SetStyleSheet(GetStyleSheet(), false);
1393 pClone->SetMergedItemSet(GetMergedItemSet());
1394
1395 if(bAddText)
1396 {
1397 // #i118485# copy text (Caution! Model needed, as guaranteed in aw080)
1398 OutlinerParaObject* pOPO = GetOutlinerParaObject();
1384 // copy transformation
1385 basegfx::B2DHomMatrix aMatrix;
1386 basegfx::B2DPolyPolygon aPolyPolygon;
1387
1388 TRGetBaseGeometry(aMatrix, aPolyPolygon);
1389 pClone->TRSetBaseGeometry(aMatrix, aPolyPolygon);
1390
1391 // copy all attributes to support graphic styles for OLEs
1392 pClone->SetStyleSheet(GetStyleSheet(), false);
1393 pClone->SetMergedItemSet(GetMergedItemSet());
1394
1395 if(bAddText)
1396 {
1397 // #i118485# copy text (Caution! Model needed, as guaranteed in aw080)
1398 OutlinerParaObject* pOPO = GetOutlinerParaObject();
1399
1399
1400 if(pOPO && GetModel())
1401 {
1402 pClone->NbcSetOutlinerParaObject(new OutlinerParaObject(*pOPO));
1403 }
1404 }
1405
1406 return pClone;
1407 }
1408 else
1409 {
1400 if(pOPO && GetModel())
1401 {
1402 pClone->NbcSetOutlinerParaObject(new OutlinerParaObject(*pOPO));
1403 }
1404 }
1405
1406 return pClone;
1407 }
1408 else
1409 {
1410 // #i100710# pOLEGraphic may be zero (no visualisation available),
1410 // #i100710# pOLEGraphic may be zero (no visualization available),
1411 // so we need to use the OLE replacement graphic
1412 SdrRectObj* pClone = new SdrRectObj(GetSnapRect());
1413 pClone->SetModel(GetModel());
1414
1415 // gray outline
1416 pClone->SetMergedItem(XLineStyleItem(XLINE_SOLID));
1417 const svtools::ColorConfig aColorConfig;
1418 const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
1419 pClone->SetMergedItem(XLineColorItem(String(), aColor.nColor));
1420
1421 // bitmap fill
1422 pClone->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
1411 // so we need to use the OLE replacement graphic
1412 SdrRectObj* pClone = new SdrRectObj(GetSnapRect());
1413 pClone->SetModel(GetModel());
1414
1415 // gray outline
1416 pClone->SetMergedItem(XLineStyleItem(XLINE_SOLID));
1417 const svtools::ColorConfig aColorConfig;
1418 const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
1419 pClone->SetMergedItem(XLineColorItem(String(), aColor.nColor));
1420
1421 // bitmap fill
1422 pClone->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
1423 pClone->SetMergedItem(XFillBitmapItem(String(), Graphic(GetEmtyOLEReplacementBitmap())));
1423 pClone->SetMergedItem(XFillBitmapItem(String(), Graphic(GetEmptyOLEReplacementBitmap())));
1424 pClone->SetMergedItem(XFillBmpTileItem(false));
1425 pClone->SetMergedItem(XFillBmpStretchItem(false));
1426
1427 return pClone;
1428 }
1429}
1430
1431SdrObject* SdrOle2Obj::DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const

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

1501 comphelper::anyToString( cppu::getCaughtException() ),
1502 RTL_TEXTENCODING_UTF8 )).getStr() );
1503 }
1504 }
1505
1506 SdrRectObj::SetModel( pNewModel );
1507
1508 // #i43086#
1424 pClone->SetMergedItem(XFillBmpTileItem(false));
1425 pClone->SetMergedItem(XFillBmpStretchItem(false));
1426
1427 return pClone;
1428 }
1429}
1430
1431SdrObject* SdrOle2Obj::DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const

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

1501 comphelper::anyToString( cppu::getCaughtException() ),
1502 RTL_TEXTENCODING_UTF8 )).getStr() );
1503 }
1504 }
1505
1506 SdrRectObj::SetModel( pNewModel );
1507
1508 // #i43086#
1509 // #i85304 redo the change for charts for the above bugfix, as #i43086# does not ocur anymore
1509 // #i85304 redo the change for charts for the above bugfix, as #i43086# does not occur anymore
1510 //so maybe the ImpSetVisAreaSize call can be removed here completely
1511 //Nevertheless I leave it in for other objects as I am not sure about the side effects when removing now
1512 if( pModel && !pModel->isLocked() && !IsChart() )
1513 ImpSetVisAreaSize();
1514
1515 if( pDestPers && !IsEmptyPresObj() )
1516 {
1517 if ( !pSrcPers || IsEmptyPresObj() )

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

1564
1565void SdrOle2Obj::SetObjRef( const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& rNewObjRef )
1566{
1567 DBG_ASSERT( !rNewObjRef.is() || !xObjRef.GetObject().is(), "SetObjRef called on already initialized object!");
1568 if( rNewObjRef == xObjRef.GetObject() )
1569 return;
1570
1571 // MBA: the caller of the method is responsible to control the old object, it will not be closed here
1510 //so maybe the ImpSetVisAreaSize call can be removed here completely
1511 //Nevertheless I leave it in for other objects as I am not sure about the side effects when removing now
1512 if( pModel && !pModel->isLocked() && !IsChart() )
1513 ImpSetVisAreaSize();
1514
1515 if( pDestPers && !IsEmptyPresObj() )
1516 {
1517 if ( !pSrcPers || IsEmptyPresObj() )

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

1564
1565void SdrOle2Obj::SetObjRef( const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& rNewObjRef )
1566{
1567 DBG_ASSERT( !rNewObjRef.is() || !xObjRef.GetObject().is(), "SetObjRef called on already initialized object!");
1568 if( rNewObjRef == xObjRef.GetObject() )
1569 return;
1570
1571 // MBA: the caller of the method is responsible to control the old object, it will not be closed here
1572 // Otherwise WW8 import crashes because it tranfers control to OLENode by this method
1572 // Otherwise WW8 import crashes because it transfers control to OLENode by this method
1573 if ( xObjRef.GetObject().is() )
1574 xObjRef.Lock( sal_False );
1575
1576 // MBA: avoid removal of object in Disconnect! It is definitely a HACK to call SetObjRef(0)!
1577 // This call will try to close the objects; so if anybody else wants to keep it, it must be locked by a CloseListener
1578 xObjRef.Clear();
1579
1580 if ( mpImpl->mbConnected )

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

1611
1612// -----------------------------------------------------------------------------
1613
1614SdrObject* SdrOle2Obj::getFullDragClone() const
1615{
1616 // special handling for OLE. The default handling works, but is too
1617 // slow when the whole OLE needs to be cloned. Get the Metafile and
1618 // create a graphic object with it
1573 if ( xObjRef.GetObject().is() )
1574 xObjRef.Lock( sal_False );
1575
1576 // MBA: avoid removal of object in Disconnect! It is definitely a HACK to call SetObjRef(0)!
1577 // This call will try to close the objects; so if anybody else wants to keep it, it must be locked by a CloseListener
1578 xObjRef.Clear();
1579
1580 if ( mpImpl->mbConnected )

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

1611
1612// -----------------------------------------------------------------------------
1613
1614SdrObject* SdrOle2Obj::getFullDragClone() const
1615{
1616 // special handling for OLE. The default handling works, but is too
1617 // slow when the whole OLE needs to be cloned. Get the Metafile and
1618 // create a graphic object with it
1619
1619
1620 // #i118485# use central replacement generator
1621 return createSdrGrafObjReplacement(false, true);
1622}
1623
1624// -----------------------------------------------------------------------------
1625
1626void SdrOle2Obj::SetPersistName( const String& rPersistName )
1627{

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

1772 }
1773 catch( embed::NoVisualAreaSizeException& )
1774 {
1775 // objects my not have visual areas
1776 }
1777 catch( uno::Exception& e )
1778 {
1779 (void)e;
1620 // #i118485# use central replacement generator
1621 return createSdrGrafObjReplacement(false, true);
1622}
1623
1624// -----------------------------------------------------------------------------
1625
1626void SdrOle2Obj::SetPersistName( const String& rPersistName )
1627{

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

1772 }
1773 catch( embed::NoVisualAreaSizeException& )
1774 {
1775 // objects my not have visual areas
1776 }
1777 catch( uno::Exception& e )
1778 {
1779 (void)e;
1780 DBG_ERROR( "SdrOle2Obj::operator=(), unexcpected exception caught!" );
1780 DBG_ERROR( "SdrOle2Obj::operator=(), unexpected exception caught!" );
1781 }
1782 } */
1783 }
1784 }
1785 }
1786}
1787
1788// -----------------------------------------------------------------------------

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

1868 // make the new object area known to the client
1869 // compared to the "else" branch aRect might have been changed by the object and no additional scaling was applied
1870 // OJ: WHY this -> OSL_ASSERT( pClient );
1871 if( pClient )
1872 pClient->SetObjArea(aRect);
1873
1874 // we need a new replacement image as the object has resized itself
1875
1781 }
1782 } */
1783 }
1784 }
1785 }
1786}
1787
1788// -----------------------------------------------------------------------------

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

1868 // make the new object area known to the client
1869 // compared to the "else" branch aRect might have been changed by the object and no additional scaling was applied
1870 // OJ: WHY this -> OSL_ASSERT( pClient );
1871 if( pClient )
1872 pClient->SetObjArea(aRect);
1873
1874 // we need a new replacement image as the object has resized itself
1875
1876 //#i79578# don't request a new replacement image for charts to often
1877 //a chart sends a modified call to the framework if it was changed
1878 //thus the replacement update is already handled there
1876 // #i79578# don't request a new replacement image for charts to often
1877 // a chart sends a modified call to the framework if it was changed
1878 // thus the replacement update is already handled there
1879 if( !IsChart() )
1880 xObjRef.UpdateReplacement();
1881 }
1882 else
1883 {
1884 // The object isn't active and does not want to resize itself so the changed object area size
1885 // will be reflected in a changed object scaling
1886 Fraction aScaleWidth;

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

1898 mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
1899 }
1900 }
1901 }
1902 }
1903 else if( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
1904 svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() ) )
1905 {
1879 if( !IsChart() )
1880 xObjRef.UpdateReplacement();
1881 }
1882 else
1883 {
1884 // The object isn't active and does not want to resize itself so the changed object area size
1885 // will be reflected in a changed object scaling
1886 Fraction aScaleWidth;

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

1898 mpImpl->pLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
1899 }
1900 }
1901 }
1902 }
1903 else if( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
1904 svt::EmbeddedObjectRef::TryRunningState( xObjRef.GetObject() ) )
1905 {
1906 //also handle not sfx based ole objects e.g. charts
1907 //#i83860# resizing charts in impress distorts fonts
1906 // also handle not sfx based ole objects e.g. charts
1907 // #i83860# resizing charts in Impress distorts fonts
1908 uno::Reference< embed::XVisualObject > xVisualObject( this->getXModel(), uno::UNO_QUERY );
1909 if( xVisualObject.is() )
1910 {
1911 MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObjRef->getMapUnit( GetAspect() ) );
1912 Point aTL( aRect.TopLeft() );
1913 Point aBR( aRect.BottomRight() );
1914 Point aTL2( OutputDevice::LogicToLogic( aTL, pModel->GetScaleUnit(), aMapUnit) );
1915 Point aBR2( OutputDevice::LogicToLogic( aBR, pModel->GetScaleUnit(), aMapUnit) );

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

1942 ImpSetVisAreaSize();
1943}
1944
1945// -----------------------------------------------------------------------------
1946
1947void SdrOle2Obj::SetGeoData(const SdrObjGeoData& rGeo)
1948{
1949 SdrRectObj::SetGeoData(rGeo);
1908 uno::Reference< embed::XVisualObject > xVisualObject( this->getXModel(), uno::UNO_QUERY );
1909 if( xVisualObject.is() )
1910 {
1911 MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObjRef->getMapUnit( GetAspect() ) );
1912 Point aTL( aRect.TopLeft() );
1913 Point aBR( aRect.BottomRight() );
1914 Point aTL2( OutputDevice::LogicToLogic( aTL, pModel->GetScaleUnit(), aMapUnit) );
1915 Point aBR2( OutputDevice::LogicToLogic( aBR, pModel->GetScaleUnit(), aMapUnit) );

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

1942 ImpSetVisAreaSize();
1943}
1944
1945// -----------------------------------------------------------------------------
1946
1947void SdrOle2Obj::SetGeoData(const SdrObjGeoData& rGeo)
1948{
1949 SdrRectObj::SetGeoData(rGeo);
1950
1950
1951 if( pModel && !pModel->isLocked() )
1952 ImpSetVisAreaSize();
1953}
1954
1955// -----------------------------------------------------------------------------
1956
1957void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
1958{
1959 SdrRectObj::NbcSetSnapRect(rRect);
1960
1961 if( pModel && !pModel->isLocked() )
1962 ImpSetVisAreaSize();
1963
1964 if ( xObjRef.is() && IsChart() )
1965 {
1951 if( pModel && !pModel->isLocked() )
1952 ImpSetVisAreaSize();
1953}
1954
1955// -----------------------------------------------------------------------------
1956
1957void SdrOle2Obj::NbcSetSnapRect(const Rectangle& rRect)
1958{
1959 SdrRectObj::NbcSetSnapRect(rRect);
1960
1961 if( pModel && !pModel->isLocked() )
1962 ImpSetVisAreaSize();
1963
1964 if ( xObjRef.is() && IsChart() )
1965 {
1966 //#i103460# charts do not necessaryly have an own size within ODF files,
1966 //#i103460# charts do not necessarily have an own size within ODF files,
1967 //for this case they need to use the size settings from the surrounding frame,
1968 //which is made available with this method as there is no other way
1969 xObjRef.SetDefaultSizeForChart( Size( rRect.GetWidth(), rRect.GetHeight() ) );
1970 }
1971}
1972
1973// -----------------------------------------------------------------------------
1974
1975void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
1976{
1977 SdrRectObj::NbcSetLogicRect(rRect);
1967 //for this case they need to use the size settings from the surrounding frame,
1968 //which is made available with this method as there is no other way
1969 xObjRef.SetDefaultSizeForChart( Size( rRect.GetWidth(), rRect.GetHeight() ) );
1970 }
1971}
1972
1973// -----------------------------------------------------------------------------
1974
1975void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
1976{
1977 SdrRectObj::NbcSetLogicRect(rRect);
1978
1978
1979 if( pModel && !pModel->isLocked() )
1980 ImpSetVisAreaSize();
1981}
1982
1983Graphic* SdrOle2Obj::GetGraphic() const
1984{
1985 if ( xObjRef.is() )
1986 return xObjRef.GetGraphic();

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

2304 return sal_True;
2305 } catch( uno::Exception& )
2306 {}
2307 }
2308
2309 }
2310
2311 return sal_False;
1979 if( pModel && !pModel->isLocked() )
1980 ImpSetVisAreaSize();
1981}
1982
1983Graphic* SdrOle2Obj::GetGraphic() const
1984{
1985 if ( xObjRef.is() )
1986 return xObjRef.GetGraphic();

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

2304 return sal_True;
2305 } catch( uno::Exception& )
2306 {}
2307 }
2308
2309 }
2310
2311 return sal_False;
2312 }
2312 }
2313
2314 return sal_True;
2315}
2316
2317//////////////////////////////////////////////////////////////////////////////
2318
2313
2314 return sal_True;
2315}
2316
2317//////////////////////////////////////////////////////////////////////////////
2318
2319Bitmap SdrOle2Obj::GetEmtyOLEReplacementBitmap()
2319Bitmap SdrOle2Obj::GetEmptyOLEReplacementBitmap()
2320{
2321 return Bitmap(ResId(BMP_SVXOLEOBJ, *ImpGetResMgr()));
2322}
2323
2324//////////////////////////////////////////////////////////////////////////////
2325
2326void SdrOle2Obj::SetWindow(const com::sun::star::uno::Reference < com::sun::star::awt::XWindow >& _xWindow)
2327{
2328 if ( xObjRef.is() && mpImpl->pLightClient )
2329 {
2330 mpImpl->pLightClient->setWindow(_xWindow);
2331 }
2332}
2333
2320{
2321 return Bitmap(ResId(BMP_SVXOLEOBJ, *ImpGetResMgr()));
2322}
2323
2324//////////////////////////////////////////////////////////////////////////////
2325
2326void SdrOle2Obj::SetWindow(const com::sun::star::uno::Reference < com::sun::star::awt::XWindow >& _xWindow)
2327{
2328 if ( xObjRef.is() && mpImpl->pLightClient )
2329 {
2330 mpImpl->pLightClient->setWindow(_xWindow);
2331 }
2332}
2333
2334//////////////////////////////////////////////////////////////////////////////
2335// eof
2334/* vim: set noet sw=4 ts=4: */