sw/inc/list.hxx | 1 + sw/source/core/doc/DocumentListsManager.cxx | 7 +++++++ sw/source/core/doc/docnum.cxx | 2 ++ sw/source/core/doc/list.cxx | 6 +++++- test/source/mtfxmldump.cxx | 24 ++++++++++++++++++++++++ vcl/README | 20 +++++++++++++++++--- 6 files changed, 56 insertions(+), 4 deletions(-)
New commits: commit ddc363b2b2496dfe72775650d8929901ca8be5a2 Author: Michael Stahl <[email protected]> Date: Wed Mar 2 13:03:52 2016 +0100 test: dump MetaPolyPolygonAction too Change-Id: I3ecafc104c91d7f4e93805b2e03359cf60d2db4b diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx index 2aab2fa..c955fcc 100644 --- a/test/source/mtfxmldump.cxx +++ b/test/source/mtfxmldump.cxx @@ -535,6 +535,30 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter) } break; + case MetaActionType::POLYPOLYGON: + { + MetaPolyPolygonAction *const pMPPAction( + static_cast<MetaPolyPolygonAction*>(pAction)); + rWriter.startElement(sCurrentElementTag); + + tools::PolyPolygon const& rPoly(pMPPAction->GetPolyPolygon()); + for (sal_uInt16 j = 0; j < rPoly.Count(); ++j) + { + rWriter.startElement("polygon"); + for (sal_uInt16 i = 0; i < rPoly[j].GetSize(); i++) + { + rWriter.startElement("point"); + rWriter.attribute("x", rPoly[j][i].X()); + rWriter.attribute("y", rPoly[j][i].Y()); + rWriter.endElement(); + } + rWriter.endElement(); + } + + rWriter.endElement(); + } + break; + case MetaActionType::COMMENT: { MetaCommentAction* pMetaCommentAction = static_cast<MetaCommentAction*>(pAction); commit 632804b1f9066f5ac701338e500ae5c0ed1875dd Author: Michael Stahl <[email protected]> Date: Wed Mar 2 12:21:53 2016 +0100 vcl: document that it's possible to dump GDIMetaFile to XML Change-Id: I921577df6c905e935d05ff0e9d2b2c6e8d22cc89 diff --git a/vcl/README b/vcl/README index ebf8ee4..d995cdc 100644 --- a/vcl/README +++ b/vcl/README @@ -76,6 +76,20 @@ The way COM is used in LO generally: - oslWorkerWrapperFunction() puts every thread spawned via oslCreateThread() into MTA (free-threaded) +== GDIMetafile == + +GDIMetafile is a vector drawing representation that corresponds directly +to the SVM (StarView Metafile) format; it is extremely important as +an intermediate format in all sorts of drawing and printing operations. + +There is a class MetafileXmlDump in include/test/mtfxmldump.hxx that +can store a GDIMetafile as XML, which makes debugging much easier +since you can just use "diff" to see changes. + +To use it you need to link against "test" library and then (because +"test" is not part of the installation) run with: +LD_LIBRARY_PATH=workdir/LinkTarget/Library:workdir/UnpackedTarball/cppunit/src/cppunit/.libs instdir/program/soffice + == EMF+ == emf+ is vector file format used by MSO and is successor of wmf and @@ -159,13 +173,13 @@ Printing from Writer works like this: 1) individual pages print by passing an appropriate OutputDevice to XRenderable 2) in drawinglayer, a VclMetafileProcessor2D is used to record everything on - the page (because the OutputDevice has been set up to record a MetaFile) -3) the pages' MetaFiles are converted to PDF by the vcl::PDFWriter + the page (because the OutputDevice has been set up to record a GDIMetaFile) +3) the pages' GDIMetaFiles are converted to PDF by the vcl::PDFWriter in vcl/source/gdi/pdfwriter* Creating the ODF thumbnail for the first page works as above except step 3 is: -3) the MetaFile is replayed to create the thumbnail +3) the GDIMetaFile is replayed to create the thumbnail On-screen display differs in step 1 and 2: commit 69ff012f1a2d10b3284586474f2add4e88eabcfb Author: Michael Stahl <[email protected]> Date: Tue Mar 1 22:04:09 2016 +0100 sw: tdf#91131 when renaming a SwNumRule, also ... ... update the DocumentListsManager::maLists because without that all list styles created in the UI will have GetDefaultListStyleName() == "Untitled1" and then deleting one of them deletes all these entries from maList, which makes the DocumentListsManager unhappy. Change-Id: Ic40e561fc540881ab29566a3f5ecdc8a180c97ef diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx index 0cb1ba5..2c3daf7 100644 --- a/sw/inc/list.hxx +++ b/sw/inc/list.hxx @@ -39,6 +39,7 @@ class SwList const OUString GetListId() const; const OUString GetDefaultListStyleName() const; + void SetDefaultListStyleName(OUString const&); void InsertListItem( SwNodeNum& rNodeNum, const int nLevel ); diff --git a/sw/source/core/doc/DocumentListsManager.cxx b/sw/source/core/doc/DocumentListsManager.cxx index 5a90a37..d2b86ae 100644 --- a/sw/source/core/doc/DocumentListsManager.cxx +++ b/sw/source/core/doc/DocumentListsManager.cxx @@ -182,6 +182,13 @@ void DocumentListsManager::trackChangeOfListStyleName( const OUString& sListStyl maListStyleLists.erase( sListStyleName ); maListStyleLists[sNewListStyleName] = pList; } + for (auto & it : maLists) // tdf#91131 update these references too + { + if (it.second->GetDefaultListStyleName() == sListStyleName) + { + it.second->SetDefaultListStyleName(sNewListStyleName); + } + } } diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx index f08d102..4976f07 100644 --- a/sw/source/core/doc/list.cxx +++ b/sw/source/core/doc/list.cxx @@ -51,7 +51,6 @@ class SwListImpl bool IsListLevelMarked( const int nListLevel ) const; - private: // unique identifier of the list const OUString msListId; // default list style for the list items, identified by the list style name @@ -232,6 +231,11 @@ const OUString SwList::GetDefaultListStyleName() const return mpListImpl->GetDefaultListStyleName(); } +void SwList::SetDefaultListStyleName(OUString const& rNew) +{ + mpListImpl->msDefaultListStyleName = rNew; +} + void SwList::InsertListItem( SwNodeNum& rNodeNum, const int nLevel ) { commit 38f3b3fd31143495249a67c9526fe2a47dafe861 Author: Michael Stahl <[email protected]> Date: Tue Mar 1 22:03:02 2016 +0100 sw: SwDoc::RenameNumRule() relies on caller checking that ... ... the new name is not being used. Change-Id: Idd392fa4ab6379ec21c5b308767c052bf28fa5aa diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index c9a64fa..2f456e4 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1066,6 +1066,8 @@ void SwDoc::ChgNumRuleFormats( const SwNumRule& rRule ) bool SwDoc::RenameNumRule(const OUString & rOldName, const OUString & rNewName, bool bBroadcast) { + assert(!FindNumRulePtr(rNewName)); + bool bResult = false; SwNumRule * pNumRule = FindNumRulePtr(rOldName); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
