summaryrefslogtreecommitdiffstats
path: root/basic/source/sbx/sbxdec.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/sbx/sbxdec.cxx')
-rw-r--r--basic/source/sbx/sbxdec.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index acfc31acfbd0..cad5601f2f7b 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -17,7 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+#ifdef _WIN32
#include <o3tl/char16_t2wchar_t.hxx>
+#include <systools/win32/oleauto.hxx>
+#endif
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
@@ -70,10 +74,6 @@ void SbxDecimal::fillAutomationDecimal
#endif
}
-SbxDecimal::~SbxDecimal()
-{
-}
-
void releaseDecimalPtr( SbxDecimal*& rpDecimal )
{
if( rpDecimal )
@@ -342,7 +342,7 @@ void SbxDecimal::getString( OUString& rString )
#ifdef _WIN32
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
- BSTR pBStr = nullptr;
+ sal::systools::BStr pBStr;
// VarBstrFromDec allocates new BSTR that needs to be released with SysFreeString
HRESULT hResult = VarBstrFromDec( &maDec, nLANGID, 0, &pBStr );
if( hResult == S_OK )
@@ -366,8 +366,7 @@ void SbxDecimal::getString( OUString& rString )
i++;
}
}
- rString = o3tl::toU( pBStr );
- SysFreeString( pBStr );
+ rString = pBStr;
}
#else
(void)rString;