Commit for development environment setup
This commit is contained in:
1751
PROMS/LBWordLibrary/LBBozoComObject.cs
Normal file
1751
PROMS/LBWordLibrary/LBBozoComObject.cs
Normal file
File diff suppressed because it is too large
Load Diff
1617
PROMS/LBWordLibrary/LBComObject.old.cs
Normal file
1617
PROMS/LBWordLibrary/LBComObject.old.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -389,43 +389,21 @@ namespace LBWordLibrary
|
||||
LBPages myPages = ActiveWindow.ActivePane.Pages;// Start with pages
|
||||
float retval = (float)myPages.Count - 1;
|
||||
LBRange myRange = Range();
|
||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
||||
//float partial = (float) myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToTextBoundary);
|
||||
|
||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToAbsolute, 0);
|
||||
float mytop = myRange.PageSetup.TopMargin;
|
||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
||||
//float partial = (float) myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToTextBoundary);
|
||||
// B2018-028 Word 2016 has a different value for the Vertical Position Relative to the Text Boundary than older version of Word.
|
||||
// We now need to calculated the last row of text in the PROMS attachment differently.
|
||||
// We now subtract the TopMargin the Page Setup from the Vertical Position Relative to the Page
|
||||
// this works with older versions of MS Word as well.
|
||||
float partial = (float)myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToPage) - GetTopMargin(myRange); // B2019-169 added function to get top margin
|
||||
float partial = (float)myRange.get_Information(LBWdInformation.wdVerticalPositionRelativeToPage) - mytop;
|
||||
partial += myRange.Font.Size;
|
||||
retval += partial / 7200;
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
// B2019-169
|
||||
// Would sometimes not return the top margin from Word. We added a Try/Catch and attempt an alternative way doing this, else we log an error and return a zero top margin
|
||||
public float GetTopMargin (LBRange myRange)
|
||||
{
|
||||
try
|
||||
{
|
||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
||||
return myRange.PageSetup.TopMargin;
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToAbsolute, 0);
|
||||
float tpmar = myRange.PageSetup.TopMargin;
|
||||
myRange = myRange.GoTo(LBWdGoToItem.wdGoToPercent, LBWdGoToDirection.wdGoToLast, 100);
|
||||
return tpmar;
|
||||
}
|
||||
catch
|
||||
{
|
||||
_MyLog.ErrorFormat("Unable to read Top Margin");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Ascii
|
||||
{
|
||||
get
|
||||
@@ -840,25 +818,6 @@ namespace LBWordLibrary
|
||||
{
|
||||
return new LBRange(InvokeMethod("GoTo", What, Which, Count, Missing.Value));
|
||||
}
|
||||
// B2022-088: Find Doc Ro button not working in Word Sections
|
||||
public bool LastWasUpper
|
||||
{
|
||||
get
|
||||
{
|
||||
int start = this.Start - 1;
|
||||
|
||||
while (start >= 0)
|
||||
{
|
||||
this.Start = start;
|
||||
this.End = start + 1;
|
||||
string previous = LBDocumentClass.GetRangeText(this);
|
||||
if (Regex.IsMatch(previous, "[A-Z]")) return true;
|
||||
if (Regex.IsMatch(previous, "[a-z]")) return false;
|
||||
start = start - 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
public partial class LBSelection : LBComObject
|
||||
{
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@@ -9,23 +10,29 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LBWordLibrary</RootNamespace>
|
||||
<AssemblyName>LBWordLibrary</AssemblyName>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccProjectName>"%24/PROMS/LBWordLibrary", QUDAAAAA</SccProjectName>
|
||||
<SccLocalPath>.</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<SccProvider>MSSCCI:Microsoft Visual SourceSafe</SccProvider>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -34,16 +41,46 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\debug\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\DataLoader\bin\Debug\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="LBComObject.cs" />
|
||||
<Compile Include="LBObjectExtension.cs" />
|
||||
<Compile Include="OutlookLBComObject.cs" />
|
||||
<Compile Include="OutlookLBComObjectExt.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RegHive.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
Reference in New Issue
Block a user