diff options
author | obo <obo@openoffice.org> | 2010-06-18 10:54:35 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-18 10:54:35 +0200 |
commit | 9ca24e718dabd621c32fdd0a5eb604d5805cd2e6 (patch) | |
tree | 9fe6504c4c970b0a74c3c6f495cb6b47cf45dc08 | |
parent | 634d41ae7f59dd48b6940d09e77ffd2554afa380 (diff) | |
parent | da127380c572fe5500e80e146efc6ce67f26b7d0 (diff) |
CWS-TOOLING: integrate CWS tl78
-rwxr-xr-x | sw/source/filter/ww8/wrtww8.cxx | 22 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 15 | ||||
-rw-r--r-- | sw/source/ui/uno/SwXDocumentSettings.cxx | 2 |
3 files changed, 30 insertions, 9 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index dc63f31800..b6cd862e9b 100755 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -257,13 +257,30 @@ static void WriteDop( WW8Export& rWrt ) SwDocShell *pDocShell(rWrt.pDoc->GetDocShell()); DBG_ASSERT(pDocShell, "no SwDocShell"); uno::Reference<document::XDocumentProperties> xDocProps; + uno::Reference<beans::XPropertySet> xProps; if (pDocShell) { + uno::Reference<lang::XComponent> xModelComp(pDocShell->GetModel(), + uno::UNO_QUERY); + xProps = uno::Reference<beans::XPropertySet>(xModelComp, + uno::UNO_QUERY); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( - pDocShell->GetModel(), uno::UNO_QUERY_THROW); + xModelComp, uno::UNO_QUERY_THROW); xDocProps = xDPS->getDocumentProperties(); DBG_ASSERT(xDocProps.is(), "DocumentProperties is null"); + + rDop.lKeyProtDoc = pDocShell->GetModifyPasswordHash(); } + if ((rWrt.pSepx && rWrt.pSepx->DocumentIsProtected()) || + rDop.lKeyProtDoc != 0) + { + rDop.fProtEnabled = 1; + } + else + { + rDop.fProtEnabled = 0; + } + if (!xDocProps.is()) { rDop.dttmCreated = rDop.dttmRevised = rDop.dttmLastPrint = 0x45FBAC69; } else { @@ -279,9 +296,8 @@ static void WriteDop( WW8Export& rWrt ) Date aD3(uDT.Day, uDT.Month, uDT.Year); Time aT3(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.HundredthSeconds); rDop.dttmLastPrint = sw::ms::DateTime2DTTM(DateTime(aD3,aT3)); - } - rDop.fProtEnabled = rWrt.pSepx ? rWrt.pSepx->DocumentIsProtected() : 0; + } // auch damit werden die DocStat-Felder in Kopf-/Fusszeilen nicht korrekt // berechnet. diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 2945cdec83..cc6b44d656 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1420,14 +1420,19 @@ void SwWW8ImplReader::ImportDop() uno::Reference<beans::XPropertySetInfo> xInfo = xDocProps->getPropertySetInfo(); sal_Bool bValue = false; - if (xInfo.is() && - xInfo->hasPropertyByName(C2U("ApplyFormDesignMode"))) + if (xInfo.is()) { - xDocProps->setPropertyValue(C2U("ApplyFormDesignMode"), - cppu::bool2any(bValue)); + if (xInfo->hasPropertyByName(C2U("ApplyFormDesignMode"))) + { + xDocProps->setPropertyValue(C2U("ApplyFormDesignMode"), + cppu::bool2any(bValue)); + } } } } + + mpDocShell->SetModifyPasswordHash(pWDop->lKeyProtDoc); + const SvtFilterOptions* pOpt = SvtFilterOptions::Get(); sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields()); if (bUseEnhFields) { @@ -1852,7 +1857,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect, bool wwSectionManager::SectionIsProtected(const wwSection &rSection) const { - return (mrReader.pWDop->fProtEnabled && !rSection.IsNotProtected()); + return (!rSection.IsNotProtected()); } void wwSectionManager::SetHdFt(wwSection &rSection, int nSect, diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index df8e740438..59fbcef91f 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -122,7 +122,7 @@ enum SwDocumentSettingsPropertyHandles HANDLE_PROTECT_FORM, HANDLE_TABS_RELATIVE_TO_INDENT, // --> OD 2008-06-05 #i89181# - HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST + HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, // <-- }; |