Commit 35d1da0e authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52289 954022d7-b5bf-4e40-9824-e11837661b57
parent 82414e76
......@@ -214,6 +214,13 @@ ASCOfficeXlsFile/AVSWorksheetConverter/source/Streams_binaries/SummaryInformatio
ASCOfficeXlsFile/AVSWorksheetConverter/source/XLS_logic/Biff_structures/ODRAW svnc_bugtraq_003anumber=true
Common/DocxFormat/Source/SystemUtility/Solution/FileSystemTest/app.ico svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Fonts/FreeType/freetype242_vs2005.lib svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Debug/Interop.OfficeCore.dll svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Debug/TestConsole.exe svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Debug/TestConsole.pdb svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Debug/TestConsole.vshost.exe svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Release/Interop.OfficeCore.dll svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Release/TestConsole.exe svn_mime_002dtype=application%2Foctet-stream
OfficeCore/Test/TestConsole/bin/Release/TestConsole.pdb svn_mime_002dtype=application%2Foctet-stream
Redist/ASCOfficeDocxFile2.dll svn_mime_002dtype=application%2Foctet-stream
Redist/XlsxSerializerCom.dll svn_mime_002dtype=application%2Foctet-stream
Test/Applications/AVSOfficeDocFileTest/AVSOfficeDocFileTest/AVSDocFileTest.aps svn_mime_002dtype=application%2Foctet-stream
......
This diff is collapsed.
......@@ -143,6 +143,7 @@ namespace ImageUtils
if (NULL != pBitmap)
{
*pImage = pBitmap;
return TRUE;
}
......@@ -207,6 +208,9 @@ namespace ImageUtils
BSTR bstrFilePath = strFilePath.AllocSysString();
Gdiplus::Status nStatus = pBitmap->Save(bstrFilePath, &clsId, NULL);
SysFreeString(bstrFilePath);
if (nStatus == Gdiplus::Ok)
return TRUE;
}
catch(...)
{
......@@ -323,7 +327,14 @@ public:
return S_FALSE;
}
BOOL bIsSaved = ImageUtils::SaveGdipImage((CString)bsFileName, pBitmap, strFormat);
BOOL bIsSaved = FALSE;
try
{
bIsSaved = ImageUtils::SaveGdipImage((CString)bsFileName, pBitmap, strFormat);
}
catch(...)
{
}
RELEASEOBJECT(pBitmap);
if (bIsSaved)
......
using System;
using System.Collections.Generic;
using System.Text;
namespace TestConsole
{
class Program
{
static void Main(string[] args)
{
TestFonts();
}
static void TestImage()
{
OfficeCore.CImageGdipFileClass oImage = new OfficeCore.CImageGdipFileClass();
oImage.OpenFile(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg");
//oImage.Resize(1200, 900, 0); // default
//oImage.Resize(1200, 900, 3); // bilinear
oImage.Resize(1200, 900, 4); // bicubic
//oImage.Resize(1200, 900, 5); // nearest
//oImage.SaveFile(@"C:\test\test.bmp", 1);
//oImage.SaveFile(@"C:\test\test.gif", 2);
//oImage.SaveFile(@"C:\test\test.jpg", 3);
oImage.SaveFile(@"C:\test\test.png", 4);
//oImage.SaveFile(@"C:\test\test.tiff", 5);
}
static void TestFonts()
{
OfficeCore.CWinFontsClass oFonts = new OfficeCore.CWinFontsClass();
oFonts.Init("", false, true);
//oFonts.Init("", true, true);
//oFonts.Init("", false, false);
//oFonts.Init(@"X:\AVS\Sources\TeamlabOffice\trunk\OfficeWeb\Fonts\native", false, true);
//oFonts.Init(@"X:\AVS\Sources\TeamlabOffice\trunk\OfficeWeb\Fonts\native", true, true);
//oFonts.Init(@"X:\AVS\Sources\TeamlabOffice\trunk\OfficeWeb\Fonts\native", false, false);
oFonts.SetAdditionalParam("BinaryFonts", @"C:\test\font_selection.bin");
oFonts.SetAdditionalParam("AllFonts.js", @"C:\test\AllFonts.js");
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TestConsole")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("avs")]
[assembly: AssemblyProduct("TestConsole")]
[assembly: AssemblyCopyright("Copyright © avs 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("78efe6c2-6906-4526-8f32-0dbfdfddbdfb")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{97BBFD6A-C1AE-46BB-AFF0-FB01876C4A54}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TestConsole</RootNamespace>
<AssemblyName>TestConsole</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<COMReference Include="OfficeCore">
<Guid>{2FA8EF81-55E5-4F98-B399-2DF9A5DA5E41}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestConsole", "TestConsole.csproj", "{97BBFD6A-C1AE-46BB-AFF0-FB01876C4A54}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{97BBFD6A-C1AE-46BB-AFF0-FB01876C4A54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97BBFD6A-C1AE-46BB-AFF0-FB01876C4A54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97BBFD6A-C1AE-46BB-AFF0-FB01876C4A54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97BBFD6A-C1AE-46BB-AFF0-FB01876C4A54}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment