1. mst
  2. ooo340

Commits

lihui  committed 727ee8e

Fix for issue: 106271

  • Participants
  • Parent commits 556352e
  • Branches default

Comments (0)

Files changed (1)

File vbahelper/source/vbahelper/vbadocumentbase.cxx

View file
 	uno::Reference< util::XCloseable > xCloseable( getModel(), uno::UNO_QUERY );
 
 	if( xCloseable.is() )
+	{
 		// use close(boolean DeliverOwnership)
 	
 		// The boolean parameter DeliverOwnership tells objects vetoing the close process that they may
 		// assume ownership if they object the closure by throwing a CloseVetoException
 		// Here we give up ownership. To be on the safe side, catch possible veto exception anyway.
-		xCloseable->close(sal_True);
+		try{
+			xCloseable->close(sal_True);
+		}
+		catch( util::CloseVetoException )
+		{
+			//close is cancelled, nothing to do
+		}
+	}
 	// If close is not supported by this model - try to dispose it.
 	// But if the model disagree with a reset request for the modify state
 	// we shouldn't do so. Otherwhise some strange things can happen.