Kaydet (Commit) 5b255bdf authored tarafından Oliver Bolte's avatar Oliver Bolte

INTEGRATION: CWS limerickfilterteam08 (1.53.66); FILE MERGED

2003/08/15 14:11:19 cmc 1.53.66.8: #i9270# snap to known page sizes on export as well as import, move snap to single location, clean it up and document
2003/08/15 09:48:03 cmc 1.53.66.7: #i15387# handle spaces and greater 40 char len bookmarks which are not acceptable in word :-(
2003/08/14 15:30:24 cmc 1.53.66.6: #i17056# word doesn't have title case character property, work around as hard uppercased text
2003/08/11 13:03:46 cmc 1.53.66.5: #110055# disable form protection on export until some things are clarified
2003/08/11 08:37:46 cmc 1.53.66.4: #110055# wrong way around
2003/07/01 13:17:28 cmc 1.53.66.3: rework casts to make filter more readable
2003/06/11 11:41:50 cmc 1.53.66.2: RESYNC: (1.53-1.55); FILE MERGED
2003/06/05 12:49:51 mmaher 1.53.66.1: #110055 Fix for importing winword forms
üst c146925b
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: wrtww8.cxx,v $ * $RCSfile: wrtww8.cxx,v $
* *
* $Revision: 1.55 $ * $Revision: 1.56 $
* *
* last change: $Author: vg $ $Date: 2003-06-04 10:19:32 $ * last change: $Author: obo $ $Date: 2003-09-01 12:41:14 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -214,6 +214,20 @@ ...@@ -214,6 +214,20 @@
#ifndef _COM_SUN_STAR_I18N_FORBIDDENCHARACTERS_HPP_ #ifndef _COM_SUN_STAR_I18N_FORBIDDENCHARACTERS_HPP_
#include <com/sun/star/i18n/ForbiddenCharacters.hpp> #include <com/sun/star/i18n/ForbiddenCharacters.hpp>
#endif #endif
#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
#endif
#ifndef SW_WRITERHELPER
#include "writerhelper.hxx"
#endif
#ifndef SW_WRITERWORDGLUE
#include "writerwordglue.hxx"
#endif
using namespace sw::util;
using namespace sw::types;
class WW8_WrFkp class WW8_WrFkp
{ {
...@@ -339,8 +353,8 @@ static void WriteDop( SwWW8Writer& rWrt ) ...@@ -339,8 +353,8 @@ static void WriteDop( SwWW8Writer& rWrt )
rDop.fUsePrinterMetrics = !rWrt.pDoc->IsUseVirtualDevice(); rDop.fUsePrinterMetrics = !rWrt.pDoc->IsUseVirtualDevice();
// default TabStop schreiben // default TabStop schreiben
const SvxTabStopItem& rTabStop = (SvxTabStopItem& )rWrt.pDoc-> const SvxTabStopItem& rTabStop =
GetAttrPool().GetDefaultItem( RES_PARATR_TABSTOP ); DefaultItemGet<SvxTabStopItem>(*rWrt.pDoc, RES_PARATR_TABSTOP);
rDop.dxaTab = (USHORT)rTabStop[0].GetTabPos(); rDop.dxaTab = (USHORT)rTabStop[0].GetTabPos();
...@@ -355,6 +369,34 @@ static void WriteDop( SwWW8Writer& rWrt ) ...@@ -355,6 +369,34 @@ static void WriteDop( SwWW8Writer& rWrt )
rDop.cParas = rDStat.nPara; rDop.cParas = rDStat.nPara;
rDop.cLines = rDStat.nPara; rDop.cLines = rDStat.nPara;
#if 0
//Currently don't ever exprt as protected forms, we will import protected
//forms as "no design mode", but the opposite is not possible as the the
//default writer is "design", which would mean that users in word cannot
//edit any document :-(
//Readonly would be a better match, but form fields cannot be edited in
//that mode :-(
using namespace com::sun::star;
uno::Reference<lang::XComponent> xModelComp(
rWrt.pDoc->GetDocShell()->GetModel(), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xDocProps(
xModelComp, uno::UNO_QUERY);
if (xDocProps.is())
{
uno::Reference<beans::XPropertySetInfo> xInfo =
xDocProps->getPropertySetInfo();
if (xInfo.is() &&
xInfo->hasPropertyByName(C2U("ApplyFormDesignMode")))
{
sal_Bool bValue = cppu::any2bool(
xDocProps->getPropertyValue(C2U("ApplyFormDesignMode")));
if (!bValue)
rDop.fProtEnabled = 1;
}
}
#endif
// auch damit werden die DocStat-Felder in Kopf-/Fusszeilen nicht korrekt // auch damit werden die DocStat-Felder in Kopf-/Fusszeilen nicht korrekt
// berechnet. // berechnet.
// ( we do not have this fields! ) // ( we do not have this fields! )
...@@ -569,12 +611,12 @@ void SwWW8Writer::ExportDopTypography(WW8DopTypography &rTypo) ...@@ -569,12 +611,12 @@ void SwWW8Writer::ExportDopTypography(WW8DopTypography &rTypo)
rTypo.reserved1=nUseReserved; rTypo.reserved1=nUseReserved;
if (rTypo.iLevelOfKinsoku) if (rTypo.iLevelOfKinsoku)
{ {
rTypo.cchFollowingPunct = static_cast<INT16> rTypo.cchFollowingPunct = msword_cast<sal_Int16>
(pUseMe->beginLine.getLength()); (pUseMe->beginLine.getLength());
if (rTypo.cchFollowingPunct > WW8DopTypography::nMaxFollowing - 1) if (rTypo.cchFollowingPunct > WW8DopTypography::nMaxFollowing - 1)
rTypo.cchFollowingPunct = WW8DopTypography::nMaxFollowing - 1; rTypo.cchFollowingPunct = WW8DopTypography::nMaxFollowing - 1;
rTypo.cchLeadingPunct = static_cast<INT16> rTypo.cchLeadingPunct = msword_cast<sal_Int16>
(pUseMe->endLine.getLength()); (pUseMe->endLine.getLength());
if (rTypo.cchLeadingPunct > WW8DopTypography::nMaxLeading - 1) if (rTypo.cchLeadingPunct > WW8DopTypography::nMaxLeading - 1)
rTypo.cchLeadingPunct = WW8DopTypography::nMaxLeading -1; rTypo.cchLeadingPunct = WW8DopTypography::nMaxLeading -1;
...@@ -1467,14 +1509,14 @@ void SwWW8Writer::AppendBookmarks( const SwTxtNode& rNd, ...@@ -1467,14 +1509,14 @@ void SwWW8Writer::AppendBookmarks( const SwTxtNode& rNd,
nCntnt < nAktEnd ) ) nCntnt < nAktEnd ) )
{ {
ULONG nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos; ULONG nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
pBkmks->Append( nCp, rBkmk.GetName() ); pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()));
} }
if( pOPos && nNd == pOPos->nNode.GetIndex() && if( pOPos && nNd == pOPos->nNode.GetIndex() &&
( nCntnt = pOPos->nContent.GetIndex() ) >= nAktPos && ( nCntnt = pOPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd ) nCntnt < nAktEnd )
{ {
ULONG nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos; ULONG nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
pBkmks->Append( nCp, rBkmk.GetName() ); pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()));
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment