ooo-build r11364 - in trunk: . patches/src680



Author: pmladek
Date: Tue Jan 22 20:04:15 2008
New Revision: 11364
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11364&view=rev

Log:
2008-01-22  Petr Mladek  <pmladek suse cz>

	* patches/src680/xmloff-field-patch.diff: better solution to avoid
	  the missing SwPaM copy constructor; thanks Fridrich for help



Modified:
   trunk/ChangeLog
   trunk/patches/src680/sw-field-patch.diff

Modified: trunk/patches/src680/sw-field-patch.diff
==============================================================================
--- trunk/patches/src680/sw-field-patch.diff	(original)
+++ trunk/patches/src680/sw-field-patch.diff	Tue Jan 22 20:04:15 2008
@@ -2013,7 +2013,7 @@
      maTracer.LeaveEnvironment(sw::log::eDocumentProperties);
  }
  
-@@ -1722,6 +1728,7 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) :
+@@ -1722,6 +1728,7 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplRe
      maOldApos.push_back(false);
      maOldApos.swap(pRdr->maApos);
      maOldFieldStack.swap(pRdr->maFieldStack);
@@ -2021,7 +2021,7 @@
  }
  
  void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr )
-@@ -1768,6 +1775,7 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr )
+@@ -1768,6 +1775,7 @@ void WW8ReaderSave::Restore( SwWW8ImplRe
          pRdr->pPlcxMan->RestoreAllPLCFx(maPLCFxSave);
      pRdr->maApos.swap(maOldApos);
      pRdr->maFieldStack.swap(maOldFieldStack);
@@ -2029,7 +2029,7 @@
  }
  
  void SwWW8ImplReader::Read_HdFtFtnText( const SwNodeIndex* pSttIdx,
-@@ -2737,6 +2745,21 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
+@@ -2737,6 +2745,22 @@ bool SwWW8ImplReader::ReadChar(long nPos
          case 0x15:
              if( !bSpec )        // Juristenparagraph
                  cInsert = '\xa7';
@@ -2037,7 +2037,8 @@
 +				if (!maNewFieldCtxStack.empty() && pPaM!=NULL && pPaM->GetPoint()!=NULL) {
 +					WW8NewFieldCtx *pFieldCtx=maNewFieldCtxStack.back();
 +					maNewFieldCtxStack.pop_back();
-+					SwPaM aFldPam(pFieldCtx->GetRange(*pPaM->GetPoint()));
++					SwPosition aEndPos = *pPaM->GetPoint();
++					SwPaM aFldPam( pFieldCtx->GetPtNode(), pFieldCtx->GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex());
 +					SwFieldBookmark *pFieldmark=(SwFieldBookmark*)rDoc.makeBookmark(aFldPam, KeyCode(), pFieldCtx->GetBookmarkName(), String(), IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT);
 +					ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
 +					if (pFieldmark!=NULL) {
@@ -2051,7 +2052,7 @@
              break;
          case 0x9:
              cInsert = '\x9';    // Tab
-@@ -3530,7 +3553,7 @@ void wwSectionManager::InsertSegments()
+@@ -3530,7 +3554,7 @@ void wwSectionManager::InsertSegments()
  
          bool bInsertSection = aIter != aStart ? aIter->IsContinous() : false;
          bool bInsertPageDesc = !bInsertSection;
@@ -2064,7 +2065,7 @@
 index 5748ff8..95580bb 100644
 --- sw/source/filter/ww8/ww8par.hxx
 +++ sw/source/filter/ww8/ww8par.hxx
-@@ -390,6 +390,31 @@ public:
+@@ -390,6 +390,32 @@ public:
      void Swap(FieldEntry &rOther) throw();
  };
  
@@ -2084,7 +2085,8 @@
 +	WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString sBookmarkName, ::rtl::OUString sBookmarkType);
 +	~WW8NewFieldCtx();
 +
-+	SwPaM& GetRange(SwPosition &aEndPos);
++	SwNodeIndex GetPtNode() { return maPtNode; };
++	xub_StrLen GetPtCntnt() { return mnPtCntnt; };
 +	::rtl::OUString GetBookmarkName();
 +	::rtl::OUString GetBookmarkType();
 +	void AddParam(::rtl::OUString name, ::rtl::OUString value);
@@ -2096,7 +2098,7 @@
  //-----------------------------------------
  //    Mini-Merker fuer einige Flags
  //-----------------------------------------
-@@ -422,6 +447,7 @@ private:
+@@ -422,6 +448,7 @@ private:
      bool mbWasParaEnd;
      bool mbHasBorder;
      bool mbFirstPara;
@@ -2104,7 +2106,7 @@
  public:
      WW8ReaderSave(SwWW8ImplReader* pRdr, WW8_CP nStart=-1);
      void Restore(SwWW8ImplReader* pRdr);
-@@ -876,6 +902,9 @@ private:
+@@ -876,6 +903,9 @@ private:
      std::deque<FieldEntry> maFieldStack;
      typedef std::deque<FieldEntry>::const_iterator mycFieldIter;
  
@@ -2118,7 +2120,7 @@
 index 9bfd62e..43de610 100644
 --- sw/source/filter/ww8/ww8par3.cxx
 +++ sw/source/filter/ww8/ww8par3.cxx
-@@ -221,9 +221,66 @@
+@@ -221,9 +221,57 @@
  #include "ww8par2.hxx"  // wg. Listen-Attributen in Styles
  #endif
  
@@ -2143,15 +2145,6 @@
 +	if (mpPaM) delete mpPaM;
 +}
 +
-+
-+SwPaM& WW8NewFieldCtx::GetRange(SwPosition &aEndPos)
-+{
-+	SwPosition aStartPos( maPtNode );
-+	if (mpPaM) delete mpPaM;
-+	mpPaM = new SwPaM( maPtNode, mnPtCntnt, aEndPos.nNode, aEndPos.nContent.GetIndex());
-+	return *mpPaM;
-+}
-+
 +::rtl::OUString WW8NewFieldCtx::GetBookmarkName()
 +{
 +	return sBookmarkName;
@@ -2185,7 +2178,7 @@
  //-----------------------------------------
  //            UNO-Controls
  //-----------------------------------------
-@@ -239,10 +296,13 @@ eF_ResT SwWW8ImplReader::Read_F_OCX( WW8FieldDesc*, String& )
+@@ -239,10 +287,13 @@ eF_ResT SwWW8ImplReader::Read_F_OCX( WW8
  
  eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
  {
@@ -2200,7 +2193,7 @@
  
      /* #80205#
      Here we have a small complication. This formula control contains
-@@ -254,10 +314,12 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
+@@ -254,10 +305,12 @@ eF_ResT SwWW8ImplReader::Read_F_FormText
      the field result into the formula here in place of the default
      text.
      */
@@ -2214,7 +2207,7 @@
      aFormula.sDefault.SearchAndReplaceAll(
          String(static_cast< sal_Unicode >(0x2002)),
          CREATE_CONST_ASC("  "));
-@@ -268,9 +330,38 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
+@@ -268,9 +321,38 @@ eF_ResT SwWW8ImplReader::Read_F_FormText
      aFld.SetHelp(aFormula.sHelp);
      aFld.SetToolTip(aFormula.sToolTip);
  
@@ -2255,7 +2248,7 @@
  }
  
  eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
-@@ -283,7 +374,40 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
+@@ -283,7 +365,40 @@ eF_ResT SwWW8ImplReader::Read_F_FormChec
      if (0x01 == rStr.GetChar(writer_cast<xub_StrLen>(pF->nLCode-1)))
          ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_CHECKBOX);
  
@@ -2297,7 +2290,7 @@
      return FLD_OK;
  }
  
-@@ -2041,6 +2165,10 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula,
+@@ -2041,6 +2156,10 @@ bool SwWW8ImplReader::ImportFormulaContr
      if((aPic.lcb > 0x3A) && !pDataStream->GetError() )
      {
          pDataStream->Seek( nPicLocFc + aPic.cbHeader );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]