rpms/openoffice.org/F-10 workspace.os131.patch,1.4,1.5

Caolan McNamara caolanm at fedoraproject.org
Wed Sep 2 14:58:34 UTC 2009


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29268

Modified Files:
	workspace.os131.patch 
Log Message:
grr

workspace.os131.patch:
 inc/IDocumentContentOperations.hxx |    2 
 inc/doc.hxx                        |   10 
 inc/unotxdoc.hxx                   |   32 +--
 source/core/doc/doccomp.cxx        |    6 
 source/core/doc/docfmt.cxx         |    2 
 source/core/doc/docglbl.cxx        |    2 
 source/core/doc/docglos.cxx        |    2 
 source/core/doc/doclay.cxx         |    4 
 source/core/doc/docnew.cxx         |  384 +++++++++++++++++++++++++++++++++++--
 source/core/doc/docnum.cxx         |    2 
 source/core/doc/docredln.cxx       |    6 
 source/core/doc/tblcpy.cxx         |    2 
 source/core/doc/tblrwcl.cxx        |    2 
 source/core/docnode/ndcopy.cxx     |   73 +++++--
 source/core/docnode/section.cxx    |    4 
 source/core/edit/eddel.cxx         |    2 
 source/core/edit/edglss.cxx        |    6 
 source/core/frmedt/fecopy.cxx      |    4 
 source/core/txtnode/atrftn.cxx     |    2 
 source/core/undo/untblk.cxx        |    2 
 source/filter/ww8/ww8glsy.cxx      |    2 
 source/filter/xml/xmltbli.cxx      |    2 
 source/ui/dbui/dbmgr.cxx           |  258 ++++++++++--------------
 source/ui/uno/unoatxt.cxx          |    4 
 source/ui/uno/unotxdoc.cxx         |   30 +-
 25 files changed, 615 insertions(+), 230 deletions(-)

Index: workspace.os131.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-10/workspace.os131.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- workspace.os131.patch	2 Sep 2009 14:22:37 -0000	1.4
+++ workspace.os131.patch	2 Sep 2009 14:58:33 -0000	1.5
@@ -643,15 +643,6 @@ Index: sw/source/core/doc/docglbl.cxx
  
  
  					// und noch alle Bookmarks
-@@ -653,7 +653,7 @@
- 						pDoc->GetNodes().Delete( aIdx, 1 );
- 
- 					// alle Flys in dem Bereich
--					_CopyFlyInFly( aRg, aIdx );
-+                    _CopyFlyInFly( aRg, 0, aIdx );
- 
- 
- 					// und noch alle Bookmarks
 Index: sw/source/core/doc/tblrwcl.cxx
 ===================================================================
 --- sw/source/core/doc/tblrwcl.cxx	(.../tags/DEV300_m50)	(revision 275705)
@@ -982,7 +973,7 @@ Index: sw/source/ui/dbui/dbmgr.cxx
  #include <mmconfigitem.hxx>
  #include <sfx2/request.hxx>
  #include <hintids.hxx>
-@@ -3185,7 +3165,6 @@
+@@ -3176,7 +3156,6 @@
  
      SwWrtShell& rSourceShell = rSourceView.GetWrtShell();
      BOOL bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1;
@@ -990,7 +981,7 @@ Index: sw/source/ui/dbui/dbmgr.cxx
      //save the settings of the first
      rSourceShell.SttEndDoc(TRUE);
      USHORT nStartingPageNo = rSourceShell.GetVirtPageNum();
-@@ -3195,22 +3174,6 @@
+@@ -3186,22 +3165,6 @@
  
      try
      {
@@ -1013,7 +1004,7 @@ Index: sw/source/ui/dbui/dbmgr.cxx
          // create a target docshell to put the merged document into
          SfxObjectShellRef xTargetDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
          xTargetDocShell->DoInitNew( 0 );
-@@ -3259,116 +3222,120 @@
+@@ -3250,116 +3213,121 @@
                      Application::Reschedule();
              }
  
@@ -1026,14 +1017,83 @@ Index: sw/source/ui/dbui/dbmgr.cxx
 -                            rSourceView.GetViewFrame()->GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON,
 -                                    &aURL, &aFilterName, &aHidden, &aReferer, &aTarget, 0L);
 -            if(pReturnValue)
-+            // copy the source document
-+            SfxObjectShellRef xWorkDocSh;
-+            if(nDocNo == 1 )
-             {
+-            {
 -                SfxViewFrameItem* pVItem = (SfxViewFrameItem*)pReturnValue;
 -                SwView* pWorkView = (SwView*) pVItem->GetFrame()->GetViewShell();
 -                SwWrtShell& rWorkShell = pWorkView->GetWrtShell();
 -                pWorkView->AttrChangedNotify( &rWorkShell );//Damit SelectShell gerufen wird.
+-
+-                // merge the data
+-                SwDoc* pWorkDoc = rWorkShell.GetDoc();
+-                SwNewDBMgr* pWorkDBMgr = pWorkDoc->GetNewDBMgr();
+-                pWorkDoc->SetNewDBMgr( this );
+-                pWorkDoc->EmbedAllLinks();
+-                if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds())
+-                    rWorkShell.Undo();
+-                // create a layout
+-                rWorkShell.CalcLayout();
+-                SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE, rWorkShell.GetView().GetViewFrame()->GetObjectShell()));
+-                rWorkShell.ViewShell::UpdateFlds();
+-                SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, rWorkShell.GetView().GetViewFrame()->GetObjectShell()));
+-
+-                // strip invisible content and convert fields to text
+-                rWorkShell.RemoveInvisibleContent();
+-                rWorkShell.ConvertFieldsToText();
+-                rWorkShell.SetNumberingRestart();
+-
+-
+-                // insert the document into the target document
+-                rWorkShell.SttEndDoc(FALSE);
+-                rWorkShell.SttEndDoc(TRUE);
+-                rWorkShell.SelAll();
+-                pTargetShell->SttEndDoc(FALSE);
+-
+-                //#i63806# put the styles to the target document
+-                //if the source uses headers or footers each new copy need to copy a new page styles
+-                if(bPageStylesWithHeaderFooter)
+-                {
+-                    //create a new pagestyle
+-                    //copy the pagedesc from the current document to the new document and change the name of the to-be-applied style
+-
+-                    SwDoc* pTargetDoc = pTargetShell->GetDoc();
+-                    String sNewPageDescName = lcl_FindUniqueName(pTargetShell, sStartingPageDesc, nDocNo );
+-                    pTargetShell->GetDoc()->MakePageDesc( sNewPageDescName );
+-                    SwPageDesc* pTargetPageDesc = pTargetShell->FindPageDescByName( sNewPageDescName );
+-                    if(pSourcePageDesc && pTargetPageDesc)
+-                    {
+-                        pTargetDoc->CopyPageDesc( *pSourcePageDesc, *pTargetPageDesc, sal_False );
+-                        sModifiedStartingPageDesc = sNewPageDescName;
+-                        lcl_CopyFollowPageDesc( *pTargetShell, *pSourcePageDesc, *pTargetPageDesc, nDocNo );
+-                    }
+-                }
+-                if(nDocNo == 1 || bPageStylesWithHeaderFooter)
+-                {
+-                    pTargetView->GetDocShell()->_LoadStyles( *pWorkView->GetDocShell(), sal_True );
+-                }
+-                if(nDocNo > 1)
+-                {
+-                    pTargetShell->InsertPageBreak( &sModifiedStartingPageDesc, nStartingPageNo );
+-                }
+-                else
+-                {
+-                    pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
+-                }
+-                USHORT nPageCountBefore = pTargetShell->GetPageCnt();
+-                DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended")
+-                //#i51359# add a second paragraph in case there's only one
+-                {
+-                    SwNodeIndex aIdx( pWorkDoc->GetNodes().GetEndOfExtras(), 2 );
+-                  SwPosition aTestPos( aIdx );
+-                  SwCursor aTestCrsr(aTestPos,0,false);
+-                    if(!aTestCrsr.MovePara(fnParaNext, fnParaStart))
+-                    {
+-                        //append a paragraph
+-                        pWorkDoc->AppendTxtNode( aTestPos );
+-                    }
++            // copy the source document
++            SfxObjectShellRef xWorkDocSh;
++            if(nDocNo == 1 )
++            {
 +                uno::Reference< util::XCloneable > xClone( rSourceView.GetDocShell()->GetModel(), uno::UNO_QUERY);
 +                uno::Reference< lang::XUnoTunnel > xWorkDocShell( xClone->createClone(), uno::UNO_QUERY); 
 +                SwXTextDocument* pWorkModel = reinterpret_cast<SwXTextDocument*>(xWorkDocShell->getSomething(SwXTextDocument::getUnoTunnelId()));
@@ -1049,19 +1109,7 @@ Index: sw/source/ui/dbui/dbmgr.cxx
 +            SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::CreateViewFrame( *xWorkDocSh, 0, sal_True )->GetViewShell() );
 +            SwWrtShell& rWorkShell = pWorkView->GetWrtShell();
 +            pWorkView->AttrChangedNotify( &rWorkShell );//Damit SelectShell gerufen wird.
- 
--                // merge the data
--                SwDoc* pWorkDoc = rWorkShell.GetDoc();
--                SwNewDBMgr* pWorkDBMgr = pWorkDoc->GetNewDBMgr();
--                pWorkDoc->SetNewDBMgr( this );
--                pWorkDoc->EmbedAllLinks();
--                if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds())
--                    rWorkShell.Undo();
--                // create a layout
--                rWorkShell.CalcLayout();
--                SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE, rWorkShell.GetView().GetViewFrame()->GetObjectShell()));
--                rWorkShell.ViewShell::UpdateFlds();
--                SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, rWorkShell.GetView().GetViewFrame()->GetObjectShell()));
++
 +            // merge the data
 +            SwDoc* pWorkDoc = rWorkShell.GetDoc();
 +            SwNewDBMgr* pWorkDBMgr = pWorkDoc->GetNewDBMgr();
@@ -1074,65 +1122,39 @@ Index: sw/source/ui/dbui/dbmgr.cxx
 +            SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE, rWorkShell.GetView().GetViewFrame()->GetObjectShell()));
 +            rWorkShell.ViewShell::UpdateFlds();
 +            SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, rWorkShell.GetView().GetViewFrame()->GetObjectShell()));
- 
--                // strip invisible content and convert fields to text
--                rWorkShell.RemoveInvisibleContent();
--                rWorkShell.ConvertFieldsToText();
--                rWorkShell.SetNumberingRestart();
++
 +            // strip invisible content and convert fields to text
 +            rWorkShell.RemoveInvisibleContent();
 +            rWorkShell.ConvertFieldsToText();
 +            rWorkShell.SetNumberingRestart();
- 
- 
--                // insert the document into the target document
--                rWorkShell.SttEndDoc(FALSE);
--                rWorkShell.SttEndDoc(TRUE);
--                rWorkShell.SelAll();
--                pTargetShell->SttEndDoc(FALSE);
++
++
 +            // insert the document into the target document
 +            rWorkShell.SttEndDoc(FALSE);
 +            rWorkShell.SttEndDoc(TRUE);
 +            rWorkShell.SelAll();
 +            pTargetShell->SttEndDoc(FALSE);
- 
--                //#i63806# put the styles to the target document
--                //if the source uses headers or footers each new copy need to copy a new page styles
--                if(bPageStylesWithHeaderFooter)
--                {
--                    //create a new pagestyle
--                    //copy the pagedesc from the current document to the new document and change the name of the to-be-applied style
++
 +            //#i63806# put the styles to the target document
 +            //if the source uses headers or footers each new copy need to copy a new page styles
 +            if(bPageStylesWithHeaderFooter)
 +            {
 +                //create a new pagestyle
 +                //copy the pagedesc from the current document to the new document and change the name of the to-be-applied style
- 
--                    SwDoc* pTargetDoc = pTargetShell->GetDoc();
--                    String sNewPageDescName = lcl_FindUniqueName(pTargetShell, sStartingPageDesc, nDocNo );
--                    pTargetShell->GetDoc()->MakePageDesc( sNewPageDescName );
--                    SwPageDesc* pTargetPageDesc = pTargetShell->FindPageDescByName( sNewPageDescName );
--                    if(pSourcePageDesc && pTargetPageDesc)
--                    {
--                        pTargetDoc->CopyPageDesc( *pSourcePageDesc, *pTargetPageDesc, sal_False );
--                        sModifiedStartingPageDesc = sNewPageDescName;
--                        lcl_CopyFollowPageDesc( *pTargetShell, *pSourcePageDesc, *pTargetPageDesc, nDocNo );
--                    }
--                }
--                if(nDocNo == 1 || bPageStylesWithHeaderFooter)
++
 +                SwDoc* pTargetDoc = pTargetShell->GetDoc();
 +                String sNewPageDescName = lcl_FindUniqueName(pTargetShell, sStartingPageDesc, nDocNo );
 +                pTargetShell->GetDoc()->MakePageDesc( sNewPageDescName );
 +                SwPageDesc* pTargetPageDesc = pTargetShell->FindPageDescByName( sNewPageDescName );
 +                if(pSourcePageDesc && pTargetPageDesc)
-                 {
--                    pTargetView->GetDocShell()->_LoadStyles( *pWorkView->GetDocShell(), sal_True );
++                {
 +                    pTargetDoc->CopyPageDesc( *pSourcePageDesc, *pTargetPageDesc, sal_False );
 +                    sModifiedStartingPageDesc = sNewPageDescName;
 +                    lcl_CopyFollowPageDesc( *pTargetShell, *pSourcePageDesc, *pTargetPageDesc, nDocNo );
                  }
--                if(nDocNo > 1)
+-                pTargetShell->Paste( rWorkShell.GetDoc(), sal_True );
+-                //convert fields in page styles (header/footer - has to be done after the first document has been pasted
+-                if(1 == nDocNo)
 +            }
 +            if(nDocNo == 1 || bPageStylesWithHeaderFooter)
 +            {
@@ -1155,34 +1177,11 @@ Index: sw/source/ui/dbui/dbmgr.cxx
 +              SwCursor aTestCrsr(aTestPos,0,false);
 +                if(!aTestCrsr.MovePara(fnParaNext, fnParaStart))
                  {
--                    pTargetShell->InsertPageBreak( &sModifiedStartingPageDesc, nStartingPageNo );
+-                    pTargetShell->CalcLayout();
+-                    pTargetShell->ConvertFieldsToText();
 +                    //append a paragraph
 +                    pWorkDoc->AppendTxtNode( aTestPos );
                  }
--                else
--                {
--                    pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
--                }
--                USHORT nPageCountBefore = pTargetShell->GetPageCnt();
--                DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
--                //#i51359# add a second paragraph in case there's only one
--                {
--                    SwNodeIndex aIdx( pWorkDoc->GetNodes().GetEndOfExtras(), 2 );
--                  SwPosition aTestPos( aIdx );
--                  SwCursor aTestCrsr(aTestPos,0,false);
--                    if(!aTestCrsr.MovePara(fnParaNext, fnParaStart))
--                    {
--                        //append a paragraph
--                        pWorkDoc->AppendTxtNode( aTestPos );
--                    }
--                }
--                pTargetShell->Paste( rWorkShell.GetDoc(), sal_True );
--                //convert fields in page styles (header/footer - has to be done after the first document has been pasted
--                if(1 == nDocNo)
--                {
--                    pTargetShell->CalcLayout();
--                    pTargetShell->ConvertFieldsToText();
--                }
 -                //add the document info to the config item
 -                SwDocMergeInfo aMergeInfo;
 -                aMergeInfo.nStartPageInTarget = nPageCountBefore;
@@ -1197,8 +1196,18 @@ Index: sw/source/ui/dbui/dbmgr.cxx
 -                aMergeInfo.nDBRow = nStartRow;
 -                rMMConfig.AddMergedDocument( aMergeInfo );
 -                ++nRet;
+-
+-                // the print monitor needs some time to act
+-                for( USHORT i = 0; i < 25; i++)
+-                    Application::Reschedule();
+-
+-                //restore the ole DBMgr
+-                pWorkDoc->SetNewDBMgr( pWorkDBMgr );
+-                //now the temporary document should be closed
+-                SfxObjectShellRef xDocSh(pWorkView->GetDocShell());
+-                xDocSh->DoClose();
 +                pTargetShell->ConvertFieldsToText();
-+            }
+             }
 +            //add the document info to the config item
 +            SwDocMergeInfo aMergeInfo;
 +            aMergeInfo.nStartPageInTarget = nPageCountBefore;
@@ -1208,31 +1217,23 @@ Index: sw/source/ui/dbui/dbmgr.cxx
 +            aMergeInfo.nDBRow = nStartRow;
 +            rMMConfig.AddMergedDocument( aMergeInfo );
 +            ++nRet;
- 
--                // the print monitor needs some time to act
--                for( USHORT i = 0; i < 25; i++)
--                    Application::Reschedule();
++
 +            // the print monitor needs some time to act
 +            for( USHORT i = 0; i < 25; i++)
 +                Application::Reschedule();
- 
--                //restore the ole DBMgr
--                pWorkDoc->SetNewDBMgr( pWorkDBMgr );
--                //now the temporary document should be closed
--                SfxObjectShellRef xDocSh(pWorkView->GetDocShell());
--                xDocSh->DoClose();
--            }
++
 +            //restore the ole DBMgr
 +            pWorkDoc->SetNewDBMgr( pWorkDBMgr );
 +            //now the temporary document should be closed
 +            SfxObjectShellRef xDocSh(pWorkView->GetDocShell());
 +            xDocSh->DoClose();
++
              nEndRow = pImpl->pMergeData->xResultSet->getRow();
              ++nDocNo;
          } while( !bCancel &&
-@@ -3390,8 +3357,6 @@
+@@ -3381,8 +3349,6 @@
      {
-         DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
+         DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments")
      }
 -    if(sSourceDocURL.Len())
 -        File::remove( sSourceDocURL );




More information about the fedora-extras-commits mailing list