[Libreoffice-commits] .: Branch 'libreoffice-3-3' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Nov 17 08:53:25 PST 2010


 sc/source/ui/view/preview.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit f853b153ceb623624a9a531535b1e1cac5bc58a7
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed Nov 17 11:52:30 2010 -0500

    Changing margins in print preview should mark the document modified.
    
    This fixes fdo#31219.

diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 88c7749..6e970f3 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -1152,11 +1152,13 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
                     {
                        aLRItem.SetLeft( (long)( aButtonUpPt.X() / HMM_PER_TWIPS + aOffset.X() / HMM_PER_TWIPS ));
                        rStyleSet.Put( aLRItem );
+                       pDocShell->SetModified(true);
                     }
                     else if( bRightRulerChange && bRightRulerMove )
                     {
                         aLRItem.SetRight( (long)( nWidth - aButtonUpPt.X() / HMM_PER_TWIPS - aOffset.X() / HMM_PER_TWIPS ));
                         rStyleSet.Put( aLRItem );
+                        pDocShell->SetModified(true);
                     }
 
                     ScStyleSaveData aNewData;
@@ -1220,11 +1222,13 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
                     {
                         aULItem.SetUpperValue( (USHORT)( aButtonUpPt.Y() / HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) );
                         rStyleSet.Put( aULItem );
+                        pDocShell->SetModified(true);
                     }
                     else if( bBottomRulerMove && bBottomRulerChange )
                     {
                         aULItem.SetLowerValue( (USHORT)( nHeight - aButtonUpPt.Y() / HMM_PER_TWIPS - aOffset.Y() / HMM_PER_TWIPS ) );
                         rStyleSet.Put( aULItem );
+                        pDocShell->SetModified(true);
                     }
                     else if( bHeaderRulerMove && bHeaderRulerChange )
                     {
@@ -1238,6 +1242,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
                             SvxSetItem  aNewHeader( (const SvxSetItem&)rStyleSet.Get(ATTR_PAGE_HEADERSET) );
                             aNewHeader.GetItemSet().Put( SvxSizeItem( ATTR_PAGE_SIZE, aHeaderSize ) );
                             rStyleSet.Put( aNewHeader );
+                            pDocShell->SetModified(true);
                         }
                     }
                     else if( bFooterRulerMove && bFooterRulerChange )
@@ -1252,6 +1257,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
                             SvxSetItem  aNewFooter( (const SvxSetItem&)rStyleSet.Get(ATTR_PAGE_FOOTERSET) );
                             aNewFooter.GetItemSet().Put( SvxSizeItem( ATTR_PAGE_SIZE, aFooterSize ) );
                             rStyleSet.Put( aNewFooter );
+                            pDocShell->SetModified(true);
                         }
                     }
 
@@ -1319,6 +1325,7 @@ void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
                 if( nNewColWidth >= 0 )
                 {
                     aFunc.SetWidthOrHeight( TRUE, 1,nCols, nTab, SC_SIZE_DIRECT, (USHORT)nNewColWidth, TRUE, TRUE);
+                    pDocShell->SetModified(true);
                 }
                 if ( ValidTab( nTab ) )
                 {


More information about the Libreoffice-commits mailing list