Commits

os  committed 197c0a5

#i114045# return from page preview: go to the right document position

  • Participants
  • Parent commits a777f22

Comments (0)

Files changed (2)

File sw/source/ui/inc/view.hxx

                     bInMailMerge : 1,
                     bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
                     bOldShellWasPagePreView : 1,
+                    bIsPreviewDoubleClick : 1, // #i114045#
                     bMakeSelectionVisible : 1 // #b6330459# transport the bookmark selection
 					;
 

File sw/source/ui/uiview/view.cxx

     nRightBorderDistance( 0 ),
     bInMailMerge(sal_False),
     bInDtor(sal_False),
-    bOldShellWasPagePreView(sal_False)
+    bOldShellWasPagePreView(sal_False),
+    bIsPreviewDoubleClick(sal_False)
 {
     // OD 18.12.2002 #103492# - According to discussion with MBA and further
     // investigations, no old SfxViewShell will be set as parameter <pOldSh>,
             sNewCrsrPos = ((SwPagePreView*)pExistingSh)->GetNewCrsrPos();
             nNewPage = ((SwPagePreView*)pExistingSh)->GetNewPage();
             bOldShellWasPagePreView = sal_True;
+            bIsPreviewDoubleClick = sNewCrsrPos.Len() > 0 || nNewPage != USHRT_MAX;
         }
         else if( pExistingSh->IsA( TYPE( SwSrcView ) ) )
             bOldShellWasSrcView = sal_True;
 
 void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >& rSequence, sal_Bool bBrowse )
 {
-    if(GetDocShell()->IsPreview())
+    if(GetDocShell()->IsPreview()||bIsPreviewDoubleClick)
         return;
     //#i43146# go to the last editing position when opening own files
     bool bIsOwnDocument = lcl_IsOwnDocument( *this );