Tag: cws_src680_reportdesign02
User: oj      
Date: 2007-11-07 08:55:06+0000
Modified:
   dba/reportdesign/source/ui/inc/ReportController.hxx
   dba/reportdesign/source/ui/report/ReportController.cxx

Log:
 #i77751# remove dosave

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&r2=1.3.36.1
Delta lines:  +3 -10
--------------------
--- ReportController.hxx        2007-08-02 14:37:02+0000        1.3
+++ ReportController.hxx        2007-11-07 08:55:03+0000        1.3.36.1
@@ -6,9 +6,9 @@
  *
  *  $RCSfile: ReportController.hxx,v $
  *
- *  $Revision: 1.3 $
+ *  $Revision: 1.3.36.1 $
  *
- *  last change: $Author: hr $ $Date: 2007/08/02 14:37:02 $
+ *  last change: $Author: oj $ $Date: 2007/11/07 08:55:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -202,11 +202,6 @@
         */
         void listen(const bool _bAdd);
 
-               /** saves the report definition
-                       @param  _bSaveAs if <TRUE/> then the report will be 
saved as a new one.
-               */
-               sal_Bool doSaveDoc(sal_Bool _bSaveAs);
-
                /** opens the common page dialog
                */
                void openPageDialog(const ::com::sun::star::uno::Reference< 
::com::sun::star::report::XSection>& _xSection);
@@ -308,8 +303,6 @@
                DECL_LINK( OnInvalidateClipboard, void* );
                DECL_LINK( OnClipboardChanged, void* );
         DECL_LINK( OnExecuteReport, void* );
-        DECL_LINK( OnSave, void* );
-        DECL_LINK( OnSaveAs, void* );
         DECL_LINK( OnOpenHelpAgent, void* );
                short saveModified();
                // all the features which should be handled by this class

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.4.36.3&r2=1.4.36.4
Delta lines:  +2 -105
---------------------
--- ReportController.cxx        2007-11-05 13:07:28+0000        1.4.36.3
+++ ReportController.cxx        2007-11-07 08:55:03+0000        1.4.36.4
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ReportController.cxx,v $
  *
- *  $Revision: 1.4.36.3 $
+ *  $Revision: 1.4.36.4 $
  *
- *  last change: $Author: oj $ $Date: 2007/11/05 13:07:28 $
+ *  last change: $Author: oj $ $Date: 2007/11/07 08:55:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1675,12 +1675,6 @@
                        {
                        }
                        break;
-               case SID_SAVEASDOC:
-            getView()->PostUserEvent(LINK(this, OReportController,OnSaveAs));
-                       break;
-               case SID_SAVEDOC:
-            getView()->PostUserEvent(LINK(this, OReportController,OnSave));
-                       break;
                case SID_EDITDOC:
                        if(isEditable())
                        { // the state should be changed to not editable
@@ -2421,89 +2415,6 @@
        return 0L;
 }
 // 
-----------------------------------------------------------------------------
-sal_Bool OReportController::doSaveDoc(sal_Bool _bSaveAs)
-{
-       WaitObject aWO(getView());
-
-       sal_Bool bRet = sal_False;
-       if ( m_xReportDefinition.is() )
-               try
-               {
-            if ( !_bSaveAs )
-            {
-                           uno::Reference< embed::XStorage > xStorage = 
m_xReportDefinition->getDocumentStorage();
-                           OSL_ENSURE(xStorage.is(),"No Storage available!");
-                           if ( xStorage.is() )
-                           {
-                                   
m_xReportDefinition->storeToStorage(xStorage,m_xReportDefinition->getArgs());
-                           }
-            }
-
-
-                       uno::Reference< sdb::XDocumentDataSource> 
xDocumentDataSource(getDataSource(),UNO_QUERY);
-                       if ( xDocumentDataSource.is() )
-                       {
-                               uno::Reference< sdb::XReportDocumentsSupplier> 
xSup(xDocumentDataSource->getDatabaseDocument(),UNO_QUERY);
-                               if ( xSup.is() )
-                               {
-                                       uno::Reference< 
container::XNameContainer> xNames(xSup->getReportDocuments(),uno::UNO_QUERY);
-                                       OSL_ENSURE(xNames.is(),"Who blows my 
XNameAccess up! -> GPF");
-                                       sal_Bool bNew = (0 == 
m_sName.getLength());
-                                       bNew = bNew || _bSaveAs || (xNames.is() 
&& !xNames->hasByName(m_sName));
-                                       // first we need a name for our query 
so ask the user
-                                       if ( bNew )
-                                       {
-                        ::rtl::OUString sDefault;
-                                               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));
-                                               }
-
-                        String aGcc3WorkaroundTemporary( 
ModuleRes(STR_RPT_LABEL));
-                        const ::rtl::OUString sLabel(aGcc3WorkaroundTemporary);
-                        Sequence< Any > aArgs(4);
-                        Reference< awt::XWindow> xWindow = 
getTopMostContainerWindow();
-                               if ( !xWindow.is() )
-                               {
-                                       xWindow = 
VCLUnoHelper::GetInterface(getView()->Window::GetParent());
-                               }
-                               // the parent window
-                        aArgs[0] <<= beans::NamedValue( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")),makeAny(xWindow));
-                        aArgs[1] <<= beans::NamedValue( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultValue")),makeAny(sDefault));
-                        aArgs[2] <<= beans::NamedValue( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")),makeAny(sLabel));
-                        aArgs[3] <<= beans::NamedValue( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HierarchicalNameAccess")),makeAny(uno::Reference<
 container::XHierarchicalNameAccess>(xNames,uno::UNO_QUERY)));
-
-                        Reference< XExecutableDialog > 
xDialog(getORB()->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.SaveAsDialog")),aArgs),
 UNO_QUERY);
-
-                               // execute it
-                               if (xDialog.is() && xDialog->execute() == 
RET_OK )
-                                               {
-                            uno::Reference<beans::XPropertySet> 
xProp(xDialog,uno::UNO_QUERY_THROW);
-                            xProp->getPropertyValue(PROPERTY_NAME) >>= m_sName;
-                                                       
m_xReportDefinition->setName(m_sName);
-                                                       
xNames->insertByName(m_sName,uno::makeAny(m_xReportDefinition));
-                                               }
-                                               else
-                                                       return sal_False;
-                                       } // if(bNew)
-                                       //else
-                                       //      
xNames->replaceByName(m_sName,uno::makeAny(m_xReportDefinition));
-
-                               } // if ( xSup.is() )
-            }
-            setModified(sal_False);
-               }
-               catch(Exception&)
-               {
-            DBG_UNHANDLED_EXCEPTION();
-                       bRet = sal_False;
-               }
-       return bRet;
-}
 namespace
 {
 // 
-----------------------------------------------------------------------------
@@ -3218,20 +3129,6 @@
     return 0L;
 }
 // 
-----------------------------------------------------------------------------
-IMPL_LINK( OReportController, OnSave, void* ,/*_pMemfun*/)
-{
-    //m_nExecuteReportEvent = 0;
-    doSaveDoc(sal_False);
-    return 0L;
-}
-// 
-----------------------------------------------------------------------------
-IMPL_LINK( OReportController, OnSaveAs, void* ,/*_pMemfun*/)
-{
-    //m_nExecuteReportEvent = 0;
-    doSaveDoc(sal_True);
-    return 0L;
-}
-// 
-----------------------------------------------------------------------------
 void OReportController::createControl(const Sequence< PropertyValue >& 
_aArgs,const uno::Reference< report::XSection>& _xSection,const 
::rtl::OUString& _sFunction,sal_uInt16 _nObjectId)
 {
     SequenceAsHashMap aMap(_aArgs);




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

Reply via email to