From cf83e1c234437a9fcd3fe3d4aa6aeed82b3cc9d7 Mon Sep 17 00:00:00 2001 From: "@DinosDev" Date: Tue, 25 Jun 2024 16:29:13 -0300 Subject: [PATCH] Melhoria nas bordas Melhoria nas bordas utilizando o Core da classe principal --- Src/uOpenOfficeHelper.pas | 7 ++++--- Src/uOpenOffice_calc.pas | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Src/uOpenOfficeHelper.pas b/Src/uOpenOfficeHelper.pas index 557cdad..5a3f67c 100644 --- a/Src/uOpenOfficeHelper.pas +++ b/Src/uOpenOfficeHelper.pas @@ -86,6 +86,9 @@ THelperOpenOffice_calc = class helper for TOpenOffice_calc implementation +uses + System.Win.ComObj; + procedure THelperOpenOffice_calc.addChart(aSettingsChart: TSettingsChart); var Chart, Rect, sheet : OleVariant; @@ -323,11 +326,9 @@ function THelperOpenOffice_calc.CountCell: Integer; function THelperOpenOffice_calc.seTBorder(borderPosition: TBoderSheet; opColor: TOpenColor; RemoveBorder: boolean): TOpenOffice_calc; var - border: Variant; settings: Variant; begin - border := ServicesManager.createInstance('com.sun.star.reflection.CoreReflection'); - border.forName('com.sun.star.table.BorderLine2').createObject(settings); + CoreReflection.forName('com.sun.star.table.BorderLine2').createObject(settings); if not RemoveBorder then begin diff --git a/Src/uOpenOffice_calc.pas b/Src/uOpenOffice_calc.pas index efe997f..38d0883 100644 --- a/Src/uOpenOffice_calc.pas +++ b/Src/uOpenOffice_calc.pas @@ -79,6 +79,7 @@ TOpenOffice_calc = class(TOpenOffice) property oSCalc: OleVariant read objSCalc write objSCalc; property Table: OleVariant read objSCalc; property Fields: TFieldsSheet read FFields; + property CoreReflection :OleVariant read objCoreReflection; property SheetName: string read FSheetName write SetSheetName; //---------events-----------//