summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-12-10 14:28:44 +0000
committerRüdiger Timm <rt@openoffice.org>2008-12-10 14:28:44 +0000
commit551e73376e65e255da2828dc2e3de1dc1cc4384f (patch)
tree1441f459a2091bd792bb0e4b5e28ccf033372f6e
parent8b4cfad3fd8b8d41be20dae44bfbf9c73019d96b (diff)
CWS-TOOLING: integrate CWS hb12
2008-12-01 11:10:21 +0100 hbrinkm r264591 : handled warnings on wntmsci12 2008-11-25 09:57:33 +0100 hbrinkm r264275 : CWS-TOOLING: rebase CWS hb12 to trunk@263288 (milestone: DEV300:m35) 2008-11-19 17:17:34 +0100 hbrinkm r264008 : #i28656# applied patch 2008-11-19 17:06:18 +0100 hbrinkm r264007 : #i96267# applied patch 2008-11-19 16:47:16 +0100 hbrinkm r264006 : #i95533# applied patch 2008-11-17 14:18:10 +0100 hbrinkm r263722 : #i25545# applied patch 2008-11-17 13:48:18 +0100 hbrinkm r263721 : #i96114# applied patch 2008-10-30 14:51:50 +0100 hbrinkm r262827 : #i94634# applied patch 2008-10-22 16:35:49 +0200 hbrinkm r262608 : i74244# use correct mask when checking for author field 2008-10-21 10:08:10 +0200 hbrinkm r262563 : #iXXXXX# migrate CVS hb12 to SVN 2008-10-21 10:06:26 +0200 hbrinkm r262562 : #iXXXXX# migrate CVS hb12 to SVN
-rw-r--r--sw/inc/docufld.hxx1
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx3
-rw-r--r--sw/source/filter/rtf/wrtrtf.cxx6
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx4
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx21
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx8
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx5
-rw-r--r--sw/source/filter/ww8/ww8par.cxx13
-rw-r--r--sw/source/filter/ww8/ww8par.hxx3
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx23
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx15
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx3
12 files changed, 73 insertions, 32 deletions
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 5d8176063303..5dd199b11a81 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -99,6 +99,7 @@ namespace nsSwDocInfoSubType
const SwDocInfoSubType DI_SUB_TIME = 0x0200;
const SwDocInfoSubType DI_SUB_DATE = 0x0300;
const SwDocInfoSubType DI_SUB_FIXED = 0x1000;
+ const SwDocInfoSubType DI_SUB_MASK = 0xff00;
}
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index a061f31e21a0..d2a83b6e8664 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: swparrtf.cxx,v $
- * $Revision: 1.81 $
+ * $Revision: 1.81.82.1 $
*
* This file is part of OpenOffice.org.
*
@@ -224,6 +224,7 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
bInPgDscTbl = bNewNumList = false;
bFirstContinue = true;
bContainsPara = false;
+ bContainsTablePara = false;
bNestedField = false;
bForceNewTable = false;
diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx
index 7d63b4f13dc4..fb6d40acb71f 100644
--- a/sw/source/filter/rtf/wrtrtf.cxx
+++ b/sw/source/filter/rtf/wrtrtf.cxx
@@ -1545,8 +1545,10 @@ void SwRTFWriter::OutRTFPageDescription( const SwPageDesc& rPgDsc,
OutRTFBorders(pFmt->GetAttrSet().GetBox());
// falls es gesharte Heaer/Footer gibt, so gebe diese auch noch aus
- if( nsUseOnPage::PD_MIRROR & pAktPageDesc->GetUseOn() &&
- !pAktPageDesc->IsFooterShared() || !pAktPageDesc->IsHeaderShared() )
+ if (
+ (nsUseOnPage::PD_MIRROR & pAktPageDesc->GetUseOn()) &&
+ (!pAktPageDesc->IsFooterShared() || !pAktPageDesc->IsHeaderShared())
+ )
{
bOutLeftHeadFoot = TRUE;
const SfxPoolItem* pHt;
diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx
index 7f36d9365444..135b62cefaf1 100644
--- a/sw/source/filter/ww8/WW8FFData.cxx
+++ b/sw/source/filter/ww8/WW8FFData.cxx
@@ -27,6 +27,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
#include "WW8FFData.hxx"
#include <tools/stream.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index 9deeaff5b63f..3bbbe229551d 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: writerwordglue.cxx,v $
- * $Revision: 1.28 $
+ * $Revision: 1.28.216.1 $
*
* This file is part of OpenOffice.org.
*
@@ -776,15 +776,18 @@ namespace sw
{
sal_uInt8 nRet =
rtl_getBestWindowsCharsetFromTextEncoding(eTextEncoding);
- if (eTextEncoding == RTL_TEXTENCODING_UCS2)
+ switch (eTextEncoding)
{
- ASSERT(nRet != 0x80, "This method may be redundant");
- nRet = 0x80;
- }
- else if (eTextEncoding == RTL_TEXTENCODING_DONTKNOW)
- {
- ASSERT(nRet != 0x80, "This method may be redundant");
- nRet = 0x80;
+ case RTL_TEXTENCODING_DONTKNOW:
+ case RTL_TEXTENCODING_UCS2:
+ case RTL_TEXTENCODING_UTF7:
+ case RTL_TEXTENCODING_UTF8:
+ case RTL_TEXTENCODING_JAVA_UTF8:
+ ASSERT(nRet != 0x80, "This method may be redundant");
+ nRet = 0x80;
+ break;
+ default:
+ break;
}
return nRet;
}
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 018e5271e079..b14821161408 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2549,26 +2549,26 @@ static Writer& OutWW8_SwField( Writer& rWrt, const SfxPoolItem& rHt )
eFld = ww::eREVNUM;
break;
case DI_CREATE:
- if (DI_SUB_AUTHOR == (nSubType & DI_SUB_AUTHOR))
+ if (DI_SUB_AUTHOR == (nSubType & DI_SUB_MASK))
eFld = ww::eAUTHOR;
else if (rWW8Wrt.GetNumberFmt(*pFld, sStr))
eFld = ww::eCREATEDATE;
break;
case DI_CHANGE:
- if (DI_SUB_AUTHOR == (nSubType & DI_SUB_AUTHOR))
+ if (DI_SUB_AUTHOR == (nSubType & DI_SUB_MASK))
eFld = ww::eLASTSAVEDBY;
else if (rWW8Wrt.GetNumberFmt(*pFld, sStr))
eFld = ww::eSAVEDATE;
break;
case DI_PRINT:
- if (DI_SUB_AUTHOR != (nSubType & DI_SUB_AUTHOR) &&
+ if (DI_SUB_AUTHOR != (nSubType & DI_SUB_MASK) &&
rWW8Wrt.GetNumberFmt(*pFld, sStr))
eFld = ww::ePRINTDATE;
break;
case DI_EDIT:
- if( DI_SUB_AUTHOR != (nSubType & DI_SUB_AUTHOR ) &&
+ if( DI_SUB_AUTHOR != (nSubType & DI_SUB_MASK ) &&
rWW8Wrt.GetNumberFmt( *pFld, sStr ))
eFld = ww::eSAVEDATE;
break;
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index b992534b014c..8d8efd2df452 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2280,11 +2280,6 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
// values, if it differs from the one in the FSPA.
if ( pRecord->nXRelTo == 2 && pRecord->nYRelTo == 2 )
{
- // if <nXRelTo> differs from <FSPA.nbx> overwrite <nXRelTo>
- if ( pFSPA->nbx != pRecord->nXRelTo )
- {
- pRecord->nXRelTo = pFSPA->nbx;
- }
// if <nYRelTo> differs from <FSPA.nby> overwrite <nYRelTo>
if ( pFSPA->nby != pRecord->nYRelTo )
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 74161d7d8589..b27986f82a79 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3502,8 +3502,14 @@ void wwSectionManager::InsertSegments()
for (mySegIter aIter = aStart; aIter != aEnd; ++aIter)
{
mySegIter aNext = aIter+1;
+ mySegIter aPrev = (aIter == aStart) ? aIter : aIter-1;
- bool bInsertSection = aIter != aStart ? aIter->IsContinous() : false;
+ // If two following sections are different in following properties, Word will interprete a continuous
+ // section break between them as if it was a section break next page.
+ bool bThisAndPreviousAreCompatible = ((aIter->GetPageWidth() == aPrev->GetPageWidth()) &&
+ (aIter->GetPageHeight() == aPrev->GetPageHeight()) && (aIter->IsLandScape() == aPrev->IsLandScape()));
+
+ bool bInsertSection = (aIter != aStart) ? (aIter->IsContinous() && bThisAndPreviousAreCompatible): false;
bool bInsertPageDesc = !bInsertSection;
bool bProtected = !bUseEnhFields && SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disales this...
if (bInsertPageDesc)
@@ -3518,7 +3524,10 @@ void wwSectionManager::InsertSegments()
*/
bool bIgnoreCols = false;
- if ((aNext != aEnd && aNext->IsContinous() || bProtected))
+ bool bThisAndNextAreCompatible = (aNext != aEnd) ? ((aIter->GetPageWidth() == aNext->GetPageWidth()) &&
+ (aIter->GetPageHeight() == aNext->GetPageHeight()) && (aIter->IsLandScape() == aNext->IsLandScape())) : true;
+
+ if ((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible || bProtected))
{
bIgnoreCols = true;
if ((aIter->NoCols() > 1) || bProtected)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 3a9aacfe62b4..d2bb67b78f1d 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -188,7 +188,7 @@ public:
//the rParaSprms returns back the original word paragraph indent
//sprms which were attached to the original numbering format
SwNumRule* GetNumRuleForActivation(USHORT nLFOPosition, const BYTE nLevel,
- std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0) const;
+ std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
SwNumRule* CreateNextRule(bool bSimple);
~WW8ListManager();
private:
@@ -220,6 +220,7 @@ private:
//No copying
WW8ListManager(const WW8ListManager&);
WW8ListManager& operator=(const WW8ListManager&);
+ sal_uInt16 nLastLFOPosition;
};
//-----------------------------------------
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 42d6f6eb92bf..b63181ddbf65 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -203,6 +203,8 @@ class WW8TabDesc
short nConvertedLeft;
short nMaxRight;
short nSwWidth;
+ short nPreferredWidth;
+ short nOrgDxaLeft;
bool bOk;
bool bClaimLineFmt;
@@ -1628,7 +1630,7 @@ enum wwTableSprm
{
sprmNil,
- sprmTTextFlow, sprmTFCantSplit, sprmTFCantSplit90,sprmTJc, sprmTFBiDi, sprmTDefTable,
+ sprmTTableWidth,sprmTTextFlow, sprmTFCantSplit, sprmTFCantSplit90,sprmTJc, sprmTFBiDi, sprmTDefTable,
sprmTDyaRowHeight, sprmTDefTableShd, sprmTDxaLeft, sprmTSetBrc,
sprmTDxaCol, sprmTInsert, sprmTDelete, sprmTTableHeader,
sprmTDxaGapHalf, sprmTTableBorders,
@@ -1643,6 +1645,8 @@ wwTableSprm GetTableSprm(sal_uInt16 nId, ww::WordVersion eVer)
case ww::eWW8:
switch (nId)
{
+ case 0xF614:
+ return sprmTTableWidth;
case 0x7629:
return sprmTTextFlow;
case 0x3403:
@@ -1762,6 +1766,8 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
nConvertedLeft(0),
nMaxRight(0),
nSwWidth(0),
+ nPreferredWidth(0),
+ nOrgDxaLeft(0),
bOk(true),
bClaimLineFmt(false),
eOri(text::HoriOrientation::NONE),
@@ -1828,6 +1834,15 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
wwTableSprm eSprm = GetTableSprm(nId, pIo->GetFib().GetFIBVersion());
switch (eSprm)
{
+ case sprmTTableWidth:
+ {
+ const BYTE b0 = pParams[0];
+ const BYTE b1 = pParams[1];
+ const BYTE b2 = pParams[2];
+ if (b0 == 3) // Twips
+ nPreferredWidth = b2 * 0x100 + b1;
+ }
+ break;
case sprmTTextFlow:
pNewBand->ProcessDirection(pParams);
break;
@@ -1881,6 +1896,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
// shift the whole table to that margin (see below)
{
short nDxaNew = (INT16)SVBT16ToShort( pParams );
+ nOrgDxaLeft = nDxaNew;
if( nDxaNew < nTabeDxaNew )
nTabeDxaNew = nDxaNew;
}
@@ -2326,7 +2342,7 @@ void WW8TabDesc::CalcDefaults()
}
} */
- if (nMinLeft && (text::HoriOrientation::LEFT == eOri))
+ if (nMinLeft && ((!bIsBiDi && text::HoriOrientation::LEFT == eOri) || (bIsBiDi && text::HoriOrientation::RIGHT == eOri)))
eOri = text::HoriOrientation::LEFT_AND_WIDTH; // absolutely positioned
nDefaultSwCols = nMinCols; // da Zellen einfuegen billiger ist als Mergen
@@ -2491,7 +2507,8 @@ void WW8TabDesc::CreateSwTable()
//inside the frame, in word the dialog involved greys out the
//ability to set the margin.
SvxLRSpaceItem aL( RES_LR_SPACE );
- aL.SetLeft( GetMinLeft() );
+ // set right to original DxaLeft (i28656)
+ aL.SetLeft( !bIsBiDi ? GetMinLeft() : pIo->maSectionManager.GetTextAreaWidth() - nPreferredWidth - nOrgDxaLeft);
aItemSet.Put(aL);
}
}
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index cf0099971f54..56283cef1752 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1072,6 +1072,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
bool bLVLOk = true;
sal_uInt8 aBits1;
+ nLastLFOPosition = USHRT_MAX;
long nOriginalPos = rSt.Tell();
//
// 1. PLCF LST auslesen und die Listen Vorlagen im Writer anlegen
@@ -1480,7 +1481,6 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
const BYTE nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
- const
{
sal_uInt16 nLFOInfos = pLFOInfos ? pLFOInfos->Count() : 0;
if( nLFOInfos <= nLFOPosition )
@@ -1497,6 +1497,16 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
if( !pLFOInfo->pNumRule )
return 0;
+ // #i25545#
+ SwNumFmt pFmt(*(pLFOInfo->pNumRule->GetNumFmt(nLevel)));
+ if (rReader.IsRightToLeft() && nLastLFOPosition != nLFOPosition) {
+ if ( pFmt.GetNumAdjust() == SVX_ADJUST_RIGHT)
+ pFmt.SetNumAdjust(SVX_ADJUST_LEFT);
+ else if ( pFmt.GetNumAdjust() == SVX_ADJUST_LEFT)
+ pFmt.SetNumAdjust(SVX_ADJUST_RIGHT);
+ pLFOInfo->pNumRule->Set(nLevel, pFmt);
+ }
+ nLastLFOPosition = nLFOPosition;
/*
#i1869#
If this list has had its bits set in word 2000 to pretend that it is a
@@ -1804,12 +1814,9 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO,
{
pTxtNd->SetAttr
(SwNumRuleItem(pRule->GetName()));
-
}
}
-
}
-
// --> OD 2005-10-17 #126238#
// - re-introduce fix for issue #i49037#, which got lost by
// accident on a re-synchronisation on the master.
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index edc5102710b2..e34543a79778 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -6003,7 +6003,8 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
//recorded as 3 byte;
{0xCA78, &SwWW8ImplReader::Read_DoubleLine_Rotate},
{0x6649, 0}, //undocumented
- {0xF614, 0}, //undocumented
+ {0xF614, 0}, //"sprmTTableWidth"
+ //recorded as 3 bytes;
{0xD612, 0}, //undocumented
{0xD613, 0}, //undocumented
{0xD61A, 0}, //undocumented