User: hr      
Date: 2007-08-02 14:40:26+0000
Modified:
   dba/reportdesign/source/ui/report/ReportSection.cxx

Log:
 INTEGRATION: CWS rpt23fix01 (1.2.2); FILE MERGED
 2007/07/16 12:25:36 lla 1.2.2.6: #i77268# ServiceFactory no longer need in 
getOverlappedControlColor()
 2007/07/16 12:11:04 oj 1.2.2.5: remove unused var
 2007/07/16 12:06:44 oj 1.2.2.4: #i77411# set help id
 2007/07/16 10:24:02 lla 1.2.2.3: #i77268# visualisation for DnD
 2007/07/16 07:49:01 lla 1.2.2.2: #77986# toolbar fix
 2007/07/11 09:58:18 oj 1.2.2.1: #i78520# allowd to add control with keyboard

File Changes:

Directory: /dba/reportdesign/source/ui/report/
==============================================

File [changed]: ReportSection.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportSection.cxx?r1=1.2&r2=1.3
Delta lines:  +35 -13
---------------------
--- ReportSection.cxx   2007-07-09 11:56:32+0000        1.2
+++ ReportSection.cxx   2007-08-02 14:40:24+0000        1.3
@@ -112,11 +112,23 @@
 #include <svtools/itempool.hxx>
 #endif
 #include <svx/unoshape.hxx>
+#include <unotools/confignode.hxx>
+#include <svtools/extcolorcfg.hxx>
+
 // 
=============================================================================
 namespace rptui
 {
 // 
=============================================================================
 using namespace ::com::sun::star;
+// 
-----------------------------------------------------------------------------
+
+sal_Int32 lcl_getOverlappedControlColor(/*const uno::Reference 
<lang::XMultiServiceFactory> _rxFactory*/)
+{
+       svtools::ExtendedColorConfig aConfig;
+    // sal_Int32 nColor = 
aConfig.GetColorValue(rtl::OUString::createFromAscii("ReportDesigner"), 
rtl::OUString::createFromAscii("OverlappedControl")).nColor;
+    sal_Int32 nColor = 
aConfig.GetColorValue(rtl::OUString::createFromAscii("ReportDesigner"), 
DBOVERLAPPEDCONTROL).nColor;
+    return nColor;
+}
 
//------------------------------------------------------------------------------
 DBG_NAME( rpt_OReportSection )
 OReportSection::OReportSection(OViewsWindow* _pParent,const uno::Reference< 
report::XSection >& _xSection) 
@@ -136,12 +148,13 @@
 {
        DBG_CTOR( rpt_OReportSection,NULL);
     EnableChildTransparentMode();
-       SetUniqueId(HID_REPORTSECTION);
+       SetHelpId(HID_REPORTSECTION);
        SetMapMode( MapMode( MAP_100TH_MM ) );
        m_pFunc.reset(new DlgEdFuncSelect( this ));
        try
        {
                fill();
+            m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( 
/* m_pParent->getView()->getReportView()->getController()->getORB() */ ) );
        }
        catch(uno::Exception&)
        {
@@ -348,10 +361,14 @@
        if ( eNewMode != m_eMode )
        {
                if ( eNewMode == RPTUI_INSERT )
+               {
                        m_pFunc.reset(new DlgEdFuncInsert( this ));
+               }
                else
+               {
                        m_pFunc.reset(new DlgEdFuncSelect( this ));
-
+               }
+        m_pFunc->setOverlappedControlColor(lcl_getOverlappedControlColor( /* 
m_pParent->getView()->getReportView()->getController()->getORB()  */ ) );
         m_pModel->SetReadOnly(eNewMode == RPTUI_READONLY);
         m_eMode = eNewMode;
        }       
@@ -552,6 +569,11 @@
     SdrObject* pObj = m_pView->GetCreateObj();//rMarkList.GetMark(0)->GetObj();
     if ( !pObj )
         return;
+    createDefault(_sType,pObj);
+}
+// 
-----------------------------------------------------------------------------
+void OReportSection::createDefault(const ::rtl::OUString& _sType,SdrObject* 
_pObj)
+{
     sal_Bool bAttributesAppliedFromGallery = sal_False;
 
        if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) )
@@ -574,7 +596,7 @@
                                                if( pSourceObj )
                                                {
                                                        const SfxItemSet& 
rSource = pSourceObj->GetMergedItemSet();
-                                                       SfxItemSet aDest( 
pObj->GetModel()->GetItemPool(),                              // ranges from 
SdrAttrObj
+                                                       SfxItemSet aDest( 
_pObj->GetModel()->GetItemPool(),                             // ranges from 
SdrAttrObj
                                                        SDRATTR_START, 
SDRATTR_SHADOW_LAST,
                                                        SDRATTR_MISC_FIRST, 
SDRATTR_MISC_LAST,
                                                        SDRATTR_TEXTDIRECTION, 
SDRATTR_TEXTDIRECTION,
@@ -589,12 +611,12 @@
                                                        // end
                                                        0, 0);
                                                        aDest.Set( rSource );
-                                                       pObj->SetMergedItemSet( 
aDest );
+                                                       
_pObj->SetMergedItemSet( aDest );
                                                        sal_Int32 nAngle = 
pSourceObj->GetRotateAngle();
                                                        if ( nAngle )
                                                        {
                                                                double a = 
nAngle * F_PI18000;
-                                                               
pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle, sin( a ), cos( a ) );
+                                                               
_pObj->NbcRotate( _pObj->GetSnapRect().Center(), nAngle, sin( a ), cos( a ) );
                                                        }
                                                        
bAttributesAppliedFromGallery = sal_True;
                                                }
@@ -606,11 +628,11 @@
        }
        if ( !bAttributesAppliedFromGallery )
        {
-               pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER 
,ITEMID_ADJUST) );
-               pObj->SetMergedItem( SdrTextVertAdjustItem( 
SDRTEXTVERTADJUST_CENTER ) );
-               pObj->SetMergedItem( SdrTextHorzAdjustItem( 
SDRTEXTHORZADJUST_BLOCK ) );
-               pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) );
-               ((SdrObjCustomShape*)pObj)->MergeDefaultAttributes( &_sType );
+               _pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER 
,ITEMID_ADJUST) );
+               _pObj->SetMergedItem( SdrTextVertAdjustItem( 
SDRTEXTVERTADJUST_CENTER ) );
+               _pObj->SetMergedItem( SdrTextHorzAdjustItem( 
SDRTEXTHORZADJUST_BLOCK ) );
+               _pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) );
+               ((SdrObjCustomShape*)_pObj)->MergeDefaultAttributes( &_sType );
        }
 }
 // 
-----------------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to