You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2014/07/10 15:57:47 UTC

svn commit: r1609460 - in /openoffice/branches/AOO410/main/sd: ./ source/ui/unoidl/unopage.cxx

Author: alg
Date: Thu Jul 10 13:57:46 2014
New Revision: 1609460

URL: http://svn.apache.org/r1609460
Log:
i119287 corrected default style for draw objects created using UNO API

Modified:
    openoffice/branches/AOO410/main/sd/   (props changed)
    openoffice/branches/AOO410/main/sd/source/ui/unoidl/unopage.cxx

Propchange: openoffice/branches/AOO410/main/sd/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Jul 10 13:57:46 2014
@@ -0,0 +1,5 @@
+/openoffice/branches/AOO400/main/sd:1503684
+/openoffice/branches/ia2/main/sd:1417739-1541842
+/openoffice/branches/ooxml-osba/main/sd:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283
+/openoffice/branches/rejuvenate01/main/sd:1480411,1534063,1534098,1536312,1549902,1560617
+/openoffice/trunk/main/sd:1571617,1571677,1572569,1572577,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585261,1586242,1586249,1586583,1587468,1589050,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602823,1602850,1603416,1603897,1609118

Modified: openoffice/branches/AOO410/main/sd/source/ui/unoidl/unopage.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/sd/source/ui/unoidl/unopage.cxx?rev=1609460&r1=1609459&r2=1609460&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/sd/source/ui/unoidl/unopage.cxx (original)
+++ openoffice/branches/AOO410/main/sd/source/ui/unoidl/unopage.cxx Thu Jul 10 13:57:46 2014
@@ -67,11 +67,7 @@
 #include <svx/svdview.hxx>
 #include "misc.hxx"
 #include "View.hxx"
-#ifndef SVX_LIGHT
-#ifndef SD_DRAW_DOC_SHELL_HXX
 #include "DrawDocShell.hxx"
-#endif
-#endif
 #include "ViewShell.hxx"
 #include "DrawViewShell.hxx"
 #include "unoobj.hxx"
@@ -80,6 +76,7 @@
 #include "unopback.hxx"
 #include "unohelp.hxx"
 #include <vcl/dibtools.hxx>
+#include <svx/svdograf.hxx>
 
 using ::com::sun::star::animations::XAnimationNode;
 using ::com::sun::star::animations::XAnimationNodeSupplier;
@@ -431,9 +428,24 @@ SdrObject * SdGenericDrawPage::_CreateSd
         SdrObject* pObj = SvxFmDrawPage::_CreateSdrObject( xShape );
         if( pObj && ( (pObj->GetObjInventor() != SdrInventor) || (pObj->GetObjIdentifier() != OBJ_PAGE) ) )
         {
-			SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
+            SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
             if( pDoc )
-                pObj->NbcSetStyleSheet( pDoc->GetDefaultStyleSheet(), sal_True );
+            {
+                // #119287# similar to the code in the SdrObject methods the graphic and ole
+                // SdrObjects need another default style than the rest, see task. Adding here, too.
+                // TTTT: Same as for #119287#: Can be removed in branch aw080 again
+                const bool bIsSdrGrafObj(0 != dynamic_cast< SdrGrafObj* >(pObj));
+                const bool bIsSdrOle2Obj(0 != dynamic_cast< SdrOle2Obj* >(pObj));
+
+                if(bIsSdrGrafObj || bIsSdrOle2Obj)
+                {
+                    pObj->NbcSetStyleSheet(pDoc->GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(), sal_True);
+                }
+                else
+                {
+                    pObj->NbcSetStyleSheet(pDoc->GetDefaultStyleSheet(), sal_True);
+                }
+            }
         }
 		return pObj;
     }