summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2010-11-26 17:50:30 +0100
committerRene Engelhard <rene@debian.org>2010-11-26 17:50:30 +0100
commit3a33c8e913080e883fcbd60a89f919debf1853fb (patch)
tree6090ac477d9102b99eed5add0eb082efbda3ba77
parent5a5597655a4bf12e4ca07c9c2b6f6221e217f080 (diff)
parent162670f49bab5d3deb066d6ef8f9fa18ddd5e027 (diff)
Merge branch 'libreoffice-3-3'
-rw-r--r--starmath/uiconfig/smath/menubar/menubar.xml1
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx19
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx1
-rw-r--r--sw/source/filter/ww8/ww8par.cxx9
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx17
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/sweb/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swform/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swreport/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swxform/menubar/menubar.xml1
11 files changed, 43 insertions, 10 deletions
diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml
index d9ae7af85edc..5b01e9beda24 100644
--- a/starmath/uiconfig/smath/menubar/menubar.xml
+++ b/starmath/uiconfig/smath/menubar/menubar.xml
@@ -114,6 +114,7 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index c2bd9fdd533a..1ae7c7192cc3 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -964,7 +964,8 @@ WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
: MSWordSections( rExport ),
aCps( 4, 4 ),
pAttrs( 0 ),
- pTxtPos( 0 )
+ pTxtPos( 0 ),
+ bNoMoreSections( false )
{
// to be in sync with the AppendSection() call in the MSWordSections
// constructor
@@ -1040,9 +1041,12 @@ void MSWordSections::AppendSection( const SwPageDesc* pPd,
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
{
- aCps.Insert( nStartCp, aCps.Count() );
+ if ( !bNoMoreSections )
+ {
+ aCps.Insert( nStartCp, aCps.Count() );
- AppendSection( pPd, pSectionFmt, nLnNumRestartNo );
+ AppendSection( pPd, pSectionFmt, nLnNumRestartNo );
+ }
}
void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
@@ -1057,9 +1061,12 @@ void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD,
const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
{
- aCps.Insert(nStartCp, aCps.Count());
+ if ( !bNoMoreSections )
+ {
+ aCps.Insert(nStartCp, aCps.Count());
- AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo );
+ AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo );
+ }
}
// MSWordSections::SetNum() setzt in jeder Section beim 1. Aufruf den
@@ -1744,6 +1751,8 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
WW8_SepInfo& rSepInfo = aSects[i];
rWrt.SectionProperties( rSepInfo, pA );
+
+ bNoMoreSections = true;
}
rWrt.SetHdFtIndex( nOldIndex ); //0
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 2567a62ec9b6..23832e6e9016 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -228,6 +228,7 @@ class WW8_WrPlcSepx : public MSWordSections
SvULongs aCps; // PTRARR von CPs
WW8_PdAttrDesc* pAttrs;
WW8_WrPlc0* pTxtPos; // Pos der einzelnen Header / Footer
+ bool bNoMoreSections;
// No copy, no assign
WW8_WrPlcSepx( const WW8_WrPlcSepx& );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 24ac58f7c9e8..e15954281202 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5194,7 +5194,14 @@ ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const St
}
SwWW8ImplReader* pRdr = new SwWW8ImplReader(nVersion, pStg, pIn, rDoc,
rBaseURL, bNew);
- nRet = pRdr->LoadDoc( rPam );
+ try
+ {
+ nRet = pRdr->LoadDoc( rPam );
+ }
+ catch( const std::exception& )
+ {
+ nRet = ERR_WW8_NO_WW8_FILE_ERR;
+ }
delete pRdr;
if( refStrm.Is() )
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 52f3304d15da..44f8335208a8 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -897,11 +897,18 @@ void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_)
const BYTE* WW8SprmIter::operator ++( int )
{
- if (nRemLen > 0)
+ if (nRemLen > 0 )
{
- pSprms += nAktSize;
- nRemLen -= nAktSize;
- UpdateMyMembers();
+ if( nRemLen >= nAktSize )
+ {
+ pSprms += nAktSize;
+ nRemLen -= nAktSize;
+ UpdateMyMembers();
+ }
+ else
+ {
+ throw( ::std::exception() );
+ }
}
return pSprms;
}
@@ -3252,6 +3259,8 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
Otherwise our cool fastsave algorithm can be brought to bear on the
problem.
*/
+ if( !pPieceIter )
+ return;
ULONG nOldPos = pPieceIter->GetIdx();
bool bOk = pPieceIter->SeekPos(nOrigCp);
pPieceIter->SetIdx( nOldPos );
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml
index 2f6534c69197..8cd46b6e674f 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -454,6 +454,7 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml
index ffae48e1f7be..fa417a66b392 100644
--- a/sw/uiconfig/sweb/menubar/menubar.xml
+++ b/sw/uiconfig/sweb/menubar/menubar.xml
@@ -383,6 +383,7 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml
index 729cf028d5d2..4e90101c0625 100644
--- a/sw/uiconfig/swform/menubar/menubar.xml
+++ b/sw/uiconfig/swform/menubar/menubar.xml
@@ -450,6 +450,7 @@
<menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml
index 729cf028d5d2..4e90101c0625 100644
--- a/sw/uiconfig/swreport/menubar/menubar.xml
+++ b/sw/uiconfig/swreport/menubar/menubar.xml
@@ -450,6 +450,7 @@
<menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index 82993b0cc7bb..58422d94c226 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -458,6 +458,7 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml
index df5fe3f02e9e..14e758ef99e0 100644
--- a/sw/uiconfig/swxform/menubar/menubar.xml
+++ b/sw/uiconfig/swxform/menubar/menubar.xml
@@ -451,6 +451,7 @@
<menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>