Tag: cws_src680_titles02
User: oj      
Date: 2007-12-17 15:25:07+0000
Modified:
   dba/reportdesign/source/ui/inc/ReportController.hxx
   dba/reportdesign/source/ui/report/ReportController.cxx

Log:
 #i45617# return correct report titles as well

File Changes:

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

File [changed]: ReportController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/ReportController.hxx?r1=1.3.58.1&r2=1.3.58.2
Delta lines:  +6 -3
-------------------
--- ReportController.hxx        2007-12-10 11:36:17+0000        1.3.58.1
+++ ReportController.hxx        2007-12-17 15:25:04+0000        1.3.58.2
@@ -6,9 +6,9 @@
  *
  *  $RCSfile: ReportController.hxx,v $
  *
- *  $Revision: 1.3.58.1 $
+ *  $Revision: 1.3.58.2 $
  *
- *  last change: $Author: oj $ $Date: 2007/12/10 11:36:17 $
+ *  last change: $Author: oj $ $Date: 2007/12/17 15:25:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -390,6 +390,9 @@
         virtual ::sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& 
xSelection ) throw (::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::uno::RuntimeException);
         virtual ::com::sun::star::uno::Any SAL_CALL getSelection(  ) throw 
(::com::sun::star::uno::RuntimeException);
 
+        // XTitle
+        virtual ::rtl::OUString SAL_CALL getTitle(  ) throw 
(::com::sun::star::uno::RuntimeException);
+
                /** returns the current position of the splitter
                *
                * \return 
@@ -426,7 +429,7 @@
         */
         ::boost::shared_ptr<rptui::OReportModel> getSdrModel();
 
-       protected:
+       private:
                virtual void onLoadedMenu( const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& 
_xLayoutManager );
                virtual void impl_initialize( );
        };

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

File [changed]: ReportController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportController.cxx?r1=1.6.6.1&r2=1.6.6.2
Delta lines:  +17 -16
---------------------
--- ReportController.cxx        2007-12-10 11:36:17+0000        1.6.6.1
+++ ReportController.cxx        2007-12-17 15:25:05+0000        1.6.6.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ReportController.cxx,v $
  *
- *  $Revision: 1.6.6.1 $
+ *  $Revision: 1.6.6.2 $
  *
- *  last change: $Author: oj $ $Date: 2007/12/10 11:36:17 $
+ *  last change: $Author: oj $ $Date: 2007/12/17 15:25:05 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1748,14 +1748,6 @@
         if ( rIni.get_ensureType(static_cast< 
::rtl::OUString>(PROPERTY_ACTIVECONNECTION),xConn) && xConn.is() )
                        initializeConnection( xConn );
 
-        rIni.get_ensureType(static_cast< 
::rtl::OUString>(PROPERTY_REPORTNAME),m_sName);
-        if ( !m_sName.getLength() )
-        {
-            static const ::rtl::OUString 
s_sDocumentTitle(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle"));
-            rIni.get_ensureType(s_sDocumentTitle,m_sName);
-        }
-
-
                sal_Bool bFirstTry = sal_False;
                if (!isConnected())
                {       // whoever instantiated us did not give us a connection 
to share. Okay, create an own one
@@ -1784,7 +1776,7 @@
        {
                if ( m_xReportDefinition.is() )
                {
-                       m_sName = m_xReportDefinition->getName();
+                       //m_sName = m_xReportDefinition->getName();
                        getView()->initialize();        // show the windows and 
fill with our informations
                        getUndoMgr()->Clear();          // clear all undo redo 
things
             getSdrModel();
@@ -2452,11 +2444,7 @@
                                                if (_bSaveAs && !bNew)
                                                        sDefault = m_sName;
                                                else
-                                               {
-                                                       String aName = 
String(ModuleRes(STR_RPT_TITLE));
-                                                       aName = 
aName.GetToken(0,' ');
-                                                       sDefault = 
String(::dbtools::createUniqueName(xNames.get(),aName));
-                                               }
+                                                       sDefault = getTitle();
 
                         String aGcc3WorkaroundTemporary( 
ModuleRes(STR_RPT_LABEL));
                         const ::rtl::OUString sLabel(aGcc3WorkaroundTemporary);
@@ -4001,3 +3989,16 @@
     return m_xFormatter;
 }
 // 
-----------------------------------------------------------------------------
+// css.frame.XTitle
+::rtl::OUString SAL_CALL OReportController::getTitle()
+    throw (uno::RuntimeException)
+{
+    vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+       ::osl::MutexGuard aGuard(m_aMutex);
+
+    uno::Reference< frame::XTitle> 
xTitle(m_xReportDefinition,uno::UNO_QUERY_THROW);
+    
+    return xTitle->getTitle ();
+}
+// 
-----------------------------------------------------------------------------
+// 
-----------------------------------------------------------------------------




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

Reply via email to