From 53ac16be2244b6e8fe3f4a9a6ac8ff4e36de1d21 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Fri, 30 Jan 2009 18:21:18 +0000 Subject: [PATCH] Small fixes to fpspreadsheet and pascocoa git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@690 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- bindings/pascocoa/appkit/AppKit.inc | 4 +- .../examples/simplewindow/simplewindow.lpi | 297 ++++++++++-------- .../examples/texteditor/texteditor.lpi | 58 ++-- bindings/pascocoa/foundation/NSGeometry.inc | 4 +- .../examples/opendocdemo/opendocwrite.lpi | 145 ++++----- .../examples/opendocdemo/opendocwrite.lpr | 6 +- components/fpspreadsheet/fpsallformats.pas | 2 +- components/fpspreadsheet/fpspreadsheet.pas | 20 ++ 8 files changed, 300 insertions(+), 236 deletions(-) diff --git a/bindings/pascocoa/appkit/AppKit.inc b/bindings/pascocoa/appkit/AppKit.inc index 9f7187150..245234cc9 100644 --- a/bindings/pascocoa/appkit/AppKit.inc +++ b/bindings/pascocoa/appkit/AppKit.inc @@ -30,8 +30,8 @@ #import } {$include NSMenu.inc} {$include NSMenuItem.inc} -{$include NSColor.inc> -#import } +{$include NSColor.inc} +{#import } {$include NSBitmapImageRep.inc} {#import #import diff --git a/bindings/pascocoa/examples/simplewindow/simplewindow.lpi b/bindings/pascocoa/examples/simplewindow/simplewindow.lpi index b16f75bb5..fbbaad388 100644 --- a/bindings/pascocoa/examples/simplewindow/simplewindow.lpi +++ b/bindings/pascocoa/examples/simplewindow/simplewindow.lpi @@ -1,17 +1,16 @@ - - + + - - <ActiveEditorIndexAtStart Value="4"/> + <ActiveEditorIndexAtStart Value="8"/> </General> <VersionInfo> <ProjectVersion Value=""/> @@ -33,7 +32,7 @@ <PackageName Value="cocoa_pkg"/> </Item1> </RequiredPackages> - <Units Count="62"> + <Units Count="63"> <Unit0> <Filename Value="simplewindow.pas"/> <IsPartOfProject Value="True"/> @@ -41,7 +40,7 @@ <CursorPos X="14" Y="35"/> <TopLine Value="28"/> <EditorIndex Value="0"/> - <UsageCount Value="110"/> + <UsageCount Value="111"/> <Loaded Value="True"/> </Unit0> <Unit1> @@ -65,9 +64,11 @@ </Unit3> <Unit4> <Filename Value="../../appkit/AppKit.inc"/> - <CursorPos X="88" Y="76"/> - <TopLine Value="70"/> + <CursorPos X="23" Y="26"/> + <TopLine Value="20"/> + <EditorIndex Value="5"/> <UsageCount Value="41"/> + <Loaded Value="True"/> </Unit4> <Unit5> <Filename Value="../../../fpc/packages/extra/univint/FPCMacOSAll.pas"/> @@ -83,14 +84,14 @@ <UsageCount Value="14"/> </Unit6> <Unit7> - <Filename Value="/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"/> + <Filename Value="../../../../../../../../System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"/> <CursorPos X="10" Y="125"/> <TopLine Value="123"/> <UsageCount Value="4"/> <SyntaxHighlighter Value="C++"/> </Unit7> <Unit8> - <Filename Value="/System/Library/Frameworks/Foundation.framework/Headers/NSAutoreleasePool.h"/> + <Filename Value="../../../../../../../../System/Library/Frameworks/Foundation.framework/Headers/NSAutoreleasePool.h"/> <CursorPos X="30" Y="5"/> <TopLine Value="1"/> <UsageCount Value="4"/> @@ -103,298 +104,293 @@ <UsageCount Value="15"/> </Unit9> <Unit10> - <Filename Value="../../foundation/Foundation.inc"/> - <CursorPos X="21" Y="130"/> - <TopLine Value="120"/> - <UsageCount Value="10"/> - </Unit10> - <Unit11> <Filename Value="../../foundation/Foundation_impl.inc"/> <CursorPos X="30" Y="4"/> <TopLine Value="1"/> <UsageCount Value="15"/> - </Unit11> - <Unit12> + </Unit10> + <Unit11> <Filename Value="../../foundation/NSAutoreleasePool.inc"/> <CursorPos X="43" Y="8"/> <TopLine Value="2"/> <UsageCount Value="21"/> - </Unit12> - <Unit13> + </Unit11> + <Unit12> <Filename Value="../../foundation/NSAutoreleasePool_impl.inc"/> <CursorPos X="22" Y="9"/> <TopLine Value="1"/> <UsageCount Value="15"/> - </Unit13> - <Unit14> + </Unit12> + <Unit13> <Filename Value="../../foundation/foundation.pas"/> <UnitName Value="foundation"/> <CursorPos X="60" Y="13"/> <TopLine Value="5"/> <UsageCount Value="22"/> - </Unit14> - <Unit15> - <Filename Value="/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObject.h"/> + </Unit13> + <Unit14> + <Filename Value="../../../../../../../../System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSObject.h"/> <CursorPos X="21" Y="116"/> <TopLine Value="111"/> <UsageCount Value="4"/> <SyntaxHighlighter Value="C++"/> - </Unit15> - <Unit16> + </Unit14> + <Unit15> <Filename Value="../../foundation/NSObject.inc"/> <CursorPos X="65" Y="61"/> <TopLine Value="53"/> <UsageCount Value="50"/> - </Unit16> - <Unit17> + </Unit15> + <Unit16> <Filename Value="../../foundation/NSObject_impl.inc"/> <CursorPos X="1" Y="11"/> <TopLine Value="1"/> <UsageCount Value="28"/> - </Unit17> - <Unit18> + </Unit16> + <Unit17> <Filename Value="../../appkit/NSApplication.inc"/> <CursorPos X="9" Y="1692"/> <TopLine Value="1687"/> <UsageCount Value="48"/> <Loaded Value="True"/> - </Unit18> - <Unit19> - <Filename Value="/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h"/> + </Unit17> + <Unit18> + <Filename Value="../../../../../../../../System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h"/> <CursorPos X="21" Y="537"/> <TopLine Value="535"/> <UsageCount Value="4"/> <SyntaxHighlighter Value="C++"/> - </Unit19> - <Unit20> + </Unit18> + <Unit19> <Filename Value="../../appkit/NSWindow.inc"/> <CursorPos X="9" Y="1692"/> <TopLine Value="1687"/> <UsageCount Value="47"/> <Loaded Value="True"/> - </Unit20> - <Unit21> + </Unit19> + <Unit20> <Filename Value="../../appkit/NSWindow_impl.inc"/> <CursorPos X="65" Y="19"/> <TopLine Value="14"/> <UsageCount Value="29"/> - </Unit21> - <Unit22> - <Filename Value="/System/Library/Frameworks/Foundation.framework/Headers/NSGeometry.h"/> + </Unit20> + <Unit21> + <Filename Value="../../../../../../../../System/Library/Frameworks/Foundation.framework/Headers/NSGeometry.h"/> <CursorPos X="12" Y="131"/> <TopLine Value="125"/> <UsageCount Value="4"/> <SyntaxHighlighter Value="C++"/> - </Unit22> - <Unit23> + </Unit21> + <Unit22> <Filename Value="../../foundation/NSGeometry.inc"/> - <CursorPos X="1" Y="1"/> + <CursorPos X="26" Y="22"/> <TopLine Value="1"/> + <EditorIndex Value="7"/> <UsageCount Value="55"/> <Loaded Value="True"/> - </Unit23> - <Unit24> - <Filename Value="/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h"/> + </Unit22> + <Unit23> + <Filename Value="../../../../../../../../System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h"/> <CursorPos X="12" Y="167"/> <TopLine Value="163"/> <UsageCount Value="4"/> <SyntaxHighlighter Value="C++"/> - </Unit24> - <Unit25> + </Unit23> + <Unit24> <Filename Value="../../appkit/NSGraphics.inc"/> <CursorPos X="38" Y="184"/> <TopLine Value="175"/> <UsageCount Value="17"/> - </Unit25> - <Unit26> + </Unit24> + <Unit25> <Filename Value="../../../objc/objc.inc"/> <CursorPos X="104" Y="76"/> <TopLine Value="69"/> <UsageCount Value="11"/> - </Unit26> - <Unit27> + </Unit25> + <Unit26> <Filename Value="../../../fpc/rtl/unix/aliasctp.inc"/> <CursorPos X="49" Y="37"/> <TopLine Value="33"/> <UsageCount Value="4"/> - </Unit27> - <Unit28> + </Unit26> + <Unit27> <Filename Value="../../../fpc/rtl/unix/unixtype.pp"/> <UnitName Value="unixtype"/> <CursorPos X="47" Y="8"/> <TopLine Value="3"/> <UsageCount Value="4"/> - </Unit28> - <Unit29> + </Unit27> + <Unit28> <Filename Value="../../../fpc/rtl/darwin/ptypes.inc"/> <CursorPos X="34" Y="14"/> <TopLine Value="12"/> <UsageCount Value="4"/> - </Unit29> - <Unit30> + </Unit28> + <Unit29> <Filename Value="../../../fpc/rtl/unix/ctypes.inc"/> <CursorPos X="34" Y="55"/> <TopLine Value="44"/> <UsageCount Value="4"/> - </Unit30> - <Unit31> + </Unit29> + <Unit30> <Filename Value="../../../objc/objc-runtime.inc"/> <CursorPos X="62" Y="19"/> <TopLine Value="16"/> <UsageCount Value="11"/> - </Unit31> - <Unit32> + </Unit30> + <Unit31> <Filename Value="../../appkit/NSWindow_type.inc"/> <CursorPos X="41" Y="4"/> <TopLine Value="1"/> <UsageCount Value="5"/> - </Unit32> - <Unit33> + </Unit31> + <Unit32> <Filename Value="../../appkit/NSApplication_type.inc"/> <CursorPos X="40" Y="252"/> <TopLine Value="244"/> <UsageCount Value="5"/> - </Unit33> - <Unit34> + </Unit32> + <Unit33> <Filename Value="../../../fpc/rtl/inc/objpash.inc"/> <CursorPos X="11" Y="68"/> <TopLine Value="64"/> <UsageCount Value="4"/> - </Unit34> - <Unit35> + </Unit33> + <Unit34> <Filename Value="../../../objc/objc.pas"/> <UnitName Value="objc"/> <CursorPos X="70" Y="14"/> <TopLine Value="9"/> <UsageCount Value="11"/> - </Unit35> - <Unit36> + </Unit34> + <Unit35> <Filename Value="../../../objc/objc-class.inc"/> <CursorPos X="5" Y="261"/> <TopLine Value="261"/> <UsageCount Value="5"/> - </Unit36> - <Unit37> - <Filename Value="/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSStatusBar.h"/> + </Unit35> + <Unit36> + <Filename Value="../../../../../../../../System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSStatusBar.h"/> <CursorPos X="58" Y="18"/> <TopLine Value="17"/> <UsageCount Value="5"/> <SyntaxHighlighter Value="C++"/> - </Unit37> - <Unit38> + </Unit36> + <Unit37> <Filename Value="../../appkit/NSStatusBar.inc"/> <CursorPos X="96" Y="30"/> <TopLine Value="22"/> <UsageCount Value="52"/> - </Unit38> - <Unit39> + </Unit37> + <Unit38> <Filename Value="../../appkit/NSStatusItem.inc"/> <CursorPos X="37" Y="105"/> <TopLine Value="99"/> <UsageCount Value="39"/> - </Unit39> - <Unit40> - <Filename Value="/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSStatusItem.h"/> + </Unit38> + <Unit39> + <Filename Value="../../../../../../../../System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSStatusItem.h"/> <CursorPos X="38" Y="100"/> <TopLine Value="85"/> <UsageCount Value="5"/> <SyntaxHighlighter Value="C++"/> - </Unit40> - <Unit41> + </Unit39> + <Unit40> <Filename Value="../../../../fpc/packages/extra/univint/FPCMacOSAll.pas"/> <UnitName Value="FPCMacOSAll"/> <CursorPos X="18" Y="55559"/> <TopLine Value="55553"/> <UsageCount Value="5"/> - </Unit41> - <Unit42> - <Filename Value="/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextField.h"/> + </Unit40> + <Unit41> + <Filename Value="../../../../../../../../System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextField.h"/> <CursorPos X="23" Y="40"/> <TopLine Value="39"/> <UsageCount Value="5"/> <SyntaxHighlighter Value="C++"/> - </Unit42> - <Unit43> + </Unit41> + <Unit42> <Filename Value="../../appkit/NSTextField.inc"/> <CursorPos X="85" Y="5"/> <TopLine Value="1"/> <UsageCount Value="50"/> - </Unit43> - <Unit44> + </Unit42> + <Unit43> <Filename Value="../../appkit/NSControl.inc"/> <CursorPos X="82" Y="62"/> <TopLine Value="57"/> <UsageCount Value="29"/> - </Unit44> - <Unit45> - <Filename Value="/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSView.h"/> + </Unit43> + <Unit44> + <Filename Value="../../../../../../../../System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSView.h"/> <CursorPos X="54" Y="2"/> <TopLine Value="1"/> <UsageCount Value="5"/> <SyntaxHighlighter Value="C++"/> - </Unit45> - <Unit46> + </Unit44> + <Unit45> <Filename Value="../../appkit/NSView.inc"/> <CursorPos X="89" Y="1692"/> <TopLine Value="1687"/> <UsageCount Value="39"/> - </Unit46> - <Unit47> + </Unit45> + <Unit46> <Filename Value="../../appkit/NSResponder.inc"/> <CursorPos X="22" Y="228"/> <TopLine Value="219"/> <UsageCount Value="12"/> - </Unit47> - <Unit48> + </Unit46> + <Unit47> <Filename Value="../../appkit/NSActionCell.inc"/> <CursorPos X="35" Y="35"/> <TopLine Value="29"/> <UsageCount Value="10"/> - </Unit48> - <Unit49> + </Unit47> + <Unit48> <Filename Value="../../appkit/NSCell.inc"/> <CursorPos X="26" Y="151"/> <TopLine Value="145"/> <UsageCount Value="10"/> - </Unit49> - <Unit50> + </Unit48> + <Unit49> <Filename Value="../../appkit/NSAlert.inc"/> <CursorPos X="21" Y="38"/> <TopLine Value="28"/> <UsageCount Value="10"/> - </Unit50> - <Unit51> + </Unit49> + <Unit50> <Filename Value="../../appkit/NSButtonCell.inc"/> <CursorPos X="53" Y="39"/> <TopLine Value="35"/> <UsageCount Value="10"/> - </Unit51> - <Unit52> + </Unit50> + <Unit51> <Filename Value="../../appkit/NSButton.inc"/> <CursorPos X="30" Y="71"/> <TopLine Value="66"/> <UsageCount Value="10"/> - </Unit52> - <Unit53> + </Unit51> + <Unit52> <Filename Value="../../foundation/NSObjCRuntime.inc"/> <CursorPos X="24" Y="10"/> <TopLine Value="1"/> <UsageCount Value="10"/> - </Unit53> - <Unit54> + </Unit52> + <Unit53> <Filename Value="../../appkit/NSTextFieldCell.inc"/> <CursorPos X="95" Y="39"/> <TopLine Value="33"/> <UsageCount Value="10"/> - </Unit54> - <Unit55> + </Unit53> + <Unit54> <Filename Value="../../../../../lazarus/lcl/interfaces/carbon/carboncanvas.pp"/> <UnitName Value="CarbonCanvas"/> <CursorPos X="58" Y="29"/> <TopLine Value="23"/> <UsageCount Value="10"/> - </Unit55> - <Unit56> + </Unit54> + <Unit55> <Filename Value="../../../../../lazarus/lcl/lclproc.pas"/> <UnitName Value="LCLProc"/> <CursorPos X="8" Y="3188"/> @@ -402,21 +398,21 @@ <EditorIndex Value="1"/> <UsageCount Value="10"/> <Loaded Value="True"/> - </Unit56> - <Unit57> + </Unit55> + <Unit56> <Filename Value="../../../../../lazarus/lcl/interfaces/wince/wincelistsl.inc"/> <CursorPos X="86" Y="183"/> <TopLine Value="180"/> <UsageCount Value="10"/> - </Unit57> - <Unit58> + </Unit56> + <Unit57> <Filename Value="../../../../../lazarus/lcl/interfaces/wince/winceint.pp"/> <UnitName Value="WinCEInt"/> <CursorPos X="81" Y="47"/> <TopLine Value="44"/> <UsageCount Value="10"/> - </Unit58> - <Unit59> + </Unit57> + <Unit58> <Filename Value="../../../../../lazarus/lcl/stdactns.pas"/> <UnitName Value="StdActns"/> <CursorPos X="25" Y="979"/> @@ -424,25 +420,42 @@ <EditorIndex Value="2"/> <UsageCount Value="10"/> <Loaded Value="True"/> - </Unit59> - <Unit60> - <Filename Value="/usr/local/share/fpcsrc/rtl/inc/wstringh.inc"/> + </Unit58> + <Unit59> + <Filename Value="../../../../../../../../usr/local/share/fpcsrc/rtl/inc/wstringh.inc"/> <CursorPos X="16" Y="81"/> <TopLine Value="69"/> <EditorIndex Value="3"/> <UsageCount Value="10"/> <Loaded Value="True"/> - </Unit60> - <Unit61> - <Filename Value="/usr/local/share/fpcsrc/rtl/inc/wstrings.inc"/> - <CursorPos X="19" Y="1508"/> - <TopLine Value="1510"/> + </Unit59> + <Unit60> + <Filename Value="../../../../../../../../usr/local/share/fpcsrc/rtl/inc/wstrings.inc"/> + <CursorPos X="19" Y="17"/> + <TopLine Value="1"/> <EditorIndex Value="4"/> <UsageCount Value="10"/> <Loaded Value="True"/> + </Unit60> + <Unit61> + <Filename Value="../../appkit/NSTextView.inc"/> + <CursorPos X="35" Y="253"/> + <TopLine Value="245"/> + <EditorIndex Value="6"/> + <UsageCount Value="10"/> + <Loaded Value="True"/> </Unit61> + <Unit62> + <Filename Value="../../cocoa_pkg.pas"/> + <UnitName Value="cocoa_pkg"/> + <CursorPos X="20" Y="17"/> + <TopLine Value="1"/> + <EditorIndex Value="8"/> + <UsageCount Value="10"/> + <Loaded Value="True"/> + </Unit62> </Units> - <JumpHistory Count="12" HistoryIndex="11"> + <JumpHistory Count="17" HistoryIndex="16"> <Position1> <Filename Value="simplewindow.pas"/> <Caret Line="67" Column="13" TopLine="45"/> @@ -480,7 +493,7 @@ <Caret Line="979" Column="25" TopLine="967"/> </Position9> <Position10> - <Filename Value="/usr/local/share/fpcsrc/rtl/inc/wstrings.inc"/> + <Filename Value="../../../../../../../../usr/local/share/fpcsrc/rtl/inc/wstrings.inc"/> <Caret Line="1625" Column="14" TopLine="1612"/> </Position10> <Position11> @@ -488,9 +501,29 @@ <Caret Line="3216" Column="16" TopLine="3200"/> </Position11> <Position12> - <Filename Value="/usr/local/share/fpcsrc/rtl/inc/wstrings.inc"/> + <Filename Value="../../../../../../../../usr/local/share/fpcsrc/rtl/inc/wstrings.inc"/> <Caret Line="1625" Column="13" TopLine="1612"/> </Position12> + <Position13> + <Filename Value="../../appkit/AppKit.inc"/> + <Caret Line="76" Column="88" TopLine="70"/> + </Position13> + <Position14> + <Filename Value="../../appkit/NSTextView.inc"/> + <Caret Line="1" Column="1" TopLine="1"/> + </Position14> + <Position15> + <Filename Value="../../appkit/NSTextView.inc"/> + <Caret Line="258" Column="94" TopLine="245"/> + </Position15> + <Position16> + <Filename Value="../../foundation/NSGeometry.inc"/> + <Caret Line="9" Column="33" TopLine="1"/> + </Position16> + <Position17> + <Filename Value="../../cocoa_pkg.pas"/> + <Caret Line="1" Column="1" TopLine="1"/> + </Position17> </JumpHistory> </ProjectOptions> <CompilerOptions> diff --git a/bindings/pascocoa/examples/texteditor/texteditor.lpi b/bindings/pascocoa/examples/texteditor/texteditor.lpi index eec0a2a69..b8c5bd9e8 100644 --- a/bindings/pascocoa/examples/texteditor/texteditor.lpi +++ b/bindings/pascocoa/examples/texteditor/texteditor.lpi @@ -8,7 +8,7 @@ </Flags> <MainUnit Value="0"/> <TargetFileExt Value=""/> - <ActiveEditorIndexAtStart Value="8"/> + <ActiveEditorIndexAtStart Value="10"/> </General> <VersionInfo> <ProjectVersion Value=""/> @@ -32,7 +32,7 @@ <PackageName Value="cocoa_pkg"/> </Item1> </RequiredPackages> - <Units Count="21"> + <Units Count="22"> <Unit0> <Filename Value="texteditor.pas"/> <IsPartOfProject Value="True"/> @@ -40,7 +40,7 @@ <CursorPos X="1" Y="62"/> <TopLine Value="39"/> <EditorIndex Value="0"/> - <UsageCount Value="74"/> + <UsageCount Value="87"/> <Loaded Value="True"/> </Unit0> <Unit1> @@ -50,7 +50,7 @@ <CursorPos X="24" Y="32"/> <TopLine Value="27"/> <EditorIndex Value="5"/> - <UsageCount Value="74"/> + <UsageCount Value="87"/> <Loaded Value="True"/> </Unit1> <Unit2> @@ -60,7 +60,7 @@ <CursorPos X="1" Y="232"/> <TopLine Value="208"/> <EditorIndex Value="7"/> - <UsageCount Value="74"/> + <UsageCount Value="87"/> <Loaded Value="True"/> </Unit2> <Unit3> @@ -70,7 +70,7 @@ <CursorPos X="21" Y="30"/> <TopLine Value="20"/> <EditorIndex Value="6"/> - <UsageCount Value="74"/> + <UsageCount Value="87"/> <Loaded Value="True"/> </Unit3> <Unit4> @@ -80,7 +80,7 @@ <CursorPos X="1" Y="77"/> <TopLine Value="75"/> <EditorIndex Value="2"/> - <UsageCount Value="69"/> + <UsageCount Value="82"/> <Loaded Value="True"/> </Unit4> <Unit5> @@ -89,7 +89,7 @@ <CursorPos X="50" Y="3"/> <TopLine Value="27"/> <EditorIndex Value="3"/> - <UsageCount Value="34"/> + <UsageCount Value="41"/> <Loaded Value="True"/> </Unit5> <Unit6> @@ -97,86 +97,86 @@ <UnitName Value="foundation"/> <CursorPos X="98" Y="3"/> <TopLine Value="1"/> - <UsageCount Value="27"/> + <UsageCount Value="25"/> </Unit6> <Unit7> <Filename Value="../../appkit/NSToolbarItem.inc"/> <CursorPos X="49" Y="5"/> <TopLine Value="4"/> - <UsageCount Value="6"/> + <UsageCount Value="4"/> </Unit7> <Unit8> <Filename Value="../../appkit/appkit.pas"/> <UnitName Value="appkit"/> <CursorPos X="28" Y="9"/> <TopLine Value="1"/> - <UsageCount Value="8"/> + <UsageCount Value="6"/> </Unit8> <Unit9> <Filename Value="../../../objc/objc.inc"/> <CursorPos X="13" Y="60"/> <TopLine Value="46"/> <EditorIndex Value="4"/> - <UsageCount Value="31"/> + <UsageCount Value="38"/> <Loaded Value="True"/> </Unit9> <Unit10> <Filename Value="../../appkit/NSApplication.inc"/> <CursorPos X="31" Y="1047"/> <TopLine Value="1041"/> - <UsageCount Value="7"/> + <UsageCount Value="5"/> </Unit10> <Unit11> <Filename Value="../../appkit/NSAlert.inc"/> <CursorPos X="16" Y="8"/> <TopLine Value="1"/> - <UsageCount Value="9"/> + <UsageCount Value="7"/> </Unit11> <Unit12> <Filename Value="../../appkit/AppKit.inc"/> <CursorPos X="43" Y="29"/> <TopLine Value="21"/> <EditorIndex Value="8"/> - <UsageCount Value="22"/> + <UsageCount Value="29"/> <Loaded Value="True"/> </Unit12> <Unit13> <Filename Value="../../foundation/Foundation.inc"/> <CursorPos X="48" Y="9"/> <TopLine Value="5"/> - <UsageCount Value="8"/> + <UsageCount Value="6"/> </Unit13> <Unit14> <Filename Value="../../appkit/NSBundle.inc"/> <CursorPos X="34" Y="6"/> <TopLine Value="1"/> - <UsageCount Value="7"/> + <UsageCount Value="5"/> </Unit14> <Unit15> <Filename Value="../../foundation/NSBundle.inc"/> <CursorPos X="35" Y="409"/> <TopLine Value="403"/> - <UsageCount Value="21"/> + <UsageCount Value="19"/> </Unit15> <Unit16> <Filename Value="../../appkit/NSNibLoading.inc"/> <CursorPos X="41" Y="42"/> <TopLine Value="33"/> - <UsageCount Value="7"/> + <UsageCount Value="5"/> </Unit16> <Unit17> <Filename Value="../../foundation/NSObject.inc"/> <CursorPos X="9" Y="251"/> <TopLine Value="240"/> <EditorIndex Value="1"/> - <UsageCount Value="28"/> + <UsageCount Value="35"/> <Loaded Value="True"/> </Unit17> <Unit18> <Filename Value="../../../../../smart-house/weather-station-client/target/generated/src/main/java/br/usp/pcs/weather/GlobalWeatherService.java"/> <CursorPos X="35" Y="20"/> <TopLine Value="8"/> - <UsageCount Value="12"/> + <UsageCount Value="19"/> <Loaded Value="True"/> <SyntaxHighlighter Value="Java"/> </Unit18> @@ -184,17 +184,25 @@ <Filename Value="../../../../../smart-house/weather-station-client/target/generated/src/main/java/br/usp/pcs/weather/WeatherServiceService.java"/> <CursorPos X="102" Y="12"/> <TopLine Value="6"/> - <UsageCount Value="10"/> + <UsageCount Value="8"/> <SyntaxHighlighter Value="Java"/> </Unit19> <Unit20> <Filename Value="../../appkit/NSTextView.inc"/> - <CursorPos X="63" Y="288"/> - <TopLine Value="276"/> + <CursorPos X="1" Y="1"/> + <TopLine Value="1"/> <EditorIndex Value="9"/> - <UsageCount Value="11"/> + <UsageCount Value="18"/> <Loaded Value="True"/> </Unit20> + <Unit21> + <Filename Value="../../appkit/NSColor.inc"/> + <CursorPos X="1" Y="5"/> + <TopLine Value="1"/> + <EditorIndex Value="10"/> + <UsageCount Value="17"/> + <Loaded Value="True"/> + </Unit21> </Units> <JumpHistory Count="30" HistoryIndex="29"> <Position1> diff --git a/bindings/pascocoa/foundation/NSGeometry.inc b/bindings/pascocoa/foundation/NSGeometry.inc index a2205cde1..70d8c8371 100644 --- a/bindings/pascocoa/foundation/NSGeometry.inc +++ b/bindings/pascocoa/foundation/NSGeometry.inc @@ -18,8 +18,8 @@ type y: cfloat; end; -//typedef NSPoint *NSPointPointer; -//typedef NSPoint *NSPointArray; + NSPointPointer = ^NSPoint; + NSPointArray = ^NSPoint; NSSize = record width: cfloat; { should never be negative } diff --git a/components/fpspreadsheet/examples/opendocdemo/opendocwrite.lpi b/components/fpspreadsheet/examples/opendocdemo/opendocwrite.lpi index 29f5c81c9..02464e3f1 100644 --- a/components/fpspreadsheet/examples/opendocdemo/opendocwrite.lpi +++ b/components/fpspreadsheet/examples/opendocdemo/opendocwrite.lpi @@ -11,7 +11,7 @@ <TargetFileExt Value=".exe"/> <Title Value="opendocwrite"/> <UseAppBundle Value="False"/> - <ActiveEditorIndexAtStart Value="6"/> + <ActiveEditorIndexAtStart Value="0"/> </General> <VersionInfo> <ProjectVersion Value=""/> @@ -33,13 +33,13 @@ <PackageName Value="laz_fpspreadsheet"/> </Item1> </RequiredPackages> - <Units Count="15"> + <Units Count="16"> <Unit0> <Filename Value="opendocwrite.lpr"/> <IsPartOfProject Value="True"/> <UnitName Value="opendocwrite"/> - <CursorPos X="26" Y="35"/> - <TopLine Value="21"/> + <CursorPos X="1" Y="70"/> + <TopLine Value="45"/> <EditorIndex Value="0"/> <UsageCount Value="309"/> <Loaded Value="True"/> @@ -70,7 +70,7 @@ <UnitName Value="xlsbiff5"/> <CursorPos X="38" Y="1059"/> <TopLine Value="1045"/> - <EditorIndex Value="6"/> + <EditorIndex Value="7"/> <UsageCount Value="140"/> <Loaded Value="True"/> </Unit4> @@ -79,7 +79,7 @@ <UnitName Value="fpsutils"/> <CursorPos X="1" Y="49"/> <TopLine Value="30"/> - <EditorIndex Value="5"/> + <EditorIndex Value="6"/> <UsageCount Value="140"/> <Loaded Value="True"/> </Unit5> @@ -88,7 +88,7 @@ <UnitName Value="xlsbiff2"/> <CursorPos X="25" Y="216"/> <TopLine Value="203"/> - <EditorIndex Value="7"/> + <EditorIndex Value="8"/> <UsageCount Value="139"/> <Loaded Value="True"/> </Unit6> @@ -97,7 +97,7 @@ <UnitName Value="fpolestorage"/> <CursorPos X="30" Y="654"/> <TopLine Value="642"/> - <EditorIndex Value="8"/> + <EditorIndex Value="9"/> <UsageCount Value="139"/> <Loaded Value="True"/> </Unit7> @@ -116,10 +116,10 @@ <Unit10> <Filename Value="..\..\fpspreadsheet.pas"/> <UnitName Value="fpspreadsheet"/> - <CursorPos X="17" Y="138"/> - <TopLine Value="125"/> - <EditorIndex Value="4"/> - <UsageCount Value="97"/> + <CursorPos X="1" Y="366"/> + <TopLine Value="349"/> + <EditorIndex Value="5"/> + <UsageCount Value="98"/> <Loaded Value="True"/> </Unit10> <Unit11> @@ -131,10 +131,10 @@ <Unit12> <Filename Value="..\..\fpsopendocument.pas"/> <UnitName Value="fpsopendocument"/> - <CursorPos X="88" Y="294"/> - <TopLine Value="284"/> - <EditorIndex Value="1"/> - <UsageCount Value="15"/> + <CursorPos X="1" Y="118"/> + <TopLine Value="107"/> + <EditorIndex Value="2"/> + <UsageCount Value="16"/> <Loaded Value="True"/> </Unit12> <Unit13> @@ -142,140 +142,145 @@ <UnitName Value="xlsxooxml"/> <CursorPos X="1" Y="268"/> <TopLine Value="253"/> - <EditorIndex Value="3"/> - <UsageCount Value="15"/> + <EditorIndex Value="4"/> + <UsageCount Value="16"/> <Loaded Value="True"/> </Unit13> <Unit14> <Filename Value="..\..\..\..\..\..\..\..\usr\local\share\fpcsrc\rtl\objpas\sysutils\sysstrh.inc"/> <CursorPos X="10" Y="154"/> <TopLine Value="141"/> - <EditorIndex Value="2"/> - <UsageCount Value="12"/> + <EditorIndex Value="3"/> + <UsageCount Value="13"/> <Loaded Value="True"/> </Unit14> + <Unit15> + <Filename Value="..\..\fpsallformats.pas"/> + <UnitName Value="fpsallformats"/> + <CursorPos X="44" Y="13"/> + <TopLine Value="1"/> + <EditorIndex Value="1"/> + <UsageCount Value="11"/> + <Loaded Value="True"/> + </Unit15> </Units> - <JumpHistory Count="30" HistoryIndex="29"> + <JumpHistory Count="29" HistoryIndex="28"> <Position1> - <Filename Value="..\..\fpsopendocument.pas"/> - <Caret Line="295" Column="1" TopLine="282"/> + <Filename Value="..\..\fpspreadsheet.pas"/> + <Caret Line="754" Column="1" TopLine="741"/> </Position1> <Position2> - <Filename Value="..\..\fpsopendocument.pas"/> - <Caret Line="297" Column="1" TopLine="284"/> + <Filename Value="..\..\fpspreadsheet.pas"/> + <Caret Line="755" Column="1" TopLine="742"/> </Position2> <Position3> <Filename Value="..\..\fpspreadsheet.pas"/> - <Caret Line="754" Column="1" TopLine="741"/> + <Caret Line="757" Column="1" TopLine="744"/> </Position3> <Position4> <Filename Value="..\..\fpspreadsheet.pas"/> - <Caret Line="755" Column="1" TopLine="742"/> + <Caret Line="759" Column="1" TopLine="746"/> </Position4> <Position5> - <Filename Value="..\..\fpspreadsheet.pas"/> - <Caret Line="757" Column="1" TopLine="744"/> - </Position5> - <Position6> - <Filename Value="..\..\fpspreadsheet.pas"/> - <Caret Line="759" Column="1" TopLine="746"/> - </Position6> - <Position7> <Filename Value="..\..\fpsopendocument.pas"/> <Caret Line="392" Column="1" TopLine="379"/> + </Position5> + <Position6> + <Filename Value="..\..\xlsbiff2.pas"/> + <Caret Line="87" Column="1" TopLine="79"/> + </Position6> + <Position7> + <Filename Value="..\..\xlsbiff2.pas"/> + <Caret Line="211" Column="34" TopLine="196"/> </Position7> <Position8> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="87" Column="1" TopLine="79"/> + <Caret Line="22" Column="40" TopLine="8"/> </Position8> <Position9> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="211" Column="34" TopLine="196"/> + <Caret Line="48" Column="22" TopLine="35"/> </Position9> <Position10> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="22" Column="40" TopLine="8"/> + <Caret Line="194" Column="7" TopLine="181"/> </Position10> <Position11> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="48" Column="22" TopLine="35"/> + <Caret Line="329" Column="51" TopLine="316"/> </Position11> <Position12> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="194" Column="7" TopLine="181"/> + <Caret Line="257" Column="34" TopLine="242"/> </Position12> <Position13> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="329" Column="51" TopLine="316"/> + <Caret Line="286" Column="34" TopLine="271"/> </Position13> <Position14> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="257" Column="34" TopLine="242"/> + <Caret Line="350" Column="38" TopLine="336"/> </Position14> <Position15> - <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="286" Column="34" TopLine="271"/> - </Position15> - <Position16> - <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="350" Column="38" TopLine="336"/> - </Position16> - <Position17> <Filename Value="..\..\xlsbiff5.pas"/> <Caret Line="207" Column="1" TopLine="196"/> - </Position17> - <Position18> + </Position15> + <Position16> <Filename Value="..\..\xlsbiff5.pas"/> <Caret Line="556" Column="34" TopLine="542"/> + </Position16> + <Position17> + <Filename Value="..\..\xlsbiff2.pas"/> + <Caret Line="50" Column="19" TopLine="37"/> + </Position17> + <Position18> + <Filename Value="..\..\xlsbiff2.pas"/> + <Caret Line="150" Column="34" TopLine="137"/> </Position18> <Position19> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="50" Column="19" TopLine="37"/> + <Caret Line="153" Column="72" TopLine="137"/> </Position19> <Position20> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="150" Column="34" TopLine="137"/> + <Caret Line="159" Column="13" TopLine="137"/> </Position20> <Position21> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="153" Column="72" TopLine="137"/> + <Caret Line="187" Column="32" TopLine="174"/> </Position21> <Position22> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="159" Column="13" TopLine="137"/> + <Caret Line="190" Column="13" TopLine="174"/> </Position22> <Position23> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="187" Column="32" TopLine="174"/> + <Caret Line="193" Column="34" TopLine="174"/> </Position23> <Position24> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="190" Column="13" TopLine="174"/> + <Caret Line="226" Column="33" TopLine="213"/> </Position24> <Position25> <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="193" Column="34" TopLine="174"/> + <Caret Line="97" Column="16" TopLine="85"/> </Position25> <Position26> - <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="226" Column="33" TopLine="213"/> + <Filename Value="..\..\xlsbiff5.pas"/> + <Caret Line="601" Column="25" TopLine="588"/> </Position26> <Position27> - <Filename Value="..\..\xlsbiff2.pas"/> - <Caret Line="97" Column="16" TopLine="85"/> + <Filename Value="..\..\xlsbiff5.pas"/> + <Caret Line="673" Column="34" TopLine="659"/> </Position27> <Position28> <Filename Value="..\..\xlsbiff5.pas"/> - <Caret Line="601" Column="25" TopLine="588"/> + <Caret Line="700" Column="34" TopLine="686"/> </Position28> <Position29> - <Filename Value="..\..\xlsbiff5.pas"/> - <Caret Line="673" Column="34" TopLine="659"/> + <Filename Value="opendocwrite.lpr"/> + <Caret Line="13" Column="45" TopLine="5"/> </Position29> - <Position30> - <Filename Value="..\..\xlsbiff5.pas"/> - <Caret Line="700" Column="34" TopLine="686"/> - </Position30> </JumpHistory> </ProjectOptions> <CompilerOptions> diff --git a/components/fpspreadsheet/examples/opendocdemo/opendocwrite.lpr b/components/fpspreadsheet/examples/opendocdemo/opendocwrite.lpr index 8440a17c8..16fa55b95 100644 --- a/components/fpspreadsheet/examples/opendocdemo/opendocwrite.lpr +++ b/components/fpspreadsheet/examples/opendocdemo/opendocwrite.lpr @@ -60,10 +60,8 @@ begin *) // Write some string cells - MyWorksheet.WriteUTF8Text(1, 0, 'First'); - MyWorksheet.WriteUTF8Text(1, 1, 'Second'); - MyWorksheet.WriteUTF8Text(1, 2, 'Third'); - MyWorksheet.WriteUTF8Text(1, 3, 'Fourth'); + MyWorksheet.WriteUTF8Text(4, 2, 'Total:'); + MyWorksheet.WriteNumber(4, 3, 10.0); // Save the spreadsheet to a file MyWorkbook.WriteToFile(MyDir + 'test', sfOpenDocument); diff --git a/components/fpspreadsheet/fpsallformats.pas b/components/fpspreadsheet/fpsallformats.pas index c0c45505e..504566076 100755 --- a/components/fpspreadsheet/fpsallformats.pas +++ b/components/fpspreadsheet/fpsallformats.pas @@ -10,7 +10,7 @@ unit fpsallformats; interface uses - xlsbiff2, xlsbiff5; + xlsbiff2, xlsbiff5, fpsopendocument, xlsxooxml; implementation diff --git a/components/fpspreadsheet/fpspreadsheet.pas b/components/fpspreadsheet/fpspreadsheet.pas index 2bdb5400c..242595a3e 100755 --- a/components/fpspreadsheet/fpspreadsheet.pas +++ b/components/fpspreadsheet/fpspreadsheet.pas @@ -355,6 +355,16 @@ begin else Result := nil; end; +{@@ + Returns the number of the last column with a cell with contents. + + If no cells have contents, zero will be returned, which is also a valid value. + + Use GetCellCount to verify if there is at least one cell with contents in the + worksheet. + + @see GetCellCount +} function TsWorksheet.GetLastColNumber: Cardinal; var i: Integer; @@ -373,6 +383,16 @@ begin end; end; +{@@ + Returns the number of the last row with a cell with contents. + + If no cells have contents, zero will be returned, which is also a valid value. + + Use GetCellCount to verify if there is at least one cell with contents in the + worksheet. + + @see GetCellCount +} function TsWorksheet.GetLastRowNumber: Cardinal; var i: Integer;