sw/source/core/docnode/nodedump.cxx          |    5 +++++
 sw/source/core/layout/anchoreddrawobject.cxx |    4 ++++
 2 files changed, 9 insertions(+)

New commits:
commit 199eb08be994ef968eb38f4966bc27ef1756d382
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu Jun 5 16:25:01 2014 +0200

    SwAnchoredDrawObject::GetObjBoundRect: avoid SwDoc::SetModified()
    
    This is a const method, but it does a const_cast to still resize an
    object... if that's so, then we should ensure that the "is modified"
    flag of SwDoc is untouched.
    
    CppunitTest_sw_ooxmlimport's testChartSize is a reproducer for this,
    when shape text is imported as textbox.
    
    Change-Id: I6dedb31520a14127ca91782874c285f6e0f93c65

diff --git a/sw/source/core/layout/anchoreddrawobject.cxx 
b/sw/source/core/layout/anchoreddrawobject.cxx
index 72f947e..1e011aa 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -655,9 +655,13 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
 
         if ( nTargetWidth != aCurrObjRect.GetWidth( ) || nTargetHeight != 
aCurrObjRect.GetHeight( ) )
         {
+            SwDoc* pDoc = const_cast<SwDoc*>(GetPageFrm()->GetFmt()->GetDoc());
+            bool bModified = pDoc->IsModified();
             const_cast< SdrObject* >( GetDrawObj() )->Resize( 
aCurrObjRect.TopLeft(),
                     Fraction( nTargetWidth, aCurrObjRect.GetWidth() ),
                     Fraction( nTargetHeight, aCurrObjRect.GetHeight() ), false 
);
+            if (!bModified)
+                pDoc->ResetModified();
         }
     }
     return GetDrawObj()->GetCurrentBoundRect();
commit 383cc9deee599a59ee2c8fcb15ab3ab6e1d9bee7
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu Jun 5 15:33:32 2014 +0200

    SwDoc::dumpAsXml: show mbModified
    
    Change-Id: I491d4af104453bb5ff3b55b28e3e1775d8aab8f7

diff --git a/sw/source/core/docnode/nodedump.cxx 
b/sw/source/core/docnode/nodedump.cxx
index fde49d7..0c40a8a 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -191,6 +191,11 @@ void SwDoc::dumpAsXml( xmlTextWriterPtr w )
     mpRedlineTbl->dumpAsXml( writer );
     mpExtraRedlineTbl->dumpAsXml( writer );
     lcl_dumpSdrModel( writer, getIDocumentDrawModelAccess().GetDrawModel() );
+
+    writer.startElement("mbModified");
+    writer.writeFormatAttribute("value", TMP_FORMAT, mbModified);
+    writer.endElement();
+
     writer.endElement();
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to