Index: /trunk/src/VBox/Main/idl/comimpl.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/comimpl.xsl	(revision 85316)
+++ /trunk/src/VBox/Main/idl/comimpl.xsl	(revision 85317)
@@ -254,9 +254,11 @@
         </xsl:call-template>
       </xsl:variable>
-      <xsl:value-of select="concat('         SafeArray&lt;', $elemtype, '&gt; aArr(ComSafeArrayInArg(',$param,'));&#10;')"/>
-      <xsl:value-of select="concat('         return ',$member, '.initFrom(aArr);&#10;')"/>
+      <xsl:text>        SafeArray&lt;</xsl:text><xsl:value-of select="$elemtype"/>
+      <xsl:text>&gt; aArr(ComSafeArrayInArg(</xsl:text><xsl:value-of select="$param"/><xsl:text>));&#10;</xsl:text>
+      <xsl:text>        return </xsl:text><xsl:value-of select="$member"/><xsl:text>.initFrom(aArr);&#10;</xsl:text>
     </xsl:when>
     <xsl:when test="($type='wstring') or ($type='uuid')">
-      <xsl:value-of select="concat('         return ',$member, '.assignEx(', $param, ');&#10;')"/>
+      <xsl:text>        return </xsl:text><xsl:value-of select="$member"/><xsl:text>.assignEx(</xsl:text>
+      <xsl:value-of select="$param"/><xsl:text>);&#10;</xsl:text>
     </xsl:when>
     <xsl:otherwise>
@@ -493,4 +495,5 @@
   <xsl:param name="depth" />
   <xsl:param name="parents" />
+  <xsl:param name="fGenBstr" />
 
   <xsl:variable name="extends">
@@ -565,24 +568,5 @@
     </xsl:if>
 
-    <xsl:value-of select="       '    // purely internal setter&#10;'" />
-    <xsl:text>    inline </xsl:text>
-    <xsl:choose>
-      <xsl:when test="(@safearray='yes') or (@type='wstring') or (@type = 'uuid')">
-        <xsl:text>HRESULT</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>void</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:value-of select="concat(' set_', @name,'(',$pTypeNameIn, ')&#10;    {&#10;')" />
-    <xsl:call-template name="genSetParam">
-      <xsl:with-param name="type" select="@type" />
-      <xsl:with-param name="member" select="$mName" />
-      <xsl:with-param name="param" select="$pName" />
-      <xsl:with-param name="safearray" select="@safearray" />
-      <xsl:with-param name="internal" select="'yes'" />
-    </xsl:call-template>
-    <xsl:value-of select="       '    }&#10;'" />
-
+    <xsl:text>    // purely internal setter&#10;</xsl:text>
     <xsl:if test="(@type='wstring') or (@type = 'uuid')">
       <xsl:text>    inline HRESULT set_</xsl:text><xsl:value-of select="@name"/><xsl:text>(const Utf8Str &amp;a_rString)&#10;</xsl:text>
@@ -591,4 +575,24 @@
       <xsl:text>    }&#10;</xsl:text>
     </xsl:if>
+    <xsl:if test="not((@type='wstring') or (@type = 'uuid')) or $fGenBstr">
+      <xsl:text>    inline </xsl:text>
+      <xsl:choose>
+        <xsl:when test="(@safearray='yes') or (@type='wstring') or (@type = 'uuid')">
+          <xsl:text>HRESULT</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>void</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+      <xsl:value-of select="concat(' set_', @name,'(',$pTypeNameIn, ')&#10;    {&#10;')" />
+      <xsl:call-template name="genSetParam">
+        <xsl:with-param name="type" select="@type" />
+        <xsl:with-param name="member" select="$mName" />
+        <xsl:with-param name="param" select="$pName" />
+        <xsl:with-param name="safearray" select="@safearray" />
+        <xsl:with-param name="internal" select="'yes'" />
+      </xsl:call-template>
+      <xsl:value-of select="       '    }&#10;'" />
+    </xsl:if>
 
   </xsl:for-each>
@@ -609,4 +613,5 @@
         <xsl:with-param name="depth" select="$depth+1" />
         <xsl:with-param name="parents" select="concat($parents, ', ', @name)" />
+        <xsl:with-param name="fGenBstr" select="$fGenBstr" />
       </xsl:call-template>
     </xsl:when>
@@ -864,4 +869,5 @@
   <xsl:call-template name="genAttrCode">
     <xsl:with-param name="name" select="@name" />
+    <xsl:with-param name="fGenBstr" select="($G_generateBstrVariants = 'yes') or (contains(@autogenflags, 'BSTR'))" />
   </xsl:call-template>
   <xsl:value-of select="'};&#10;'" />
