summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2009-11-13 15:46:58 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2009-11-13 15:46:58 +0100
commitf323477de7b296489ae3104fd66c22100002d358 (patch)
tree279d85d6deac446212836dec25034684c68aeb95 /sw
parentfd67b046624ff95b39950b8af30ad3ff90d26fe8 (diff)
parent1fc7845ffa5ee5842ab650ac7aaab0638fc4b4e4 (diff)
merge with DEV300_m64
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/IDocumentExternalData.hxx72
-rw-r--r--sw/inc/dbgoutsw.hxx6
-rw-r--r--sw/inc/doc.hxx10
-rw-r--r--sw/inc/hintids.hxx42
-rw-r--r--sw/source/core/bastyp/init.cxx12
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx5
-rwxr-xr-xsw/source/core/doc/doc.cxx10
-rw-r--r--sw/source/core/doc/docfmt.cxx8
-rw-r--r--sw/source/core/text/atrstck.cxx20
-rw-r--r--sw/source/core/txtnode/fntcache.cxx6
-rw-r--r--sw/source/core/txtnode/ndhints.cxx8
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx6
-rw-r--r--sw/source/core/undo/docundo.cxx31
-rw-r--r--sw/source/core/unocore/unochart.cxx2
-rw-r--r--sw/source/core/unocore/unoobj.cxx5
-rw-r--r--sw/source/filter/html/css1atr.cxx16
-rw-r--r--sw/source/filter/html/htmlatr.cxx16
-rw-r--r--sw/source/filter/rtf/rtfatr.cxx16
-rw-r--r--sw/source/filter/ww8/WW8FibData.cxx65
-rw-r--r--sw/source/filter/ww8/WW8FibData.hxx54
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx121
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx148
-rw-r--r--sw/source/filter/ww8/makefile.mk8
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx31
-rw-r--r--sw/source/filter/ww8/ww8par.cxx30
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx9
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx2
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx8
-rw-r--r--sw/source/ui/shells/textsh1.cxx5
29 files changed, 676 insertions, 96 deletions
diff --git a/sw/inc/IDocumentExternalData.hxx b/sw/inc/IDocumentExternalData.hxx
new file mode 100644
index 000000000000..d84c07a677d4
--- /dev/null
+++ b/sw/inc/IDocumentExternalData.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision:$
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
+#define INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
+
+#include <hash_map>
+#include <boost/shared_ptr.hpp>
+
+namespace sw
+{
+enum tExternalDataType { FIB, STTBF_ASSOC };
+
+struct ExternalDataTypeHash
+{
+ size_t operator()(tExternalDataType eType) const { return eType; }
+};
+
+class ExternalData
+{
+public:
+ ExternalData() {}
+ virtual ~ExternalData() {}
+};
+
+typedef ::boost::shared_ptr<ExternalData> tExternalDataPointer;
+}
+
+
+class IDocumentExternalData
+{
+protected:
+ typedef ::std::hash_map<sw::tExternalDataType, sw::tExternalDataPointer, sw::ExternalDataTypeHash>
+ tExternalData;
+
+ tExternalData m_externalData;
+
+ virtual ~IDocumentExternalData() {};
+
+public:
+ virtual void setExternalData(sw::tExternalDataType eType,
+ sw::tExternalDataPointer pPayload) = 0;
+ virtual sw::tExternalDataPointer getExternalData(sw::tExternalDataType eType) = 0;
+};
+
+#endif //INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index 635141a1bdc5..7d8d9ca4a5a3 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -35,6 +35,11 @@
#include <hash_map>
#include <tox.hxx>
class String;
+
+namespace rtl
+{
+class OUString;
+}
class SwNode;
class SwTxtAttr;
class SwpHints;
@@ -69,6 +74,7 @@ extern bool bDbgOutPrintAttrSet;
SW_DLLPUBLIC const char * dbg_out(const void * pVoid);
SW_DLLPUBLIC const char * dbg_out(const String & aStr);
+SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr);
SW_DLLPUBLIC const char * dbg_out(const SwRect & rRect);
SW_DLLPUBLIC const char * dbg_out(const SwFrmFmt & rFrmFmt);
SW_DLLPUBLIC const char * dbg_out(const SwNode & rNode);
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 5ea499a8ff82..c6d06cb2d54a 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -58,6 +58,7 @@
#include <IDocumentListsAccess.hxx>
class SwList;
// <--
+#include <IDocumentExternalData.hxx>
#define _SVSTDARR_STRINGSDTOR
#include <svtools/svstdarr.hxx>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
@@ -278,8 +279,9 @@ class SW_DLLPUBLIC SwDoc :
public IDocumentOutlineNodes,
// <--
// --> OD 2008-03-12 #refactorlists#
- public IDocumentListsAccess
+ public IDocumentListsAccess,
// <--
+ public IDocumentExternalData
{
friend void _InitCore();
@@ -1053,6 +1055,12 @@ public:
const String sNewListStyleName );
// <--
+ /** IDocumentExternalData */
+ virtual void setExternalData(::sw::tExternalDataType eType,
+ ::sw::tExternalDataPointer pPayload);
+ virtual ::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType);
+
+
/** INextInterface here
*/
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 3f2bdf6f07ae..1dc28e197107 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -112,23 +112,33 @@ enum RES_TXTATR
{
RES_TXTATR_BEGIN = RES_CHRATR_END,
-// alle TextAttribute mit einem Ende
-// JP 12.07.96: die Ids RES_TXTATR_NOLINEBREAK und RES_TXTATR_NOHYPHEN
-// wanderten in den Bereich der CharAttr. Die Ids selbst muessen
-// aber als Dummies noch erhalten bleiben. Der SwG-/Sw3 Reader
-// merkt sich die Ids immer als Offset zum Start der Gruppe!!!
-// Aus dem RES_TXTATR_NOLINEBREAK ist jetzt RES_TXTATR_INETFMT geworden.
+/** text attributes with start and end.
+ #i105453#:
+ Hints (SwTxtAttr) with the same start and end position are sorted by
+ WhichId, i.e., the TXTATR constants defined here.
+ The text formatting (SwAttrIter) poses some requirements on TXTATR order:
+ - AUTOFMT must precede CHARFMT, so that auto style can overwrite char style.
+ - INETFMT must precede CHARFMT, so that link style can overwrite char style.
+ (this is actually surprising: CHARFMT hints are not split at INETFMT
+ hints on insertion, but on exporting to ODF. if CHARFMT would precede
+ INETFMT, then exporting and importing will effectively change precedence)
+
+ Nesting hints (SwTxtAttrNesting) also have requirements on TXTATR order,
+ to ensure proper nesting (because CJK_RUBY and INETFMT have no CH_TXTATR):
+ - INETFMT should precede CJK_RUBY (for UNO API it does not matter...)
+ - META and METAFIELD must precede CJK_RUBY and INETFMT
+ */
RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
- RES_TXTATR_AUTOFMT = RES_TXTATR_WITHEND_BEGIN, // 41
- RES_TXTATR_INETFMT, // 42
- RES_TXTATR_REFMARK, // 43
- RES_TXTATR_TOXMARK, // 44
- RES_TXTATR_CHARFMT, // 45
- RES_TXTATR_DUMMY5, // 46
- RES_TXTATR_CJK_RUBY, // 47
- RES_TXTATR_UNKNOWN_CONTAINER, // 48
- RES_TXTATR_META, // 49
- RES_TXTATR_METAFIELD, // 50
+ RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN, // 41
+ RES_TXTATR_TOXMARK, // 42
+ RES_TXTATR_META, // 43
+ RES_TXTATR_METAFIELD, // 44
+ RES_TXTATR_AUTOFMT, // 45
+ RES_TXTATR_INETFMT, // 46
+ RES_TXTATR_CHARFMT, // 47
+ RES_TXTATR_CJK_RUBY, // 48
+ RES_TXTATR_UNKNOWN_CONTAINER, // 49
+ RES_TXTATR_DUMMY5, // 50
RES_TXTATR_WITHEND_END,
// alle TextAttribute ohne ein Ende
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index cd0d5321da1e..9f275aa09ed3 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -311,16 +311,16 @@ SfxItemInfo __FAR_DATA aSlotTab[] =
{ 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_DUMMY1
{ 0, SFX_ITEM_POOLABLE }, // RES_CHRATR_DUMMY2
- { 0, SFX_ITEM_POOLABLE }, // RES_TXTATR_AUTOFMT
- { FN_TXTATR_INET, 0 }, // RES_TXTATR_INETFMT
{ 0, 0 }, // RES_TXTATR_REFMARK
{ 0, 0 }, // RES_TXTATR_TOXMARK
+ { 0, 0 }, // RES_TXTATR_META
+ { 0, 0 }, // RES_TXTATR_METAFIELD
+ { 0, SFX_ITEM_POOLABLE }, // RES_TXTATR_AUTOFMT
+ { FN_TXTATR_INET, 0 }, // RES_TXTATR_INETFMT
{ 0, 0 }, // RES_TXTATR_CHARFMT
+ { SID_ATTR_CHAR_CJK_RUBY, 0 }, // RES_TXTATR_CJK_RUBY
+ { 0, SFX_ITEM_POOLABLE }, // RES_TXTATR_UNKNOWN_CONTAINER
{ 0, SFX_ITEM_POOLABLE }, // RES_TXTATR_DUMMY5
- { SID_ATTR_CHAR_CJK_RUBY, 0 }, // RES_TXTATR_CJK_RUBY,
- { 0, SFX_ITEM_POOLABLE }, // RES_TXTATR_UNKNOWN_CONTAINER,
- { 0, 0 }, // RES_TXTATR_META,
- { 0, 0 }, // RES_TXTATR_METAFIELD,
{ 0, 0 }, // RES_TXTATR_FIELD
{ 0, 0 }, // RES_TXTATR_FLYCNT
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 3ed58c72bd97..9fda3564a400 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -111,6 +111,11 @@ SW_DLLPUBLIC const char * dbg_out(const String & aStr)
return aDbgOutResult.GetBuffer();
}
+SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr)
+{
+ return OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US).getStr();
+}
+
struct CompareUShort
{
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 9b736d851381..e2b94926380b 100755
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -2625,3 +2625,13 @@ void SwDoc::ChkCondColls()
}
}
+void SwDoc::setExternalData(::sw::tExternalDataType eType,
+ ::sw::tExternalDataPointer pPayload)
+{
+ m_externalData[eType] = pPayload;
+}
+
+::sw::tExternalDataPointer SwDoc::getExternalData(::sw::tExternalDataType eType)
+{
+ return m_externalData[eType];
+}
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 948741067967..c054b7ee5579 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -469,9 +469,10 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
// --> OD 2008-02-25 #refactorlists#
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
// <--
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CJK_RUBY, RES_TXTATR_UNKNOWN_CONTAINER,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
+ RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
+ RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
@@ -753,7 +754,8 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
// TEST_TEMP ToDo: AutoFmt!
SfxItemSet aTxtSet( pDoc->GetAttrPool(),
RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK,
- RES_TXTATR_DUMMY5, RES_TXTATR_WITHEND_END-1,
+ RES_TXTATR_META, RES_TXTATR_METAFIELD,
+ RES_TXTATR_CJK_RUBY, RES_TXTATR_WITHEND_END-1,
0 );
aTxtSet.Put( rChgSet );
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index f8d617061d3e..a6ed9f42255b 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -128,16 +128,16 @@ const BYTE StackPos[ static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
35, // RES_CHRATR_OVERLINE, // 38
0, // RES_CHRATR_DUMMY1, // 39
0, // RES_CHRATR_DUMMY2, // 40
- 0, // RES_TXTATR_AUTOFMT, // 41
- 0, // RES_TXTATR_INETFMT // 42
- 36, // RES_TXTATR_REFMARK, // 43
- 37, // RES_TXTATR_TOXMARK, // 44
- 0, // RES_TXTATR_CHARFMT, // 45
- 0, // RES_TXTATR_DUMMY5 // 46
- 38, // RES_TXTATR_CJK_RUBY, // 47
- 0, // RES_TXTATR_UNKNOWN_CONTAINER, // 48
- 39, // RES_TXTATR_META, // 49
- 39 // RES_TXTATR_METAFIELD, // 50
+ 36, // RES_TXTATR_REFMARK, // 41
+ 37, // RES_TXTATR_TOXMARK, // 42
+ 38, // RES_TXTATR_META, // 43
+ 38, // RES_TXTATR_METAFIELD, // 44
+ 0, // RES_TXTATR_AUTOFMT, // 45
+ 0, // RES_TXTATR_INETFMT // 46
+ 0, // RES_TXTATR_CHARFMT, // 47
+ 39, // RES_TXTATR_CJK_RUBY, // 48
+ 0, // RES_TXTATR_UNKNOWN_CONTAINER, // 49
+ 0, // RES_TXTATR_DUMMY5 // 50
};
/*************************************************************************
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 9952c50e678d..826398ec2ce6 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2424,8 +2424,12 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
const xub_StrLen nEnd = rInf.GetIdx() + rInf.GetLen();
// skip character cells for complex scripts
- if ( rInf.GetFont() && SW_CTL == rInf.GetFont()->GetActual() &&
+ // --> OD 2009-10-14 #i105571# - skip also character cells for CJK
+ if ( rInf.GetFont() &&
+ ( SW_CTL == rInf.GetFont()->GetActual() ||
+ SW_CJK == rInf.GetFont()->GetActual() ) &&
pBreakIt->GetBreakIter().is() )
+ // <--
{
aLang = rInf.GetFont()->GetLanguage();
bSkipCell = sal_True;
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 6fdacb37a456..54be1b261655 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -123,8 +123,8 @@ static BOOL lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
return (long)&rHt1 < (long)&rHt2;
}
- // the order must ensure that META is inside RUBY!
- return ( nWhich1 < nWhich2 );
+ // order is important! for requirements see hintids.hxx
+ return ( nWhich1 > nWhich2 );
}
return ( nHt1 > nHt2 );
}
@@ -159,8 +159,8 @@ static BOOL lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
return (long)&rHt1 > (long)&rHt2;
}
- // the order must ensure that META is inside RUBY!
- return ( nWhich1 > nWhich2 );
+ // order is important! for requirements see hintids.hxx
+ return ( nWhich1 < nWhich2 );
}
else
return ( *rHt1.GetStart() > *rHt2.GetStart() );
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 6c5aafb4667d..f5ebacaac8cd 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1518,8 +1518,8 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
{
SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0 );
aCharSet.Put( *GetpSwAttrSet() );
@@ -1565,8 +1565,8 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
{
SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0 );
aCharSet.Put( *GetpSwAttrSet() );
@@ -2072,8 +2072,8 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
{
SfxItemSet aCharSet( pDest->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0 );
aCharSet.Put( *GetpSwAttrSet() );
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 07eb7182d717..1eeb9246dffe 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -679,22 +679,27 @@ SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos )
int nTmpPos = nPos + pUndoStart->GetEndOffset();
int nSubstitute = -1;
- SwUndo * pTmpUndo;
- do
+ // --> OD 2009-09-30 #i105457#
+ if ( nTmpPos > 0 )
+ // <--
{
- nTmpPos--;
- pTmpUndo = rUndos[ static_cast<USHORT>(nTmpPos) ];
+ SwUndo * pTmpUndo;
+ do
+ {
+ nTmpPos--;
+ pTmpUndo = rUndos[ static_cast<USHORT>(nTmpPos) ];
- if (pTmpUndo->GetEffectiveId() > UNDO_END)
- nSubstitute = nTmpPos;
- }
- while (nSubstitute < 0 && nTmpPos > nPos);
+ if (pTmpUndo->GetEffectiveId() > UNDO_END)
+ nSubstitute = nTmpPos;
+ }
+ while (nSubstitute < 0 && nTmpPos > nPos);
- if (nSubstitute >= 0)
- {
- SwUndo * pSubUndo = rUndos[ static_cast<USHORT>(nSubstitute) ];
- nId = pSubUndo->GetEffectiveId();
- sStr = pSubUndo->GetComment();
+ if (nSubstitute >= 0)
+ {
+ SwUndo * pSubUndo = rUndos[ static_cast<USHORT>(nSubstitute) ];
+ nId = pSubUndo->GetEffectiveId();
+ sStr = pSubUndo->GetComment();
+ }
}
}
else
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index b09f4196d396..8103b924ae98 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -2061,6 +2061,7 @@ SwChartDataSequence::SwChartDataSequence(
// which is required for some functions
SwUnoTableCrsr* pUnoTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pTblCrsr);
DBG_ASSERT(pUnoTblCrsr, "SwChartDataSequence: cursor not SwUnoTableCrsr");
+ (void) pUnoTblCrsr;
#endif
}
@@ -2111,6 +2112,7 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) :
// which is required for some functions
SwUnoTableCrsr* pUnoTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pTblCrsr);
DBG_ASSERT(pUnoTblCrsr, "SwChartDataSequence: cursor not SwUnoTableCrsr");
+ (void) pUnoTblCrsr;
#endif
}
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 70d9560eef17..3f07ccf66b62 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2387,9 +2387,10 @@ void SAL_CALL SwXTextCursor::setAllPropertiesToDefault()
// selection specific attribut ranges
USHORT aResetableSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CJK_RUBY, RES_TXTATR_UNKNOWN_CONTAINER,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
+ RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
+ RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
0
};
SvUShortsSort aParaWhichIds;
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 2020efd3288e..01108a0d2567 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3755,22 +3755,22 @@ SwAttrFnTab aCSS1AttrFnTab = {
/* RES_CHRATR_DUMMY1 */ 0,
/* RES_CHRATR_DUMMY2 */ 0,
-/* RES_TXTATR_NOLINEBREAK */ 0,
-/* RES_TXTATR_NOHYPHEN */ 0,
-/* RES_TXTATR_REFMARK*/ 0,
+/* RES_TXTATR_REFMARK */ 0,
/* RES_TXTATR_TOXMARK */ 0,
-/* RES_TXTATR_CHARFMT */ 0,
-/* RES_TXTATR_TWO_LINES */ 0,
+/* RES_TXTATR_META */ 0,
+/* RES_TXTATR_METAFIELD */ 0,
+/* RES_TXTATR_AUTOFMT */ 0,
+/* RES_TXTATR_INETFMT */ 0,
+/* RES_TXTATR_CHARFMT */ 0,
/* RES_TXTATR_CJK_RUBY */ 0,
/* RES_TXTATR_UNKNOWN_CONTAINER */ 0,
/* RES_TXTATR_DUMMY5 */ 0,
-/* RES_TXTATR_DUMMY6 */ 0,
/* RES_TXTATR_FIELD */ 0,
/* RES_TXTATR_FLYCNT */ 0,
/* RES_TXTATR_FTN */ 0,
-/* RES_TXTATR_SOFTHYPH */ 0,
-/* RES_TXTATR_HARDBLANK*/ 0,
+/* RES_TXTATR_DUMMY4 */ 0,
+/* RES_TXTATR_DUMMY3 */ 0,
/* RES_TXTATR_DUMMY1 */ 0, // Dummy:
/* RES_TXTATR_DUMMY2 */ 0, // Dummy:
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 0012d5dc0664..e788dc5da275 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -3391,22 +3391,22 @@ SwAttrFnTab aHTMLAttrFnTab = {
/* RES_CHRATR_DUMMY1 */ 0,
/* RES_CHRATR_DUMMY2 */ 0,
-/* RES_TXTATR_DUMMY4 */ 0,
-/* RES_TXTATR_INETFMT */ OutHTML_SwFmtINetFmt,
-/* RES_TXTATR_REFMARK*/ 0,
+/* RES_TXTATR_REFMARK */ 0,
/* RES_TXTATR_TOXMARK */ 0,
-/* RES_TXTATR_CHARFMT */ OutHTML_SwTxtCharFmt,
-/* RES_TXTATR_TWO_LINES */ 0,
+/* RES_TXTATR_META */ 0,
+/* RES_TXTATR_METAFIELD */ 0,
+/* RES_TXTATR_AUTOFMT */ 0,
+/* RES_TXTATR_INETFMT */ OutHTML_SwFmtINetFmt,
+/* RES_TXTATR_CHARFMT */ OutHTML_SwTxtCharFmt,
/* RES_TXTATR_CJK_RUBY */ 0,
/* RES_TXTATR_UNKNOWN_CONTAINER */ 0,
/* RES_TXTATR_DUMMY5 */ 0,
-/* RES_TXTATR_DUMMY6 */ 0,
/* RES_TXTATR_FIELD */ OutHTML_SwFmtFld,
/* RES_TXTATR_FLYCNT */ OutHTML_SwFlyCnt,
/* RES_TXTATR_FTN */ OutHTML_SwFmtFtn,
-/* RES_TXTATR_SOFTHYPH */ 0,
-/* RES_TXTATR_HARDBLANK*/ 0,
+/* RES_TXTATR_DUMMY4 */ 0,
+/* RES_TXTATR_DUMMY3 */ 0,
/* RES_TXTATR_DUMMY1 */ 0, // Dummy:
/* RES_TXTATR_DUMMY2 */ 0, // Dummy:
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index 6b033fe73e52..fc60c857aedb 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -4251,22 +4251,22 @@ SwAttrFnTab aRTFAttrFnTab = {
/* RES_CHRATR_DUMMY1 */ 0,
/* RES_CHRATR_DUMMY2 */ 0,
-/* RES_TXTATR_AUTOFMT */ OutRTF_SwTxtAutoFmt,
-/* RES_TXTATR_INETFMT */ OutRTF_SwTxtINetFmt, // Dummy
-/* RES_TXTATR_REFMARK*/ 0, // NOT USED!! OutRTF_SwRefMark,
+/* RES_TXTATR_REFMARK */ 0, // NOT USED!! OutRTF_SwRefMark,
/* RES_TXTATR_TOXMARK */ 0, // NOT USED!! OutRTF_SwTOXMark,
-/* RES_TXTATR_CHARFMT */ OutRTF_SwTxtCharFmt,
-/* RES_TXTATR_TWO_LINES */ 0,
+/* RES_TXTATR_META */ 0,
+/* RES_TXTATR_METAFIELD */ 0,
+/* RES_TXTATR_AUTOFMT */ OutRTF_SwTxtAutoFmt,
+/* RES_TXTATR_INETFMT */ OutRTF_SwTxtINetFmt,
+/* RES_TXTATR_CHARFMT */ OutRTF_SwTxtCharFmt,
/* RES_TXTATR_CJK_RUBY */ OutRTF_SwTxtRuby,
/* RES_TXTATR_UNKNOWN_CONTAINER */ 0,
/* RES_TXTATR_DUMMY5 */ 0,
-/* RES_TXTATR_DUMMY6 */ 0,
/* RES_TXTATR_FIELD */ OutRTF_SwField,
/* RES_TXTATR_FLYCNT */ OutRTF_SwFlyCntnt,
/* RES_TXTATR_FTN */ OutRTF_SwFtn,
-/* RES_TXTATR_SOFTHYPH */ 0, // old attr. - coded now by character
-/* RES_TXTATR_HARDBLANK*/ 0,
+/* RES_TXTATR_DUMMY4 */ 0,
+/* RES_TXTATR_DUMMY3 */ 0,
/* RES_TXTATR_DUMMY1 */ 0, // Dummy:
/* RES_TXTATR_DUMMY2 */ 0, // Dummy:
diff --git a/sw/source/filter/ww8/WW8FibData.cxx b/sw/source/filter/ww8/WW8FibData.cxx
new file mode 100644
index 000000000000..fdf54c25b216
--- /dev/null
+++ b/sw/source/filter/ww8/WW8FibData.cxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile:$
+ * $Revision:$
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
+
+#include "WW8FibData.hxx"
+
+namespace ww8
+{
+WW8FibData::WW8FibData()
+ : m_bReadOnlyRecommended(false),
+ m_bWriteReservation(false)
+{
+}
+
+WW8FibData::~WW8FibData()
+{
+}
+
+void WW8FibData::setReadOnlyRecommended(bool bReadOnlyRecommended)
+{
+ m_bReadOnlyRecommended = bReadOnlyRecommended;
+}
+
+void WW8FibData::setWriteReservation(bool bWriteReservation)
+{
+ m_bWriteReservation = bWriteReservation;
+}
+
+bool WW8FibData::getReadOnlyRecommended() const
+{
+ return m_bReadOnlyRecommended;
+}
+
+bool WW8FibData::getWriteReservation() const
+{
+ return m_bWriteReservation;
+}
+}
diff --git a/sw/source/filter/ww8/WW8FibData.hxx b/sw/source/filter/ww8/WW8FibData.hxx
new file mode 100644
index 000000000000..597ab16a7ad5
--- /dev/null
+++ b/sw/source/filter/ww8/WW8FibData.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile:$
+ * $Revision:$
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
+#ifndef INCLUDED_WW8_FIB_DATA_HXX
+#define INCLUDED_WW8_FIB_DATA_HXX
+#include <IDocumentExternalData.hxx>
+
+namespace ww8
+{
+class WW8FibData : public ::sw::ExternalData
+{
+ bool m_bReadOnlyRecommended;
+ bool m_bWriteReservation;
+
+public:
+ WW8FibData();
+ virtual ~WW8FibData();
+
+ void setReadOnlyRecommended(bool bReadOnlyRecommended);
+ void setWriteReservation(bool bWriteReservation);
+
+ bool getReadOnlyRecommended() const;
+ bool getWriteReservation() const;
+};
+}
+
+#endif // INCLUDED_WW8_FIB_DATA_HXX
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
new file mode 100644
index 000000000000..b03ec823292f
--- /dev/null
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ww8par2.hxx,v $
+ * $Revision: 1.47.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
+
+#include <iostream>
+#include <dbgoutsw.hxx>
+#include "WW8Sttbf.hxx"
+
+namespace ww8
+{
+ WW8Struct::WW8Struct(SvStream& rSt, sal_uInt32 nPos, sal_uInt32 nSize)
+ : mn_offset(0), mn_size(nSize)
+ {
+ rSt.Seek(nPos);
+
+ mp_data.reset(new BYTE[nSize]);
+ rSt.Read(mp_data.get(), nSize);
+ }
+
+ WW8Struct::WW8Struct(WW8Struct * pStruct, sal_uInt32 nPos, sal_uInt32 nSize)
+ : mp_data(pStruct->mp_data), mn_offset(pStruct->mn_offset + nPos),
+ mn_size(nSize)
+ {
+ }
+
+ WW8Struct::~WW8Struct()
+ {
+ }
+
+ sal_uInt8 WW8Struct::getU8(sal_uInt32 nOffset)
+ {
+ sal_uInt8 nResult = 0;
+
+ if (nOffset < mn_size)
+ {
+ nResult = mp_data[mn_offset + nOffset];
+ }
+
+ return nResult;
+ }
+
+ ::rtl::OUString WW8Struct::getUString(sal_uInt32 nOffset,
+ sal_uInt32 nCount)
+ {
+ ::rtl::OUString aResult;
+
+ if (nCount > 0)
+ {
+ rtl_uString * pNew = 0;
+ rtl_uString_newFromStr_WithLength
+ (&pNew, reinterpret_cast<const sal_Unicode *>(&mp_data[mn_offset + nOffset]),
+ nCount);
+
+ aResult = rtl::OUString(pNew);
+ }
+
+#ifdef DEBUG
+ char sBuffer[256];
+ snprintf(sBuffer, sizeof(sBuffer), "offset=\"%" SAL_PRIuUINT32 "\" count=\"%" SAL_PRIuUINT32 "\"",
+ nOffset, nCount);
+ ::std::clog << "<WW8Struct-getUString" << sBuffer << ">"
+ << dbg_out(aResult) << "</WW8Struct-getUString>"
+ << ::std::endl;
+#endif
+
+ return aResult;
+
+ }
+
+ ::rtl::OUString WW8Struct::getString(sal_uInt32 nOffset,
+ sal_uInt32 nCount)
+ {
+ ::rtl::OUString aResult;
+
+ if (nCount > 0)
+ {
+ ::rtl::OString aOStr(reinterpret_cast<const sal_Char *>(&mp_data[mn_offset + nOffset]),
+ nCount);
+ ::rtl::OUString aOUStr(rtl::OStringToOUString(aOStr, RTL_TEXTENCODING_ASCII_US));
+ aResult = rtl::OUString(aOUStr);
+ }
+
+#ifdef DEBUG
+ char sBuffer[256];
+ snprintf(sBuffer, sizeof(sBuffer), "offset=\"%" SAL_PRIuUINT32 "\" count=\"%" SAL_PRIuUINT32 "\"",
+ nOffset, nCount);
+ ::std::clog << "<WW8Struct-getString " << sBuffer << ">"
+ << dbg_out(aResult) << "</WW8Struct-getUString>"
+ << ::std::endl;
+#endif
+
+ return aResult;
+ }
+}
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
new file mode 100644
index 000000000000..cb3c43cee86c
--- /dev/null
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ww8par2.hxx,v $
+ * $Revision: 1.47.214.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
+
+#include <vector>
+#include <boost/shared_ptr.hpp>
+#include <boost/shared_array.hpp>
+#include <tools/solar.h>
+#include <rtl/ustring.hxx>
+#include <tools/stream.hxx>
+#include <IDocumentExternalData.hxx>
+
+namespace ww8
+{
+ typedef boost::shared_array<BYTE> DataArray_t;
+
+class WW8Struct : public ::sw::ExternalData
+ {
+ DataArray_t mp_data;
+ sal_uInt32 mn_offset;
+ sal_uInt32 mn_size;
+
+ public:
+ WW8Struct(SvStream& rSt, sal_uInt32 nPos, sal_uInt32 nSize);
+ WW8Struct(WW8Struct * pStruct, sal_uInt32 nPos, sal_uInt32 nSize);
+ virtual ~WW8Struct();
+
+ sal_uInt8 getU8(sal_uInt32 nOffset);
+
+ sal_uInt16 getU16(sal_uInt32 nOffset)
+ { return getU8(nOffset) + (getU8(nOffset + 1) << 8); }
+
+ sal_uInt32 getU32(sal_uInt32 nOffset)
+ { return getU16(nOffset) + (getU16(nOffset + 1) << 16); }
+
+ ::rtl::OUString getUString(sal_uInt32 nOffset, sal_uInt32 nCount);
+
+ ::rtl::OUString getString(sal_uInt32 nOffset, sal_uInt32 nCount);
+ };
+
+typedef ::std::vector<rtl::OUString> StringVector_t;
+ template <class T>
+ class WW8Sttb : public WW8Struct
+ {
+ typedef ::boost::shared_ptr< void > ExtraPointer_t;
+ typedef ::std::vector< ExtraPointer_t > ExtrasVector_t;
+ bool bDoubleByteCharacters;
+ StringVector_t m_Strings;
+ ExtrasVector_t m_Extras;
+
+ public:
+ WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize);
+ virtual ~WW8Sttb();
+
+ sal_uInt32 getCount() const;
+ ::rtl::OUString getEntry(sal_uInt32 nEntry) const
+ {
+ return m_Strings[nEntry];
+ }
+
+ StringVector_t & getStrings()
+ {
+ return m_Strings;
+ }
+
+ const T * getExtra(sal_uInt32 nEntry) const
+ {
+ return dynamic_cast<const T *> (m_Extras[nEntry].get());
+ }
+ };
+
+ template <class T>
+ WW8Sttb<T>::WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize)
+ : WW8Struct(rSt, nPos, nSize), bDoubleByteCharacters(false)
+ {
+ sal_uInt32 nOffset = 0;
+
+ if (getU16(nOffset) == 0xffff)
+ {
+ bDoubleByteCharacters = true;
+ nOffset += 2;
+ }
+
+ sal_uInt16 nCount = getU16(nOffset);
+ sal_uInt16 ncbExtra = getU16(nOffset + 2);
+
+ nOffset += 4;
+ for (sal_uInt16 i = 0; i < nCount; i++)
+ {
+ if (bDoubleByteCharacters)
+ {
+ sal_uInt16 nStrLen = getU16(nOffset);
+
+ m_Strings.push_back(getUString(nOffset +2, nStrLen));
+
+ nOffset += 2 + 2 * nStrLen;
+ }
+ else
+ {
+ sal_uInt8 nStrLen = getU8(nOffset);
+
+ m_Strings.push_back(getUString(nOffset, nStrLen));
+
+ nOffset += 1 + nStrLen;
+ }
+
+ if (ncbExtra > 0)
+ {
+ ExtraPointer_t pExtra(new T(this, nOffset, ncbExtra));
+ m_Extras.push_back(pExtra);
+
+ nOffset += ncbExtra;
+ }
+ }
+ }
+
+ template <class T>
+ WW8Sttb<T>::~WW8Sttb()
+ {
+ }
+}
diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk
index 6697ceaec4b1..164a8fef28d6 100644
--- a/sw/source/filter/ww8/makefile.mk
+++ b/sw/source/filter/ww8/makefile.mk
@@ -69,7 +69,9 @@ EXCEPTIONSFILES = \
$(SLO)$/writerwordglue.obj \
$(SLO)$/ww8scan.obj \
$(SLO)$/WW8TableInfo.obj \
- $(SLO)$/WW8FFData.obj
+ $(SLO)$/WW8FFData.obj \
+ $(SLO)$/WW8Sttbf.obj \
+ $(SLO)$/WW8FibData.obj
SLOFILES = \
@@ -96,7 +98,9 @@ SLOFILES = \
$(SLO)$/writerhelper.obj \
$(SLO)$/writerwordglue.obj \
$(SLO)$/WW8TableInfo.obj \
- $(SLO)$/WW8FFData.obj
+ $(SLO)$/WW8FFData.obj \
+ $(SLO)$/WW8Sttbf.obj \
+ $(SLO)$/WW8FibData.obj
# --- Tagets -------------------------------------------------------
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 53587bca451c..6601f874c60f 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -117,6 +117,8 @@
#include <svx/mscodec.hxx>
#include <osl/time.h>
#include <rtl/random.h>
+#include "WW8Sttbf.hxx"
+#include "WW8FibData.hxx"
using namespace sw::util;
using namespace sw::types;
@@ -2535,6 +2537,8 @@ void WW8Export::WriteMainText()
#endif
}
+typedef ww8::WW8Sttb< ww8::WW8Struct > WW8SttbAssoc;
+
void WW8Export::WriteFkpPlcUsw()
{
if( !bWrtWW8 )
@@ -2656,9 +2660,36 @@ void WW8Export::WriteFkpPlcUsw()
ExportDopTypography(pDop->doptypography);
WriteDop( *this ); // Document-Properties
+
+ // Write SttbfAssoc
+ WW8SttbAssoc * pSttbfAssoc = dynamic_cast<WW8SttbAssoc *>
+ (pDoc->getExternalData(::sw::STTBF_ASSOC).get());
+ ::std::vector<String> aStrings;
+
+ ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings();
+ ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end();
+ for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin();
+ aIt != aItEnd; aIt++)
+ {
+ String aStr(aIt->getStr());
+ aStrings.push_back(aStr);
+ }
+
+ WriteAsStringTable(aStrings, pFib->fcSttbfAssoc,
+ pFib->lcbSttbfAssoc);
+
}
Strm().Seek( 0 );
+ // Reclaim stored FIB data from document.
+ ::ww8::WW8FibData * pFibData = dynamic_cast<ww8::WW8FibData *>
+ (pDoc->getExternalData(::sw::FIB).get());
+
+ pFib->fReadOnlyRecommended =
+ pFibData->getReadOnlyRecommended() ? 1 : 0;
+ pFib->fWriteReservation =
+ pFibData->getWriteReservation() ? 1 : 0;
+
pFib->Write( Strm() ); // FIB
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 241e339003d2..b9fd20dc1cba 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -138,6 +138,8 @@
#include <dbgoutsw.hxx>
#endif
+#include "WW8Sttbf.hxx"
+#include "WW8FibData.hxx"
#define MM_250 1417 // WW-Default fuer Hor. Seitenraender: 2.5 cm
#define MM_200 1134 // WW-Default fuer u.Seitenrand: 2.0 cm
@@ -3740,6 +3742,34 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
if (mbNewDoc && pStg && !pGloss)
ReadDocInfo();
+ ::ww8::WW8FibData * pFibData = new ::ww8::WW8FibData();
+
+ if (pWwFib->fReadOnlyRecommended)
+ pFibData->setReadOnlyRecommended(true);
+ else
+ pFibData->setReadOnlyRecommended(false);
+
+ if (pWwFib->fWriteReservation)
+ pFibData->setWriteReservation(true);
+ else
+ pFibData->setWriteReservation(false);
+
+ ::sw::tExternalDataPointer pExternalFibData(pFibData);
+
+ rDoc.setExternalData(::sw::FIB, pExternalFibData);
+
+ ::sw::tExternalDataPointer pSttbfAsoc
+ (new ::ww8::WW8Sttb<ww8::WW8Struct>(*pTableStream, pWwFib->fcSttbfAssoc, pWwFib->lcbSttbfAssoc));
+
+ rDoc.setExternalData(::sw::STTBF_ASSOC, pSttbfAsoc);
+
+ if (pWwFib->fWriteReservation || pWwFib->fReadOnlyRecommended)
+ {
+ SwDocShell * pDocShell = rDoc.GetDocShell();
+ if (pDocShell)
+ pDocShell->SetReadOnlyUI(sal_True);
+ }
+
pPaM = new SwPaM(rPos);
pCtrlStck = new SwWW8FltControlStack( &rDoc, nFieldFlags, *this );
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 3a1f6e96c651..f20c13889f27 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5488,7 +5488,8 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
cQuickSaves = ( aBits1 & 0xf0 ) >> 4;
fEncrypted = aBits2 & 0x01 ;
fWhichTblStm= ( aBits2 & 0x02 ) >> 1;
- // dummy = ( aBits2 & 0x0e ) >> 1;
+ fReadOnlyRecommended = (aBits2 & 0x4) >> 2;
+ fWriteReservation = (aBits2 & 0x8) >> 3;
fExtChar = ( aBits2 & 0x10 ) >> 4;
// dummy = ( aBits2 & 0x20 ) >> 5;
fFarEast = ( aBits2 & 0x40 ) >> 6; // #i90932#
@@ -5661,6 +5662,12 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
nBits16 |= (0xf0 & ( cQuickSaves << 4 ));
if( fEncrypted ) nBits16 |= 0x0100;
if( fWhichTblStm ) nBits16 |= 0x0200;
+
+ if (fReadOnlyRecommended)
+ nBits16 |= 0x0400;
+ if (fWriteReservation)
+ nBits16 |= 0x0800;
+
if( fExtChar ) nBits16 |= 0x1000;
if( fFarEast ) nBits16 |= 0x4000; // #i90932#
if( fObfuscated ) nBits16 |= 0x8000;
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 2bcf97819f21..3547eaf99391 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -1033,6 +1033,8 @@ public:
UINT16 cQuickSaves :4; // 00F0 count of times file was quicksaved
UINT16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
UINT16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
+ UINT16 fReadOnlyRecommended :1;
+ UINT16 fWriteReservation :1;
// named "0Table", when 1, this fib refers to the
// table stream named "1Table". Normally, a file
// will have only one table stream, but under unusual
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 75b24153573e..6bea77137ac6 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -154,14 +154,6 @@ SwPostItMgr::SwPostItMgr(SwView* pView)
mbWaitingForCalcRects = true;
mnEventId = Application::PostUserEvent( LINK( this, SwPostItMgr, CalcHdl), 0 );
}
-
- //#i#
- if (HasNotes() && !mpWrtShell->GetViewOptions()->IsPostIts())
- {
- SfxRequest aRequest(mpView->GetViewFrame(),FN_VIEW_NOTES);
- mpView->ExecViewOptions(aRequest);
- }
-
}
SwPostItMgr::~SwPostItMgr()
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 77de4c0821ff..977dc77c98d3 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -488,9 +488,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_CHRATR_CJK_LANGUAGE + 1, RES_CHRATR_CTL_LANGUAGE - 1,
RES_CHRATR_CTL_LANGUAGE + 1, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CJK_RUBY, RES_TXTATR_UNKNOWN_CONTAINER,
+ RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
+ RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
+ RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};