- Fixed a small block depot bug.
- Implemented converting from small blocks to big blocks.
- Validated file attributes and flags.
- Fixed a bug for larger files.

diff --git a/ole/stg_stream.c b/ole/stg_stream.c
index 606c9c2..cceb790 100644
--- a/ole/stg_stream.c
+++ b/ole/stg_stream.c
@@ -281,7 +281,6 @@
 	This->smallBlockChain = SmallBlockChainStream_Construct(
 								This->parentStorage->ancestorStorage,	
 								This->ownerProperty);
-	
       }
       else
       {
@@ -574,19 +573,29 @@
                                        This->ownerProperty,
                                        &curProperty); 
   /*
-   * TODO
-   * determine if we have to switch from small to big blocks or vice versa
+   * Determine if we have to switch from small to big blocks or vice versa
    */
   
+  if (curProperty.size.LowPart < LIMIT_TO_USE_SMALL_BLOCK)
+  {
+    if (libNewSize.LowPart >= LIMIT_TO_USE_SMALL_BLOCK)
+    {
+      /*
+       * Transform the small block chain into a big block chain
+       */
+      This->bigBlockChain = Storage32Impl_SmallBlocksToBigBlocks(
+                                This->parentStorage->ancestorStorage,
+                                &This->smallBlockChain);
+    }
+  }
+
   if (This->smallBlockChain!=0)
   {
     Success = SmallBlockChainStream_SetSize(This->smallBlockChain, libNewSize);
-    curProperty.blockType = SMALL_BLOCK_TYPE;
   }
   else
   {
     Success = BlockChainStream_SetSize(This->bigBlockChain, libNewSize);
-    curProperty.blockType = BIG_BLOCK_TYPE;
   }
 
   /*