|
|
Home » Developing U++ » UppHub » Ole Automation [FEATURE REQUEST?]
Re: Ole Automation [FEATURE REQUEST?] [message #21163 is a reply to message #21159] |
Wed, 06 May 2009 09:52 |
|
Hello Koldo!
I added new methods
for classes OfficeSheet and MSSheet:
// >>>Ion Lupascu 06.05.2009 Add this methods
int GetSheetsCount();
bool SetActiveSheet(int index);
bool SetActiveSheet(String name);
bool SetSheetName(String new_name);
// <<<Ion Lupascu 06.05.2009
Details for MSSheet:
// >>> Ion Lupascu 06.05.2009 Add this methods
int MSSheet::GetSheetsCount(){
if (!Book)
return(-1);
return((int)Ole::GetValue(Ole::GetObject(Book, "Sheets"), "Count"));
}
// Set active sheet start with 0(zero)
bool MSSheet::SetActiveSheet(int index){
if(!Book)
return false;
VariantOle index_ole;
index_ole.Int4(index + 1);
if (!(Sheet = Ole::GetObject(Book, "Sheets", index_ole)))
return false;
return true;
}
// Set active sheet by name
bool MSSheet::SetActiveSheet(String name){
if(!Book)
return false;
VariantOle name_ole;
name_ole.BString(name);
if (!(Sheet = Ole::GetObject(Book, "Sheets", name_ole)))
return false;
return true;
}
bool MSSheet::SetSheetName(String new_name){
if(!Sheet)
return false;
VariantOle new_name_ole;
new_name_ole.BString(new_name);
return Ole::SetValue(Sheet, "Name", new_name_ole);
}
// <<< Ion Lupascu 06.05.2009
Details for OfficeSheet:
// >>> Ion Lupascu 06.05.2009 Add this methods
int OfficeSheet::GetSheetsCount(){
if (!data)
return -1;
if (type == SheetOPEN)
return -1; //... need to add ((OPENSheet*)data)->GetSheetsCount();
else if (type == SheetMS)
return ((MSSheet*)data)->GetSheetsCount();
else
return -1;
}
// Set active sheet start with 0(zero)
bool OfficeSheet::SetActiveSheet(int index){
if (!data)
return false;
if (type == SheetOPEN)
return false; //... need to add ((OPENSheet*)data)->SetActiveSheet(index);
else if (type == SheetMS)
return ((MSSheet*)data)->SetActiveSheet(index);
else
return false;
}
// Set active sheet by name
bool OfficeSheet::SetActiveSheet(String name){
if (!data)
return false;
if (type == SheetOPEN)
return false; //... need to add ((OPENSheet*)data)->SetActiveSheet(name);
else if (type == SheetMS)
return ((MSSheet*)data)->SetActiveSheet(name);
else
return false;
}
bool OfficeSheet::SetSheetName(String new_name){
if (!data)
return false;
if (type == SheetOPEN)
return false; //... need to add ((OPENSheet*)data)->SetActiveSheet(name);
else if (type == SheetMS)
return ((MSSheet*)data)->SetSheetName(new_name);
else
return false;
}
// <<< Ion Lupascu 06.05.2009
I do not added this method for Open office. Please check this and add methods for Open calc too. Maybe exists memory leak in method:
// Set active sheet by name
bool MSSheet::SetActiveSheet(String name){
if(!Book)
return false;
VariantOle name_ole;
name_ole.BString(name);
>>HERE if (!(Sheet = Ole::GetObject(Book, "Sheets", name_ole)))
return false;
return true;
}
I tested this new methods and works fine!
Thank you for changes with MSC8 and gdi32.lib
|
|
|
|
|
Ole Automation [FEATURE REQUEST?]
By: koldo on Sun, 31 August 2008 21:20
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Sat, 18 October 2008 21:02
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: mirek on Sat, 08 November 2008 14:38
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Sun, 09 November 2008 17:11
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: mirek on Sun, 16 November 2008 18:50
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Wed, 19 November 2008 08:00
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Thu, 04 December 2008 12:09
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Tue, 30 December 2008 10:49
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Sat, 17 January 2009 00:22
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Tue, 05 May 2009 13:06
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Tue, 05 May 2009 15:03
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Tue, 05 May 2009 15:52
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Tue, 05 May 2009 16:53
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Tue, 05 May 2009 21:33
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Wed, 06 May 2009 00:02
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Wed, 06 May 2009 06:05
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Wed, 06 May 2009 08:34
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Wed, 06 May 2009 09:52
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Wed, 06 May 2009 11:52
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Wed, 06 May 2009 12:25
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Wed, 06 May 2009 14:27
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Wed, 06 May 2009 15:58
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Thu, 07 May 2009 00:24
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Thu, 07 May 2009 09:18
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Tue, 05 May 2009 13:57
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Thu, 07 May 2009 22:55
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Fri, 08 May 2009 08:16
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Tue, 12 May 2009 23:12
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Wed, 13 May 2009 14:09
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Wed, 13 May 2009 14:59
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Wed, 13 May 2009 23:09
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: mr_ped on Thu, 14 May 2009 08:14
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: mr_ped on Fri, 15 May 2009 14:26
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Fri, 15 May 2009 16:18
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: mr_ped on Mon, 18 May 2009 08:29
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Mon, 18 May 2009 10:23
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: tojocky on Tue, 09 June 2009 11:17
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Tue, 09 June 2009 16:11
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Thu, 19 September 2013 16:18
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Fri, 20 September 2013 10:07
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Fri, 20 September 2013 10:13
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: Klugier on Fri, 20 September 2013 16:41
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Sat, 21 September 2013 10:16
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Mon, 23 September 2013 06:49
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Mon, 23 September 2013 10:04
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Mon, 23 September 2013 10:21
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Mon, 23 September 2013 13:17
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Mon, 23 September 2013 15:29
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Mon, 23 September 2013 16:07
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Mon, 23 September 2013 16:31
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Tue, 24 September 2013 18:47
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Thu, 26 September 2013 05:53
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Thu, 26 September 2013 16:05
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Thu, 26 September 2013 17:47
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Fri, 27 September 2013 11:12
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Fri, 27 September 2013 11:32
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Mon, 30 September 2013 08:24
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Mon, 30 September 2013 08:57
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Mon, 30 September 2013 10:39
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Mon, 30 September 2013 10:55
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Tue, 01 October 2013 08:31
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: iST1 on Tue, 01 October 2013 10:52
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Mon, 30 September 2013 08:17
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: koldo on Sun, 24 May 2009 18:36
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
|
|
|
Re: Ole Automation [FEATURE REQUEST?]
By: keltor on Wed, 30 October 2013 08:52
|
Goto Forum:
Current Time: Tue May 14 23:38:14 CEST 2024
Total time taken to generate the page: 0.02226 seconds
|
|
|