ooo-build r14387 - in trunk: . patches/dev300
- From: ameliaw svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14387 - in trunk: . patches/dev300
- Date: Wed, 22 Oct 2008 03:14:26 +0000 (UTC)
Author: ameliaw
Date: Wed Oct 22 03:14:26 2008
New Revision: 14387
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14387&view=rev
Log:
instead of sw-filter-import-TOX.diff. Modify the old method of importing
TOC.
Added:
trunk/patches/dev300/sw-import-TOC.diff
Removed:
trunk/patches/dev300/sw-filter-import-TOX.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Wed Oct 22 03:14:26 2008
@@ -54,7 +54,8 @@
# Novell
NovellBase : LinuxCommon, NovellOnly, NovellOnlyUnix, \
NotDebian, Lockdown, Split, Shrink, \
- CustomUserConfig, CalcSolver, PostgreSQL
+ CustomUserConfig, CalcSolver
+#, PostgreSQL
SUSE-9.1 : NovellBase
SUSE-9.2 : NovellBase
SUSE-9.3 : NovellBase
@@ -2701,7 +2702,7 @@
i92372.diff, i#92372, n#353143, tml
[ Fixes ]
-sw-filter-import-TOX.diff ,n#40425, Amelia Wang
+sw-import-TOC.diff ,n#40425, Amelia Wang
gnome-fpicker-transient-win.diff, i#92878, cmc
gnome-fpicker-main-thread.diff, i#93366, cmc
jurt-jnilib-deliver.diff, i#93516, thorsten
Added: trunk/patches/dev300/sw-import-TOC.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sw-import-TOC.diff Wed Oct 22 03:14:26 2008
@@ -0,0 +1,143 @@
+diff -uNr ooo300-m9-orig/sw/inc/doc.hxx ooo300-m9/sw/inc/doc.hxx
+--- ooo300-m9-orig/sw/inc/doc.hxx 2008-10-21 11:49:46.000000000 +0800
++++ ooo300-m9/sw/inc/doc.hxx 2008-10-17 17:18:12.000000000 +0800
+@@ -483,6 +483,7 @@
+ bool mbInReading : 1; // TRUE: Dokument wird gerade gelesen
+ bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary
+ bool mbUpdateTOX : 1; // TRUE: nach Dokument laden die TOX Updaten
++ bool mbUpdatePgNumOfTOX : 1; // True: only update page number of TOX
+ bool mbInLoadAsynchron : 1; // TRUE: Dokument wird gerade asynchron geladen
+ bool mbHTMLMode : 1; // TRUE: Dokument ist im HTMLMode
+ bool mbInCallModified : 1; // TRUE: im Set/Reset-Modified Link
+@@ -1439,6 +1440,9 @@
+ void SetUpdateTOX( bool bFlag = true ) { mbUpdateTOX = bFlag; }
+ bool IsUpdateTOX() const { return mbUpdateTOX; }
+
++ void SetUpdatePgNumOfTOX( bool bFlag = true ) { mbUpdateTOX = mbUpdatePgNumOfTOX = bFlag; }
++ bool IsUpdatePgNumOfTOX() const { return mbUpdatePgNumOfTOX; }
++
+ const String& GetTOIAutoMarkURL() const {return sTOIAutoMarkURL;}
+ void SetTOIAutoMarkURL(const String& rSet) {sTOIAutoMarkURL = rSet;}
+ void ApplyAutoMark();
+diff -uNr ooo300-m9-orig/sw/source/core/doc/docnew.cxx ooo300-m9/sw/source/core/doc/docnew.cxx
+--- ooo300-m9-orig/sw/source/core/doc/docnew.cxx 2008-10-21 11:49:47.000000000 +0800
++++ ooo300-m9/sw/source/core/doc/docnew.cxx 2008-10-17 17:18:12.000000000 +0800
+@@ -316,6 +316,7 @@
+ mbInReading =
+ mbInXMLImport =
+ mbUpdateTOX =
++ mbUpdatePgNumOfTOX =
+ mbInLoadAsynchron =
+ mbHTMLMode =
+ mbInCallModified =
+diff -uNr ooo300-m9-orig/sw/source/core/doc/doctxm.cxx ooo300-m9/sw/source/core/doc/doctxm.cxx
+--- ooo300-m9-orig/sw/source/core/doc/doctxm.cxx 2008-10-21 11:49:47.000000000 +0800
++++ ooo300-m9/sw/source/core/doc/doctxm.cxx 2008-10-17 17:58:18.000000000 +0800
+@@ -940,10 +940,26 @@
+ pDoc->CorrAbs( aSttIdx, aEndIdx, aPos, TRUE );
+
+ // delete all before
+- DelFlyInRange( aSttIdx, aEndIdx );
+- _DelBookmarks( aSttIdx, aEndIdx );
++ if ( !pDoc->IsUpdatePgNumOfTOX() )
++ {
++ DelFlyInRange( aSttIdx, aEndIdx );
++ _DelBookmarks( aSttIdx, aEndIdx );
+
+- pDoc->GetNodes().Delete( aSttIdx, aEndIdx.GetIndex() - aSttIdx.GetIndex() );
++ pDoc->GetNodes().Delete( aSttIdx, aEndIdx.GetIndex() - aSttIdx.GetIndex() );
++ }else
++ {
++ DelFlyInRange( aSttIdx, aEndIdx );
++ _DelBookmarks( aSttIdx, aEndIdx );
++ for (ULONG nPos = 0 ; nPos < aEndIdx.GetIndex()-aSttIdx.GetIndex() ; )
++ {
++ SwNodeIndex aPosIdx( aSttIdx, nPos );
++ SwTxtNode * pTxtNd = (SwTxtNode*)aPosIdx.GetNode().GetCntntNode();
++ if ( pTxtNd && (( pTxtNd->GetTxt().Len() != 0 ) || (pTxtNd->IsNumbered() )))
++ pDoc->GetNodes().Delete( aPosIdx, 1 );
++ else
++ nPos++;
++ }
++ }
+
+ }
+
+@@ -1023,7 +1039,14 @@
+ aStrArr.Insert( pStr, nCnt );
+ }
+
++ SwNodeIndex aStartIdx( *pSectNd , 1 );
++ SwNodeIndex aEndIdx( *pSectNd->EndOfSectionNode() );
++
+ SwNodeIndex aInsPos( *pFirstEmptyNd, 1 );
++ SwNodeIndex aTmpInsPos( *pSectNd, 1 );
++ if ( pDoc->IsUpdatePgNumOfTOX() )
++ aInsPos = aTmpInsPos;
++
+ for( nCnt = 0; nCnt < aSortArr.Count(); ++nCnt )
+ {
+ ::SetProgressState( 0, pDoc->GetDocShell() );
+@@ -1041,6 +1064,7 @@
+
+ // Generierung: dynamische TabStops setzen
+ SwTxtNode* pTOXNd = pDoc->GetNodes().MakeTxtNode( aInsPos , pColl );
++
+ aSortArr[ nCnt ]->pTOXNd = pTOXNd;
+
+ // Generierung: Form auswerten und Platzhalter
+diff -uNr ooo300-m9-orig/sw/source/filter/ww8/ww8par5.cxx ooo300-m9/sw/source/filter/ww8/ww8par5.cxx
+--- ooo300-m9-orig/sw/source/filter/ww8/ww8par5.cxx 2008-10-21 11:49:47.000000000 +0800
++++ ooo300-m9/sw/source/filter/ww8/ww8par5.cxx 2008-10-17 17:18:12.000000000 +0800
+@@ -684,6 +684,12 @@
+ nRet = maFieldStack.back().mnFieldId;
+ switch (nRet)
+ {
++ case 8: // TOX_INDEX
++ case 13: // TOX_CONTENT
++ { // tox hack!!!!
++ pPaM->Move(fnMoveForward);
++ }
++
+ case 88:
+ pCtrlStck->SetAttr(*pPaM->GetPoint(),RES_TXTATR_INETFMT);
+ break;
+@@ -704,6 +710,9 @@
+ {
+ switch (nFieldCode)
+ {
++ case 8:
++ case 13: // HACK allow recursive field in TOC...
++
+ case 36:
+ case 68:
+ case 79:
+@@ -3165,7 +3174,8 @@
+ } // ToxBase fertig
+
+ // Update fuer TOX anstossen
+- rDoc.SetUpdateTOX(true);
++ //rDoc.SetUpdateTOX(true);
++ rDoc.SetUpdatePgNumOfTOX( true );
+
+ // #i21237#
+ // propagate tab stops from paragraph styles used in TOX to
+@@ -3204,6 +3214,8 @@
+
+ rDoc.InsertTableOf(*pPaM->GetPoint(), *aFltTOX.GetBase());
+
++ pPaM->Move(fnMoveBackward); // move into TOC section...
++
+ //inserting a toc inserts a section before this point, so adjust pos
+ //for future page/section segment insertion
+ SwPaM aRegion(*pPaM);
+@@ -3230,7 +3242,8 @@
+
+ if (!maApos.back()) //a para end in apo doesn't count
+ bWasParaEnd = true;
+- return FLD_OK;
++// return FLD_OK;
++ return FLD_TEXT; // HACK so now import the TOC stored in the DOC stream...
+ }
+
+ eF_ResT SwWW8ImplReader::Read_F_Shape(WW8FieldDesc* /*pF*/, String& /*rStr*/)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]