diff --git a/Debug/Preview Handlers/PreviewHandler Host/PreviewHost.dproj b/Debug/Preview Handlers/PreviewHandler Host/PreviewHost.dproj index a076eb0..2d3e486 100644 --- a/Debug/Preview Handlers/PreviewHandler Host/PreviewHost.dproj +++ b/Debug/Preview Handlers/PreviewHandler Host/PreviewHost.dproj @@ -1,7 +1,7 @@  {b3898e3b-28c0-4d98-8436-5a69b8915599} - 19.2 + 19.5 VCL PreviewHost.dpr True @@ -124,10 +124,6 @@ dfm - - Cfg_2 - Base - Base @@ -135,6 +131,10 @@ Cfg_1 Base + + Cfg_2 + Base + Delphi.Personality.12 @@ -176,7 +176,7 @@ PreviewHost.dpr - + True True diff --git a/Debug/Preview Handlers/PreviewHandler Host/PreviewHost.res b/Debug/Preview Handlers/PreviewHandler Host/PreviewHost.res index d4ccd5b..a6f823f 100644 Binary files a/Debug/Preview Handlers/PreviewHandler Host/PreviewHost.res and b/Debug/Preview Handlers/PreviewHandler Host/PreviewHost.res differ diff --git a/Docs/Templates/fatturapa_v1.2.1_de-it.xsl b/Docs/Templates/fatturapa_v1.2.1_de-it.xsl new file mode 100644 index 0000000..13fec86 --- /dev/null +++ b/Docs/Templates/fatturapa_v1.2.1_de-it.xsl @@ -0,0 +1,1744 @@ + + + + + + + + +

Stylesheet fatturapa_v1.2.1_de-it.xsl v20201125 ft - http://tinyurl.com/fatturapa-xsl-southtyrol

+
+ + + + + +
Generaldirektion
DIREZIONE GENERALE
+
Rechtsamt
UFFICIO AFFARI LEGALI
+
EDV-Amt
UFFICIO EDP
+
Personal- und Organisationsamt
UFFICIO PERSONALE ED ORGANIZZAZIONE
+
Wohnungszuweisung und Mieterangelegenheiten
RIPARTIZIONE ALLOGGI ED INQUILINATO
+
Mieterservicestelle Bozen
CENTRO SERVIZI ALL'INQUILINATO DI BOLZANO
+
Mieterservicestelle Meran
CENTRO SERVIZI ALL'INQUILINATO DI MERANO
+
Mieterservicestelle Brixen
CENTRO SERVIZI ALL'INQUILINATO DI BRESSANONE
+
Technisches Dienste
RIPARTIZIONE SERVIZI TECNICI
+
Technisches Amt Mitte Süd
UFFICIO TECNICO CENTRO SUD
+
Technisches Amt Ost
UFFICIO TECNICO EST
+
Technisches Amt West
UFFICIO TECNICO OVEST
+
Amt für Buchhaltung, Bilanzen, Versicherung und Zahlungen
UFFICIO CONTABILITA, BILANCI, ASSICURAZIONI E PAGAMENTI
+
Arbeitsgruppe für Vergabe, Verträge und Vermögen
GRUPPO DI LAVORO APPALTI, CONTRATTI E PATRIMONIO
+
Technisches Amt Instandhaltung
UFFICIO TECNICO MANUTENZIONE
+
Uff_eFatturaPA
+ +
Nicht akkreditierter Rechnungsempfänger
Destinatario non accreditato
+
Ausländischer Rechnungsempfänger
Destinatario non residenti
+ + +
+ +
+ + + + + + + + + + + + + Jan./Gen. + Feb. + Mar. + Apr. + Mai/Mag. + Jun./Giu. + Jul./Lug. + Aug./Ago. + Sep./Set. + Okt./Ott. + Nov. + Dez./Dic. + Unbekannter Monat - Mese non riconosciuto + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +

Italienische elektronische Rechnung
FATTURA ELETTRONICA

+
+
FatturaPA Version/versione
+ + +

Daten zur Übertragung - Dati relativi alla trasmissione

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
1.1.[3|1|2]Übertragungskennung
Ident. di trasmissione
+ : + _ + +
1.1.4Kennung Rechnungsempfänger
Codice destinatario
1.1.5.1Telefonnummer Sender
Telefono del trasmittente
1.1.5.2E-Mail des Senders
E-mail del trasmittente
1.1.6zertifizierte E-Mail des Empfängers
E-mail certificata del destinatario
+
+
+ + + + +
+

Daten zum Lieferanten/Freiberufler - Dati del cedente/prestatore

+ +

Anagrafische Daten - Dati anagrafici

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1.2.1.3.[1|4|2|3]Benennung
Nominativo
   
1.2.1.3.5EORI-Kennung
Codice EORI
1.2.1.[4|5|6|7]Zugehörigkeit Berufsalbum
Albo professionale di appartenenza
   
1.2.1.1Mehrwertsteuernummer
Ident. fiscale ai fini IVA
1.2.1.2Steuernummer
Codice fiscale
1.2.1.8Steuersystem
Regime fiscale
+ + + (ordinario) + (contribuenti minimi) + (nuove iniziative produttive) + (agricoltura e attività connesse e pesca) + (vendita sali e tabacchi) + (commercio fiammiferi) + (editoria) + (gestione servizi telefonia pubblica) + (rivendita documenti di trasporto pubblico e di sosta) + (intrattenimenti, giochi e altre attività di cui alla tariffa allegata al DPR 640/72) + (agenzie viaggi e turismo) + (agriturismo) + (vendite a domicilio) + (rivendita beni usati, oggetti d’arte, d’antiquariato o da collezione) + (agenzie di vendite all’asta di oggetti d’arte, antiquariato o da collezione) + (IVA per cassa P.A.) + (IVA per cassa - art. 32-bis, D.L. 83/2012) + (Regime forfettario) + (altro) + + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) + +
+
+ +

Firmensitz - Dati della sede

+ + + + + + + + +
1.2.2.[1|2|3|4|5|6]Anschrift
indirizzo
 
   
+
+ + +

Daten der Organisation - Dati della stabile organizzazione

+ + + + + + + + +
1.2.3.[1|2|3|4|5]Anschrift
indirizzo
 
   
+
+ + +

Handelsregistereintragung - Dati di iscrizione nel registro delle imprese

+ + + + + + + + + + + + + + + + + + + + + + +
1.2.4.1Handelsregister der Provinz
Uff. Reg. Imp. Provinciale
1.2.4.2Eintragungsnummer
Numero di iscrizione
1.2.4.[3|4]Handelskapital
Capitale sociale
+ + + + +   + + + (Einzelgesellschafter)(socio unico) + (mehrere Gesellschafter)(più soci) + + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) + + +
1.2.4.5Auflösung
Stato di liquidazione
+ + (in Auflösung)(in liquidazione) + (nicht in Auflösung)(non in liquidazione) + + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) +
+
+ + + +

Adresse - Recapiti

+ + + + + + + + + + + + + + + + +
1.2.5.1Telefon
Telefono
1.2.5.2FAX
Fax
1.2.5.3E-Mail
E-mail
+
+
+ + +

Hinweis Verwaltung / Buchhaltung - Riferimento amministrativo

+ + + + +
1.2.6Referenz
Riferimento
+
+
+
+ + + + +
+

Daten des Vertreters für Steuerfragen für Dienstleisters / Lieferanten
Dati del rappresentante fiscale del cedente / prestatore

+ +

Anagrafische Daten - Dati anagrafici

+ + + + + + + + + + + + + + + + + + + + + + + + +
1.3.1.1Mehrwertsteuernummer
Ident. fiscale ai fini IVA
1.3.1.2Steuernummer
Codice fiscale
1.3.1.3.[1|4|2|3]Anschrift
indirizzo
  
1.3.1.3.5EORI-Kennung
Codice EORI
+
+
+
+ + + + +
+

Daten des Rechnungsempfängers - Dati del cessionario / committente

+ +

Anagrafische Daten - Dati anagrafici

+ + + + + + + + + + + + + + + + + + + + + + + +
1.4.1.3.[1|4|2|3]Benennung
denominazione
  
1.4.1.1Mehrwertsteuernummer
Ident. fiscale ai fini IVA
1.4.1.2Steuernummer
Codice Fiscale
1.4.1.3.5EORI-Kennung
Codice EORI
+
+ +

Firmensitz - Dati della sede

+ + + + + + + + +
1.4.2.[1|2|3|4|5|6]Anschrift
indirizzo
 
    
+
+ + +

Firmensitz - Dati della stabile organizzazione

+ + + + + + + + +
1.4.3.[1|2|3|4|5|6]Anschrift
indirizzo
 
    
+
+ +

Steuerberater - Rappresentante fiscale

+ + + + + + + + + + + + + +
1.4.4.1Mehrwertsteuernummer
Ident. fiscale ai fini IVA
1.4.4.[2 / 3|4]Benennung
denominazione
  
+
+ +
+
+ + + + +
+ + +

Daten des Vermittlers des Emittenten - Dati del terzo intermediario soggetto emittente

+ + +

Anagrafische Daten - Dati anagrafici

+ + + + + + + + + + + + + + + + + + + + + + + +
1.5.1.3.[1|4|2|3]Anschrift
indirizzo
    
1.5.1.1Mehrwertsteuernummer
Ident. fiscale ai fini IVA
1.5.1.2Steuernummer
Codice Fiscale
1.5.1.3.5EORI-Kennung
Codice EORI
+
+
+
+
+ + + + +
+

Rechnungsersteller - Soggetto emittente la fattura

+ + + + +
1.6Austeller
Soggetto emittente
+ + (Rechnungssteller)(cessionario/committente) + (dritter)(terzo) + + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) +
+
+
+ + + +
+
+ + + + + + + + + + +

Dokument Nummer Numero documento nel lotto:

+
+ +
+
FatturaPA Version/versione
+ + + + + +
+ + + + +
+

Generelle Rechnungssdaten - Dati generali del documento

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.1.1.[2|1]Währung : Dokumententyp
Valuta : Tipologia doc.
 :  + + (Rechnung)(fattura) + (Accontorechnung)(acconto/anticipo su fattura) + (Accontohonorar)(acconto/anticipo su parcella) + (Gutschrift)(nota di credito) + (Lastschrift)(nota di debito) + (Honorarnote)(parcella) + + (Integration der internenen reverse charge Rechnungen)
(Integrazione fattura reverse charge interno)
+ (Integration/Selbsfakturierung für den Einkauf von Dienstleistungen aus dem Ausland)
(Integrazione/autofattura per acquisto servizi dall'estero)
+ (Integration für den Kauf von innergemeinschaftlichen Waren)
(Integrazione per acquisto di beni intracomunitari)
+ (Integration/Selbstfakturierung für den Kauf von Waren ex Art. 17, Abs. 2 DPR 633/72)
(Integrazione/autofattura per acquisto di beni ex art.17 c.2 DPR 633/72)
+ (Selbstfakturierung Anzeige (Art.6c, Komma 8 Dekret 471/97)
)(Autofattura denuncia (art.6c .8 d.lgs. 471/97))
+ (Selbstfakturierung bei Überschreiten des Plafonds)(Autofattura per splafonamento) + (Warenentnahme aus dem Mehrwertsteuerlager)
(Estrazione beni da Deposito IVA)
+ (Warenentnahme aus dem Mehrwertsteuerlager mit Mehrwertsteuerzahlung)
(Estrazione beni da Deposito IVA con versamento dell'IVA)
+ (Aufgeschobene Rechnung gemäß Artikel 21, Absatz 4, Buchstabe a))
(Fattura differita di cui all'art. 21, comma 4, lett. a))
+ (Aufgeschobene Rechnung gemäß Artikel 21, Absatz 4, Dritter Satz Buchstabe b))
(Fattura differita di cui all'art. 21, comma 4, terzo periodo lett. b))
+ (Übertragung von abschreibungsfähigen Gütern und für interner Transaktionen (Art. 36 DPR 633/72))
(Cessione di beni ammortizzabili e per passaggi interni (art.36 DPR 633/72))
+ (Rechnung für Eigenverbrauch oder für kostenlose Abtretungen ohne Entschädigung)
(Fattura per autoconsumo o per cessioni gratuite senza rivalsa)
+ + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) +
2.1.1.[4|3]Dok.-nummer und -datum
Numero e data doc.
 -  +
2.1.1.9Gesamtbetrag Dokument
Importo totale documento
 
2.1.1.10Rundung auf dem Gesamtbetrag
Arrotondamento su Importo totale documento
2.1.1.11Grund
Causale
2.1.1.12Art. 73 DPR 633/72
+ + + +
+ +

Einbehalte - Ritenuta

+ + + + + + + + + + + + + + + + + + + + +
2.1.1.5.1Art des Einbehaltes
Tipologia ritenuta
+ + (ritenuta persone fisiche) + (ritenuta persone giuridiche) + + (contributo INPS) + (contributo ENASARCO) + (contributo ENPAM) + (altro contributo previdenziale) + + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) + +
2.1.1.5.2Einbehaltener Betrag
Importo ritenuta
 
2.1.1.5.3Einbehaltsatz
Aliquota ritenuta (%)
%
2.1.1.5.4Zahlungsgrund
Causale di pagamento
(Kennung nach Modell 770S)(decodifica come da modello 770S)
+
+
+
+ + + + +
+ +

Stempelwert - Bollo

+ + + + + + + + + + + +
2.1.1.6.1Virtueller Stempelwert
Bollo virtuale
2.1.1.6.2Betrag Stempelwert
Importo bollo
 
+
+
+
+ + + + +
+

Fürsorgekasse - Cassa previdenziale

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.1.1.7.1Fürsorgekasse
Cassa previdenziale
+ + + (Cassa Nazionale Previdenza e Assistenza Avvocati e Procuratori legali) + (Cassa Previdenza Dottori Commercialisti) + (Cassa Previdenza e Assistenza Geometri) + (Cassa Nazionale Previdenza e Assistenza Ingegneri e Architetti liberi profess.) + (Cassa Nazionale del Notariato) + (Cassa Nazionale Previdenza e Assistenza Ragionieri e Periti commerciali) + (Ente Nazionale Assistenza Agenti e Rappresentanti di Commercio-ENASARCO) + (Ente Nazionale Previdenza e Assistenza Consulenti del Lavoro-ENPACL) + (Ente Nazionale Previdenza e Assistenza Medici-ENPAM) + (Ente Nazionale Previdenza e Assistenza Farmacisti-ENPAF) + (Ente Nazionale Previdenza e Assistenza Veterinari-ENPAV) + (Ente Nazionale Previdenza e Assistenza Impiegati dell'Agricoltura-ENPAIA) + (Fondo Previdenza Impiegati Imprese di Spedizione e Agenzie Marittime) + (Istituto Nazionale Previdenza Giornalisti Italiani-INPGI) + (Opera Nazionale Assistenza Orfani Sanitari Italiani-ONAOSI) + (Cassa Autonoma Assistenza Integrativa Giornalisti Italiani-CASAGIT) + (Ente Previdenza Periti Industriali e Periti Industriali Laureati-EPPI) + (Ente Previdenza e Assistenza Pluricategoriale-EPAP) + (Ente Nazionale Previdenza e Assistenza Biologi-ENPAB) + (Ente Nazionale Previdenza e Assistenza Professione Infermieristica-ENPAPI) + (Ente Nazionale Previdenza e Assistenza Psicologi-ENPAP) + (INPS) + + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) +
2.1.1.7.4Grundlage Fürsorgebeitrag
Imponibile previdenziale
 
2.1.1.7.2Fürsorgebeitragssatz (%)
Aliquota contri. cassa (%)
%
2.1.1.7.3Fürsorgebeitrag
Importo contributo cassa
 
2.1.1.7.5MwSt-Satz
Aliquota IVA applicata
%
2.1.1.7.6Fürsorgebeitrag im Abzug
Contributo cassa soggetto a ritenuta
2.1.1.7.7Art der Beitragsfreistellung
Tipologia di non imponibilità del contributo
+ + + (ausgenommener Geschäftsvorg. ex Art. 15)
(escluse ex art. 15)
+ (nicht unterworfener Geschäftsvorg. (darf nach dem 31.12.2020 nicht mehr verwendet werden))
(non soggette (non più utilizabile dopo il 31.12.2020))
+ (nicht unterworfener Geschäftsvorg. im Sinne der Artikel von 7 bis 7-septies des DPR 633/72)
(Non soggette ad IVA ai sensi degli artt. da 7 a 7- septies del DPR 633/72)
+ (nicht unterworfener Geschäftsvorg. – andere Fälle)
(non soggette – altri casi)
+ (nicht Mehrwertsteuerpflichtig (darf nach dem 31.12.2020 nicht mehr verwendet werden) )
(non imponibili (non più utilizabile dopo il 31.12.2020))
+ (nicht Mehrwertsteuerpflichtig--Export)
(non imponibili – esportazioni)
+ (nicht Mehrwertsteuerpflichtig--innergemeinschaftliche Verkäufe)
(non imponibili – cessioni intracomunitarie)
+ (nicht Mehrwertsteuerpflichtig--Verkäufe nach San Marino)
(non imponibili – cessioni verso San Marino)
+ (nicht Mehrwertsteuerpflichtig--als Exporte behandelte Transaktionen)
(non imponibili – operazioni assimilate alle cessioni all’esportazione)
+ (nicht Mehrwertsteuerpflichtig--nach einer Absichtserklärung)
(non imponibili – a seguito di dichiarazioni d’intento)
+ (nicht Mehrwertsteuerpflichtig--andere Operationen, die nicht zur Bildung des Plafonds beitragen)
(non imponibili – altre operazioni che non concorrono alla formazione del plafond)
+ (befreit)
(esenti)
+ (im Rahmen der Differenzbesteuerung)
(regime del margine)
+ (Umkehrung der Steuerschuldnerschaft(darf nach dem 31.12.2020 nicht mehr verwendet werden))
(inversione contabile (non più utilizabile dopo il 31.12.2020))
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von Schrott und anderen recycelten Materialien)
(inversione contabile – cessione di rottami e altri materiali di recupero)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von reinem Gold und Silber)
(inversione contabile – cessione di oro e argento puro)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Unteraufträge im Bausektor)
(inversione contabile – subappalto nel settore edile)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von Gebäuden)
(inversione contabile – cessione di fabbricati)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von Mobiltelefonen)
(inversione contabile – cessione di telefoni cellulari)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von elektronischen Geräten)
(inversione contabile – cessione di prodotti elettronici)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Dienstleistungen des Bausektors und damit verwandte Sektoren)
(inversione contabile – prestazioni comparto edile e settori connessi)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Operationen im Energiesektor)
(inversione contabile – operazioni settore energetico)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - andere Fälle)
(inversione contabile – altri casi)
+ + (MwSt.-Schuld in einem anderen EU-Land abgegolten)(IVA assolta in altro stato UE)
+ + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) +
2.1.1.7.8Hinweis Verwaltung / Buchhaltung
Riferimento amministrativo / contabile
+
+
+
+ + + + +

Skonto/Aufschläge - Sconto/maggiorazione

+
+ + + + + + + + + + + + +
2.1.1.8.[2|1]Prozentsatz-Typologie
Percentuale e tipologia
+ + % + + + + + (Skonto)(sconto) + (Aufpreis)(maggiorazione) + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) +
2.1.1.8.3Betrag
Importo
+ + + - + + + +
+
+
+
+ + +
+
+ + + + +
+

Daten zur Bestellung - Dati dell'ordine di acquisto

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.1.2.1Zugehörige Zeilennummer der Rechnung
Numero linea di fattura a cui si riferisce
,
2.1.2.2Bestellkennung
Ident. ordine di acquisto
2.1.2.3Bestellungsdatum
Data ordine di acquisto
2.1.2.4Zeilennummer der Bestellung
Numero linea ordine di acquisto
2.1.2.5Verkaufs-/Konventionskodex
Codice commessa/convenzione
2.1.2.6Staatlicher Projektkodex
Codice Unitario Progetto (CUP)
2.1.2.7Ausschreibungskode
Codice Ident. Gara (CIG)
+
+
+ + + + +
+

Vertragsdaten - Dati del contratto

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.1.3.1Zugehörige Zeilennummer der Rechnung
Numero linea di fattura a cui si riferisce
,
2.1.3.2Vertragskenndaten
Ident. contratto
2.1.3.3Vertagsdatum
Data contratto
2.1.3.4Zeilennummer Vertrag
Numero linea contratto
2.1.3.5Verk.-/Konv.-kodex
Codice comm./conv.
2.1.3.6Staatlicher Projektkodex
Codice Unitario Progetto
2.1.3.7Ausschreibungskode
Codice Ident. Gara (CIG)
+
+
+ + + + +
+

Daten der Konvention - Dati della convenzione

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.1.4.1Zugehörige Zeilennummer der Rechnung
Numero linea di fattura a cui si riferisce
,
2.1.4.2Konventionskennung
Ident. convenzione
2.1.4.3Datum Konvention
Data convenzione
2.1.4.4Zeilennummer Konvention
Numero linea convenzione
2.1.4.5Verkaufs- / Konventionskodex
Codice commessa/convenzione
2.1.4.6Staatlicher Projektkodex
Codice Unitario Progetto (CUP)
2.1.4.7Ausschreibungskode
Codice Ident. Gara (CIG)
+
+
+ + + + +
+

Daten zum Erhalt der Leistung - Dati della ricezione

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.1.5.1Zugehörige Zeilennummer der Rechnung
Numero linea di fattura a cui si riferisce
,
2.1.5.2Kennzeichen des Empfangs
Ident. ricezione
2.1.5.3Empfangsdatum
Data ricezione
2.1.5.4Zeilennummer des Empfangs
Numero linea ricezione
2.1.5.5Verkaufs- / Konventionskennung
Codice commessa/convenzione
2.1.5.6Staatlicher Projektkodex
Codice Unitario Progetto (CUP)
2.1.5.7Ausschreibungskennung
Codice Ident. Gara (CIG)
+
+
+ + + + +
+

Daten zu verbundenen Rechnungen - Dati della fattura collegata

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.1.6.1Zugehörige Zeilennummer der Rechnung
Numero linea di fattura a cui si riferisce
,
2.1.6.2Kennzeichen der dazugehörenden Rechnung
Ident. fattura collegata
2.1.6.3Datum der dazugehörenden Rechnung
Data fattura collegata
2.1.6.4Zeilennummer bei der dazugehörenden Rechnung
Numero linea fattura collegata
2.1.6.5Verkaufs- / Konventionskodex
Codice commessa/convenzione
2.1.6.6Staatlicher Projektkodex
Codice Unitario Progetto (CUP)
2.1.6.7Ausschreibungskennung
Codice Ident. Gara (CIG)
+
+
+ + + + +
+

Baufortschritt - Stato avanzamento lavori

+ + + + + + +
2.1.7.1Nummer Baufortschritt
Numero fase avanzamento
,
+
+
+ + + + +
+

Daten zum Warenbegleitschein (WBS) - Dati del documento di trasporto (DDT)

+ + + + + + + + +
2.1.8.[1|2|3]Nummer, Datum WBS
Numero data DDT
+ + vom/del  +
Betrifft Zeile/Rif.linea ,
+
+
+
+ + + + +
+

Daten zum Warentransport - Dati relativi al trasporto

+ +

Daten des Frächters - Dati del vettore

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.1.9.1.3.1Benennung
Denominazione
2.1.9.1.3.4Honorartitel
Titolo onorifico
2.1.9.1.3.2Name
Nome
2.1.9.1.3.3Nachname
Cognome
2.1.9.1.1Mehrwertsteuernummer
Ident. fiscale ai fini IVA
2.1.9.1.2Steuernummer
Codice Fiscale
2.1.9.1.3.5EORI-Kennung
Codice EORI
2.1.9.1.4Führerscheinnummer
Numero licenza di guida

Weitere Daten - Altri dati

2.1.9.2Transortmittel
Mezzo di trasporto
2.1.9.3Transportgrund
Causale trasporto
2.1.9.4Anzahl der Frachtstücke
Numero colli trasportati
2.1.9.5Beschreibung der transportierten Güter
Descrizione beni trasportati
2.1.9.6Messeinheit der Ware
Unità di misura del peso merce
2.1.9.7Bruttogewicht
Peso lordo
2.1.9.8Nettogewicht
Peso netto
2.1.9.9Datum und Zeit der Abgabe
Data e ora ritiro merce
2.1.9.10Datum Transportbeginn
Data inizio trasporto
+
2.1.9.11Typologie der Abgabe
Tipologia di resa
(Kodifizierung nach ICC-Standard)
(codifica secondo standard ICC)
2.1.9.12.1Adresse der Abgabe
Indirizzo di resa
2.1.9.12.2Hausnummer Abgabeadresse
Numero civico indirizzo di resa
2.1.9.12.3PLZ Adresse Abgabe
CAP indirizzo di resa
2.1.9.12.4Gemeinde Abgabe
Comune di resa
2.1.9.12.5Provinz Abgabe
Provincia di resa
2.1.9.12.6Land der Abgabe
Nazione di resa
2.1.9.13Land der Abgabe
Nazione di resa
+
+
+ + + + +
+

Daten zur Hauptrechnung - Dati relativi alla fattura principale

+ + + + + + + + + + + + + +
2.1.10.1Nummer der Hauptrechnung
Numero fattura principale
2.1.10.2Datum Hauptrechnung
Data fattura principale
+
+
+ + +
+
+ + + + +
+ + + +
+

Daten zur Lieferung - Dati relativi alle linee di dettaglio della fornitura

+ + + + + + + + + + + + + + + + + + + + + + + +
NrBeschreibung
Descrizione cessione/prestazione
Menge
Quantità
ME
UM
Preis
Prezzo
Skonto
Sconto
Preis gesamt
Prezzo totale
MwSt
IVA
(%)
+ + + + +
+
+
+ +
+
+ + + (Skonto)(sconto) + (Prämie)(premio) + (Gutschrift)(abbuono) + (Zusatzspesen)(spesa accessoria) + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) + +
+ +
+ + + Hinweis Verwaltung / Buchhaltung RiferimentoAmministrazione +
+ + + +
+ + : +
+ +
+ + +
+ +
+ + +
+ +
+ + + + +
+
+
+
+ Datum Beginn des Leistungszeitraumes inizio periodo di riferimento: + + +
+ Datum Ende des Leistungszeitraumes Data fine periodo di riferimento: + +
+ +
+ + + + + (Skonto)(sconto) + (Aufpreis)(maggiorazione) + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) + +
+
+
+ + + + + + + + - + + + + %
+
+ + + - + + + +
+

+
+
+
+ + + + + + + +
+
+
+ + + + +
+

Daten zur MwSt. nach Satz und Art - Dati di riepilogo per aliquota IVA e natura

+ + + + + + + + + + + + + + + + + + + + + + + + +
MwSt
Aliq.
Art
Natura
Spesen
Spese
Rundung
Arroton.
Grundlage
Imponibile
Steuer
Imposta
Fälligkeit
Esigibilita
Ges.Bezug
Rif.Norma
+ + + + + + + + + + + (ausgenommener Geschäftsvorg. ex Art. 15)
(escluse ex art. 15)
+ (nicht unterworfener Geschäftsvorg.(darf nach dem 31.12.2020 nicht mehr verwendet werden))
(non soggette (non più utilizabile dopo il 31.12.2020))
+ (nicht unterworfener Geschäftsvorg. im Sinne der Artikel von 7 bis 7-septies des DPR 633/72)
(Non soggette ad IVA ai sensi degli artt. da 7 a 7- septies del DPR 633/72)
+ (nicht unterworfener Geschäftsvorg. – andere Fälle)
(non soggette – altri casi)
+ (nicht Mehrwertsteuerpflichtig-(darf nach dem 31.12.2020 nicht mehr verwendet werden))
(non imponibili (non più utilizabile dopo il 31.12.2020))
+ (nicht Mehrwertsteuerpflichtig--Export)
(non imponibili – esportazioni)
+ (nicht Mehrwertsteuerpflichtig--innergemeinschaftliche Verkäufe)
(non imponibili – cessioni intracomunitarie)
+ (nicht Mehrwertsteuerpflichtig--Verkäufe nach San Marino)
(non imponibili – cessioni verso San Marino)
+ (nicht Mehrwertsteuerpflichtig--als Exporte behandelte Transaktionen)
(non imponibili – operazioni assimilate alle cessioni all’esportazione)
+ (nicht Mehrwertsteuerpflichtig--nach einer Absichtserklärung)
(non imponibili – a seguito di dichiarazioni d’intento)
+ (nicht Mehrwertsteuerpflichtig--andere Operationen, die nicht zur Bildung des Plafonds beitragen)
(non imponibili – altre operazioni che non concorrono alla formazione del plafond)
+ (befreit)
(esenti)
+ (im Rahmen der Differenzbesteuerung)
(regime del margine)
+ (Umkehrung derSteuerschuldnerschaft(darf nach dem 31.12.2020 nicht mehr verwendet werden))
(inversione contabile (non più utilizabile dopo il 31.12.2020))
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von Schrott und anderen recycelten Materialien)
(inversione contabile – cessione di rottami e altri materiali di recupero)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von reinem Gold und Silber)
(inversione contabile – cessione di oro e argento puro)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Unteraufträge im Bausektor)
(inversione contabile – subappalto nel settore edile)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von Gebäuden)
(inversione contabile – cessione di fabbricati)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von Mobiltelefonen)
(inversione contabile – cessione di telefoni cellulari)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Verkauf von elektronischen Geräten)
(inversione contabile – cessione di prodotti elettronici)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Dienstleistungen des Bausektors und damit verwandte Sektoren)
(inversione contabile – prestazioni comparto edile e settori connessi)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - Operationen im Energiesektor)
(inversione contabile – operazioni settore energetico)
+ (Reverse-Charge (Umkehrung der Steuerschuldnerschaft) - andere Fälle)
(inversione contabile – altri casi)
+ + (MwSt.-Schuld in einem anderen EU-Land abgegolten)
(IVA assolta in altro stato UE)
+ + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) +
+
+ + (esigibilità immediata) + (esigibilità differita) + (scissione dei pagamenti) + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) + +
+
+
+ + +
+
+ + + + +

Daten zum Transportfahrzeug - Dati Veicoli ex art. 38 dl 331/1993

+ + + + + + + + + + + + + +
2.3.1Datum Ersteinschreibung des Fahrzeuges
prima immatricolazione / iscrizione PR
2.3.2Gesamtlänge Fahrt
Totale percorso
+
+
+ + + + +
+

Daten zur Bezahlung - Dati relativi al pagamento

+ + + + + + +
2.4.1Zahlungsbedingungen
Condizioni di pagamento
+ + (Ratenzahlung)(pagamento a rate) + (Einmalzahlung)(pagamento completo) + (Vorauszahlung)(anticipo) + + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) +
+
+ + + + + +

Rate Nr. Rata N° 

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2.4.2.1Zahlungsempfänger
Beneficiario pagamento
2.4.2.2Zahlungsmodalität
Modalità di pagamento
+ + (bar)(contanti) + (Scheck)(assegno) + (Zirkularscheck)(assegno circolare) + (über Schatzamt)(contanti presso Tesoreria) + (Überweisung)(bonifico) + (Wechsel)(vaglia cambiario) + (Bankmitteilung)(bollettino bancario) + (Zahlkarte)(carta di pagamento) + (RID) + (RID normal)(RID utenze) + (RID Schnell)(RID veloce) + (RIBA) + (MAV) + (quietanza erario) + (giroconto su conti di con + (Bankdauerauftrag)(domiciliazione bancaria) + (Postdauerauftrag)(domiciliazione postale) + (Postüberweisung)(bollettino di c/c postale) + (SEPA Direct Debit) + (SEPA Direct Debit CORE) + (SEPA Direct Debit B2B) + + (Einbehalt auf bereits bezahlte Summe)(Trattenuta su somme già riscosse) + + (pagoPA)(pagoPA) + + (!!! falsche Kennung !!!)(!!! codice non previsto !!!) + +
2.4.2.3Beginn Zahlungsfrist
Dec. termine pagamento
2.4.2.4Zahlungsziel (Tagen)
Term. pagamento (giorni)
2.4.2.5Ende Zahlungsziel
Data scadenza pagamento
2.4.2.6Betrag
Importo
 
2.4.2.7Kennung Postamt
Codice Ufficio Postale
2.4.2.11Titel des Quittierenden
Titolo del quietanzante
2.4.2.8Name des Quittierenden
Nome del quietanzante
2.4.2.9Nachname des Quittierenden
Cognome del quietanzante
2.4.2.10StNr. des Quittierenden
CF del quietanzante
2.4.2.12Finanzinstitut
Istituto finanziario
2.4.2.13IBAN
Codice IBAN
2.4.2.14ABI
Codice ABI
2.4.2.15CAB
Codice CAB
2.4.2.16BIC
Codice BIC
2.4.2.17Skonto für Zahlung vor Zahlungsziel
Sconto per pagamento anticipato
2.4.2.18letzter Termin für Zahlung vor Zahlungsziel
+ Data limite per il pagamento anticipato
2.4.2.19Pönale für verspätete Zahlung
Penale per ritardato pagamento
2.4.2.20Beginndatum für Anwendung der Pönale
Data di decorrenza della penale
2.4.2.21Zahlungs-Kennung
Codice pagamento
+
+
+
+
+
+ + + + +

Daten zu den Anlagen - Dati relativi agli allegati

+ + + + + + + + + + + + + + + + + + +
2.5.1Name der Anlage
Nome dell'allegato
2.5.2Kompressionsalgoritmus
Algoritmo di compressione
2.5.3Format
Formato
2.5.4Beschreibung
Descrizione
+
+
+
+ + + +
+
+ + +
+
+
+ + +
+
diff --git a/Ext/SVGIconImageList/Image32/ChangeLog.txt b/Ext/SVGIconImageList/Image32/ChangeLog.txt index 164bed9..fce3fff 100644 --- a/Ext/SVGIconImageList/Image32/ChangeLog.txt +++ b/Ext/SVGIconImageList/Image32/ChangeLog.txt @@ -1,7 +1,7 @@ Image32 - 2D graphics library for Delphi Pascal -Latest version: 4.11 -Released: 17 February 2022 +Latest version: 4.3 +Released: 27 September 2022 Copyright © 2019-2022 Angus Johnson Freeware released under Boost Software License @@ -12,6 +12,9 @@ Download : https://sourceforge.net/projects/image32/files/ Recent changes: +Version 4.3 + Numerous minor bugfixes + Version 4.11 Fixed compatibility issues with older versions of Delphi. Updated Img32.Clipper to latest version of Clipper diff --git a/Ext/SVGIconImageList/Image32/source/Img32.CQ.pas b/Ext/SVGIconImageList/Image32/source/Img32.CQ.pas index 5f1e192..c408342 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.CQ.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.CQ.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * Purpose : Color reduction for TImage32 * diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Clipper2.pas b/Ext/SVGIconImageList/Image32/source/Img32.Clipper2.pas index d4658c9..5d17b61 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Clipper2.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Clipper2.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * Purpose : Wrapper module for the Clipper library * diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Draw.pas b/Ext/SVGIconImageList/Image32/source/Img32.Draw.pas index f6d9d3a..ecff192 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Draw.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Draw.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * * @@ -1025,25 +1025,23 @@ procedure Rasterize(const paths: TPathsD; const clipRec: TRect; begin byteBuffer[j] := Min(255, Round(Abs(accum) * 318)); end; - frPositive: - begin {$IFDEF REVERSE_ORIENTATION} - if accum < -0.002 then - byteBuffer[j] := Min(255, Round(-accum * 318)); + frPositive: {$ELSE} - if accum > 0.002 then - byteBuffer[j] := Min(255, Round(accum * 318)); -{$ENDIF} - end; frNegative: +{$ENDIF} begin -{$IFDEF REVERSE_ORIENTATION} if accum > 0.002 then byteBuffer[j] := Min(255, Round(accum * 318)); + end; +{$IFDEF REVERSE_ORIENTATION} + frNegative: {$ELSE} + frPositive: +{$ENDIF} + begin if accum < -0.002 then byteBuffer[j] := Min(255, Round(-accum * 318)); -{$ENDIF} end; end; end; diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Extra.pas b/Ext/SVGIconImageList/Image32/source/Img32.Extra.pas index 60f9664..6768c33 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Extra.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Extra.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 28 July 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * * @@ -27,6 +27,46 @@ interface TButtonAttribute = (baShadow, ba3D, baEraseBeneath); TButtonAttributes = set of TButtonAttribute; +type + PPt = ^TPt; + TPt = record + pt : TPointD; + vec : TPointD; + len : double; + next : PPt; + prev : PPt; + end; + + TFitCurveContainer = class + private + ppts : PPt; + solution : TPathD; + tolSqrd : double; + function Count(first, last: PPt): integer; + function AddPt(const pt: TPointD): PPt; + procedure Clear; + function ComputeLeftTangent(p: PPt): TPointD; + function ComputeRightTangent(p: PPt): TPointD; + function ComputeCenterTangent(p: PPt): TPointD; + function ChordLengthParameterize( + first: PPt; cnt: integer): TArrayOfDouble; + function GenerateBezier(first, last: PPt; cnt: integer; + const u: TArrayOfDouble; const firstTan, lastTan: TPointD): TPathD; + function Reparameterize(first: PPt; cnt: integer; + const u: TArrayOfDouble; const bezier: TPathD): TArrayOfDouble; + function NewtonRaphsonRootFind(const q: TPathD; + const pt: TPointD; u: double): double; + function ComputeMaxErrorSqrd(first, last: PPt; + const bezier: TPathD; const u: TArrayOfDouble; + out SplitPoint: PPt): double; + function FitCubic(first, last: PPt; + firstTan, lastTan: TPointD): Boolean; + procedure AppendSolution(const bezier: TPathD); + public + function FitCurve(const path: TPathD; closed: Boolean; + tolerance: double; minSegLength: double): TPathD; + end; + procedure DrawEdge(img: TImage32; const rec: TRect; topLeftColor, bottomRightColor: TColor32; penWidth: double = 1.0); overload; procedure DrawEdge(img: TImage32; const rec: TRectD; @@ -162,6 +202,17 @@ function BlendAverage(bgColor, fgColor: TColor32): TColor32; function BlendLinearBurn(bgColor, fgColor: TColor32): TColor32; function BlendColorDodge(bgColor, fgColor: TColor32): TColor32; +//CurveFit: this function is based on - +//"An Algorithm for Automatically Fitting Digitized Curves" +//by Philip J. Schneider in "Graphics Gems", Academic Press, 1990 +//Smooths out many very closely positioned points +//tolerance range: 1..10 where 10 == max tolerance. + +function CurveFit(const path: TPathD; closed: Boolean; + tolerance: double; minSegLength: double = 2): TPathD; overload; +function CurveFit(const paths: TPathsD; closed: Boolean; + tolerance: double; minSegLength: double = 2): TPathsD; overload; + implementation uses @@ -1160,6 +1211,7 @@ TFloodFillRec = record next : PFloodFillRec; end; TFloodFillStack = class + private first : PFloodFillRec; maxY : integer; constructor Create(maxY: integer); @@ -1484,6 +1536,7 @@ procedure Emboss(img: TImage32; radius: Integer; type TPt2Container = class; TPt2 = class + private pt : TPointD; owner : TPt2Container; isStart : Boolean; @@ -1499,6 +1552,7 @@ TPt2 = class property IsAscending: Boolean read isStart; end; TPt2Container = class + private prevRight: integer; leftMostPt, rightMost: TPt2; solution: TPathsD; @@ -2346,16 +2400,6 @@ procedure BoxBlurV(var src, dst: TArrayOfColor32; w, h, stdDev: integer); end; //------------------------------------------------------------------------------ -function GaussCurve(cnt: integer): TArrayOfDouble; -var - i: integer; -begin - SetLength(Result, cnt); - for i := 0 to cnt -1 do - Result[i] := exp(-Sqr(2*i/cnt)); // 4 std devs --> array 1 >>> ~0 -end; -//------------------------------------------------------------------------------ - procedure FastGaussianBlur(img: TImage32; const rec: TRect; stdDev: integer; repeats: integer); begin @@ -2435,4 +2479,595 @@ procedure FastGaussianBlur(img: TImage32; end; //------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// CurveFit() support structures and functions +//------------------------------------------------------------------------------ + +//CurveFit: this function is based on - +//"An Algorithm for Automatically Fitting Digitized Curves" +//by Philip J. Schneider in "Graphics Gems", Academic Press, 1990 +//Smooths out many very closely positioned points +//tolerance range: 1..10 where 10 == max tolerance. + +//This function has been archived as I believe that +//RamerDouglasPeuker(), GetSmoothPath() and FlattenCBezier() +//will usually achieve a better result + +function Scale(const vec: TPointD; newLen: double): TPointD; + {$IFDEF INLINE} inline; {$ENDIF} +begin + Result.X := vec.X * newLen; + Result.Y := vec.Y * newLen; +end; +//------------------------------------------------------------------------------ + +function Mul(const vec: TPointD; val: double): TPointD; + {$IFDEF INLINE} inline; {$ENDIF} +begin + Result.X := vec.X * val; + Result.Y := vec.Y * val; +end; +//------------------------------------------------------------------------------ + +function AddVecs(const vec1, vec2: TPointD): TPointD; + {$IFDEF INLINE} inline; {$ENDIF} +begin + Result.X := vec1.X + vec2.X; + Result.Y := vec1.Y + vec2.Y; +end; +//------------------------------------------------------------------------------ + +function SubVecs(const vec1, vec2: TPointD): TPointD; + {$IFDEF INLINE} inline; {$ENDIF} +begin + Result.X := vec1.X - vec2.X; + Result.Y := vec1.Y - vec2.Y; +end; +//------------------------------------------------------------------------------ + +function NormalizeVec(const vec: TPointD): TPointD; + {$IFDEF INLINE} inline; {$ENDIF} +var + len: double; +begin + len := Sqrt(vec.X * vec.X + vec.Y * vec.Y); + if len <> 0 then + begin + Result.X := vec.X / len; + Result.Y := vec.Y / len; + end else + result := vec; +end; +//------------------------------------------------------------------------------ + +function NormalizeTPt(const pt: PPt): TPointD; + {$IFDEF INLINE} inline; {$ENDIF} +begin + with pt^ do + if len <> 0 then + begin + Result.X := vec.X / len; + Result.Y := vec.Y / len; + end else + result := vec; +end; +//------------------------------------------------------------------------------ + +function NegateVec(vec: TPointD): TPointD; + {$IFDEF INLINE} inline; {$ENDIF} +begin + Result.X := -vec.X; + Result.Y := -vec.Y; +end; +//------------------------------------------------------------------------------ + +function B0(u: double): double; {$IFDEF INLINE} inline; {$ENDIF} +var + tmp: double; +begin + tmp := 1.0 - u; + result := tmp * tmp * tmp; +end; +//------------------------------------------------------------------------------ + +function B1(u: double): double; {$IFDEF INLINE} inline; {$ENDIF} +var + tmp: double; +begin + tmp := 1.0 - u; + result := 3 * u * tmp * tmp; +end; +//------------------------------------------------------------------------------ + +function B2(u: double): double; {$IFDEF INLINE} inline; {$ENDIF} +begin + result := 3 * u * u * (1.0 - u); +end; +//------------------------------------------------------------------------------ + +function B3(u: double): double; {$IFDEF INLINE} inline; {$ENDIF} +begin + result := u * u * u; +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.AddPt(const pt: TPointD): PPt; +begin + new(Result); + Result.pt := pt; + if not assigned(ppts) then + begin + Result.prev := Result; + Result.next := Result; + ppts := Result; + end else + begin + Result.prev := ppts.prev; + ppts.prev.next := Result; + ppts.prev := Result; + Result.next := ppts; + end; +end; +//------------------------------------------------------------------------------ + +procedure TFitCurveContainer.Clear; +var + p: PPt; +begin + solution := nil; + ppts.prev.next := nil; //break loop + while assigned(ppts) do + begin + p := ppts; + ppts := ppts.next; + Dispose(p); + end; +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.Count(first, last: PPt): integer; +begin + if first = last then + result := 0 else + result := 1; + repeat + inc(Result); + first := first.next; + until (first = last); +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.ComputeLeftTangent(p: PPt): TPointD; +begin + Result := NormalizeTPt(p); +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.ComputeRightTangent(p: PPt): TPointD; +begin + Result := NegateVec(NormalizeTPt(p.prev)); +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.ComputeCenterTangent(p: PPt): TPointD; +var + v1, v2: TPointD; +begin + v1 := SubVecs(p.pt, p.prev.pt); + v2 := SubVecs(p.next.pt, p.pt); + Result := AddVecs(v1, v2); + Result := NormalizeVec(Result); +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.ChordLengthParameterize( + first: PPt; cnt: integer): TArrayOfDouble; +var + d: double; + i: integer; +begin + SetLength(Result, cnt); + Result[0] := 0; + d := 0; + for i := 1 to cnt -1 do + begin + d := d + first.len; + Result[i] := d; + first := first.next; + end; + for i := 1 to cnt -1 do + Result[i] := Result[i] / d; +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.GenerateBezier(first, last: PPt; cnt: integer; + const u: TArrayOfDouble; const firstTan, lastTan: TPointD): TPathD; +var + i: integer; + p: PPt; + dist, epsilon: double; + v1,v2, tmp: TPointD; + a0, a1: TPathD; + c: array [0..1, 0..1] of double; + x: array [0..1] of double; + det_c0_c1, det_c0_x, det_x_c1, alphaL, alphaR: double; +begin + SetLength(a0, cnt); + SetLength(a1, cnt); + dist := Distance(first.pt, last.pt); + for i := 0 to cnt -1 do + begin + v1 := Scale(firstTan, B1(u[i])); + v2 := Scale(lastTan, B2(u[i])); + a0[i] := v1; + a1[i] := v2; + end; + FillChar(c[0][0], 4 * SizeOf(double), 0); + FillChar(x[0], 2 * SizeOf(double), 0); + p := first; + for i := 0 to cnt -1 do + begin + c[0][0] := c[0][0] + DotProdVecs(a0[i], (a0[i])); + c[0][1] := c[0][1] + DotProdVecs(a0[i], (a1[i])); + c[1][0] := c[0][1]; + c[1][1] := c[1][1] + DotProdVecs(a1[i], (a1[i])); + tmp := SubVecs(p.pt, + AddVecs(Mul(first.pt, B0(u[i])), + AddVecs(Mul(first.pt, B1(u[i])), + AddVecs(Mul(last.pt, B2(u[i])), + Mul(last.pt, B3(u[i])))))); + x[0] := x[0] + DotProdVecs(a0[i], tmp); + x[1] := x[1] + DotProdVecs(a1[i], tmp); + p := p.next; + end; + det_c0_c1 := c[0][0] * c[1][1] - c[1][0] * c[0][1]; + det_c0_x := c[0][0] * x[1] - c[1][0] * x[0]; + det_x_c1 := x[0] * c[1][1] - x[1] * c[0][1]; + if det_c0_c1 = 0 then + alphaL := 0 else + alphaL := det_x_c1 / det_c0_c1; + if det_c0_c1 = 0 then + alphaR := 0 else + alphaR := det_c0_x / det_c0_c1; + //check for unlikely fit + if (alphaL > dist * 2) then alphaL := 0 + else if (alphaR > dist * 2) then alphaR := 0; + epsilon := 1.0e-6 * dist; + SetLength(Result, 4); + Result[0] := first.pt; + Result[3] := last.pt; + if (alphaL < epsilon) or (alphaR < epsilon) then + begin + dist := dist / 3; + Result[1] := AddVecs(Result[0], Scale(firstTan, dist)); + Result[2] := AddVecs(Result[3], Scale(lastTan, dist)); + end else + begin + Result[1] := AddVecs(Result[0], Scale(firstTan, alphaL)); + Result[2] := AddVecs(Result[3], Scale(lastTan, alphaR)); + end; +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.Reparameterize(first: PPt; cnt: integer; + const u: TArrayOfDouble; const bezier: TPathD): TArrayOfDouble; +var + i: integer; +begin + SetLength(Result, cnt); + for i := 0 to cnt -1 do + begin + Result[i] := NewtonRaphsonRootFind(bezier, first.pt, u[i]); + first := first.next; + end; +end; +//------------------------------------------------------------------------------ + +function BezierII(degree: integer; const v: array of TPointD; t: double): TPointD; +var + i,j: integer; + tmp: array[0..3] of TPointD; +begin + Move(v[0], tmp[0], degree * sizeOf(TPointD)); + for i := 1 to degree do + for j := 0 to degree - i do + begin + tmp[j].x := (1.0 - t) * tmp[j].x + t * tmp[j+1].x; + tmp[j].y := (1.0 - t) * tmp[j].y + t * tmp[j+1].y; + end; + Result := tmp[0]; +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.ComputeMaxErrorSqrd(first, last: PPt; + const bezier: TPathD; const u: TArrayOfDouble; + out SplitPoint: PPt): double; +var + i: integer; + distSqrd: double; + pt: TPointD; + p: PPt; +begin + Result := 0; + i := 1; + SplitPoint := first.next; + p := first.next; + while p <> last do + begin + pt := BezierII(3, bezier, u[i]); + distSqrd := DistanceSqrd(pt, p.pt); + if (distSqrd >= Result) then + begin + Result := distSqrd; + SplitPoint := p; + end; + inc(i); + p := p.next; + end; +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.NewtonRaphsonRootFind(const q: TPathD; + const pt: TPointD; u: double): double; +var + numerator, denominator: double; + qu, q1u, q2u: TPointD; + q1: array[0..2] of TPointD; + q2: array[0..1] of TPointD; +begin + q1[0].x := (q[1].x - q[0].x) * 3.0; + q1[0].y := (q[1].y - q[0].y) * 3.0; + q1[1].x := (q[2].x - q[1].x) * 3.0; + q1[1].y := (q[2].y - q[1].y) * 3.0; + q1[2].x := (q[3].x - q[2].x) * 3.0; + q1[2].y := (q[3].y - q[2].y) * 3.0; + q2[0].x := (q1[1].x - q1[0].x) * 2.0; + q2[0].y := (q1[1].y - q1[0].y) * 2.0; + q2[1].x := (q1[2].x - q1[1].x) * 2.0; + q2[1].y := (q1[2].y - q1[1].y) * 2.0; + qu := BezierII(3, q, u); + q1u := BezierII(2, q1, u); + q2u := BezierII(1, q2, u); + numerator := (qu.x - pt.x) * (q1u.x) + (qu.y - pt.y) * (q1u.y); + denominator := (q1u.x) * (q1u.x) + (q1u.y) * (q1u.y) + + (qu.x - pt.x) * (q2u.x) + (qu.y - pt.y) * (q2u.y); + if (denominator = 0) then + Result := u else + Result := u - (numerator / denominator); +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.FitCubic(first, last: PPt; + firstTan, lastTan: TPointD): Boolean; +var + i, cnt: integer; + splitPoint: PPt; + centerTan: TPointD; + bezier: TPathD; + clps, uPrime: TArrayOfDouble; + maxErrorSqrd: double; +const + maxRetries = 4; +begin + Result := true; + cnt := Count(first, last); + if cnt = 2 then + begin + SetLength(bezier, 4); + bezier[0] := first.pt; + bezier[3] := last.pt; + bezier[1] := bezier[0]; + bezier[2] := bezier[3]; + AppendSolution(bezier); + Exit; + end + else if cnt = 3 then + begin + if TurnsLeft(first.prev.pt, first.pt, first.next.pt) = + TurnsLeft(first.pt, first.next.pt, last.pt) then + firstTan := ComputeCenterTangent(first); + if TurnsLeft(last.prev.pt, last.pt, last.next.pt) = + TurnsLeft(first.pt, first.next.pt, last.pt) then + lastTan := NegateVec(ComputeCenterTangent(last)); + end; + + clps := ChordLengthParameterize(first, cnt); + bezier := GenerateBezier(first, last, cnt, clps, firstTan, lastTan); + maxErrorSqrd := ComputeMaxErrorSqrd(first, last, bezier, clps, splitPoint); + if (maxErrorSqrd < tolSqrd) then + begin + AppendSolution(bezier); + Exit; + end; + if (maxErrorSqrd < tolSqrd * 4) then //close enough to try again + begin + for i := 1 to maxRetries do + begin + uPrime := Reparameterize(first, cnt, clps, bezier); + bezier := GenerateBezier(first, last, cnt, uPrime, firstTan, lastTan); + maxErrorSqrd := + ComputeMaxErrorSqrd(first, last, bezier, uPrime, splitPoint); + if (maxErrorSqrd < tolSqrd) then + begin + AppendSolution(bezier); + Exit; + end; + clps := uPrime; + end; + end; + //We need to break the curve because it's too complex for a single Bezier. + //If we're changing direction then make this a 'hard' break (see below). + if TurnsLeft(splitPoint.prev.prev.pt, splitPoint.prev.pt, splitPoint.pt) <> + TurnsLeft(splitPoint.prev.pt, splitPoint.pt, splitPoint.next.pt) then + begin + centerTan := ComputeRightTangent(splitPoint); + FitCubic(first, splitPoint, firstTan, centerTan); + centerTan := ComputeLeftTangent(splitPoint); + FitCubic(splitPoint, last, centerTan, lastTan); + end else + begin + centerTan := ComputeCenterTangent(splitPoint); + FitCubic(first, splitPoint, firstTan, NegateVec(centerTan)); + FitCubic(splitPoint, last, centerTan, lastTan); + end; +end; +//------------------------------------------------------------------------------ + +function HardBreakCheck(ppt: PPt; compareLen: double): Boolean; +var + q: double; +const + longLen = 15; +begin + //A 'break' means starting a new Bezier. A 'hard' break avoids smoothing + //whereas a 'soft' break will still be smoothed. There is as much art as + //science in determining where to smooth and where not to. For example, + //long edges should generally remain straight but how long does an edge + //have to be to be considered a 'long' edge? + if (ppt.prev.len * 4 < ppt.len) or (ppt.len * 4 < ppt.prev.len) then + begin + //We'll hard break whenever there's significant asymmetry between + //segment lengths because GenerateBezier() will perform poorly. + result := true; + end + else if ((ppt.prev.len > longLen) and (ppt.len > longLen)) then + begin + //hard break long segments only when turning by more than ~45 degrees + q := (Sqr(ppt.prev.len) + Sqr(ppt.len) - DistanceSqrd(ppt.prev.pt, ppt.next.pt)) / + (2 * ppt.prev.len * ppt.len); //Cosine Rule. + result := (1 - abs(q)) > 0.3; + end + else if ((TurnsLeft(ppt.prev.prev.pt, ppt.prev.pt, ppt.pt) = + TurnsRight(ppt.prev.pt, ppt.pt, ppt.next.pt)) and + (ppt.prev.len > compareLen) and (ppt.len > compareLen)) then + begin + //we'll also hard break whenever there's a significant inflection point + result := true; + end else + begin + //Finally, we'll also force a 'hard' break when there's a significant bend. + //Again uses the Cosine Rule. + q :=(Sqr(ppt.prev.len) + Sqr(ppt.len) - + DistanceSqrd(ppt.prev.pt, ppt.next.pt)) / (2 * ppt.prev.len * ppt.len); + Result := (q > -0.2); //ie more than 90% + end; +end; +//------------------------------------------------------------------------------ + +function TFitCurveContainer.FitCurve(const path: TPathD; + closed: Boolean; tolerance: double; minSegLength: double): TPathD; +var + i, highI: integer; + d: double; + p, p2, pEnd: PPt; +begin + //tolerance: specifies the maximum allowed variance between the existing + //vertices and the new Bezier curves. More tolerance will produce + //fewer Beziers and simpler paths, but at the cost of less precison. + tolSqrd := Sqr(Max(1, Min(10, tolerance))); //range 1..10 + //minSegLength: Typically when vectorizing raster images, the produced + //vector paths will have many series of axis aligned segments that trace + //pixel boundaries. These paths will also contain many 1 unit segments at + //right angles to adjacent segments. Importantly, these very short segments + //will cause artifacts in the solution unless they are trimmed. + highI := High(path); + if closed then + while (highI > 0) and (Distance(path[highI], path[0]) < minSegLength) do + dec(highI); + p := AddPt(path[0]); + for i := 1 to highI do + begin + d := Distance(p.pt, path[i]); + //skip line segments with lengths less than 'minSegLength' + if d < minSegLength then Continue; + p := AddPt(path[i]); + p.prev.len := d; + p.prev.vec := SubVecs(p.pt, p.prev.pt); + end; + p.len := Distance(ppts.pt, p.pt); + p.vec := SubVecs(p.next.pt, p.pt); + p := ppts; + if (p.next = p) or (closed and (p.next = p.prev)) then + begin + Clear; + result := nil; + Exit; + end; + //for closed paths, find a good starting point + if closed then + begin + repeat + if HardBreakCheck(p, tolerance) then break; + p := p.next; + until p = ppts; + pEnd := p; + end else + pEnd := ppts.prev; + p2 := p.next; + repeat + if HardBreakCheck(p2, tolerance) then + begin + FitCubic(p, p2, ComputeLeftTangent(p), ComputeRightTangent(p2)); + p := p2; + end; + p2 := p2.next; + until (p2 = pEnd); + FitCubic(p, p2, ComputeLeftTangent(p), ComputeRightTangent(p2)); + Result := solution; + Clear; +end; +//------------------------------------------------------------------------------ + +procedure TFitCurveContainer.AppendSolution(const bezier: TPathD); +var + i, len: integer; +begin + len := Length(solution); + if len > 0 then + begin + SetLength(solution, len + 3); + for i := 0 to 2 do + solution[len +i] := bezier[i +1]; + end else + solution := bezier; +end; +//------------------------------------------------------------------------------ + +function CurveFit(const path: TPathD; closed: Boolean; + tolerance: double; minSegLength: double): TPathD; +var + paths, solution: TPathsD; +begin + SetLength(paths, 1); + paths[0] := path; + solution := CurveFit(paths, closed, tolerance, minSegLength); + if solution <> nil then + Result := solution[0]; +end; +//------------------------------------------------------------------------------ + +function CurveFit(const paths: TPathsD; closed: Boolean; + tolerance: double; minSegLength: double): TPathsD; +var + i,j, len: integer; +begin + j := 0; + len := Length(paths); + SetLength(Result, len); + with TFitCurveContainer.Create do + try + for i := 0 to len -1 do + if (paths[i] <> nil) and (Abs(Area(paths[i])) > Sqr(tolerance)) then + begin + Result[j] := FitCurve(paths[i], closed, tolerance, minSegLength); + inc(j); + end; + finally + Free; + end; + SetLength(Result, j); +end; +//------------------------------------------------------------------------------ + + end. diff --git a/Ext/SVGIconImageList/Image32/source/Img32.FMX.pas b/Ext/SVGIconImageList/Image32/source/Img32.FMX.pas index aa80934..80c96b3 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.FMX.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.FMX.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * Purpose : Image file format support for TImage32 and FMX * @@ -20,6 +20,7 @@ interface FMX.Platform, FMX.Types, FMX.Surfaces, FMX.Graphics, Img32; type + TImageFormat_FMX = class(TImageFormat) private fExt: string; @@ -119,7 +120,6 @@ procedure TImageFormat_FMX.SaveToStream(stream: TStream; img32: TImage32); try surf.SetSize(img32.Width, img32.Height, TPixelFormat.BGRA); Move(img32.PixelBase^, surf.Scanline[0]^, img32.Width * img32.Height * 4); - if Ext = '' then cm.SaveToStream(stream, surf, 'PNG') else cm.SaveToStream(stream, surf, Ext); @@ -138,7 +138,6 @@ class function TImageFormat_FMX.CopyToClipboard(img32: TImage32): Boolean; Result := assigned(img32) and not img32.IsEmpty and TPlatformServices.Current.SupportsPlatformService(IFMXClipboardService, svc); if not Result then Exit; - surf := TBitmapSurface.Create; try surf.SetSize(img32.Width, img32.Height, TPixelFormat.BGRA); @@ -162,7 +161,6 @@ class function TImageFormat_FMX.CanPasteFromClipboard: Boolean; end else Result := false; end; - //------------------------------------------------------------------------------ class function TImageFormat_FMX.PasteFromClipboard(img32: TImage32): Boolean; @@ -175,10 +173,8 @@ class function TImageFormat_FMX.PasteFromClipboard(img32: TImage32): Boolean; if not assigned(img32) or not TPlatformServices.Current.SupportsPlatformService( IFMXClipboardService, svc) then Exit; - value := svc.GetClipboard; if not Value.IsObject then Exit; - if Value.IsType and ((Value.AsType.PixelFormat = TPixelFormat.RGBA) or (Value.AsType.PixelFormat = TPixelFormat.BGRA)) then @@ -198,8 +194,8 @@ procedure AssignImage32ToFmxBitmap(img: TImage32; bmp: TBitmap); src, dst: TBitmapData; //TBitmapData is a record. begin if not Assigned(img) or not Assigned(bmp) then Exit; - - src := TBitmapData.Create(img.Width, img.Height, TPixelFormat.BGRA); + //src := TBitmapData.Create(img.Width, img.Height, TPixelFormat.BGRA); + src := TBitmapData.Create(img.Width, img.Height, TPixelFormat.RGBA); src.Data := img.PixelBase; src.Pitch := img.Width * 4; bmp.SetSize(img.Width, img.Height); @@ -210,9 +206,9 @@ procedure AssignImage32ToFmxBitmap(img: TImage32; bmp: TBitmap); bmp.Unmap(dst); end; end; + //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ - procedure CheckScreenScale; var ScreenService: IFMXScreenService; @@ -237,4 +233,3 @@ initialization {$ENDIF} end. - diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.BMP.pas b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.BMP.pas index 2990eb9..c35a66e 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.BMP.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.BMP.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 3.0 * +* Date : 20 July 2021 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * Purpose : BMP file format extension for TImage32 * diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.GIF.pas b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.GIF.pas index dc14806..c841b1f 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.GIF.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.GIF.pas @@ -1,30 +1,23 @@ unit Img32.Fmt.GIF; - (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * Purpose : GIF file format extension for TImage32 * * License : http://www.boost.org/LICENSE_1_0.txt * *******************************************************************************) - interface - {$I Img32.inc} - {$IF COMPILERVERSION = 15} implementation {$ELSE} - uses - SysUtils, Classes, Windows, Math, - Img32, Graphics, + SysUtils, Classes, Windows, Math, Img32, + {$IFDEF USES_NAMESPACES} Vcl.Graphics, {$ELSE}Graphics, {$ENDIF} {$IFDEF DELPHI_GIF} GifImg {$ELSE} GifImage {$ENDIF}; - type - TImageFormat_GIF = class(TImageFormat) public class function IsValidImageStream(stream: TStream): Boolean; override; @@ -34,13 +27,10 @@ TImageFormat_GIF = class(TImageFormat) class function CanPasteFromClipboard: Boolean; override; class function PasteFromClipboard(img32: TImage32): Boolean; override; end; - implementation - //------------------------------------------------------------------------------ // Loading (reading) GIF images from file ... //------------------------------------------------------------------------------ - class function TImageFormat_GIF.IsValidImageStream(stream: TStream): Boolean; var savedPos: integer; @@ -54,7 +44,6 @@ class function TImageFormat_GIF.IsValidImageStream(stream: TStream): Boolean; result := flag = $38464947; end; //------------------------------------------------------------------------------ - function TImageFormat_GIF.LoadFromStream(stream: TStream; img32: TImage32): Boolean; var gif: TGIFImage; @@ -105,11 +94,9 @@ function TImageFormat_GIF.LoadFromStream(stream: TStream; img32: TImage32): Bool bmpT.Free; end; end; - //------------------------------------------------------------------------------ // Saving (writing) gif images to file ... //------------------------------------------------------------------------------ - procedure TImageFormat_GIF.SaveToStream(stream: TStream; img32: TImage32); var gif: TGIFImage; @@ -134,27 +121,22 @@ procedure TImageFormat_GIF.SaveToStream(stream: TStream; img32: TImage32); end; end; //------------------------------------------------------------------------------ - class function TImageFormat_GIF.CopyToClipboard(img32: TImage32): Boolean; begin result := false; //not implemented end; //------------------------------------------------------------------------------ - class function TImageFormat_GIF.CanPasteFromClipboard: Boolean; begin result := false; end; //------------------------------------------------------------------------------ - class function TImageFormat_GIF.PasteFromClipboard(img32: TImage32): Boolean; begin result := false; //not implemented end; - //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ - initialization TImage32.RegisterImageFormatClass('GIF', TImageFormat_GIF, cpLow); @@ -162,6 +144,3 @@ initialization end. - - - diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.JPG.pas b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.JPG.pas index 901fb30..4fcb8ab 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.JPG.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.JPG.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * Purpose : JPG/JPEG file format extension for TImage32 * diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.PNG.pas b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.PNG.pas index 659b7ff..39e4478 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.PNG.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.PNG.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * Purpose : PNG file format extension for TImage32 * diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.QOI.pas b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.QOI.pas index aa65ab8..671c969 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.QOI.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.QOI.pas @@ -1,8 +1,8 @@ unit Img32.Fmt.QOI; (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * Purpose : QOI file format extension for TImage32 * diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.SVG.pas b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.SVG.pas index 106949b..6af5a52 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Fmt.SVG.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Fmt.SVG.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3.1 * +* Date : 5 October 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * Purpose : SVG file format extension for TImage32 * @@ -375,10 +375,11 @@ function TImageFormat_SVG.LoadFromStream(stream: TStream; img32: TImage32): Bool img32.BeginUpdate; try - //if the current image's dimensions are larger than the - //SVG's viewbox, then scale the SVG image up to fit - if not r.IsEmpty then + if img32.IsEmpty and not r.IsEmpty then + img32.SetSize(Round(r.Width), Round(r.Height)) + else if not r.IsEmpty then begin + //then scale the SVG to fit image w := r.Width; h := r.Height; sx := img32.Width / w; @@ -390,9 +391,8 @@ function TImageFormat_SVG.LoadFromStream(stream: TStream; img32: TImage32): Bool h := h * sx; end; img32.SetSize(Round(w), Round(h)); - end; - - if img32.IsEmpty then + end + else img32.SetSize(defaultSvgWidth, defaultSvgHeight); //draw the SVG image to fit inside the canvas diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Layers.pas b/Ext/SVGIconImageList/Image32/source/Img32.Layers.pas index 47f64e4..49c0011 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Layers.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Layers.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 28 July 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * * diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Panels.pas b/Ext/SVGIconImageList/Image32/source/Img32.Panels.pas index 5f5f3db..99ab26b 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Panels.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Panels.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 3.3 * -* Date : 21 September 2021 * +* Version : 4.3 * +* Date : 21 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * Purpose : Component that displays images on a TPanel descendant * @@ -154,9 +154,11 @@ TBaseImgPanel = class(TPanel) TImage32Panel = class(TBaseImgPanel) private fImage : TImage32; - fAllowCopyPaste : Boolean; + fAllowCopy : Boolean; + fAllowPaste : Boolean; fOnFileDrop : TFileDropEvent; - fAllowFileDrop : Boolean; + fAllowFileDrop : Boolean; + fOnCopy : TNotifyEvent; fOnPaste : TNotifyEvent; procedure SetAllowFileDrop(value: Boolean); procedure WMKeyDown(var Message: TWMKey); message WM_KEYDOWN; @@ -174,14 +176,15 @@ TImage32Panel = class(TBaseImgPanel) procedure CopyToImage(srcImg: TImage32; const rec: TRect); function CopyToClipboard: Boolean; function PasteFromClipboard: Boolean; - property Image: TImage32 read fImage; - property AllowCopyPaste: Boolean - read fAllowCopyPaste write fAllowCopyPaste; + published + property AllowCopy: Boolean read fAllowCopy write fAllowCopy; + property AllowPaste: Boolean read fAllowPaste write fAllowPaste; property AllowFileDrop: Boolean read fAllowFileDrop write SetAllowFileDrop; property OnFileDrop: TFileDropEvent read fOnFileDrop write fOnFileDrop; + property OnCopy: TNotifyEvent read fOnCopy write fOnCopy; property OnPaste: TNotifyEvent read fOnPaste write fOnPaste; end; @@ -364,6 +367,11 @@ constructor TBaseImgPanel.Create(AOwner: TComponent); Height := 200; Width := 200; + {$IFnDEF FPC} + {$IF COMPILERVERSION >= 17} //this is a guess + ShowCaption := false; + {$IFEND} + {$ENDIF} BevelWidth := 1; BorderWidth := 12; BevelInner := bvLowered; @@ -708,9 +716,9 @@ procedure TBaseImgPanel.MouseDown(Button: TMouseButton; var rec: TRect; begin + fMouseDown := true; if fAllowScrnScroll or fAllowKeyScroll then begin - fMouseDown := true; fScrollbarHorz.MouseDownPos := X; fScrollbarVert.MouseDownPos := Y; rec := GetInnerClientRect; @@ -758,9 +766,10 @@ procedure TBaseImgPanel.MouseMove(Shift: TShiftState; X, Y: Integer); inherited; Exit; end; - - if not fMouseDown then - begin + + if not fMouseDown or + not (fAllowScrnScroll or fAllowKeyScroll) then + begin if (BorderWidth >= MinBorderWidth) and ((fShowScrollBtns = ssAlways) or (focused and (fShowScrollBtns = ssbFocused))) then @@ -890,7 +899,7 @@ procedure TBaseImgPanel.Paint; Canvas.PolyLine([bl, rec.TopLeft, tr]); Canvas.Pen.Color := brColor; Canvas.PolyLine([tr, rec.BottomRight, bl]); - InflateRect(rec, -1, -1); + InflateRect(rec, integer(-1), integer(-1)); dec(width); end; end; @@ -973,6 +982,8 @@ procedure TBaseImgPanel.Paint; //prevent recursive paints (in case Invalidate etc called in fOnDrawImage) RedrawWindow(Handle, nil, 0, RDW_NOERASE or RDW_NOINTERNALPAINT or RDW_VALIDATE); + //Exit;////////////////// + //paint the outer bevel tmpRec := ClientRect; case BevelOuter of @@ -981,12 +992,12 @@ procedure TBaseImgPanel.Paint; end; //paint the border - InflateRect(tmpRec, -BevelWidth, -BevelWidth); + InflateRect(tmpRec, integer(-BevelWidth), integer(-BevelWidth)); if Focused then DrawFrame(tmpRec, fFocusedColor, fFocusedColor, dpiAwareBW) else DrawFrame(tmpRec, fUnfocusedColor, fUnfocusedColor, dpiAwareBW); - InflateRect(tmpRec, -dpiAwareBW, -dpiAwareBW); + InflateRect(tmpRec, integer(-dpiAwareBW), integer(-dpiAwareBW)); //paint the inner bevel case BevelInner of @@ -1145,7 +1156,6 @@ procedure TBaseImgPanel.WMKeyDown(var Message: TWMKey); shiftState: TShiftState; begin inherited; - if not fAllowZoom and not fAllowKeyScroll then Exit; shiftState := KeyDataToShiftState(Message.KeyData); if Assigned(fOnKeyDown) then begin @@ -1153,6 +1163,7 @@ procedure TBaseImgPanel.WMKeyDown(var Message: TWMKey); fOnKeyDown(Self, charCode, shiftState); if charCode = 0 then Exit; end; + if not fAllowZoom and not fAllowKeyScroll then Exit; case Message.CharCode of @@ -1237,7 +1248,8 @@ constructor TImage32Panel.Create(AOwner: TComponent); fImage := TNotifyImage32.Create(Self); fImage.Resampler := rBicubicResampler; fImage.SetSize(200,200); - fAllowCopyPaste := true; + fAllowCopy := true; + fAllowPaste := true; end; //------------------------------------------------------------------------------ @@ -1360,29 +1372,30 @@ procedure TImage32Panel.WMKeyDown(var Message: TWMKey); shiftState := KeyDataToShiftState(Message.KeyData); case Message.CharCode of Ord('C'): - if (ssCtrl in shiftState) and fAllowCopyPaste and - not fImage.IsEmpty then - fImage.CopyToClipboard; + if (ssCtrl in shiftState) and fAllowCopy and + not fImage.IsEmpty and + fImage.CopyToClipboard and + assigned(fOnCopy) then + fOnCopy(Self); Ord('V'): - if (ssCtrl in shiftState) and fAllowCopyPaste and - fImage.CanPasteFromClipBoard then - begin - if fImage.PasteFromClipboard and assigned(fOnPaste) then - fOnPaste(self); - end; + if (ssCtrl in shiftState) and fAllowPaste and + fImage.CanPasteFromClipBoard and + fImage.PasteFromClipboard and + assigned(fOnPaste) then + fOnPaste(self); end; end; //------------------------------------------------------------------------------ function TImage32Panel.CopyToClipboard: Boolean; begin - Result := fAllowCopyPaste and Image.CopyToClipBoard; + Result := fAllowCopy and Image.CopyToClipBoard; end; //------------------------------------------------------------------------------ function TImage32Panel.PasteFromClipboard: Boolean; begin - Result := fAllowCopyPaste and Image.PasteFromClipBoard; + Result := fAllowPaste and Image.PasteFromClipBoard; if Result and assigned(fOnPaste) then fOnPaste(self); end; //------------------------------------------------------------------------------ diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Resamplers.pas b/Ext/SVGIconImageList/Image32/source/Img32.Resamplers.pas index 213ee12..ab66f01 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Resamplers.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Resamplers.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * Purpose : For image transformations (scaling, rotating etc.) * @@ -15,7 +15,7 @@ interface {$I Img32.inc} uses - SysUtils, Classes, Types, Img32; + SysUtils, Classes, Img32; //BoxDownSampling: As the name implies, this routine is only intended for //image down-sampling (ie when shrinking images) where it generally performs @@ -34,7 +34,7 @@ function BicubicResample(img: TImage32; x256, y256: Integer): TColor32; implementation uses - Img32.Vector, Img32.Transform; + Img32.Transform; //------------------------------------------------------------------------------ // NearestNeighbor resampler @@ -422,5 +422,3 @@ initialization DefaultResampler := rBilinearResampler; end. - - diff --git a/Ext/SVGIconImageList/Image32/source/Img32.SVG.Core.pas b/Ext/SVGIconImageList/Image32/source/Img32.SVG.Core.pas index a8b1edc..4df66c0 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.SVG.Core.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.SVG.Core.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 2 July 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * * diff --git a/Ext/SVGIconImageList/Image32/source/Img32.SVG.Path.pas b/Ext/SVGIconImageList/Image32/source/Img32.SVG.Path.pas index 2e3ffa2..abd9559 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.SVG.Path.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.SVG.Path.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.0 * +* Date : 28 December 2021 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * * @@ -21,7 +21,7 @@ interface uses SysUtils, Classes, Types, Math, {$IFDEF XPLAT_GENERICS} Generics.Collections, Generics.Defaults,{$ENDIF} - Img32, Img32.SVG.Core, Img32.Vector, Img32.Text, Img32.Transform; + Img32, Img32.SVG.Core, Img32.Vector, Img32.Text; {$IFDEF ZEROBASEDSTR} {$ZEROBASEDSTRINGS OFF} @@ -276,10 +276,7 @@ implementation resourcestring rsSvgPathRangeError = 'TSvgPath.GetPath range error'; rsSvgSubPathRangeError = 'TSvgSubPath.GetSeg range error'; - rsSvgSegmentRangeError = 'TSvgSegment.GetVal range error'; - -const - buffSize = 8; + //rsSvgSegmentRangeError = 'TSvgSegment.GetVal range error'; //------------------------------------------------------------------------------ // Miscellaneous functions ... @@ -1217,7 +1214,7 @@ function TSvgSubPath.GetSimplePath: TPathD; var i: integer; begin - Result := MakePath([GetFirstPt.X, GetFirstPt.Y]); + Result := Img32.Vector.MakePath([GetFirstPt.X, GetFirstPt.Y]); for i := 0 to High(fSegs) do AppendPath(Result, fSegs[i].GetOnPathCtrlPts); end; diff --git a/Ext/SVGIconImageList/Image32/source/Img32.SVG.Reader.pas b/Ext/SVGIconImageList/Image32/source/Img32.SVG.Reader.pas index a9936b6..d988dad 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.SVG.Reader.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.SVG.Reader.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * * @@ -547,7 +547,7 @@ TClipPathElement = class(TShapeElement) buffSize = 32; clAlphaSet = $00010101; SourceImage : UTF8String = 'SourceGraphic'; - SourceAlpha : UTF8String = 'SourceAlpha'; + //SourceAlpha : UTF8String = 'SourceAlpha'; tmpFilterImg : UTF8String = 'tmp'; //https://www.w3.org/TR/css-fonts-3/#font-family-prop @@ -727,7 +727,7 @@ function MergeColorAndOpacity(color: TColor32; opacity: double): TColor32; //------------------------------------------------------------------------------ function UTF8StringToFloat(const ansiValue: UTF8String; - var value: double): Boolean; + out value: double): Boolean; var c: PUTF8Char; begin @@ -2463,6 +2463,7 @@ function TPathElement.GetSimplePath(const drawDat: TDrawData): TPathsD; var i: integer; begin + Result := nil; SetLength(Result, fSvgPaths.Count); for i := 0 to fSvgPaths.Count -1 do Result[i] := fSvgPaths[i].GetSimplePath; @@ -2994,6 +2995,8 @@ procedure TTextPathElement.GetPaths(const drawDat: TDrawData); mat: TMatrixD; tmpPath: TPathD; isClosed: Boolean; +const + dblSpace: UnicodeString = #32#32; begin if Assigned(drawPathsC) then Exit; fReader.GetBestFontForFontCache(drawDat.FontInfo); @@ -3044,11 +3047,11 @@ procedure TTextPathElement.GetPaths(const drawDat: TDrawData); for i := 1 to Length(s) do if s[i] < #32 then s[i] := #32; - i := PosEx(#32#32, s); + i := PosEx(dblSpace, s); while i > 0 do begin Delete(s, i, 1); - i := PosEx(#32#32, s, i); + i := PosEx(dblSpace, s, i); end; el := FindRefElement(pathEl); @@ -4718,4 +4721,3 @@ function TSvgReader.GetIsEmpty: Boolean; //------------------------------------------------------------------------------ end. - diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Text.pas b/Ext/SVGIconImageList/Image32/source/Img32.Text.pas index ffc94e8..8f9dae5 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Text.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Text.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 6 October 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * * @@ -282,6 +282,7 @@ TFontManager = class constructor Create; destructor Destroy; override; procedure Clear; + function GetFont(const fontName: string): TFontReader; {$IFDEF MSWINDOWS} function Load(const fontName: string): TFontReader; {$ENDIF} @@ -393,6 +394,7 @@ TTextPageMetrics = record TWordInfoList = class; TWordInfo = class + private index : integer; aWord : UnicodeString; width : double; @@ -512,6 +514,9 @@ TFontCache = class(TInterfacedObj, INotifySender, INotifyRecipient) startLine, endLine: integer): TPathsD; overload; function GetTextOutline(x, y: double; const text: UnicodeString; out nextX: double; underlineIdx: integer = 0): TPathsD; overload; + function GetVerticalTextOutline(x, y: double; + const text: UnicodeString; interCharSpace: double =0): TPathsD; + function GetAngledTextGlyphs(x, y: double; const text: UnicodeString; angleRadians: double; const rotatePt: TPointD; @@ -2483,42 +2488,41 @@ function TFontCache.GetTextOutline(x, y: double; const text: UnicodeString; end; //------------------------------------------------------------------------------ -//function TFontCache.GetTextOutlineInternal(x, y: double; -// const text: UnicodeString; out glyphs: TArrayOfPathsD; -// out nextX: double): Boolean; -//var -// i,j, len: integer; -// unicodes: TArrayOfWord; -// glyphInfo: PGlyphInfo; -// currGlyph: TPathsD; -// prevGlyphKernList: TArrayOfTKern; -//begin -// len := Length(text); -// unicodes := nil; -// setLength(unicodes, len); -// for i := 0 to len -1 do -// unicodes[i] := Ord(text[i +1]); -// Result := true; -// GetMissingGlyphs(unicodes); -// nextX := x; -// prevGlyphKernList := nil; -// for i := 0 to len -1 do -// begin -// glyphInfo := GetCharInfo(unicodes[i]); -// if not assigned(glyphInfo) then Break; -// if fUseKerning and assigned(prevGlyphKernList) then -// begin -// j := FindInKernList(glyphInfo.metrics.glyphIdx, prevGlyphKernList); -// if (j >= 0) then -// nextX := nextX + prevGlyphKernList[j].kernValue * fScale ; -// end; -// -// currGlyph := OffsetPath(glyphInfo.contours, nextX, y); -// AppendPath(glyphs, currGlyph); -// nextX := nextX + glyphInfo.metrics.hmtx.advanceWidth * fScale; -// prevGlyphKernList := glyphInfo.metrics.kernList; -// end; -//end; +function TFontCache.GetVerticalTextOutline(x, y: double; + const text: UnicodeString; interCharSpace: double): TPathsD; +var + i, xxMax: integer; + glyphInfo: PGlyphInfo; + dx, dy: double; +begin + Result := nil; + if not IsValidFont then Exit; + + xxMax := 0; + for i := 1 to Length(text) do + begin + glyphInfo := GetCharInfo(ord(text[i])); + if not assigned(glyphInfo) then Exit; + with glyphInfo.metrics.glyf do + if xMax > xxMax then + xxMax := xMax; + end; + + for i := 1 to Length(text) do + begin + glyphInfo := GetCharInfo(ord(text[i])); + with glyphInfo.metrics.glyf do + begin + dx := (xxMax - xMax) * 0.5 * scale; + y := y + yMax * scale; //yMax = char ascent + dy := - yMin * scale; //yMin = char descent + end; + AppendPath(Result, Img32.Vector.OffsetPath( glyphInfo.contours, x + dx, y)); + if text[i] = #32 then + y := y + dy - interCharSpace else + y := y + dy + interCharSpace; + end; +end; //------------------------------------------------------------------------------ function TFontCache.GetTextOutlineInternal(x, y: double; @@ -3449,12 +3453,29 @@ procedure TFontManager.Clear; end; //------------------------------------------------------------------------------ +function TFontManager.GetFont(const fontName: string): TFontReader; +var + i: integer; +begin + Result := nil; + for i := 0 to fFontList.Count -1 do + if SameText(TFontReader(fFontList[i]).fFontInfo.faceName, fontName) then + begin + Result := fFontList[i]; + Exit; + end; +end; +//------------------------------------------------------------------------------ + {$IFDEF MSWINDOWS} function TFontManager.Load(const fontName: string): TFontReader; begin if fFontList.Count >= fMaxFonts then raise Exception.Create(rsTooManyFonts); + Result := GetFont(fontname); + if Assigned(Result) then Exit; + Result := TFontReader.Create; try if not Result.Load(fontName) or diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Transform.pas b/Ext/SVGIconImageList/Image32/source/Img32.Transform.pas index 81362f0..be4f195 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Transform.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Transform.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 May 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2021 * * * @@ -65,11 +65,9 @@ interface const srcPts, dstPts: TPathD; const margins: TRect): Boolean; function SplineVertTransform(img: TImage32; const topSpline: TPathD; - splineType: TSplineType; backColor: TColor32; reverseFill: Boolean; - out offset: TPoint): Boolean; + splineType: TSplineType; backColor: TColor32; out offset: TPoint): Boolean; function SplineHorzTransform(img: TImage32; const leftSpline: TPathD; - splineType: TSplineType; backColor: TColor32; reverseFill: Boolean; - out offset: TPoint): Boolean; + splineType: TSplineType; backColor: TColor32; out offset: TPoint): Boolean; function ExtractAngleFromMatrix(const mat: TMatrixD): double; function ExtractScaleFromMatrix(const mat: TMatrixD): TSizeD; @@ -686,8 +684,7 @@ function InterpolatePathForY(const path: TPathD): TPathD; //------------------------------------------------------------------------------ function SplineVertTransform(img: TImage32; const topSpline: TPathD; - splineType: TSplineType; backColor: TColor32; reverseFill: Boolean; - out offset: TPoint): Boolean; + splineType: TSplineType; backColor: TColor32; out offset: TPoint): Boolean; var i,j, w,h, len: integer; y, q: double; @@ -755,8 +752,7 @@ function SplineVertTransform(img: TImage32; const topSpline: TPathD; //------------------------------------------------------------------------------ function SplineHorzTransform(img: TImage32; const leftSpline: TPathD; - splineType: TSplineType; backColor: TColor32; reverseFill: Boolean; - out offset: TPoint): Boolean; + splineType: TSplineType; backColor: TColor32; out offset: TPoint): Boolean; var i,j, len, w,h: integer; x, q, prevY: double; diff --git a/Ext/SVGIconImageList/Image32/source/Img32.Vector.pas b/Ext/SVGIconImageList/Image32/source/Img32.Vector.pas index 696bc59..ef874d0 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.Vector.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.Vector.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 28 July 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * * @@ -337,7 +337,11 @@ interface function GetUnitVector(const pt1, pt2: TPointD): TPointD; //GetUnitNormal: Used internally - function GetUnitNormal(const pt1, pt2: TPointD): TPointD; + function GetUnitNormal(const pt1, pt2: TPointD): TPointD; overload; + {$IFDEF INLINING} inline; {$ENDIF} + function GetUnitNormal(const pt1, pt2: TPointD; out norm: TPointD): Boolean; overload; + {$IFDEF INLINING} inline; {$ENDIF} + function GetAvgUnitVector(const vec1, vec2: TPointD): TPointD; {$IFDEF INLINING} inline; {$ENDIF} @@ -412,7 +416,7 @@ interface //With a positive delta, clockwise paths will expand and counter-clockwise //ones will contract. The reverse happens with negative deltas. function Grow(const path, normals: TPathD; delta: double; joinStyle: TJoinStyle; - miterLimOrRndScale: double; isOpen: Boolean = false): TPathD; + miterLim: double; isOpen: Boolean = false): TPathD; function ValueAlmostZero(val: double; epsilon: double = 0.001): Boolean; function ValueAlmostOne(val: double; epsilon: double = 0.001): Boolean; @@ -1036,21 +1040,25 @@ function GetUnitVector(const pt1, pt2: TPointD): TPointD; //------------------------------------------------------------------------------ function GetUnitNormal(const pt1, pt2: TPointD): TPointD; +begin + if not GetUnitNormal(pt1, pt2, Result) then + Result := NullPointD; +end; +//------------------------------------------------------------------------------ + +function GetUnitNormal(const pt1, pt2: TPointD; out norm: TPointD): Boolean; var dx, dy, inverseHypot: Double; begin - if PointsNearEqual(pt1, pt2, 0.001) then - begin - Result := NullPointD; - Exit; - end; + result := not PointsNearEqual(pt1, pt2, 0.001); + if not result then Exit; dx := (pt2.X - pt1.X); dy := (pt2.Y - pt1.Y); inverseHypot := 1 / Hypot(dx, dy); dx := dx * inverseHypot; dy := dy * inverseHypot; - Result.X := dy; - Result.Y := -dx + norm.X := dy; + norm.Y := -dx end; //------------------------------------------------------------------------------ @@ -1330,39 +1338,29 @@ function GetVectors(const path: TPathD): TPathD; function GetNormals(const path: TPathD): TPathD; var - i,highI,j, len: cardinal; - pt: TPointD; + i, highI: integer; + last: TPointD; begin - len := length(path); - setLength(result, len); - if len = 0 then Exit; - pt := path[0]; - //watch out for, and fix up duplicates at end of line - highI := len -1; - while (highI > 0) and PointsNearEqual(path[highI], pt, 0.001) do dec(highI); - if (highI = 0) then + highI := High(path); + setLength(result, highI+1); + if highI < 0 then Exit; + + last := NullPointD; + for i := 0 to highI -1 do begin - //all points are equal! - for i := 0 to len -1 do result[i] := PointD(0,0); - Exit; + if GetUnitNormal(path[i], path[i+1], result[i]) then + last := result[i] else + result[i] := last; end; - result[highI] := GetUnitNormal(path[highI], pt); - //now fix up any duplicates at the end of the path - for j := highI +1 to len -1 do result[j] := result[j-1]; - //with at least one valid vector, we can now - //safely get the remaining vectors - pt := path[highI]; - for i := highI -1 downto 0 do + if GetUnitNormal(path[highI], path[0], result[highI]) then + last := result[highI]; + + for i := 0 to highI do begin - if (path[i].X <> pt.X) or (path[i].Y <> pt.Y) then - begin - result[i] := GetUnitNormal(path[i], pt); - if (Result[i].X = 0) and (Result[i].Y = 0) then - Result[i] := Result[i+1]; - pt := path[i]; - end else - result[i] := result[i+1] + if (result[i].X <> 0) or (result[i].Y <> 0) then Break; + result[i] := last; end; + end; //------------------------------------------------------------------------------ @@ -1773,18 +1771,13 @@ function Sign(const value: Double): integer; {$IFDEF INLINE} inline; {$ENDIF} end; //------------------------------------------------------------------------------ -function GetNormal(const pt, norm: TPointD; delta: double): TPointD; +function ApplyNormal(const pt, norm: TPointD; delta: double): TPointD; + {$IFDEF INLINE} inline; {$ENDIF} begin result := PointD(pt.X + norm.X * delta, pt.Y + norm.Y * delta); end; //------------------------------------------------------------------------------ -function GetVector(const pt, norm: TPointD; delta: double): TPointD; -begin - result := PointD(pt.X - norm.Y * delta, pt.Y + norm.X * delta); -end; -//------------------------------------------------------------------------------ - function GetParallelOffests(const path, norms: TPathD; delta: double): TPathD; var @@ -1793,13 +1786,13 @@ function GetParallelOffests(const path, norms: TPathD; len := Length(path); highI := len -1; SetLength(Result, len *2); - Result[0] := GetNormal(path[0], norms[0], delta); + Result[0] := ApplyNormal(path[0], norms[0], delta); for i := 1 to highI do begin - Result[i*2-1] := GetNormal(path[i], norms[i-1], delta); - Result[i*2] := GetNormal(path[i], norms[i], delta); + Result[i*2-1] := ApplyNormal(path[i], norms[i-1], delta); + Result[i*2] := ApplyNormal(path[i], norms[i], delta); end; - Result[highI*2+1] := GetNormal(path[0], norms[highI], delta); + Result[highI*2+1] := ApplyNormal(path[0], norms[highI], delta); end; //------------------------------------------------------------------------------ @@ -1846,9 +1839,11 @@ function CalcRoundingSteps(radius: double): double; //------------------------------------------------------------------------------ function Grow(const path, normals: TPathD; delta: double; - joinStyle: TJoinStyle; miterLimOrRndScale: double; isOpen: Boolean): TPathD; + joinStyle: TJoinStyle; miterLim: double; isOpen: Boolean): TPathD; var resCnt, resCap: integer; + norms : TPathD; + parallelOffsets : TPathD; procedure AddPoint(const pt: TPointD); begin @@ -1861,6 +1856,42 @@ function Grow(const path, normals: TPathD; delta: double; inc(resCnt); end; + procedure DoMiter(i, prevI: integer; cosA: double); + var + a: double; + begin + a := delta / (1 + cosA); //see offset_triginometry4.svg + AddPoint(PointD(path[i].X + (norms[i].X + norms[prevI].X) * a, + path[i].Y + (norms[i].Y + norms[prevI].Y) * a)); + end; + + procedure DoSquare(i, prevI: integer); + var + pt1, pt2, pt3, pt4: TPointD; + pt, ptQ : TPointD; + vec : TPointD; + begin + // using the reciprocal of unit normals (as unit vectors) + // get the average unit vector ... + vec := GetAvgUnitVector( + PointD(-norms[prevI].Y, norms[prevI].X), + PointD(norms[i].Y, -norms[i].X)); + // now offset the original vertex delta units along unit vector + ptQ := OffsetPoint(path[i], delta * vec.X, delta * vec.Y); + + // get perpendicular vertices + pt1 := OffsetPoint(ptQ, delta * vec.Y, delta * -vec.X); + pt2 := OffsetPoint(ptQ, delta * -vec.Y, delta * vec.X); + // get 2 vertices along one edge offset + pt3 := parallelOffsets[prevI*2]; + pt4 := parallelOffsets[prevI*2 +1]; + IntersectPoint(pt1,pt2,pt3,pt4, pt); + AddPoint(pt); + //get the second intersect point through reflecion + pt := ReflectPoint(pt, ptQ); + AddPoint(pt); + end; + procedure AppendPath(const path: TPathD); var len: integer; @@ -1881,14 +1912,9 @@ function Grow(const path, normals: TPathD; delta: double; len : cardinal; highI : cardinal; iLo,iHi : cardinal; - norms : TPathD; - vec : TPointD; - pt, ptQ : TPointD; - p : TPathD; - a : double; growRec : TGrowRec; absDelta : double; - pt1, pt2, pt3, pt4: TPointD; + almostNoAngle: Boolean; begin Result := nil; if not Assigned(path) then exit; @@ -1920,11 +1946,10 @@ function Grow(const path, normals: TPathD; delta: double; norms := GetNormals(path); highI := len -1; - p := GetParallelOffests(path, norms, delta); + parallelOffsets := GetParallelOffests(path, norms, delta); if joinStyle = jsRound then begin - if miterLimOrRndScale <= 0 then miterLimOrRndScale := 1; growRec.Radius := delta; growRec.StepsPerRad := CalcRoundingSteps(growRec.Radius)/(Pi *2); if delta < 0 then @@ -1932,9 +1957,9 @@ function Grow(const path, normals: TPathD; delta: double; GetSinCos(1/growRec.StepsPerRad, growRec.StepSin, growRec.StepCos); end else begin - if miterLimOrRndScale <= 0 then miterLimOrRndScale := DefaultMiterLimit - else if miterLimOrRndScale < 2 then miterLimOrRndScale := 2; - miterLimOrRndScale := 2 /(sqr(miterLimOrRndScale)); + if miterLim <= 0 then miterLim := DefaultMiterLimit + else if miterLim < 2 then miterLim := 2; + miterLim := 2 /(sqr(miterLim)); growRec.StepsPerRad := 0; //stop compiler warning. end; @@ -1944,7 +1969,7 @@ function Grow(const path, normals: TPathD; delta: double; begin iLo := 1; iHi := highI -1; prevI := 0; - AddPoint(p[0]); + AddPoint(parallelOffsets[0]); end else begin iLo := 0; iHi := highI; @@ -1953,74 +1978,43 @@ function Grow(const path, normals: TPathD; delta: double; for i := iLo to iHi do begin - pt1 := p[prevI*2]; - pt2 := p[prevI*2+1]; - pt3 := p[i*2]; - pt4 := p[i*2+1]; + + if PointsNearEqual(path[i], path[prevI], 0.01) then + begin + prevI := i; + Continue; + end; + growRec.aSin := CrossProduct(norms[prevI], norms[i]); growRec.aCos := DotProduct(norms[prevI], norms[i]); - if ValueAlmostZero(growRec.aSin) or ((growRec.aSin < 0) = (delta > 0)) then - begin //is concave - if SegmentsIntersect(pt1, pt2, pt3, pt4, pt) then - AddPoint(pt) else - begin - AddPoint(pt2); - AddPoint(pt3); - end; + almostNoAngle := ValueAlmostZero(growRec.aCos -1); + if almostNoAngle or ((growRec.aSin * delta < 0)) then + begin //ie is concave + AddPoint(parallelOffsets[prevI*2+1]); + AddPoint(parallelOffsets[i*2]); end else if (joinStyle = jsRound) and (Abs(growRec.aSin) > 0.08) then //only round if angle > ~5 deg begin AppendPath(DoRound(path[i], norms[prevI], growRec)); end - else if (joinStyle = jsMiter) and - (1 + growRec.aCos > miterLimOrRndScale) then - begin - //within miter range - a := delta / (1 + growRec.aCos); - AddPoint(PointD(path[i].X + (norms[i].X + norms[prevI].X) * a, - path[i].Y + (norms[i].Y + norms[prevI].Y) * a)); + else if (joinStyle = jsMiter) then // nb: miterLim <= 2 + begin + if (1 + growRec.aCos > miterLim) then //within miter range + DoMiter(i, prevI, growRec.aCos) else + DoSquare(i, prevI); end - else if (growRec.aCos < -0.001) and (growRec.aCos > -0.999) then - begin - // squaring off at delta distance from original vertex - - // while a negative cos indicates an angle > 90, the angle here - // is the **angle of deviation**, so convexity will be > 270. - // And only convex angles > 270 degrees will need squaring since - // less obtuse angles can be safely mitered. - - // using the reciprocal of unit normals (as unit vectors) - // get the average unit vector ... - vec := GetAvgUnitVector( - PointD(-norms[prevI].Y, norms[prevI].X), - PointD(norms[i].Y, -norms[i].X)); - // now offset the original vertex delta units along unit vector - ptQ := OffsetPoint(path[i], delta * vec.X, delta * vec.Y); - - // get perpendicular vertices - pt1 := OffsetPoint(ptQ, delta * vec.Y, delta * -vec.X); - pt2 := OffsetPoint(ptQ, delta * -vec.Y, delta * vec.X); - // get 2 vertices along one edge offset - pt3 := p[prevI*2]; - pt4 := p[prevI*2 +1]; - IntersectPoint(pt1,pt2,pt3,pt4, pt); - AddPoint(pt); - //get the second intersect point through reflecion - pt := ReflectPoint(pt, ptQ); - AddPoint(pt); - end else - begin - a := delta / (1 + growRec.aCos); - AddPoint(PointD(path[i].X + (norms[i].X + norms[prevI].X) * a, - path[i].Y + (norms[i].Y + norms[prevI].Y) * a)); -// AddPoint(pt2); -// AddPoint(pt3); - end; + // don't bother squaring angles that deviate < ~20 deg. because squaring + // will be indistinguishable from mitering and just be a lot slower + else if (growRec.aCos > 0.9) then + DoMiter(i, prevI, growRec.aCos) + else + DoSquare(i, prevI); + prevI := i; end; - if isOpen then AddPoint(p[highI*2-1]); + if isOpen then AddPoint(parallelOffsets[highI*2-1]); SetLength(Result, resCnt); end; //------------------------------------------------------------------------------ @@ -2352,7 +2346,7 @@ function GrowOpenLine(const line: TPathD; width: double; miterLimOrRndScale: double): TPathD; var len, x,y: integer; - halfWidth: double; + segLen, halfWidth: double; normals, lineL, lineR, arc: TPathD; invNorm: TPointD; growRec: TGrowRec; @@ -2422,15 +2416,22 @@ function GrowOpenLine(const line: TPathD; width: double; AppendPath(Result, lineR); end else begin - //esSquare => extends both line ends by 1/2 lineWidth + lineL := Copy(line, 0, len); if endStyle = esSquare then begin - lineL := Copy(line, 0, len); + // esSquare => extends both line ends by 1/2 lineWidth AdjustPoint(lineL[0], lineL[1], width * 0.5); AdjustPoint(lineL[len-1], lineL[len-2], width * 0.5); end else - lineL := line; - + begin + //esButt -> extend only very short end segments + segLen := Distance(lineL[0], lineL[1]); + if segLen < width * 0.5 then + AdjustPoint(lineL[0], lineL[1], width * 0.5 - segLen); + segLen := Distance(lineL[len-1], lineL[len-2]); + if segLen < width * 0.5 then + AdjustPoint(lineL[len-1], lineL[len-2], width * 0.5 - segLen); + end; //first grow the left side of the line => Result Result := Grow(lineL, normals, halfWidth, joinStyle, miterLimOrRndScale, true); diff --git a/Ext/SVGIconImageList/Image32/source/Img32.inc b/Ext/SVGIconImageList/Image32/source/Img32.inc index 3db5f1a..47326ce 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.inc +++ b/Ext/SVGIconImageList/Image32/source/Img32.inc @@ -6,7 +6,7 @@ //USING_VCL_LCL - using either Delphi or Lazarus Component Libraries //Adds a few extra library features (eg copying to and from TBitmap objects) //Enabled is recommended unless you're compiling console applications. -{.$DEFINE USING_VCL_LCL} +{$DEFINE USING_VCL_LCL} {$IFDEF FPC} {$MODE DELPHI} @@ -55,6 +55,7 @@ {$IF declared(FireMonkeyVersion)} //defined in FMX.Types {$DEFINE FMX} {$IFEND} + {$DEFINE USES_NAMESPACES} {$DEFINE FORMATSETTINGS} {$DEFINE TROUNDINGMODE} {$DEFINE UITYPES} //added UITypes unit diff --git a/Ext/SVGIconImageList/Image32/source/Img32.pas b/Ext/SVGIconImageList/Image32/source/Img32.pas index 191844b..e33f5e2 100644 --- a/Ext/SVGIconImageList/Image32/source/Img32.pas +++ b/Ext/SVGIconImageList/Image32/source/Img32.pas @@ -2,8 +2,8 @@ (******************************************************************************* * Author : Angus Johnson * -* Version : 4.2 * -* Date : 30 July 2022 * +* Version : 4.3 * +* Date : 27 September 2022 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2019-2022 * * * @@ -20,8 +20,15 @@ interface uses Types, SysUtils, Classes, - {$IFDEF MSWINDOWS} Windows,{$ENDIF} {$IFDEF USING_VCL_LCL} Graphics, Forms,{$ENDIF} - {$IFDEF XPLAT_GENERICS} Generics.Collections, Generics.Defaults, Character,{$ENDIF} + {$IFDEF MSWINDOWS} Windows,{$ENDIF} + {$IFDEF USING_VCL_LCL} + {$IFDEF USES_NAMESPACES} Vcl.Graphics, Vcl.Forms, + {$ELSE}Graphics, Forms, + {$ENDIF} + {$ENDIF} + {$IFDEF XPLAT_GENERICS} + Generics.Collections, Generics.Defaults, Character, + {$ENDIF} {$IFDEF UITYPES} UITypes,{$ENDIF} Math; type @@ -590,6 +597,7 @@ TImgFmtRec = record PImgFmtRec = ^TImgFmtRec; TResamplerObj = class + private id: integer; name: string; func: TResamplerFunction; @@ -1515,27 +1523,42 @@ class procedure TImage32.RegisterImageFormatClass(ext: string; var i: Integer; imgFmtRec: PImgFmtRec; + isNewFormat: Boolean; begin if not Assigned(ImageFormatClassList) then CreateImageFormatList; if (ext = '') or (ext = '.') then Exit; if (ext[1] = '.') then Delete(ext, 1,1); if not IsAlphaChar(ext[1]) then Exit; - //avoid duplicates + isNewFormat := true; + + // avoid duplicates but still allow overriding for i := 0 to imageFormatClassList.count -1 do begin imgFmtRec := PImgFmtRec(imageFormatClassList[i]); - if SameText(imgFmtRec.Fmt, ext) then Exit; + if SameText(imgFmtRec.Fmt, ext) then + begin + imgFmtRec.Obj := bm32ExClass; // replace prior class + if imgFmtRec.SortOrder = clipPriority then + Exit; // re-sorting isn't required + imgFmtRec.SortOrder := clipPriority; + isNewFormat := false; + Break; + end; + end; + + if isNewFormat then + begin + new(imgFmtRec); + imgFmtRec.Fmt := ext; + imgFmtRec.SortOrder := clipPriority; + imgFmtRec.Obj := bm32ExClass; + ImageFormatClassList.Add(imgFmtRec); end; - //ImageFormatClassList is sorted with lowest priority first in list - new(imgFmtRec); - imgFmtRec.Fmt := ext; - imgFmtRec.SortOrder := clipPriority; - imgFmtRec.Obj := bm32ExClass; - ImageFormatClassList.Add(imgFmtRec); - //sorting here is arguably inefficient, but there will be so few - //entries in the list that this inefficiency will be inconsequential. + // Sort with lower priority before higher. + // Sorting here is arguably inefficient but, with so few + // entries, this inefficiency will be inconsequential. {$IFDEF XPLAT_GENERICS} ImageFormatClassList.Sort(TComparer.Construct( @@ -2706,11 +2729,14 @@ procedure TImage32.CopyToBitmap(bmp: TBitmap); begin if not Assigned(bmp) then Exit; bmp.PixelFormat := pf32bit; - bmp.SetSize(Width, Height); + bmp.Width := Width; + bmp.Height := Height; {$IFDEF MSWINDOWS} {$IFNDEF FPC} + {$IFDEF ALPHAFORMAT} bmp.AlphaFormat := afDefined; {$ENDIF} + {$ENDIF} SetBitmapBits(bmp.Handle, Width * Height * 4, PixelBase); {$ELSE} for i := 0 to bmp.Height -1 do diff --git a/Ext/SVGIconImageList/Source/FMX.SVGIconImageList.pas b/Ext/SVGIconImageList/Source/FMX.SVGIconImageList.pas index decfb4b..b4104b0 100644 --- a/Ext/SVGIconImageList/Source/FMX.SVGIconImageList.pas +++ b/Ext/SVGIconImageList/Source/FMX.SVGIconImageList.pas @@ -47,7 +47,7 @@ interface ; const - SVGIconImageListVersion = '3.9.2'; + SVGIconImageListVersion = '3.9.4'; DEFAULT_SIZE = 32; ZOOM_DEFAULT = 100; SVG_INHERIT_COLOR = TAlphaColors.Null; @@ -205,6 +205,10 @@ TSVGIconImageList = class(TCustomImageList) function InsertIcon(const AIndex: Integer; const ASVGText: string; const AIconName: string = ''): TSVGIconSourceItem; function CloneIcon(const AIndex: Integer; const AInsertIndex: Integer = -1): TSVGIconSourceItem; + function GetIcon(const AIndex: Integer): TSVGIconSourceItem; + function GetIconByName(const AName: string): TSVGIconSourceItem; + function ExtractSVG(const AIndex: Integer): TFmxImageSVG; + function ExtractSVGByName(const AName: string): TFmxImageSVG; //Multiple icons methods function LoadFromFiles(const AFileNames: TStrings; const AAppend: Boolean = True): Integer; @@ -681,7 +685,7 @@ function TSVGIconImageList.CloneIcon(const AIndex: Integer; const AInsertIndex: LItem: TSVGIconSourceItem; LNewIndex: Integer; begin - LItem := Self.Source.Items[AIndex] as TSVGIconSourceItem; + LItem := Self.GetIcon(AIndex); if AInsertIndex >= 0 then LNewIndex := AInsertIndex else LNewIndex := AIndex; @@ -694,6 +698,57 @@ function TSVGIconImageList.CloneIcon(const AIndex: Integer; const AInsertIndex: RefreshAllIcons; end; +function TSVGIconImageList.GetIcon(const AIndex: Integer): TSVGIconSourceItem; +begin + Result := Self.Source.Items[AIndex] as TSVGIconSourceItem; +end; + +function TSVGIconImageList.GetIconByName(const AName: string): TSVGIconSourceItem; +var + LItemIndex: Integer; +begin + LItemIndex := Self.Source.IndexOf(AName); + if LItemIndex >= 0 then + Result := Self.GetIcon(LItemIndex) + else + Result := nil; +end; + +function TSVGIconImageList.ExtractSVG(const AIndex: Integer): TFmxImageSVG; +var + LItem: TSVGIconSourceItem; +begin + LItem := Self.GetIcon(AIndex); + + if Assigned(LItem) then + begin + {$IFDEF Image32_SVGEngine} + Result := TFmxImage32SVG.Create; + {$ENDIF} + {$IFDEF Skia_SVGEngine} + Result := TFmxImageSKIASVG.Create; + {$ENDIF} + + Result.LoadFromText(LItem.SVG.Source); + Result.Opacity := LItem.Opacity; + Result.FixedColor := LItem.FixedColor; + Result.GrayScale := LItem.GrayScale; + end + else + Result := nil; +end; + +function TSVGIconImageList.ExtractSVGByName(const AName: string): TFmxImageSVG; +var + LItemIndex: Integer; +begin + LItemIndex := Self.Source.IndexOf(AName); + if LItemIndex >= 0 then + Result := Self.ExtractSVG(LItemIndex) + else + Result := nil; +end; + function TSVGIconImageList.LoadFromFiles(const AFileNames: TStrings; const AAppend: Boolean = True): Integer; var diff --git a/Ext/SVGIconImageList/Source/SVGIconImage.pas b/Ext/SVGIconImageList/Source/SVGIconImage.pas index 8ac7e2b..6a9db14 100644 --- a/Ext/SVGIconImageList/Source/SVGIconImage.pas +++ b/Ext/SVGIconImageList/Source/SVGIconImage.pas @@ -41,14 +41,32 @@ interface , System.SysUtils , System.Types , System.Classes - , System.UITypes , Vcl.Controls , Vcl.Graphics , Vcl.ImgList + , System.UITypes , SVGIconItems - , SVGInterfaces; + , SVGInterfaces + , SVGIconImageListBase + {$IFDEF D10_3+} + , Vcl.VirtualImageList + {$ENDIF} + , SVGIconImageCollection; type + TSVGIconImage = class; + + TSVGIconImageActionLink = class(TControlActionLink) + protected + FClient: TSVGIconImage; + function IsImageIndexLinked: Boolean; override; + {$IFDEF D10_4+} + function IsImageNameLinked: Boolean; override; + {$ENDIF} + procedure SetImageIndex(Value: Integer); override; + procedure AssignClient(AClient: TObject); override; + end; + TSVGIconImage = class(TGraphicControl) strict private FSVG: ISVG; @@ -60,6 +78,9 @@ TSVGIconImage = class(TGraphicControl) FFileName: TFileName; FImageList: TCustomImageList; FImageIndex: System.UITypes.TImageIndex; + {$IFDEF D10_4+} + FImageName: System.UITypes.TImageName; + {$ENDIF} FImageChangeLink: TChangeLink; FFixedColor: TColor; FGrayScale: Boolean; @@ -68,7 +89,6 @@ TSVGIconImage = class(TGraphicControl) procedure SetProportional(Value: Boolean); procedure SetOpacity(Value: Byte); procedure SetFileName(const Value: TFileName); - procedure SetImageIndex(const Value: System.UITypes.TImageIndex); procedure SetStretch(const Value: Boolean); procedure SetImageList(const Value: TCustomImageList); procedure SetAutoSizeImage(const Value: Boolean); @@ -81,12 +101,29 @@ TSVGIconImage = class(TGraphicControl) procedure ReadDummyBool(Reader: TReader); procedure ReadDummyFloat(Reader: TReader); procedure WriteDummy(Writer: TWriter); + function IsImageIndexAvail: Boolean; private function GetSVGText: string; procedure SetSVGText(const AValue: string); function UsingSVGText: Boolean; function GetSVG: ISVG; + function GetIconImageList: TSVGIconImageListBase; + function GetIconImageCollection: TSVGIconImageCollection; + {$IFDEF D10_3+} + function GetVirtualImageList: TVirtualImageList; + {$ENDIF} + + procedure SetImageIndex(const Value: TImageIndex); + {$IFDEF D10_4+} + procedure SetImageName(const Value: TImageName); + function IsImageNameStored: Boolean; + {$ENDIF} + function IsImageIndexStored: Boolean; protected + procedure UpdateImage; virtual; + {$IFDEF D10_4+} + procedure CheckImageIndexes; + {$ENDIF} procedure DefineProperties(Filer: TFiler); override; procedure Paint; override; @@ -104,12 +141,20 @@ TSVGIconImage = class(TGraphicControl) procedure SaveToFile(const FileName: string); procedure Assign(Source: TPersistent); override; property SVG: ISVG read GetSVG; + property SVGIconImageList: TSVGIconImageListBase read GetIconImageList; + property SVGIconImageCollection: TSVGIconImageCollection read GetIconImageCollection; + {$IFDEF D10_3+} + property SVGVirtualImageList: TVirtualImageList read GetVirtualImageList; + {$ENDIF} published property AutoSize: Boolean read FAutoSize write SetAutoSizeImage; property Center: Boolean read FCenter write SetCenter default True; property Opacity: Byte read FOpacity write SetOpacity default 255; property ImageList: TCustomImageList read FImageList write SetImageList; - property ImageIndex: System.UITypes.TImageIndex read FImageIndex write SetImageIndex default -1; + property ImageIndex: TImageIndex read FImageIndex write SetImageIndex stored IsImageIndexStored default -1; + {$IFDEF D10_4+} + property ImageName: TImageName read FImageName write SetImageName stored IsImageNameStored; + {$ENDIF} property FileName: TFileName read FFileName write SetFileName; property SVGText: string read GetSVGText write SetSVGText stored UsingSVGText; property FixedColor: TColor read FFixedColor write SetFixedColor default SVG_INHERIT_COLOR; @@ -194,21 +239,17 @@ TSVGGraphic = class(TGraphic) implementation -uses - SVGIconImageListBase - {$IFDEF D10_3+} - , Vcl.VirtualImageList - {$ENDIF} - , SVGIconImageCollection; - procedure TSVGIconImage.UpdateSVGFactory; var LOldSVGText: string; begin - LOldSVGText := fsvg.Source; - FSVG := GlobalSVGFactory.NewSvg; - FSVG.Source := LOldSVGText; - Invalidate; + if UsingSVGText then + begin + LOldSVGText := FSVG.Source; + FSVG := GlobalSVGFactory.NewSvg; + FSVG.Source := LOldSVGText; + Invalidate; + end; end; constructor TSVGIconImage.Create(AOwner: TComponent); @@ -220,6 +261,9 @@ constructor TSVGIconImage.Create(AOwner: TComponent); FStretch := True; FOpacity := 255; FImageIndex := -1; + {$IFDEF D10_4+} + FImageName := ''; + {$ENDIF} FFixedColor := SVG_INHERIT_COLOR; FGrayScale := False; //ParentBackground := True; @@ -253,7 +297,8 @@ procedure TSVGIconImage.DefineProperties(Filer: TFiler); destructor TSVGIconImage.Destroy; begin - FImageChangeLink.Free; + ImageList := nil; + FreeAndNil(FImageChangeLink); inherited; end; @@ -265,6 +310,15 @@ procedure TSVGIconImage.CheckAutoSize; end; end; +{$IFDEF D10_4+} +procedure TSVGIconImage.CheckImageIndexes; +begin + if (ImageList = nil) or not ImageList.IsImageNameAvailable then + Exit; + ImageList.CheckIndexAndName(FImageIndex, FImageName); +end; +{$ENDIF} + procedure TSVGIconImage.Clear; begin FSVG.Clear; @@ -277,38 +331,38 @@ function TSVGIconImage.Empty: Boolean; Empty := FSVG.IsEmpty; end; +function TSVGIconImage.IsImageIndexAvail: Boolean; +begin + Result := False; + if (FImageIndex >= 0) and Assigned(FImageList) then + Result := FImageIndex <= FImageList.Count; +end; + function TSVGIconImage.GetInheritedApplyToRootOnly: Boolean; +var + LSVGIconItem: TSVGIconItem; begin Result := False; - if not Assigned(FImageList) then - Exit; + LSVGIconItem := SVGIconItem; + if Assigned(LSVGIconItem) then + Result := SVGIconItem.ApplyFixedColorToRootOnly; if FImageList is TSVGIconImageListBase then - begin - if FImageIndex >= 0 then - begin - if FImageIndex < FImageList.Count then - Result := SVGIconItem.ApplyFixedColorToRootOnly; - end; - Result := Result or TSVGIconImageListBase(FImageList).ApplyFixedColorToRootOnly; - end; + Result := Result or TSVGIconImageListBase(FImageList).ApplyFixedColorToRootOnly + {$IFDEF D10_3+} + else if FImageList is TVirtualImageList and + (TVirtualImageList(FImageList).ImageCollection is TSVGIconImageCollection) then + Result := Result or TSVGIconImageCollection(TVirtualImageList(FImageList).ImageCollection).ApplyFixedColorToRootOnly; + {$ENDIF} end; function TSVGIconImage.GetInheritedFixedColor: TColor; +var + LSVGIconItem: TSVGIconItem; begin Result := SVG_INHERIT_COLOR; - if not Assigned(FImageList) then - Exit; - if FImageList is TSVGIconImageListBase then - begin - if FImageIndex >= 0 then - begin - if FImageIndex < FImageList.Count then - Result := SVGIconItem.FixedColor; - if Result <> SVG_INHERIT_COLOR then - exit; - end; - Result := TSVGIconImageListBase(FImageList).FixedColor; - end; + LSVGIconItem := SVGIconItem; + if Assigned(LSVGIconItem) then + Result := LSVGIconItem.FixedColor; end; function TSVGIconImage.GetSVG: ISVG; @@ -326,37 +380,109 @@ function TSVGIconImage.GetSVGText: string; procedure TSVGIconImage.ImageListChange(Sender: TObject); begin - if Sender = FImageList then + UpdateImage; + Invalidate; +end; + +function TSVGIconImage.GetIconImageList: TSVGIconImageListBase; +begin + if FImageList is TSVGIconImageListBase then + Result := TSVGIconImageListBase(FImageList) + else + Result := nil; +end; + +{$IFDEF D10_3+} +function TSVGIconImage.GetVirtualImageList: TVirtualImageList; +begin + Result := nil; + if (FImageList is TVirtualImageList) and + (TVirtualImageList(FImageList).ImageCollection is TSVGIconImageCollection) then + Result := TVirtualImageList(FImageList); +end; +{$ENDIF} + +function TSVGIconImage.IsImageIndexStored: Boolean; +begin + Result := (ActionLink = nil) or + not TSVGIconImageActionLink(ActionLink).IsImageIndexLinked; +end; + +{$IFDEF D10_4+} +function TSVGIconImage.IsImageNameStored: Boolean; +begin + Result := (ActionLink = nil) or + not TSVGIconImageActionLink(ActionLink).IsImageNameLinked; +end; + +procedure TSVGIconImage.SetImageName(const Value: TImageName); +begin + if Value <> FImageName then + begin + FImageName := Value; + if (FImageList <> nil) and FImageList.IsImageNameAvailable then + FImageIndex := FImageList.GetIndexByName(FImageName); + UpdateImage; Invalidate; + end; end; +{$ENDIF} -function TSVGIconImage.SVGIconItem: TSVGIconItem; +procedure TSVGIconImage.UpdateImage; +begin +{$IFDEF D10_4+} + if (FImageList <> nil) and FImageList.IsImageNameAvailable then + begin + if (FImageName <> '') and (FImageIndex = -1) then + FImageIndex := FImageList.GetIndexByName(FImageName) + else if (FImageName = '') and (FImageIndex <> -1) then + FImageName := FImageList.GetNameByIndex(FImageIndex); + end; +{$ENDIF} +end; + +function TSVGIconImage.GetIconImageCollection: TSVGIconImageCollection; +{$IFDEF D10_3+} var - {$IFDEF D10_3+} LVirtualImageList: TVirtualImageList; - LItem: TVirtualImageListItem; - {$ENDIF} - LSVGIconItems: TSVGIconItems; +{$ENDIF} begin Result := nil; - if FImageList is TSVGIconImageListBase then - begin - LSVGIconItems := TSVGIconImageListBase(FImageList).SVGIconItems; - Result := LSVGIconItems[FImageIndex]; - end; {$IFDEF D10_3+} if (FImageList is TVirtualImageList) then begin LVirtualImageList := TVirtualImageList(FImageList); if LVirtualImageList.ImageCollection is TSVGIconImageCollection then + Result := TSVGIconImageCollection(LVirtualImageList.ImageCollection); + end; + {$ENDIF} +end; + +function TSVGIconImage.SVGIconItem: TSVGIconItem; +var + {$IFDEF D10_3+} + LItem: TVirtualImageListItem; + {$ENDIF} + LSVGIconItems: TSVGIconItems; +begin + Result := nil; + if IsImageIndexAvail then + begin + if SVGIconImageList <> nil then + begin + LSVGIconItems := SVGIconImageList.SVGIconItems; + Result := LSVGIconItems[FImageIndex]; + end + {$IFDEF D10_3+} + else if SVGVirtualImageList <> nil then begin - LSVGIconItems := TSVGIconImageCollection(LVirtualImageList.ImageCollection).SVGIconItems; - LItem := LVirtualImageList.Images[FImageIndex]; + LSVGIconItems := SVGIconImageCollection.SVGIconItems; + LItem := SVGVirtualImageList.Images[FImageIndex]; if Assigned(LItem) then Result := LSVGIconItems[LItem.Collectionindex]; - end; + end + {$ENDIF} end; - {$ENDIF} end; function TSVGIconImage.UsingSVGText: Boolean; @@ -509,7 +635,10 @@ procedure TSVGIconImage.SetStretch(const Value: Boolean); procedure TSVGIconImage.SetSVGText(const AValue: string); begin FSVG.Source := AValue; - Repaint; + if AValue = '' then + Clear + else + Repaint; end; procedure TSVGIconImage.SetOpacity(Value: Byte); @@ -559,24 +688,38 @@ procedure TSVGIconImage.SetGrayScale(const Value: Boolean); end; end; -procedure TSVGIconImage.SetImageIndex(const Value: System.UITypes.TImageIndex); +procedure TSVGIconImage.SetImageIndex(const Value: TImageIndex); begin - if FImageIndex = Value then - Exit; - FImageIndex := Value; - CheckAutoSize; - Repaint; + if FImageIndex <> Value then + begin + FImageIndex := Value; + {$IFDEF D10_4+} + if (FImageList <> nil) and FImageList.IsImageNameAvailable then + FImageName := FImageList.GetNameByIndex(FImageIndex); + {$ENDIF} + CheckAutoSize; + UpdateImage; + Invalidate; + end; end; procedure TSVGIconImage.SetImageList(const Value: TCustomImageList); begin - if FImageList <> nil then FImageList.UnRegisterChanges(FImageChangeLink); - FImageList := Value; - if FImageList <> nil then + if Value <> FImageList then begin - FImageList.RegisterChanges(FImageChangeLink); - FImageList.FreeNotification(Self); - SVGText := ''; + if FImageList <> nil then + begin + FImageList.RemoveFreeNotification(Self); + FImageList.UnRegisterChanges(FImageChangeLink); + end; + FImageList := Value; + if FImageList <> nil then + begin + FImageList.RegisterChanges(FImageChangeLink); + FImageList.FreeNotification(Self); + end; + UpdateImage; + Invalidate; end; end; @@ -740,6 +883,34 @@ procedure TSVGGraphic.SaveToStream(Stream: TStream); FSVG.SaveToStream(Stream); end; +{ TSVGIconImageActionLink } + +procedure TSVGIconImageActionLink.AssignClient(AClient: TObject); +begin + inherited AssignClient(AClient); + FClient := AClient as TSVGIconImage; +end; + +function TSVGIconImageActionLink.IsImageIndexLinked: Boolean; +begin + Result := inherited IsImageIndexLinked and + (TSVGIconImage(FClient).ImageIndex = TSVGIconImage(Action).ImageIndex); +end; + +{$IFDEF D10_4+} +function TSVGIconImageActionLink.IsImageNameLinked: Boolean; +begin + Result := inherited IsImageIndexLinked and + (TSVGIconImage(FClient).ImageName = TSVGIconImage(Action).ImageName); +end; +{$ENDIF} + +procedure TSVGIconImageActionLink.SetImageIndex(Value: Integer); +begin + inherited; + if IsImageIndexLinked then + TSVGIconImage(FClient).ImageIndex := Value; +end; initialization TPicture.RegisterFileFormat('SVG', 'Scalable Vector Graphics', TSVGGraphic); diff --git a/Ext/SVGIconImageList/Source/SVGIconImageListBase.pas b/Ext/SVGIconImageList/Source/SVGIconImageListBase.pas index d76e9ee..78c77bf 100644 --- a/Ext/SVGIconImageList/Source/SVGIconImageListBase.pas +++ b/Ext/SVGIconImageList/Source/SVGIconImageListBase.pas @@ -48,7 +48,7 @@ interface SvgInterfaces; const - SVGIconImageListVersion = '3.9.2'; + SVGIconImageListVersion = '3.9.4'; DEFAULT_SIZE = 16; type diff --git a/Ext/SVGIconImageList/Source/SVGIconUtils.pas b/Ext/SVGIconImageList/Source/SVGIconUtils.pas index e118947..7b6763f 100644 --- a/Ext/SVGIconImageList/Source/SVGIconUtils.pas +++ b/Ext/SVGIconImageList/Source/SVGIconUtils.pas @@ -47,6 +47,16 @@ interface , Vcl.Imaging.pngimage , ComCtrls; +Type + TPngExportSize = (es16, es32, es48, es64, es96, es128, es192, es256, esCustom); + TPngExportSizes = Set of TPngExportSize; + + TExportToPngEvent = procedure (const ASizes: TPngExportSizes; const SVGText: string; + const AFolder, AFormat: string; ACustomSize: Integer) of Object; + +const + AllPngExportSizes = [es16, es32, es48, es64, es96, es128, es192, es256, esCustom]; + function UpdateSVGIconListView(const AListView: TListView; const ACategory: string = ''; const AIncludeIndex: Boolean = True): Integer; @@ -63,7 +73,7 @@ implementation System.SysUtils , System.Types , Vcl.Themes - , SVGIconImageCOllection + , SVGIconImageCollection {$IFDEF D10_3} , VirtualImageList {$ENDIF} diff --git a/Ext/SVGIconImageList/Source/SVGInterfaces.pas b/Ext/SVGIconImageList/Source/SVGInterfaces.pas index cd6d9b7..66f435a 100644 --- a/Ext/SVGIconImageList/Source/SVGInterfaces.pas +++ b/Ext/SVGIconImageList/Source/SVGInterfaces.pas @@ -145,6 +145,8 @@ function GetGlobalSVGFactoryDesc: string; Result := 'Delphi TSVG Engine' {$ELSEIF DEFINED(Image32_SVGEngine)} Result := 'Delphi Image32 Engine' + {$ELSEIF DEFINED(Skia_SVGEngine)} + Result := 'Skia4delphi Engine' {$ENDIF} end; diff --git a/Ext/SVGIconImageList/Source/dlgExportPNG.dfm b/Ext/SVGIconImageList/Source/dlgExportPNG.dfm index b506158..a83e976 100644 --- a/Ext/SVGIconImageList/Source/dlgExportPNG.dfm +++ b/Ext/SVGIconImageList/Source/dlgExportPNG.dfm @@ -3,8 +3,8 @@ object ExportToPNGDialog: TExportToPNGDialog Top = 168 BorderStyle = bsDialog Caption = 'Export SVG to PNG files' - ClientHeight = 280 - ClientWidth = 458 + ClientHeight = 279 + ClientWidth = 454 Color = clBtnFace Font.Charset = ANSI_CHARSET Font.Color = clWindowText @@ -38,6 +38,13 @@ object ExportToPNGDialog: TExportToPNGDialog Height = 13 Caption = 'Filename' end + object SVGIconImage: TSVGIconImage + Left = 24 + Top = 8 + Width = 200 + Height = 200 + AutoSize = False + end object FSearchOptions: TGroupBox Left = 247 Top = 8 @@ -176,13 +183,6 @@ object ExportToPNGDialog: TExportToPNGDialog TabOrder = 2 OnClick = btnCancelClick end - object SVGIconImage: TSVGIconImage - Left = 24 - Top = 8 - Width = 200 - Height = 200 - AutoSize = False - end object FormatEdit: TEdit Left = 247 Top = 174 @@ -198,7 +198,7 @@ object ExportToPNGDialog: TExportToPNGDialog Width = 169 Height = 23 Caption = 'Change output filename...' - TabOrder = 5 + TabOrder = 3 OnClick = OutputButtonClick end object SavePNGDialog: TSaveDialog diff --git a/Ext/SVGIconImageList/Source/dlgExportPNG.pas b/Ext/SVGIconImageList/Source/dlgExportPNG.pas index f25b9cc..d74362e 100644 --- a/Ext/SVGIconImageList/Source/dlgExportPNG.pas +++ b/Ext/SVGIconImageList/Source/dlgExportPNG.pas @@ -4,7 +4,7 @@ interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ExtCtrls, SVGIconImage; + StdCtrls, ExtCtrls, SVGIconImage, SVGIconUtils; resourcestring SVG_IMAGE_EXPORTED = 'PNG Images created into Folder'; @@ -41,6 +41,7 @@ TExportToPNGDialog = class(TForm) private FFileName: TFileName; FIconName: string; + FOnExportToPng: TExportToPngEvent; procedure UpdateExampleLabel; procedure ExportToPNG; procedure SetFileName(const Value: TFileName); @@ -54,24 +55,29 @@ TExportToPNGDialog = class(TForm) function ExportToPNG(const AParentRect: TRect; const AFileName: TFileName; - ASVGContent: string; + const ASVGContent: string; const AShowModal: Boolean; - const ACustomSize: Integer = 0): boolean; + const ACustomSize: Integer = 0; + const AExportFormat: string = ''; + const ASizes: TPngExportSizes = []; + const OnExportToPng: TExportToPngEvent = nil): Boolean; implementation {$R *.dfm} uses - SVGIconUtils - , System.UITypes + System.UITypes , System.Math; function ExportToPNG(const AParentRect: TRect; const AFileName: TFileName; - ASVGContent: string; + const ASVGContent: string; const AShowModal: Boolean; - const ACustomSize: Integer = 0): Boolean; + const ACustomSize: Integer = 0; + const AExportFormat: string = ''; + const ASizes: TPngExportSizes = []; + const OnExportToPng: TExportToPngEvent = nil): Boolean; var LExportToPNGDialog: TExportToPNGDialog; I: Integer; @@ -99,7 +105,25 @@ function ExportToPNG(const AParentRect: TRect; if not Assigned(LExportToPNGDialog) then LExportToPNGDialog := TExportToPNGDialog.Create(nil); + + LExportToPNGDialog.FOnExportToPng := OnExportToPng; + + if ASizes <> [] then + begin + LExportToPNGDialog.Export16x16.Checked := es16 in ASizes; + LExportToPNGDialog.Export32x32.Checked := es32 in ASizes; + LExportToPNGDialog.Export48x48.Checked := es48 in ASizes; + LExportToPNGDialog.Export64x64.Checked := es64 in ASizes; + LExportToPNGDialog.Export96x96.Checked := es96 in ASizes; + LExportToPNGDialog.Export128x128.Checked := es128 in ASizes; + LExportToPNGDialog.Export192x192.Checked := es192 in ASizes; + LExportToPNGDialog.Export256x256.Checked := es256 in ASizes; + LExportToPNGDialog.ExportCustom.Checked := LCustomSize <> 0; + end; + LExportToPNGDialog.FileName := AFileName; + if AExportFormat <> '' then + LExportToPNGDialog.FormatEdit.Text := AExportFormat; LExportToPNGDialog.SVGIconImage.SVGText := ASVGContent; if LCustomSize <> 0 then LExportToPNGDialog.CustomSizeValue := LCustomSize @@ -144,36 +168,45 @@ procedure TExportToPNGDialog.ExportToPNG; LOutFolder: string; LIconName: string; LFileExported: TStringList; + LExportSizes: TPngExportSizes; - function ExportToPNG(ASize: Integer): string; + function ExportToPNG(ASize: Integer; AExportSize: TPngExportSize): string; begin Result := GetOutFileName(ASize); SVGExportToPng(ASize, ASize, SVGIconImage.SVG, LOutFolder, Result); + LExportSizes := LExportSizes + [AExportSize]; end; begin + LExportSizes := []; LFileExported := TStringList.Create; try LOutFolder := ExtractFilePath(FileName); ForceDirectories(LOutFolder); LIconName := ChangeFileExt(ExtractFileName(FileName),''); if Export16x16.Checked then - LFileExported.Add(ExportToPNG(16)); + LFileExported.Add(ExportToPNG(16, es16)); if Export32x32.Checked then - LFileExported.Add(ExportToPNG(32)); + LFileExported.Add(ExportToPNG(32, es32)); if Export48x48.Checked then - LFileExported.Add(ExportToPNG(48)); + LFileExported.Add(ExportToPNG(48, es48)); + if Export64x64.Checked then + LFileExported.Add(ExportToPNG(64, es64)); if Export96x96.Checked then - LFileExported.Add(ExportToPNG(96)); + LFileExported.Add(ExportToPNG(96, es96)); if Export128x128.Checked then - LFileExported.Add(ExportToPNG(128)); + LFileExported.Add(ExportToPNG(128, es128)); if Export192x192.Checked then - LFileExported.Add(ExportToPNG(192)); + LFileExported.Add(ExportToPNG(192, es192)); if Export256x256.Checked then - LFileExported.Add(ExportToPNG(256)); + LFileExported.Add(ExportToPNG(256, es256)); if ExportCustom.Checked and (CustomSizeValue > 0) then - LFileExported.Add(ExportToPNG(CustomSizeValue)); + LFileExported.Add(ExportToPNG(CustomSizeValue, esCustom)); + + if Assigned(FOnExportToPng) then + FOnExportToPng(LExportSizes, SVGIconImage.SVG.Source, + ExtractFilePath(FileName), FormatEdit.Text, CustomSizeValue*Ord(ExportCustom.Checked)); MessageDlg(SVG_IMAGE_EXPORTED+sLineBreak+LOutFolder+sLineBreak+ LFileExported.Text, diff --git a/README.md b/README.md index ad660af..d23405d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## **Anteprima Fattura Elettronica (Viewer e Icone) integrato in Windows Explorer e Visualizzatore** -### Versione attuale 2.0 ### +### Versione attuale 2.1 ### **Una serie di strumenti per gestire i file xml contenenti Fatture Elettroniche in Windows:** @@ -13,7 +13,7 @@ - Un [Visualizzatore][10] di F.E. che permette di visualizzarla in formati diversi e stamparla ### Funzionalità -- Possibilità di definire liberamente un "template" per il disegno dell'icona +- Possibilità di scegliere lo stile di visualizzazione della fattura (PA, AssoSoftware, Custom...) - Possibilità di associare colori diversi alle icone in base ai tipi di F.E. o ad altre regole - Supporta Windows Vista, 7, 8 and 10 (sia 32 bit che 64 bit). - Supporto dei temi (Scuro o Chiaro) in accordo con le preferenze dell'utente in Windows @@ -63,6 +63,10 @@ Per installare manualmente FExplorer.dll seguire questi step: ## Release Notes ## +23 Nov 2022 - Versione 2.1.0 +- Aggiunto "Stile" SudTirolo (ITA/DEU)[16] +- Aggiunta possibilità di spegnere pannello anteprima icona e testo XML nel Viewer + 11 Sep 2022 - Versione 2.0.0 - Build con Delphi 11.2 Alexandria - Fixato errore in caricamento file con spazi @@ -171,3 +175,5 @@ Related links: [embarcadero.com][11] - [learndelphi.org][12] [14]: https://github.com/DelphiClubItalia/PKCS7Extractor [15]: http://www.angusj.com/delphi/image32/Docs/_Body.htm + +[16]: https://github.com/provbz/fatturapa-xsl-southtyrol \ No newline at end of file diff --git a/Setup/FExplorer.iss b/Setup/FExplorer.iss index 2cc34c1..6e29799 100644 --- a/Setup/FExplorer.iss +++ b/Setup/FExplorer.iss @@ -1,7 +1,7 @@ ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName 'FExplorer (Fattura Elettronica Explorer e Visualizzatore)' -#define MyAppVersion '2.0.0' +#define MyAppVersion '2.1.0' [Setup] AppName={#MyAppName} diff --git a/Source/FEViewer.dproj b/Source/FEViewer.dproj index 7f2ec1a..0c46523 100644 --- a/Source/FEViewer.dproj +++ b/Source/FEViewer.dproj @@ -67,7 +67,7 @@ ..\Icons\logo.ico $(BDS)\bin\default_app.manifest 1040 - CompanyName=Ethea S.r.l.;FileDescription=Visualizzatore Fattura Elettronica;FileVersion=2.0.0.0;InternalName=;LegalCopyright=Copyright © 2021-2022 - Ethea S.r.l. & Andrea Magni;LegalTrademarks=;OriginalFilename=;ProductName=FExplorer Viewer;ProductVersion=2.0;Comments= + CompanyName=Ethea S.r.l.;FileDescription=Visualizzatore Fattura Elettronica;FileVersion=2.1.0.0;InternalName=;LegalCopyright=Copyright © 2021-2022 - Ethea S.r.l. & Andrea Magni;LegalTrademarks=;OriginalFilename=;ProductName=FExplorer Viewer;ProductVersion=2.1;Comments= Glow|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Glow.vsf;Sky|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Sky.vsf;Windows10|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10.vsf;"Windows10 Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Dark.vsf";"Windows10 SlateGray|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10SlateGray.vsf";"Windows11 Modern Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Dark.vsf";"Windows11 Modern Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Light.vsf" 0 false @@ -76,6 +76,7 @@ ..\Dcu\$(Platform)\$(Config) ..\..\exe\InstantXMLEditor.exe 2 + 1
System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Bde;$(DCC_Namespace) diff --git a/Source/FEViewer.res b/Source/FEViewer.res index f40e2d0..d3107a1 100644 Binary files a/Source/FEViewer.res and b/Source/FEViewer.res differ diff --git a/Source/FExplorer.About.dfm b/Source/FExplorer.About.dfm index 830f4d2..43bf0fb 100644 --- a/Source/FExplorer.About.dfm +++ b/Source/FExplorer.About.dfm @@ -210,12 +210,14 @@ object FrmAbout: TFrmAbout Color = clWindow ParentBackground = False TabOrder = 0 + ExplicitTop = 264 + ExplicitWidth = 442 object btnOK: TButton Left = 360 Top = 16 Width = 75 Height = 25 - Caption = 'OK' + Caption = 'CLOSE' Default = True TabOrder = 2 OnClick = btnOKClick @@ -295,6 +297,12 @@ object FrmAbout: TFrmAbout '- Image32 Library - http://www.angusj.com/delphi/image32/Docs/_B' + 'ody.htm' 'Copyright '#169'2019-2022 Angus Johnson.' + '' + + '- StyleSheet FatturaPA in South-Tyrol - https://github.com/provb' + + 'z/fatturapa-xsl-' + 'southtyrol' + 'Copyright '#169'2017 Ferdinand Tavernini' '' 'HTMLViewer - https://github.com/BerndGabriel/HtmlViewer' 'Copyright (c) 1995 - 2008 by L. David Baldwin' @@ -306,6 +314,7 @@ object FrmAbout: TFrmAbout ReadOnly = True ScrollBars = ssVertical TabOrder = 1 + ExplicitHeight = 114 end object LinkLabel1: TLinkLabel Left = 8 @@ -322,11 +331,13 @@ object FrmAbout: TFrmAbout object panelLibrary: TGroupBox Left = 11 Top = 204 - Width = 427 + Width = 419 Height = 55 Anchors = [akLeft, akRight, akBottom] Caption = 'OpenSSL Library Info' TabOrder = 3 + ExplicitTop = 203 + ExplicitWidth = 415 object OpenSSLlabelLocation: TLabel Left = 96 Top = 17 diff --git a/Source/FExplorer.ContextMenuHandler.pas b/Source/FExplorer.ContextMenuHandler.pas index 2e03a03..7653f14 100644 --- a/Source/FExplorer.ContextMenuHandler.pas +++ b/Source/FExplorer.ContextMenuHandler.pas @@ -139,7 +139,7 @@ function TFEContextMenu.InitShellExt(pidlFolder: PItemIDList; // realign string FFileName := PChar(FFileName); TLogPreview.Add('FFileName: '+FFileName); - LFileExt := ExtractFileExt(fFileName); + LFileExt := ExtractFileExt(FFileName); // only for .xml and .xml.p7m files di Fatture Elettroniche if IndexText(LFileExt, ['.xml', '.xml.p7m', '.p7m']) <> -1 then Result := NOERROR @@ -209,7 +209,7 @@ function TFEContextMenu.InvokeCommand(var lpici: TCMInvokeCommandInfo): HResult; // execute the command specified by lpici.lpVerb. if LoWord(lpici.lpVerb) = MENU_ITEM_PREVIEW_INVOICE then begin - TLogPreview.Add('TMDContextMenu: Menu clicked'); + TLogPreview.Add('TFEContextMenu: Menu clicked'); Reg := TRegistry.Create(KEY_READ); try diff --git a/Source/FExplorer.Main.pas b/Source/FExplorer.Main.pas index 3e1b0ca..271e000 100644 --- a/Source/FExplorer.Main.pas +++ b/Source/FExplorer.Main.pas @@ -23,6 +23,7 @@ { limitations under the License. } { } { The Original Code is Main.pas. } +{ Delphi Preview Handler https://github.com/RRUZ/delphi-preview-handler } { } { The Initial Developer of the Original Code is Rodrigo Ruz V. } { Portions created by Rodrigo Ruz V. are Copyright 2011-2021 Rodrigo Ruz V. } @@ -35,11 +36,6 @@ interface implementation uses - System.Generics.Collections, - System.Classes, - SynEditHighlighter, - uPreviewHandler, - SynHighlighterXML, FExplorer.ThumbnailHandler, FExplorer.PreviewHandler; diff --git a/Source/FExplorer.PreviewForm.dfm b/Source/FExplorer.PreviewForm.dfm index c0ae0bc..784a69e 100644 --- a/Source/FExplorer.PreviewForm.dfm +++ b/Source/FExplorer.PreviewForm.dfm @@ -1,39 +1,30 @@ -object FrmPreview: TFrmPreview +inherited FrmPreview: TFrmPreview Left = 522 Top = 286 - ClientHeight = 651 - ClientWidth = 672 - Color = clBtnFace + ClientHeight = 613 + ClientWidth = 601 DoubleBuffered = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 Font.Name = 'Segoe UI' - Font.Style = [] - OldCreateOrder = False - OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged - OnCreate = FormCreate - OnDestroy = FormDestroy OnResize = FormResize - PixelsPerInch = 96 + ExplicitWidth = 617 + ExplicitHeight = 652 TextHeight = 13 object Splitter: TSplitter Left = 0 Top = 145 - Width = 672 + Width = 601 Height = 6 Cursor = crVSplit Align = alTop AutoSnap = False MinSize = 100 OnMoved = SplitterMoved - ExplicitTop = 329 ExplicitWidth = 888 end object PanelTop: TPanel Left = 0 Top = 0 - Width = 672 + Width = 601 Height = 35 Align = alTop BevelOuter = bvNone @@ -41,7 +32,7 @@ object FrmPreview: TFrmPreview object ToolBar: TToolBar Left = 0 Top = 0 - Width = 672 + Width = 605 Height = 35 Align = alClient AutoSize = True @@ -51,7 +42,6 @@ object FrmPreview: TFrmPreview EdgeOuter = esNone Images = SVGIconImageList List = True - ShowCaptions = True TabOrder = 0 object ToolButtonShowText: TToolButton Left = 0 @@ -67,7 +57,7 @@ object FrmPreview: TFrmPreview OnMouseLeave = ToolButtonMouseLeave end object ToolButtonZoomIn: TToolButton - Left = 111 + Left = 35 Top = 0 Cursor = crHandPoint Hint = 'Zoom + (aumento lo zoom)' @@ -80,7 +70,7 @@ object FrmPreview: TFrmPreview OnMouseLeave = ToolButtonMouseLeave end object ToolButtonZoomOut: TToolButton - Left = 190 + Left = 70 Top = 0 Cursor = crHandPoint Hint = 'Zoom - (diminuisce lo zoom)' @@ -93,7 +83,7 @@ object FrmPreview: TFrmPreview OnMouseLeave = ToolButtonMouseLeave end object ToolButtonSettings: TToolButton - Left = 265 + Left = 105 Top = 0 Cursor = crHandPoint Hint = 'Modifica impostazioni...' @@ -107,7 +97,7 @@ object FrmPreview: TFrmPreview OnMouseLeave = ToolButtonMouseLeave end object ToolButtonAbout: TToolButton - Left = 379 + Left = 140 Top = 0 Cursor = crHandPoint Hint = 'Mostra info...' @@ -121,14 +111,14 @@ object FrmPreview: TFrmPreview OnMouseLeave = ToolButtonMouseLeave end object SeparatorEditor: TToolButton - Left = 448 + Left = 175 Top = 0 Width = 8 ImageName = 'settings' Style = tbsSeparator end object ToolButtonReformat: TToolButton - Left = 456 + Left = 183 Top = 0 Hint = 'Riformatta testo XML' AutoSize = True @@ -144,7 +134,7 @@ object FrmPreview: TFrmPreview object PanelXML: TPanel Left = 0 Top = 35 - Width = 672 + Width = 601 Height = 110 Align = alTop BevelOuter = bvNone @@ -153,7 +143,7 @@ object FrmPreview: TFrmPreview object SynEdit: TSynEdit Left = 0 Top = 0 - Width = 672 + Width = 605 Height = 110 Align = alClient Font.Charset = DEFAULT_CHARSET @@ -180,12 +170,13 @@ object FrmPreview: TFrmPreview Gutter.ShowLineNumbers = True ReadOnly = True FontSmoothing = fsmNone + ExplicitWidth = 601 end end object StatusBar: TStatusBar Left = 0 - Top = 630 - Width = 672 + Top = 592 + Width = 601 Height = 21 Panels = <> ParentFont = True @@ -198,8 +189,8 @@ object FrmPreview: TFrmPreview end object PanelBottom: TPanel Left = 0 - Top = 600 - Width = 672 + Top = 562 + Width = 601 Height = 30 Align = alBottom BevelOuter = bvNone @@ -207,7 +198,7 @@ object FrmPreview: TFrmPreview object ToolBarAllegati: TToolBar Left = 0 Top = 0 - Width = 672 + Width = 605 Height = 30 Align = alClient AutoSize = True @@ -217,16 +208,16 @@ object FrmPreview: TFrmPreview EdgeOuter = esNone Images = SVGIconImageList List = True - ShowCaptions = True TabOrder = 0 Transparent = True + ExplicitWidth = 601 end end object HtmlViewer: THtmlViewer Left = 0 Top = 151 - Width = 672 - Height = 449 + Width = 601 + Height = 411 BorderStyle = htFocused HistoryMaxCount = 0 NoSelect = False @@ -243,91 +234,75 @@ object FrmPreview: TFrmPreview Touch.InteractiveGestureOptions = [igoPanSingleFingerHorizontal, igoPanSingleFingerVertical, igoPanInertia] end object SVGIconImageList: TVirtualImageList - DisabledGrayscale = False - DisabledSuffix = '_Disabled' Images = < item CollectionIndex = 42 CollectionName = 'Show-Text' - Disabled = False Name = 'Show-Text' end item CollectionIndex = 43 CollectionName = 'Hide-Text' - Disabled = False Name = 'Hide-Text' end item CollectionIndex = 23 CollectionName = 'about' - Disabled = False Name = 'about' end item CollectionIndex = 41 CollectionName = 'Support' - Disabled = False Name = 'Support' end item CollectionIndex = 0 CollectionName = 'Style' - Disabled = False Name = 'Style' end item CollectionIndex = 45 CollectionName = 'Services' - Disabled = False Name = 'Services' end item CollectionIndex = 26 CollectionName = 'plus' - Disabled = False Name = 'plus' end item CollectionIndex = 25 CollectionName = 'Minus' - Disabled = False Name = 'Minus' end item CollectionIndex = 6 CollectionName = 'Search' - Disabled = False Name = 'Search' end item CollectionIndex = 38 CollectionName = 'export' - Disabled = False Name = 'export' end item CollectionIndex = 19 CollectionName = 'Reformat' - Disabled = False Name = 'Reformat' end item CollectionIndex = 48 CollectionName = 'attachment' - Disabled = False Name = 'attachment' end item CollectionIndex = 28 CollectionName = 'preferences-desktop' - Disabled = False Name = 'preferences-desktop' end item CollectionIndex = 16 CollectionName = 'Print-preview' - Disabled = False Name = 'Print-preview' end> ImageCollection = dmResources.SVGIconImageCollection diff --git a/Source/FExplorer.PreviewForm.pas b/Source/FExplorer.PreviewForm.pas index 0e832a6..a4330bb 100644 --- a/Source/FExplorer.PreviewForm.pas +++ b/Source/FExplorer.PreviewForm.pas @@ -43,11 +43,11 @@ interface FExplorer.Settings, System.ImageList, SynEditCodeFolding, SVGIconImageList, SVGIconImageListBase, SVGIconImage, Vcl.VirtualImageList, Vcl.OleCtrls, SHDocVw, Xml.xmldom, Xml.XMLIntf, Xml.Win.msxmldom, Xml.XMLDoc, - FExplorer.Resources, HTMLUn2, HtmlView - ; + FExplorer.Resources, HTMLUn2, HtmlView, + UPreviewContainer; type - TFrmPreview = class(TForm) + TFrmPreview = class(TPreviewContainer) SynEdit: TSynEdit; PanelTop: TPanel; PanelXML: TPanel; @@ -77,13 +77,12 @@ TFrmPreview = class(TForm) procedure ToolButtonMouseEnter(Sender: TObject); procedure ToolButtonMouseLeave(Sender: TObject); procedure SplitterMoved(Sender: TObject); - procedure FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, - NewDPI: Integer); private FXMLFontSize: Integer; FHTMLFontSize: Integer; FSimpleText: string; FFileName: string; + FIconVisible: Boolean; FPreviewSettings: TPreviewSettings; FInvoice: TLegalInvoice; FAllegatiButtons: TObjectList; @@ -143,6 +142,7 @@ implementation ; {$R *.dfm} + { TFrmEditor } procedure TFrmPreview.AllegatoButtonClick(Sender: TObject); @@ -258,10 +258,7 @@ destructor TFrmPreview.Destroy; function TFrmPreview.DialogPosRect: TRect; begin - if Self.Parent <> nil then - GetWindowRect(Self.Parent.ParentWindow, Result) - else - Result := TRect.Create(0,0,0,0); + Result := ClientToScreen(ActualRect); end; procedure TFrmPreview.UpdateGUI; @@ -310,18 +307,17 @@ procedure TFrmPreview.UpdateHighlighter; {$ENDIF} end; -procedure TFrmPreview.FormAfterMonitorDpiChanged(Sender: TObject; OldDPI, - NewDPI: Integer); -begin - TLogPreview.Add('TFrmEditor.FormAfterMonitorDpiChanged: '+ - '- Old: '+OldDPI.ToString+' - New: '+NewDPI.ToString); -end; - procedure TFrmPreview.FormCreate(Sender: TObject); +var + FileVersionStr: string; begin + inherited; TLogPreview.Add('TFrmEditor.FormCreate'); + FileVersionStr := uMisc.GetFileVersion(GetModuleLocation()); + FSimpleText := Format(StatusBar.SimpleText, + [FileVersionStr, {$IFDEF WIN32}32{$ELSE}64{$ENDIF}]); + StatusBar.SimpleText := FSimpleText; Application.OnException := AppException; - FSimpleText := StatusBar.SimpleText; UpdateFromSettings(False); end; @@ -377,7 +373,8 @@ procedure TFrmPreview.SaveSettings; FPreviewSettings.UpdateSettings(SynEdit.Font.Name, HtmlViewer.DefFontName, XMLFontSize, HTMLFontSize, - (PanelXML.Visible and HtmlViewer.Visible)); + (PanelXML.Visible and HtmlViewer.Visible), + FIconVisible); FPreviewSettings.WriteSettings(SynEdit.Highlighter, nil); end; end; @@ -486,10 +483,10 @@ procedure TFrmPreview.UpdateFromSettings(const Preview: Boolean); HtmlViewer.DefFontName := FPreviewSettings.HTMLFontName; PanelXML.Visible := FPreviewSettings.ShowXML; + FIconVisible := FPreviewSettings.ShowIcon; {$IFNDEF DISABLE_STYLES} TStyleManager.TrySetStyle(FPreviewSettings.StyleName, False); {$ENDIF} - //BackgroundTrackBar.Position := FPreviewSettings.LightBackground; UpdateHighlighter; UpdateGUI; if Preview then diff --git a/Source/FExplorer.Resources.dfm b/Source/FExplorer.Resources.dfm index a659222..a470520 100644 --- a/Source/FExplorer.Resources.dfm +++ b/Source/FExplorer.Resources.dfm @@ -10991,4 +10991,5638 @@ object dmResources: TdmResources Top = 131 DOMVendorDesc = 'MSXML' end + object SudTirolo_ITA_DEU: TXMLDocument + NodeIndentStr = #9 + Options = [doNodeAutoIndent] + XML.Strings = ( + '' + '' + '' + '' + '' + '' + '' + ' ' + + '

Stylesheet fatturapa_v1.2.1_de-it.xsl v20201125 ft -' + + ' http://ti' + + 'nyurl.com/fatturapa-xsl-southtyrol

' + '
' + + ' ' + '' + ' ' + ' ' + ' ' + + '
Generaldirektion
DIREZIO' + + 'NE GENERALE
' + + '
Rechtsamt
UFFICIO AFFARI' + + ' LEGALI
' + + '
EDV-Amt
UFFICIO EDP<' + + '/xsl:when>' + + '
Personal- und Organisationsamt<' + + 'br/>UFFICIO PERSONALE ED ORGANIZZAZIONE
' + + '
Wohnungszuweisung und Mieterang' + + 'elegenheiten
RIPARTIZIONE ALLOGGI ED INQUILINATO' + + '
Mieterservicestelle Bozen
<' + + 'i>CENTRO SERVIZI ALL'#39'INQUILINATO DI BOLZANO
' + + '
Mieterservicestelle Meran
<' + + 'i>CENTRO SERVIZI ALL'#39'INQUILINATO DI MERANO
' + + '
Mieterservicestelle Brixen
' + + 'CENTRO SERVIZI ALL'#39'INQUILINATO DI BRESSANONE
' + + '
Technisches Dienste
RIPA' + + 'RTIZIONE SERVIZI TECNICI
' + + '
Technisches Amt Mitte S'#252'd
<' + + 'i>UFFICIO TECNICO CENTRO SUD
' + + '
Technisches Amt Ost
UFFI' + + 'CIO TECNICO EST
' + + '
Technisches Amt West
UFF' + + 'ICIO TECNICO OVEST
' + + '
Amt f'#252'r Buchhaltung, Bilanzen, ' + + 'Versicherung und Zahlungen
UFFICIO CONTABILITA, BILANCI, ' + + 'ASSICURAZIONI E PAGAMENTI
' + + '
Arbeitsgruppe f'#252'r Vergabe, Vert' + + 'r'#228'ge und Verm'#246'gen
GRUPPO DI LAVORO APPALTI, CONTRATTI E P' + + 'ATRIMONIO
' + + '
Technisches Amt Instandhaltung<' + + 'br/>UFFICIO TECNICO MANUTENZIONE
' + + '
Uff_eFatturaPA
' + '' + + '
Nicht akkreditierter Rechnungs' + + 'empf'#228'nger
Destinatario non accreditato
' + + '
Ausl'#228'ndischer Rechnungsempf'#228'ng' + + 'er
Destinatario non residenti
' + '' + + ' ' + '
' + ' ' + '
' + '' + ' ' + ' ' + '' + + ' ' + + ' ' + + ' ' + '' + ' ' + ' ' + ' ' + ' ' + + ' Ja' + + 'n./Gen.' + + ' Fe' + + 'b.' + + ' Ma' + + 'r.' + + ' Ap' + + 'r.' + + ' Ma' + + 'i/Mag.' + + ' Ju' + + 'n./Giu.' + + ' Ju' + + 'l./Lug.' + + ' Au' + + 'g./Ago.' + + ' Se' + + 'p./Set.' + + ' Okt./Ott.' + ' Nov.' + + ' Dez./Dic.' + + ' Unbekannter Mona' + + 't - Mese non riconosciuto' + ' ' + ' ' + ' ' + + ' ' + ' ' + + ' ' + + ' ' + + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + + ' ' + ' '#9'' + ' ' + ' ' + '
' + ' ' + ' ' + + '

' + + 'Italienische elektronische Rechnung
FATTURA ELETTRONICA

' + '
' + + '
FatturaPA Version/versione
' + + ' ' + + ' ' + + '

Daten zur '#220'bertragung - Dati relativi alla ' + + 'trasmissione

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + '
1.1.[3|1|2]'#220'bertragungskennung
Ident. d' + + 'i trasmissione
' + + ' ' + + ' :' + + ' ' + + ' _' + + ' ' + + ' ' + + ' ' + + '
1.1.4Kennung Rechnungsempf'#228'nger' + + '
Codice destinatario
1.1.5.1Telefonnummer Sender
Telefono del trasmittente
1.1.5.2E-Mail des Senders
' + + 'E-mail del trasmittente
1.1.6zertifizierte E-Mail des ' + + 'Empf'#228'ngers
E-mail certificata del destinatario
' + '
' + '
' + + ' ' + '' + + ' ' + + ' ' + + '
' + + '

Daten' + + ' zum Lieferanten/Freiberufler - Dati del cedente/prestatore

' + + ' ' + + '

' + + 'Anagrafische Daten - Dati anagrafici

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + '' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + ' ' + + ' ' + + '

' + + 'Firmensitz - Dati della sede

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + ' ' + '' + + ' ' + + '

' + + 'Daten der Organisation - Dati della stabile organizzazione

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + ' ' + '' + + ' ' + + '

' + + 'Handelsregistereintragung - Dati di iscrizione nel registro d' + + 'elle imprese

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + ' ' + '' + + ' ' + + ' ' + + ' ' + + '

Adresse - Recapiti

' + + ' ' + + '
1.2.1.3.[1|4|2|3]Benennung
Nominativo
'#160''#160''#160'
1.2.1.3.5EORI-Kennung
Codice ' + + 'EORI
1.2.1.[4|5|6|7]Zugeh'#246'rigkeit Berufsa' + + 'lbum
Albo professionale di appartenenza
'#160''#160''#160'
1.2.1.1Mehrwertsteuernummer
I' + + 'dent. fiscale ai fini IVA
' + + ' ' + + '
1.2.1.2Steuernummer
Codice fi' + + 'scale
' + + '
1.2.1.8Steuersystem
Regime fi' + + 'scale
' + + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' (ordinario)' + + ' ' + + ' (contribuenti ' + + 'minimi)' + + ' ' + + ' (nuove iniziat' + + 'ive produttive)' + + ' ' + + ' (agricoltura e' + + ' attivit'#224' connesse e pesca)' + + ' ' + + ' (vendita sali ' + + 'e tabacchi)' + + ' ' + + ' (commercio fia' + + 'mmiferi)' + + ' ' + + ' (editoria)' + + ' ' + + ' (gestione serv' + + 'izi telefonia pubblica)' + + ' ' + + ' (rivendita doc' + + 'umenti di trasporto pubblico e di sosta)' + + ' ' + + ' (intrattenimen' + + 'ti, giochi e altre attivit'#224' di cui alla tariffa allegata al DPR ' + + '640/72)' + + ' ' + + ' (agenzie viagg' + + 'i e turismo)' + + ' ' + + ' (agriturismo)<' + + '/xsl:when>' + + ' ' + + ' (vendite a dom' + + 'icilio)' + + ' ' + + ' (rivendita ben' + + 'i usati, oggetti d'#8217'arte, d'#8217'antiquariato o da collezione)' + + ' ' + + ' (agenzie di ve' + + 'ndite all'#8217'asta di oggetti d'#8217'arte, antiquariato o da collezione)<' + + '/xsl:when>' + + ' ' + + ' (IVA per cassa' + + ' P.A.)' + + ' ' + + ' (IVA per cassa' + + ' - art. 32-bis, D.L. 83/2012)' + + ' ' + + ' (Regime forfet' + + 'tario)' + + ' ' + + ' (altro)' + + ' ' + + ' ' + + ' ' + + ' (!!! falsche Kennun' + + 'g !!!)(!!! codice non previsto !!!)' + + ' ' + + ' ' + + ' ' + + '
1.2.2.[1|2|3|4|5|6]Anschrift
indirizzo
'#160'
'#160''#160''#160'
' + + ' ' + + '
1.2.3.[1|2|3|4|5]Anschrift
indirizzo
'#160'
'#160''#160''#160'
' + + ' ' + + '
1.2.4.1H' + + 'andelsregister der Provinz
Uff. Reg. Imp. Provinciale' + + '
1.2.4.2Eintragungsnummer
Nume' + + 'ro di iscrizione
1.2.4.[3|4]Handelskapital
Cap' + + 'itale sociale
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' '#160'' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' (Einzelgese' + + 'llschafter)(socio unico)' + + ' ' + + ' (mehrere Ge' + + 'sellschafter)(pi'#249' soci)' + + ' ' + + ' ' + + ' ' + + ' (!!! falsche K' + + 'ennung !!!)(!!! codice non previsto !!!)' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
1.2.4.5Aufl'#246'sung
Stato di liq' + + 'uidazione
' + + ' ' + + ' ' + + ' ' + + ' (in Aufl'#246'sung)(in liquidazione)' + + ' ' + + ' (nicht in Aufl'#246's' + + 'ung)(non in liquidazione)' + + ' ' + + ' ' + + ' ' + + ' (!!! falsche Kennung' + + ' !!!)(!!! codice non previsto !!!)' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
1.2.5.1T' + + 'elefon
Telefono
1.2.5.2F' + + 'AX
Fax
1.2.5.3E' + + '-Mail
E-mail
' + + ' ' + + ' ' + '' + + ' ' + + '

' + + 'Hinweis Verwaltung / Buchhaltung - Riferimento amministrativo' + + '

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
1.2.6Referenz' + + '
Riferimento
' + '
' + '
' + '
' + + ' ' + '' + + ' ' + + ' ' + + '
' + + '

Daten' + + ' des Vertreters f'#252'r Steuerfragen f'#252'r Dienstleisters / Lieferante' + + 'n
Dati del rappresentante fiscale del cedente / prestator' + + 'e

' + + ' ' + + '

' + + 'Anagrafische Daten - Dati anagrafici

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 1.3.1.1M' + + 'ehrwertsteuernummer
Ident. fiscale ai fini IVA' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 1.3.1.2Steuernummer
Codice fi' + + 'scale' + + ' ' + + ' ' + + '' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 1.3.1.3.[1|4|2|3]Anschrift
indirizzo' + + ' ' + + ' '#160''#160'' + + ' ' + + ' ' + + ' ' + + '
' + '' + + ' ' + + ' ' + + ' ' + + ' 1.3.1.3.5EORI-Kennung
Codice ' + + 'EORI' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + '
' + '
' + '
' + + ' ' + '' + + ' ' + + ' ' + + '
' + + '

Daten' + + ' des Rechnungsempf'#228'ngers - Dati del cessionario / committente' + + '

' + + ' ' + + '

' + + 'Anagrafische Daten - Dati anagrafici

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 1.4.1.3.[1|4|2|3]Benennung
denominazione' + + ' ' + + ' '#160''#160'' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 1.4.1.1Mehrwertsteuernummer
I' + + 'dent. fiscale ai fini IVA' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 1.4.1.2Steuernummer
Codice Fi' + + 'scale' + + ' ' + + ' ' + + '' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 1.4.1.3.5EORI-Kennung
Codice ' + + 'EORI' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + '
' + + ' ' + + '

' + + 'Firmensitz - Dati della sede

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 1.4.2.[1|2|3|4|5|6]Anschrift
indirizzo' + + ' ' + + ' '#160'
'#160''#160' '#160'
' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + '
' + + ' ' + + ' ' + + '

' + + 'Firmensitz - Dati della stabile organizzazione

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 1.4.3.[1|2|3|4|5|6]Anschrift
indirizzo' + + ' ' + + ' '#160'
'#160''#160' '#160'
' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + '
' + + ' ' + + '

' + + 'Steuerberater - Rappresentante fiscale

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 1.4.4.1Mehrwertsteuernummer
I' + + 'dent. fiscale ai fini IVA' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 1.4.4.[2 / 3|4]Benennung
denominazione' + + ' ' + + ' '#160''#160'' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + '
' + '' + '
' + '
' + + ' ' + '' + + ' ' + + ' ' + + '
' + '' + + ' ' + + '

' + + 'Daten des Vermittlers des Emittenten - Dati del terzo interme' + + 'diario soggetto emittente

' + '' + + ' ' + + ' ' + + '

Anagrafische Daten - Dati anagrafici

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + '' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
1.5.1.3.[1|4|2|3]Anschrift
indirizzo
'#160''#160' '#160'
1.5.1.1Mehrwertsteuernummer
I' + + 'dent. fiscale ai fini IVA
1.5.1.2Steuernummer
Codice Fi' + + 'scale
1.5.1.3.5EORI-Kennung
Codice ' + + 'EORI
' + + ' ' + + ' ' + '
' + '
' + + ' ' + '' + + ' ' + + ' ' + + '
' + + '

Rechn' + + 'ungsersteller - Soggetto emittente la fattura

' + + ' ' + + ' ' + + '' + + ' ' + + ' ' + '
1.6Austeller
Sog' + + 'getto emittente
' + + ' ' + + ' ' + + ' ' + + ' (Rechnungssteller)(cessionar' + + 'io/committente)' + + ' ' + + ' (dritter)(terzo)' + + ' ' + + ' ' + + ' ' + + ' (!!! falsche Kennung !!!)(!!! c' + + 'odice non previsto !!!)' + + ' ' + + '
' + '
' + '
' + + ' ' + '' + + ' ' + '
' + '
' + ' ' + '' + ' ' + '' + + ' ' + + ' ' + ' ' + '' + + ' ' + + ' ' + + '

Dokument Nummer' + + ' Numero documento nel lotto:

' + '
' + '' + '
' + + '
FatturaPA Version/versione
' + '' + + ' ' + '' + + ' ' + + ' ' + + '
' + '' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + '

Generelle Rechnungssdaten - Dati generali del documento<' + + '/i>

' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.1.[2|1]W'#228'hrung : Dokumententyp
Valuta : Tipologia doc.' + + ' ' + + '
'#160':'#160' ' + + ' ' + + ' ' + + ' ' + + ' (Rec' + + 'hnung)(fattura)' + + ' ' + + ' (Acc' + + 'ontorechnung)(acconto/anticipo su fattura)' + + ' ' + + ' (Acc' + + 'ontohonorar)(acconto/anticipo su parcella)' + + ' ' + + ' (Gut' + + 'schrift)(nota di credito)' + + ' ' + + ' (Las' + + 'tschrift)(nota di debito)' + + ' ' + + ' (Hon' + + 'orarnote)(parcella)' + + ' ' + + ' ' + + #9#9#9#9#9#9#9#9#9#9#9' (Integration der ' + + 'internenen reverse charge Rechnungen)
(Integrazione fattu' + + 'ra reverse charge interno)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Integration/Selb' + + 'sfakturierung f'#252'r den Einkauf von Dienstleistungen aus dem Ausla' + + 'nd)
(Integrazione/autofattura per acquisto servizi dall'#39'e' + + 'stero)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Integration f'#252'r ' + + 'den Kauf von innergemeinschaftlichen Waren)
(Integrazione' + + ' per acquisto di beni intracomunitari)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Integration/Selb' + + 'stfakturierung f'#252'r den Kauf von Waren ex Art. 17, Abs. 2 DPR 633' + + '/72)
(Integrazione/autofattura per acquisto di beni ex ar' + + 't.17 c.2 DPR 633/72)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Selbstfakturieru' + + 'ng Anzeige (Art.6c, Komma 8 Dekret 471/97)
)(Autofattura ' + + 'denuncia (art.6c .8 d.lgs. 471/97))
' + + ' ' + + ' (Sel' + + 'bstfakturierung bei '#220'berschreiten des Plafonds)(Autofattura p' + + 'er splafonamento)' + + #9#9#9#9#9#9#9#9#9#9#9' (Warenentnahme au' + + 's dem Mehrwertsteuerlager)
(Estrazione beni da Deposito I' + + 'VA)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Warenentnahme au' + + 's dem Mehrwertsteuerlager mit Mehrwertsteuerzahlung)
(Est' + + 'razione beni da Deposito IVA con versamento dell'#39'IVA)' + + #9#9#9#9#9#9#9#9#9#9#9' (Aufgeschobene Re' + + 'chnung gem'#228#223' Artikel 21, Absatz 4, Buchstabe a))
(Fattura' + + ' differita di cui all'#39'art. 21, comma 4, lett. a))
' + + #9#9#9#9#9#9#9#9#9#9#9' (Aufgeschobene Re' + + 'chnung gem'#228#223' Artikel 21, Absatz 4, Dritter Satz Buchstabe b))(Fattura differita di cui all'#39'art. 21, comma 4, terzo perio' + + 'do lett. b))' + + #9#9#9#9#9#9#9#9#9#9#9' ('#220'bertragung von ' + + 'abschreibungsf'#228'higen G'#252'tern und f'#252'r interner Transaktionen (Art.' + + ' 36 DPR 633/72))
(Cessione di beni ammortizzabili e per p' + + 'assaggi interni (art.36 DPR 633/72))
' + + #9#9#9#9#9#9#9#9#9#9#9' (Rechnung f'#252'r Eig' + + 'enverbrauch oder f'#252'r kostenlose Abtretungen ohne Entsch'#228'digung)<' + + 'br/>(Fattura per autoconsumo o per cessioni gratuite senza ri' + + 'valsa)' + + ' ' + + ' ' + + ' ' + + ' (!!! fals' + + 'che Kennung !!!)(!!! codice non previsto !!!)' + + ' ' + + '
2.1.1.[4|3]Dok.-nummer und -datumNumero e data doc.'#160'-'#160'' + + ' ' + + '
2.1.1.9Gesamtbetrag Dokument
' + + 'Importo totale documento
'#160'
2.1.1.10Rundung auf dem Gesamtbetrag' + + '
Arrotondamento su Importo totale documento
2.1.1.11Grund
Causale' + + ' ' + + '
2.1.1.12Art. 73 DPR 633/' + + '72
' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + '

Einbehalte - Ritenuta

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' Art des Einbehaltes
Tipologia ritenuta' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.1.5.1' + + ' ' + + ' ' + + ' ' + + ' ' + + ' (ritenuta persone fisiche)' + + ' ' + + ' ' + + ' (ritenuta persone giuridiche)' + + ' ' + + ' ' + + ' ' + + ' ' + + ' (contributo INPS)' + + ' ' + + ' ' + + ' (contributo ENASARCO)' + + ' ' + + ' ' + + ' (contributo ENPAM)' + + ' ' + + ' ' + + ' (altro contributo previdenziale)' + + ' ' + + ' ' + + ' ' + + ' (!!!' + + ' falsche Kennung !!!)(!!! codice non previsto !!!)' + + ' ' + + ' ' + + ' ' + + '
2.1.1.5.2Einbehaltene' + + 'r Betrag
Importo ritenuta
'#160'
2.1.1.5.3Einbehaltsat' + + 'z
Aliquota ritenuta (%)
%
2.1.1.5.4Zahlungsgrun' + + 'd
Causale di pagamento
' + + ' (Kennung nach Modell 770S)(decodifica come da modello 770S)<' + + '/i>
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + '

Stempelwert - Bollo

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' Virtueller Stempelwert
Bollo virtuale' + + '' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.1.6.1
2.1.1.6.2Betrag Stemp' + + 'elwert
Importo bollo
'#160'
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '

F'#252'rsorgekasse - Cassa previdenziale

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' F'#252'rsorgekasse
Cassa previdenziale' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.1.7.1' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' (Cassa Nazionale Previdenza e Assistenza Avvocati e Procuratori' + + ' legali)' + + ' ' + + ' ' + + ' (Cassa Previdenza Dottori Commercialisti)' + + ' ' + + ' ' + + ' (Cassa Previdenza e Assistenza Geometri)' + + ' ' + + ' ' + + ' (Cassa Nazionale Previdenza e Assistenza Ingegneri e Architetti' + + ' liberi profess.)' + + ' ' + + ' ' + + ' (Cassa Nazionale del Notariato)' + + ' ' + + ' ' + + ' (Cassa Nazionale Previdenza e Assistenza Ragionieri e Periti co' + + 'mmerciali)' + + ' ' + + ' ' + + ' (Ente Nazionale Assistenza Agenti e Rappresentanti di Commercio' + + '-ENASARCO)' + + ' ' + + ' ' + + ' (Ente Nazionale Previdenza e Assistenza Consulenti del Lavoro-E' + + 'NPACL)' + + ' ' + + ' ' + + ' (Ente Nazionale Previdenza e Assistenza Medici-ENPAM)' + + ' ' + + ' ' + + ' (Ente Nazionale Previdenza e Assistenza Farmacisti-ENPAF)' + + ' ' + + ' ' + + ' (Ente Nazionale Previdenza e Assistenza Veterinari-ENPAV)' + + ' ' + + ' ' + + ' (Ente Nazionale Previdenza e Assistenza Impiegati dell'#39'Agricolt' + + 'ura-ENPAIA)' + + ' ' + + ' ' + + ' (Fondo Previdenza Impiegati Imprese di Spedizione e Agenzie Mar' + + 'ittime)' + + ' ' + + ' ' + + ' (Istituto Nazionale Previdenza Giornalisti Italiani-INPGI)' + + ' ' + + ' ' + + ' (Opera Nazionale Assistenza Orfani Sanitari Italiani-ONAOSI)' + + ' ' + + ' ' + + ' (Cassa Autonoma Assistenza Integrativa Giornalisti Italiani-CAS' + + 'AGIT)' + + ' ' + + ' ' + + ' (Ente Previdenza Periti Industriali e Periti Industriali Laurea' + + 'ti-EPPI)' + + ' ' + + ' ' + + ' (Ente Previdenza e Assistenza Pluricategoriale-EPAP)' + + ' ' + + ' ' + + ' (Ente Nazionale Previdenza e Assistenza Biologi-ENPAB)' + + ' ' + + ' ' + + ' (Ente Nazionale Previdenza e Assistenza Professione Infermieris' + + 'tica-ENPAPI)' + + ' ' + + ' ' + + ' (Ente Nazionale Previdenza e Assistenza Psicologi-ENPAP)' + + ' ' + + ' ' + + ' (INPS)' + + ' ' + + ' ' + + ' ' + + ' (!!!' + + ' falsche Kennung !!!)(!!! codice non previsto !!!)' + + ' ' + + '
2.1.1.7.4Grundlage F'#252 + + 'rsorgebeitrag
Imponibile previdenziale
'#160'
2.1.1.7.2F'#252'rsorgebeit' + + 'ragssatz (%)
Aliquota contri. cassa (%)
%
2.1.1.7.3F'#252'rsorgebeit' + + 'rag
Importo contributo cassa
'#160'
2.1.1.7.5MwSt-SatzAliquota IVA applicata %
2.1.1.7.6F'#252'rsorgebeit' + + 'rag im Abzug
Contributo cassa soggetto a ritenuta' + + ' ' + + '
2.1.1.7.7Art der Beit' + + 'ragsfreistellung
Tipologia di non imponibilit'#224' del contri' + + 'buto
' + + ' ' + + ' ' + + ' ' + + ' ' + + #9#9#9#9#9#9#9#9#9#9#9#9' (ausgenommener Ges' + + 'ch'#228'ftsvorg. ex Art. 15)
(escluse ex art. 15)' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht unterworfen' + + 'er Gesch'#228'ftsvorg. (darf nach dem 31.12.2020 nicht mehr verwendet' + + ' werden))
(non soggette (non pi'#249' utilizabile dopo il 31.1' + + '2.2020))
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht unterworf' + + 'ener Gesch'#228'ftsvorg. im Sinne der Artikel von 7 bis 7-septies des' + + ' DPR 633/72)
(Non soggette ad IVA ai sensi degli artt. da' + + ' 7 a 7- septies del DPR 633/72)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht unterworf' + + 'ener Gesch'#228'ftsvorg. '#8211' andere F'#228'lle)
(non soggette '#8211' altri' + + ' casi)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwertste' + + 'uerpflichtig (darf nach dem 31.12.2020 nicht mehr verwendet werd' + + 'en) )
(non imponibili (non pi'#249' utilizabile dopo il 31.12.' + + '2020))
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwerts' + + 'teuerpflichtig--Export)
(non imponibili '#8211' esportazioni)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwerts' + + 'teuerpflichtig--innergemeinschaftliche Verk'#228'ufe)
(non imp' + + 'onibili '#8211' cessioni intracomunitarie)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwerts' + + 'teuerpflichtig--Verk'#228'ufe nach San Marino)
(non imponibili' + + ' '#8211' cessioni verso San Marino)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwerts' + + 'teuerpflichtig--als Exporte behandelte Transaktionen)
(no' + + 'n imponibili '#8211' operazioni assimilate alle cessioni all'#8217'esportazi' + + 'one)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwerts' + + 'teuerpflichtig--nach einer Absichtserkl'#228'rung)
(non imponi' + + 'bili '#8211' a seguito di dichiarazioni d'#8217'intento)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwerts' + + 'teuerpflichtig--andere Operationen, die nicht zur Bildung des Pl' + + 'afonds beitragen)
(non imponibili '#8211' altre operazioni che ' + + 'non concorrono alla formazione del plafond)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (befreit)
(' + + 'esenti)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (im Rahmen der Dif' + + 'ferenzbesteuerung)
(regime del margine)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Umkehrung der Ste' + + 'uerschuldnerschaft(darf nach dem 31.12.2020 nicht mehr verwendet' + + ' werden))
(inversione contabile (non pi'#249' utilizabile dopo' + + ' il 31.12.2020))
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - Verkauf von Schrott und ' + + 'anderen recycelten Materialien)
(inversione contabile '#8211' c' + + 'essione di rottami e altri materiali di recupero)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - Verkauf von reinem Gold ' + + 'und Silber)
(inversione contabile '#8211' cessione di oro e arg' + + 'ento puro)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - Unterauftr'#228'ge im Bausekt' + + 'or)
(inversione contabile '#8211' subappalto nel settore edile)' + + '
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - Verkauf von Geb'#228'uden)(inversione contabile '#8211' cessione di fabbricati)' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - Verkauf von Mobiltelefon' + + 'en)
(inversione contabile '#8211' cessione di telefoni cellular' + + 'i)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - Verkauf von elektronisch' + + 'en Ger'#228'ten)
(inversione contabile '#8211' cessione di prodotti ' + + 'elettronici)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - Dienstleistungen des Bau' + + 'sektors und damit verwandte Sektoren)
(inversione contabi' + + 'le '#8211' prestazioni comparto edile e settori connessi)' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - Operationen im Energiese' + + 'ktor)
(inversione contabile '#8211' operazioni settore energeti' + + 'co)
' + + #9#9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge ' + + '(Umkehrung der Steuerschuldnerschaft) - andere F'#228'lle)
(in' + + 'versione contabile '#8211' altri casi)
' + + ' ' + + ' ' + + #9#9#9#9#9#9#9#9#9#9#9#9' (MwSt.-Schuld in e' + + 'inem anderen EU-Land abgegolten)(IVA assolta in altro stato U' + + 'E)
' + + ' ' + + ' ' + + ' ' + + ' (!!!' + + ' falsche Kennung !!!)(!!! codice non previsto !!!)' + + ' ' + + '
2.1.1.7.8Hinweis Verw' + + 'altung / Buchhaltung
Riferimento amministrativo / contabi' + + 'le
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Skonto/Aufschl'#228'ge - Sconto/maggiorazione

' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.1.8.[2|1]Prozentsatz-Typologie
Percentuale e t' + + 'ipologia
' + + ' ' + + ' ' + + ' ' + + ' % ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '(Skonto)(sconto)' + + ' ' + + ' ' + + '(Aufpreis)(maggiorazione)' + + ' ' + + ' (!!' + + '! falsche Kennung !!!)(!!! codice non previsto !!!)' + + ' ' + + '
2.1.1.8.3Betrag
<' + + 'i>Importo
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' -' + + ' ' + + ' +' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' ' + '' + + ' ' + '
' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten zur Bestellung - Dati dell'#39'ordine di acquisto<' + + '/h3>' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.2.1Zugeh'#246'rige Zeilennummer der Rechnung
Numero linea di ' + + 'fattura a cui si riferisce
,' + + '
2.1.2.2Bestellkennung
Ident. ordine di acquisto
2.1.2.3Bestellungsdatum
' + + 'Data ordine di acquisto
2.1.2.4Zeilennummer der Bestell' + + 'ung
Numero linea ordine di acquisto
<' + + '/span>
2.1.2.5Verkaufs-/Konventionskod' + + 'ex
Codice commessa/convenzione
2.1.2.6Staatlicher Projektkodex' + + '
Codice Unitario Progetto (CUP)
2.1.2.7Ausschreibungskode
<' + + 'i>Codice Ident. Gara (CIG)
' + + ' ' + ' ' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Vertragsdaten - Dati del contratto

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.3.1Zugeh'#246'rige Zeilennummer der Rechnung
Numero linea di ' + + 'fattura a cui si riferisce
,' + + '
2.1.3.2Vertragskenndaten
Ident. contratto
2.1.3.3Vertagsdatum
Data' + + ' contratto
2.1.3.4Zeilennummer Vertrag
Numero linea contratto
<' + + '/span>
2.1.3.5Verk.-/Konv.-kodex
<' + + 'i>Codice comm./conv.
2.1.3.6Staatlicher Projektkodex' + + '
Codice Unitario Progetto
2.1.3.7Ausschreibungskode
<' + + 'i>Codice Ident. Gara (CIG)
' + + ' ' + '
' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten der Konvention - Dati della convenzione

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.4.1Zugeh'#246'rige Zeilennummer der Rechnung
Numero linea di ' + + 'fattura a cui si riferisce
,' + + '
2.1.4.2Konventionskennung
<' + + 'i>Ident. convenzione
2.1.4.3Datum Konvention
' + + 'Data convenzione
2.1.4.4Zeilennummer Konvention<' + + 'br/>Numero linea convenzione<' + + '/span>
2.1.4.5Verkaufs- / Konventionsk' + + 'odex
Codice commessa/convenzione
2.1.4.6Staatlicher Projektkodex' + + '
Codice Unitario Progetto (CUP)
2.1.4.7Ausschreibungskode
<' + + 'i>Codice Ident. Gara (CIG)
' + + ' ' + '
' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten zum Erhalt der Leistung - Dati della ricezione' + + '

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.5.1Zugeh'#246'rige Zeilennummer der Rechnung
Numero linea di ' + + 'fattura a cui si riferisce
,' + + '
2.1.5.2Kennzeichen des Empfangs' + + '
Ident. ricezione
2.1.5.3Empfangsdatum
Dat' + + 'a ricezione
2.1.5.4Zeilennummer des Empfang' + + 's
Numero linea ricezione
<' + + '/span>
2.1.5.5Verkaufs- / Konventionsk' + + 'ennung
Codice commessa/convenzione
2.1.5.6Staatlicher Projektkodex' + + '
Codice Unitario Progetto (CUP)
2.1.5.7AusschreibungskennungCodice Ident. Gara (CIG)
' + + ' ' + '
' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten zu verbundenen Rechnungen - Dati della fattura col' + + 'legata

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.6.1Zugeh'#246'rige Zeilennummer der Rechnung
Numero linea di ' + + 'fattura a cui si riferisce
,' + + '
2.1.6.2Kennzeichen der dazugeh'#246 + + 'renden Rechnung
Ident. fattura collegata
2.1.6.3Datum der dazugeh'#246'renden' + + ' Rechnung
Data fattura collegata
2.1.6.4Zeilennummer bei der daz' + + 'ugeh'#246'renden Rechnung
Numero linea fattura collegata' + + ' ' + + '
<' + + '/span>
2.1.6.5Verkaufs- / Konventionsk' + + 'odex
Codice commessa/convenzione
2.1.6.6Staatlicher Projektkodex' + + '
Codice Unitario Progetto (CUP)
2.1.6.7AusschreibungskennungCodice Ident. Gara (CIG)
' + + ' ' + '
' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Baufortschritt - Stato avanzamento lavori

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.7.1N' + + 'ummer Baufortschritt
Numero fase avanzamento
,
' + + ' ' + '
' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten zum Warenbegleitschein (WBS) - Dati del documento ' + + 'di trasporto (DDT)

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.8.[1|2|3]Nummer, Datum WBS
Numer' + + 'o data DDT
' + + ' ' + + ' ' + + ' ' + + ' vom/del'#160'' + + '' + + ' ' + + '
' + + 'Betrifft Zeile/Rif.linea'#160',
' + + ' ' + + '
' + + ' ' + '
' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten zum Warentransport - Dati relativi al trasporto

' + + ' ' + + ' ' + + ' ' + + '

Daten des Fr'#228'chters - Dati del vettore

' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.9.1.3.1Benennung
Denominazione
2.1.9.1.3.4HonorartitelTitolo onorifico
2.1.9.1.3.2Name
Nome
2.1.9.1.3.3Nachname
Cognome
2.1.9.1.1Mehrwertsteuernum' + + 'mer
Ident. fiscale ai fini IVA
<' + + '/span>
2.1.9.1.2Steuernummer
' + + 'Codice Fiscale
2.1.9.1.3.5EORI-KennungCodice EORI
2.1.9.1.4F'#252'hrerscheinnumme' + + 'r
Numero licenza di guida

Weitere Daten - Altri dati<' + + '/h4>

2.1.9.2Transortmittel
' + + 'Mezzo di trasporto
2.1.9.3Transportgrund
' + + 'Causale trasporto
2.1.9.4Anzahl der Frachtst' + + #252'cke
Numero colli trasportati
2.1.9.5Beschreibung der tr' + + 'ansportierten G'#252'ter
Descrizione beni trasportati
2.1.9.6Messeinheit der War' + + 'e
Unit'#224' di misura del peso merce
2.1.9.7Bruttogewicht
<' + + 'i>Peso lordo
2.1.9.8Nettogewicht
Peso netto
2.1.9.9Datum und Zeit der ' + + 'Abgabe
Data e ora ritiro merce
2.1.9.10Datum Transportbeg' + + 'inn
Data inizio trasporto
' + + ' ' + + '
2.1.9.11Typologie der Abga' + + 'be
Tipologia di resa
(Kodifizierung nach ICC-Standard)
(codifica ' + + 'secondo standard ICC)
2.1.9.12.1Adresse der Abga' + + 'be
Indirizzo di resa
2.1.9.12.2Hausnummer Abgab' + + 'eadresse
Numero civico indirizzo di resa
2.1.9.12.3PLZ Adresse Abga' + + 'be
CAP indirizzo di resa
2.1.9.12.4Gemeinde Abgabe<' + + 'br/>Comune di resa
2.1.9.12.5Provinz AbgabeProvincia di resa
2.1.9.12.6Land der Abgabe<' + + 'br/>Nazione di resa
2.1.9.13Land der AbgabeNazione di resa
' + + ' ' + '
' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten zur Hauptrechnung - Dati relativi alla fattura pri' + + 'ncipale

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.1.10.1Nummer der Hauptrechnung
<' + + 'i>Numero fattura principale
' + + ' ' + + '
2.1.10.2Datum Hauptrechnung
Dat' + + 'a fattura principale
' + + '
' + + ' ' + '
' + + ' ' + '' + '

' + '
' + + ' ' + '' + + ' ' + + ' ' + + '
' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten zur Lieferung - Dati relativi alle linee di dettag' + + 'lio della fornitura

' + + ' ' + + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + ' ' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Daten zur MwSt. nach Satz und Art - Dati di riepilogo pe' + + 'r aliquota IVA e natura

' + + ' ' + + '
NrBeschreibung
Descrizione cessione/presta' + + 'zione
Menge
Quantit'#224'
ME
UM
Preis
Prezzo
Skonto
Sconto
Preis gesamt
Prezzo totale
MwSt
IVA
(%)
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' (Skonto)(sconto)' + + ' ' + + ' (Pr'#228'mie)(premio)' + + ' ' + + ' (Gutschrift)(abbuon' + + 'o)' + + ' ' + + ' (Zusatzspesen)(spes' + + 'a accessoria)' + + ' ' + + ' (!!! falsche Kennung !!!)<' + + 'i>(!!! codice non previsto !!!)' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' Hinweis Verwaltung / Buchhaltung RiferimentoAmminist' + + 'razione' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' Datum Beginn des Leistu' + + 'ngszeitraumes inizio periodo di riferimento: ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' Datum Ende des Leistung' + + 'szeitraumes Data fine periodo di riferimento: ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + #9#9#9#9#9#9#9#9#9'
' + + #9#9#9#9#9#9#9#9#9#9#9#9' ' + #9#9#9#9#9#9#9#9#9#9#9#9' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' (Skonto)(sc' + + 'onto)' + + ' ' + + ' (Aufpreis)(' + + 'maggiorazione)' + + ' ' + + ' (!!! falsche Kennun' + + 'g !!!)(!!! codice non previsto !!!)' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' '#9'' + + ' ' + + ' '#9#9'-' + + ' ' + + ' '#9#9'+' + + ' ' + + ' '#9'' + + ' ' + + ' %
' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' '#9#9' -' + + ' ' + + ' '#9#9' +' + + ' ' + + ' '#9'' + + ' ' + + '
' + + ' ' + + '

' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
MwSt
Aliq.
Art
Natura
Spesen
Spese
Rundung
Arroton.
Grundlage
Imponibile
Steuer
Imposta
F'#228'lligkeit
Esigibilita
Ges.Bezug
Rif.Norma
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' <' + + 'xsl:value-of select="Natura"/>' + + ' ' + + ' ' + + ' ' + + ' ' + + #9#9#9#9#9#9#9#9#9#9#9' (ausgenommener Gesc' + + 'h'#228'ftsvorg. ex Art. 15)
(escluse ex art. 15)' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht unterworfene' + + 'r Gesch'#228'ftsvorg.(darf nach dem 31.12.2020 nicht mehr verwendet w' + + 'erden))
(non soggette (non pi'#249' utilizabile dopo il 31.12.' + + '2020))
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht unterworfe' + + 'ner Gesch'#228'ftsvorg. im Sinne der Artikel von 7 bis 7-septies des ' + + 'DPR 633/72)
(Non soggette ad IVA ai sensi degli artt. da ' + + '7 a 7- septies del DPR 633/72)
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht unterworfe' + + 'ner Gesch'#228'ftsvorg. '#8211' andere F'#228'lle)
(non soggette '#8211' altri ' + + 'casi)
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwertsteu' + + 'erpflichtig-(darf nach dem 31.12.2020 nicht mehr verwendet werde' + + 'n))
(non imponibili (non pi'#249' utilizabile dopo il 31.12.20' + + '20))
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwertst' + + 'euerpflichtig--Export)
(non imponibili '#8211' esportazioni)
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwertst' + + 'euerpflichtig--innergemeinschaftliche Verk'#228'ufe)
(non impo' + + 'nibili '#8211' cessioni intracomunitarie)
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwertst' + + 'euerpflichtig--Verk'#228'ufe nach San Marino)
(non imponibili ' + + #8211' cessioni verso San Marino)
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwertst' + + 'euerpflichtig--als Exporte behandelte Transaktionen)
(non' + + ' imponibili '#8211' operazioni assimilate alle cessioni all'#8217'esportazio' + + 'ne)
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwertst' + + 'euerpflichtig--nach einer Absichtserkl'#228'rung)
(non imponib' + + 'ili '#8211' a seguito di dichiarazioni d'#8217'intento)
' + + #9#9#9#9#9#9#9#9#9#9#9' (nicht Mehrwertst' + + 'euerpflichtig--andere Operationen, die nicht zur Bildung des Pla' + + 'fonds beitragen)
(non imponibili '#8211' altre operazioni che n' + + 'on concorrono alla formazione del plafond)
' + + #9#9#9#9#9#9#9#9#9#9#9' (befreit)
(e' + + 'senti)
' + + #9#9#9#9#9#9#9#9#9#9#9' (im Rahmen der Diff' + + 'erenzbesteuerung)
(regime del margine)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Umkehrung derSteue' + + 'rschuldnerschaft(darf nach dem 31.12.2020 nicht mehr verwendet w' + + 'erden))
(inversione contabile (non pi'#249' utilizabile dopo i' + + 'l 31.12.2020))
' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - Verkauf von Schrott und a' + + 'nderen recycelten Materialien)
(inversione contabile '#8211' ce' + + 'ssione di rottami e altri materiali di recupero)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - Verkauf von reinem Gold u' + + 'nd Silber)
(inversione contabile '#8211' cessione di oro e arge' + + 'nto puro)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - Unterauftr'#228'ge im Bausekto' + + 'r)
(inversione contabile '#8211' subappalto nel settore edile)<' + + '/i>
' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - Verkauf von Geb'#228'uden)
(inversione contabile '#8211' cessione di fabbricati)' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - Verkauf von Mobiltelefone' + + 'n)
(inversione contabile '#8211' cessione di telefoni cellulari' + + ')
' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - Verkauf von elektronische' + + 'n Ger'#228'ten)
(inversione contabile '#8211' cessione di prodotti e' + + 'lettronici)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - Dienstleistungen des Baus' + + 'ektors und damit verwandte Sektoren)
(inversione contabil' + + 'e '#8211' prestazioni comparto edile e settori connessi)' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - Operationen im Energiesek' + + 'tor)
(inversione contabile '#8211' operazioni settore energetic' + + 'o)
' + + #9#9#9#9#9#9#9#9#9#9#9' (Reverse-Charge (' + + 'Umkehrung der Steuerschuldnerschaft) - andere F'#228'lle)
(inv' + + 'ersione contabile '#8211' altri casi)
' + + ' ' + + ' ' + + #9#9#9#9#9#9#9#9#9#9#9' (MwSt.-Schuld in ei' + + 'nem anderen EU-Land abgegolten)
(IVA assolta in altro sta' + + 'to UE)
' + + ' ' + + ' ' + + ' ' + + ' (!!! falsche K' + + 'ennung !!!)(!!! codice non previsto !!!)' + + ' ' + + '
' + + ' ' + + '
' + + '<' + + '/span>' + + ' ' + + ' ' + + ' ' + + ' (esigibilit'#224 + + ' immediata)' + + ' ' + + ' (esigibilit'#224 + + ' differita)' + + ' ' + + ' (scissione d' + + 'ei pagamenti)' + + ' ' + + ' (!!! falsche K' + + 'ennung !!!)(!!! codice non previsto !!!)' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + '
' + + ' ' + '' + '
' + '
' + + ' ' + '' + + ' ' + + ' ' + + '

Daten zum Transportfahrzeug - Dati Veicoli ex ar' + + 't. 38 dl 331/1993

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + '
2.3.1Datum Er' + + 'steinschreibung des Fahrzeuges
prima immatricolazione / ' + + 'iscrizione PR
' + + '
2.3.2Gesamtl'#228'nge Fahrt
Totale perc' + + 'orso
' + '
' + '
' + + ' ' + '' + + ' ' + + ' ' + + '
' + + '

Daten' + + ' zur Bezahlung - Dati relativi al pagamento

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.4.1Zahlungs' + + 'bedingungen
Condizioni di pagamento
' + + ' ' + + ' ' + + ' ' + + ' (Ratenzahlung)(p' + + 'agamento a rate)' + + ' ' + + ' (Einmalzahlung)(' + + 'pagamento completo)' + + ' ' + + ' (Vorauszahlung)(' + + 'anticipo)' + + ' ' + + ' ' + + ' ' + + ' (!!! falsche Kennung !!!' + + ')(!!! codice non previsto !!!)' + + ' ' + + '
' + + ' ' + + '
' + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '

Rate Nr. Rata N'#176':'#160''#160'' + + '

' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
2.4.2.1Z' + + 'ahlungsempf'#228'nger
Beneficiario pagamento
2.4.2.2Zahlungsmodalit'#228't
Modalit'#224' di pagamento
' + + ' ' + + ' ' + + ' ' + + ' (bar)(' + + 'contanti)' + + ' ' + + ' (Scheck)<' + + 'i>(assegno)' + + ' ' + + ' (Zirkular' + + 'scheck)(assegno circolare)' + + ' ' + + ' ('#252'ber Sch' + + 'atzamt)(contanti presso Tesoreria)' + + ' ' + + ' ('#220'berweis' + + 'ung)(bonifico)' + + ' ' + + ' (Wechsel)' + + '(vaglia cambiario)' + + ' ' + + ' (Bankmitt' + + 'eilung)(bollettino bancario)' + + ' ' + + ' (Zahlkart' + + 'e)(carta di pagamento)' + + ' ' + + ' (RID)' + + ' ' + + ' (RID norm' + + 'al)(RID utenze)' + + ' ' + + ' (RID Schn' + + 'ell)(RID veloce)' + + ' ' + + ' (RIBA)' + + ' ' + + ' (MAV)' + + ' ' + + ' (quietanz' + + 'a erario)' + + ' ' + + ' (girocont' + + 'o su conti di con' + + ' ' + + ' (Bankdaue' + + 'rauftrag)(domiciliazione bancaria)' + + ' ' + + ' (Postdaue' + + 'rauftrag)(domiciliazione postale)' + + ' ' + + ' (Post'#252'ber' + + 'weisung)(bollettino di c/c postale)' + + ' ' + + ' (SEPA Dir' + + 'ect Debit)' + + ' ' + + ' (SEPA Dir' + + 'ect Debit CORE)' + + ' ' + + ' (SEPA Dir' + + 'ect Debit B2B)' + + ' ' + + ' ' + + ' ' + + ' (Einbehal' + + 't auf bereits bezahlte Summe)(Trattenuta su somme gi'#224' riscoss' + + 'e)' + + ' ' + + ' ' + + ' ' + + ' (pagoPA)<' + + 'i>(pagoPA)' + + ' ' + + ' ' + + ' ' + + ' (!!! falsche K' + + 'ennung !!!)(!!! codice non previsto !!!)' + + ' ' + + ' ' + + ' ' + + '
2.4.2.3Beginn Zahlungsfris' + + 't
Dec. termine pagamento
2.4.2.4Zahlungsziel (Tagen' + + ')
Term. pagamento (giorni)
2.4.2.5Ende ZahlungszielData scadenza pagamento
2.4.2.6Betrag
Impor' + + 'to
'#160'
2.4.2.7Kennung Postamt
Codice Ufficio Postale
2.4.2.11Titel des Quittier' + + 'enden
Titolo del quietanzante
2.4.2.8Name des Quittieren' + + 'den
Nome del quietanzante
2.4.2.9Nachname des Quitti' + + 'erenden
Cognome del quietanzante
2.4.2.10StNr. des Quittier' + + 'enden
CF del quietanzante
2.4.2.12Finanzinstitut
Istituto finanziario
2.4.2.13IBAN
Codice' + + ' IBAN
2.4.2.14ABI
Codice ' + + 'ABI
' + + '
2.4.2.15CAB
Codice ' + + 'CAB
' + + '
2.4.2.16BIC
Codice ' + + 'BIC
' + + '
2.4.2.17Skonto f'#252'r Zahlung' + + ' vor Zahlungsziel
Sconto per pagamento anticipato' + + ' ' + + '
2.4.2.18letzter Termin f'#252'r' + + ' Zahlung vor Zahlungsziel
' + + ' ' + + ' Data limite per il pagamento antici' + + 'pato
2.4.2.19P'#246'nale f'#252'r versp'#228't' + + 'ete Zahlung
Penale per ritardato pagamento
2.4.2.20Beginndatum f'#252'r An' + + 'wendung der P'#246'nale
Data di decorrenza della penale' + + ' ' + + '
2.4.2.21Zahlungs-KennungCodice pagamento
' + + ' ' + + '
' + + ' ' + + '
' + + ' ' + '
' + '
' + + ' ' + '' + + ' ' + + ' ' + + '

Daten zu den Anlagen - Dati relativi agli allegati

' + + ' ' + + ' ' + + ' ' + + ' ' + + ' 2.5.1Name der' + + ' Anlage
Nome dell'#39'allegato' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 2.5.2Kompressionsalgoritmus
Algori' + + 'tmo di compressione' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 2.5.3Format
Formato' + + ' ' + + ' <' + + '/span>' + + ' ' + + '
' + + ' ' + + ' ' + + ' ' + + ' 2.5.4' + + ' ' + + ' Beschreibung
Descrizione' + + ' ' + + ' ' + + ' ' + + '
' + + ' ' + + ' ' + '
' + '
' + + ' ' + '' + '
' + ' ' + '
' + ' ' + ' ' + ' ' + '') + Left = 39 + Top = 160 + DOMVendorDesc = 'MSXML' + end end diff --git a/Source/FExplorer.Resources.pas b/Source/FExplorer.Resources.pas index 54ea2ae..3c41a8c 100644 --- a/Source/FExplorer.Resources.pas +++ b/Source/FExplorer.Resources.pas @@ -102,6 +102,7 @@ TLegalInvoice = record const ADE_TEMPLATE_XSLT = 'AgenziaEntrate'; const ASSOSOFTWARE_XSLT = 'AssoSoftware'; const CUSTOM_XSLT = 'Custom'; + const TEMPLATE_SUDTIROL_XSLT = 'SudTirolo_ITA_DEU'; const EDITING_XSLT = 'Editing'; constructor Create(const AXML: string; const AParseImmediately: Boolean = True); @@ -127,6 +128,7 @@ TdmResources = class(TDataModule) SynXSLSyn: TSynXMLSyn; SynXSLSynDark: TSynXMLSyn; EditingTemplate: TXMLDocument; + SudTirolo_ITA_DEU: TXMLDocument; procedure DataModuleCreate(Sender: TObject); private public @@ -147,6 +149,7 @@ implementation uses Windows + , uLogExcept , System.StrUtils , System.IOUtils , System.NetEncoding @@ -290,6 +293,8 @@ procedure TLegalInvoice.Parse; begin //Inizializza il Documento XML + TLogPreview.Add('TLegalInvoice.Parse INIT'); + LXMLDoc := LoadXMLData(XML); LXSLTOutput := ''; @@ -298,6 +303,8 @@ procedure TLegalInvoice.Parse; Transform(dmResources.AgenziaEntrateTemplate) else if (StylesheetName = ASSOSOFTWARE_XSLT) or (StylesheetName = '') then Transform(dmResources.AssoSoftwareTemplate) + else if (StylesheetName = TEMPLATE_SUDTIROL_XSLT) then + Transform(dmResources.SudTirolo_ITA_DEU) else if (StylesheetName = CUSTOM_XSLT) then Transform(dmResources.CustomTemplate) else if (StylesheetName = EDITING_XSLT) then @@ -308,6 +315,7 @@ procedure TLegalInvoice.Parse; ParseAllegati(LXMLDoc); FParsed := True; + TLogPreview.Add('TLegalInvoice.Parse DONE'); end; procedure TLegalInvoice.ParseAllegati(const AXMLDoc: IXMLDocument); diff --git a/Source/FExplorer.Settings.pas b/Source/FExplorer.Settings.pas index 2c884ff..0804a59 100644 --- a/Source/FExplorer.Settings.pas +++ b/Source/FExplorer.Settings.pas @@ -81,6 +81,7 @@ TSettings = class FUseDarkStyle: boolean; FXMLFontName: string; FShowXML: Boolean; + FShowIcon: Boolean; FPreferD2D: Boolean; FActivePageIndex: Integer; FThemeSelection: TThemeSelection; @@ -111,7 +112,7 @@ TSettings = class class property SettingsFileName: string read GetSettingsFileName; procedure UpdateSettings(const AXMLFontName, AHTMLFontName: string; - AXMLFontSize, AHTMLFontSize: Integer; AEditorVisible: Boolean); + AXMLFontSize, AHTMLFontSize: Integer; AEditorVisible: Boolean; AIconVisible: Boolean); procedure ReadSettings(const ASynEditHighilighter: TSynCustomHighlighter; const ASynEditorOptions: TSynEditorOptionsContainer); virtual; procedure WriteSettings(const ASynEditHighilighter: TSynCustomHighlighter; @@ -126,6 +127,7 @@ TSettings = class property HTMLFontName: string read FHTMLFontName write FHTMLFontName; property StyleName: string read FStyleName write FStyleName; property ShowXML: Boolean read FShowXML write FShowXML; + property ShowIcon: Boolean read FShowIcon write FShowIcon; property SplitterPos: Integer read FSplitterPos write FSplitterPos; property PreferD2D: Boolean read FPreferD2D write SetPreferD2D; property SVGEngine: TSVGEngine read FSVGEngine write SetSVGEngine; @@ -351,6 +353,7 @@ procedure TSettings.ReadSettings(const ASynEditHighilighter: TSynCustomHighlight FXMLFontName := FIniFile.ReadString('Global', 'XMLFontName', 'Consolas'); FHTMLFontName := FIniFile.ReadString('Global', 'HTMLFontName', 'Arial'); FShowXML := FIniFile.ReadInteger('Global', 'ShowXML', 0) = 1; + FShowIcon := FIniFile.ReadInteger('Global', 'ShowIcon', 1) = 1; FSplitterPos := FIniFile.ReadInteger('Global', 'SplitterPos', 33); LPreferD2D := FIniFile.ReadInteger('Global', 'PreferD2D', 0); PreferD2D := not ((LPreferD2D = 0) or (LPreferD2D = 255)); @@ -425,13 +428,14 @@ procedure TSettings.SetSVGEngine(const Value: TSVGEngine); end; procedure TSettings.UpdateSettings(const AXMLFontName, AHTMLFontName: string; - AXMLFontSize, AHTMLFontSize: Integer; AEditorVisible: Boolean); + AXMLFontSize, AHTMLFontSize: Integer; AEditorVisible: Boolean; AIconVisible: Boolean); begin XMLFontSize := AXMLFontSize; XMLFontName := AXMLFontName; HTMLFontSize := AHTMLFontSize; HTMLFontName := AHTMLFontName; ShowXML := AEditorVisible; + ShowIcon:= AIconVisible; end; procedure TSettings.WriteSettings(const ASynEditHighilighter: TSynCustomHighlighter; @@ -449,6 +453,7 @@ procedure TSettings.WriteSettings(const ASynEditHighilighter: TSynCustomHighligh FIniFile.WriteString('Global', 'StyleName', FStyleName); FIniFile.WriteInteger('Global', 'ShowXML', Ord(FShowXML)); + FIniFile.WriteInteger('Global', 'ShowIcon', Ord(FShowIcon)); FIniFile.WriteInteger('Global', 'SplitterPos', FSplitterPos); FIniFile.WriteInteger('Global', 'PreferD2D', Ord(FPreferD2D)); FIniFile.WriteInteger('Global', 'SVGEngine', Ord(FSVGEngine)); diff --git a/Source/FExplorer.SettingsForm.dfm b/Source/FExplorer.SettingsForm.dfm index 7832939..81f8ca9 100644 --- a/Source/FExplorer.SettingsForm.dfm +++ b/Source/FExplorer.SettingsForm.dfm @@ -14,12 +14,10 @@ object SVGSettingsForm: TSVGSettingsForm Font.Height = -12 Font.Name = 'Segoe UI' Font.Style = [] - OldCreateOrder = False Position = poDefault ShowHint = True OnCreate = FormCreate OnDestroy = FormDestroy - PixelsPerInch = 96 TextHeight = 15 object TLabel Left = 4 @@ -61,31 +59,8 @@ object SVGSettingsForm: TSVGSettingsForm Items.Strings = ( 'AssoSoftware' 'AgenziaEntrate' + 'SudTirolo_ITA_DEU' 'Custom') - ExplicitWidth = 209 - end - end - object IconStyleGroupBox: TGroupBox - Left = 3 - Top = 236 - Width = 310 - Height = 62 - Caption = 'Stile anteprima Icone' - TabOrder = 2 - DesignSize = ( - 310 - 62) - object IconStyleSheetComboBox: TComboBox - Left = 16 - Top = 24 - Width = 281 - Height = 23 - Anchors = [akLeft, akTop, akRight] - TabOrder = 0 - Text = 'Default' - Items.Strings = ( - 'Default') - ExplicitWidth = 209 end end object RenderingGroupBox: TGroupBox @@ -115,6 +90,51 @@ object SVGSettingsForm: TSVGSettingsForm TabOrder = 1 end end + object GUIElementsGroupBox: TGroupBox + Left = 2 + Top = 236 + Width = 310 + Height = 147 + Caption = 'Visualizzazione elementi interfaccia utente' + TabOrder = 2 + DesignSize = ( + 310 + 147) + object IconStyleLabel: TLabel + Left = 14 + Top = 74 + Width = 111 + Height = 15 + Caption = 'Stile anteprima Icona' + end + object ShowIconCheckBox: TCheckBox + Left = 14 + Top = 52 + Width = 280 + Height = 18 + Caption = 'Mostra anteprima icona' + TabOrder = 1 + end + object IconStyleSheetComboBox: TComboBox + Left = 14 + Top = 95 + Width = 280 + Height = 23 + Anchors = [akLeft, akTop, akRight] + TabOrder = 2 + Text = 'Default' + Items.Strings = ( + 'Default') + end + object ShowXMLCheckBox: TCheckBox + Left = 14 + Top = 25 + Width = 280 + Height = 17 + Caption = 'Mostra testo originale (XML)' + TabOrder = 0 + end + end end object stTheme: TTabSheet Caption = 'Tema' @@ -173,61 +193,53 @@ object SVGSettingsForm: TSVGSettingsForm Left = 16 Top = 164 Width = 281 - Height = 149 + Height = 130 Caption = 'Testo XML' TabOrder = 1 object FontLabel: TLabel Left = 8 - Top = 44 + Top = 22 Width = 57 Height = 15 Caption = 'Font name' end object SizeLabel: TLabel Left = 8 - Top = 90 + Top = 72 Width = 63 Height = 15 Caption = 'Dimensione' end object XMLFontComboBox: TComboBox Left = 8 - Top = 61 + Top = 39 Width = 225 Height = 22 Style = csOwnerDrawFixed Sorted = True - TabOrder = 1 + TabOrder = 0 OnDrawItem = FontDrawItem end object XMLFontSizeEdit: TEdit Left = 8 - Top = 107 + Top = 89 Width = 34 Height = 23 Alignment = taRightJustify NumbersOnly = True - TabOrder = 2 + TabOrder = 1 Text = '12' end object XMLUpDown: TUpDown Left = 42 - Top = 107 + Top = 89 Width = 16 Height = 23 Associate = XMLFontSizeEdit Min = 8 Max = 30 Position = 12 - TabOrder = 3 - end - object ShowXMLCheckBox: TCheckBox - Left = 8 - Top = 24 - Width = 121 - Height = 17 - Caption = 'Mostra testo XML' - TabOrder = 0 + TabOrder = 2 end end object HTMLGroupBox: TGroupBox @@ -237,14 +249,14 @@ object SVGSettingsForm: TSVGSettingsForm Height = 121 Caption = 'Testo HTML (default)' TabOrder = 0 - object Label1: TLabel + object HTMLFontNameLabel: TLabel Left = 8 Top = 19 Width = 57 Height = 15 Caption = 'Font name' end - object Label2: TLabel + object HTMLSizeLabel: TLabel Left = 8 Top = 65 Width = 63 @@ -578,6 +590,7 @@ object SVGSettingsForm: TSVGSettingsForm AutoSize = False ImageList = OrientationImageList ImageIndex = 0 + ImageName = 'portrait' end object OrientationRadioGroup: TRadioGroup Left = 16 @@ -754,6 +767,8 @@ object SVGSettingsForm: TSVGSettingsForm end> TabOrder = 2 OnButtonClicked = MenuButtonGroupButtonClicked + ExplicitLeft = 1 + ExplicitTop = 35 end object TitlePanel: TPanel Left = 0 @@ -767,8 +782,8 @@ object SVGSettingsForm: TSVGSettingsForm TabOrder = 3 end object OpenDialog: TOpenDialog - Left = 592 - Top = 352 + Left = 634 + Top = 372 end object SettingsImageList: TSVGIconImageList Size = 36 @@ -865,8 +880,8 @@ object SVGSettingsForm: TSVGSettingsForm '17V13H18.5V11.5H17V10.5H18.5V9Z" />' end> Scaled = True - Left = 492 - Top = 368 + Left = 570 + Top = 307 end object OrientationImageList: TSVGIconImageList Size = 128 @@ -894,7 +909,7 @@ object SVGSettingsForm: TSVGSettingsForm '65v12.5c0,1.4,1.1,2.5,2.5,2.5H90V80z"/>'#13#10''#13#10 end> Scaled = True - Left = 356 - Top = 336 + Left = 596 + Top = 232 end end diff --git a/Source/FExplorer.SettingsForm.pas b/Source/FExplorer.SettingsForm.pas index 676e5d6..67c6054 100644 --- a/Source/FExplorer.SettingsForm.pas +++ b/Source/FExplorer.SettingsForm.pas @@ -87,14 +87,11 @@ TSVGSettingsForm = class(TForm) XMLFontSizeEdit: TEdit; XMLUpDown: TUpDown; HTMLGroupBox: TGroupBox; - Label1: TLabel; - Label2: TLabel; + HTMLFontNameLabel: TLabel; + HTMLSizeLabel: TLabel; HTMLFontComboBox: TComboBox; HTMLFontSizeEdit: TEdit; HTMLUpDown: TUpDown; - IconStyleGroupBox: TGroupBox; - IconStyleSheetComboBox: TComboBox; - ShowXMLCheckBox: TCheckBox; tsAdvanced: TTabSheet; AllowEditCheckBox: TCheckBox; DeveloperGroupBox: TGroupBox; @@ -117,6 +114,11 @@ TSVGSettingsForm = class(TForm) RenderingGroupBox: TGroupBox; PreferD2DCheckBox: TCheckBox; EngineRadioGroup: TRadioGroup; + GUIElementsGroupBox: TGroupBox; + ShowIconCheckBox: TCheckBox; + IconStyleSheetComboBox: TComboBox; + IconStyleLabel: TLabel; + ShowXMLCheckBox: TCheckBox; procedure BoxElementsClick(Sender: TObject); procedure cbForegroundClick(Sender: TObject); procedure cbBackgroundClick(Sender: TObject); @@ -181,6 +183,7 @@ function ShowSettings(const AParentRect: TRect; implementation uses + System.UITypes, {$IFNDEF DISABLE_STYLES} Vcl.Themes, {$ENDIF} @@ -567,6 +570,7 @@ procedure TSVGSettingsForm.AssignSettings(ASettings: TSettings); ThemesRadioGroup.ItemIndex := Ord(ASettings.ThemeSelection); ShowXMLCheckBox.Checked := ASettings.ShowXML; + ShowIconCheckBox.Checked := ASettings.ShowIcon; XMLFontComboBox.ItemIndex := XMLFontComboBox.Items.IndexOf(ASettings.XMLFontName); XMLUpDown.Position := ASettings.XMLFontSize; @@ -628,6 +632,7 @@ procedure TSVGSettingsForm.UpdateSettings(ASettings: TSettings); ASettings.ThemeSelection := TThemeSelection(ThemesRadioGroup.ItemIndex); ASettings.ShowXML := ShowXMLCheckBox.Checked; + ASettings.ShowIcon := ShowIconCheckBox.Checked; ASettings.XMLFontName := XMLFontComboBox.Text; ASettings.XMLFontSize := XMLUpDown.Position; diff --git a/Source/FExplorer.ThumbnailHandler.pas b/Source/FExplorer.ThumbnailHandler.pas index 3e56e23..f6a4f2d 100644 --- a/Source/FExplorer.ThumbnailHandler.pas +++ b/Source/FExplorer.ThumbnailHandler.pas @@ -200,4 +200,3 @@ class procedure TFEThumbnailProvider.RegisterThumbnailProvider( end. - diff --git a/Source/FExplorer.ThumbnailHandlerRegister.pas b/Source/FExplorer.ThumbnailHandlerRegister.pas index c227625..1288cc6 100644 --- a/Source/FExplorer.ThumbnailHandlerRegister.pas +++ b/Source/FExplorer.ThumbnailHandlerRegister.pas @@ -37,7 +37,7 @@ interface TThumbnailHandlerRegister = class(TComObjectFactory) private FTThumbnailHandlerClass: TThumbnailHandlerClass; - class procedure DeleteRegValue(const Key, ValueName: string; RootKey: DWord); + class procedure DeleteRegValue(const Key, ValueName: string; RootKey: HKEY); protected public constructor Create(ATThumbnailHandlerClass: TThumbnailHandlerClass; @@ -73,7 +73,7 @@ function TThumbnailHandlerRegister.CreateComObject(const Controller: IUnknown): TComFEThumbnailProvider(result).ThumbnailHandlerClass := TThumbnailHandlerClass; end; -class procedure TThumbnailHandlerRegister.DeleteRegValue(const Key, ValueName: string; RootKey: DWord); +class procedure TThumbnailHandlerRegister.DeleteRegValue(const Key, ValueName: string; RootKey: HKEY); var RegKey: HKEY; begin diff --git a/Source/FExplorer.ViewerMainForm.dfm b/Source/FExplorer.ViewerMainForm.dfm index 6a1aaa3..ac3e147 100644 --- a/Source/FExplorer.ViewerMainForm.dfm +++ b/Source/FExplorer.ViewerMainForm.dfm @@ -226,14 +226,15 @@ object frmMain: TfrmMain AutoSize = False ImageList = VirtualImageList ImageIndex = 39 + ImageName = 'error' Align = alLeft end object StatusStaticText: TStaticText AlignWithMargins = True Left = 36 Top = 4 - Width = 4 - Height = 4 + Width = 210 + Height = 34 Align = alClient Alignment = taCenter TabOrder = 0 @@ -378,10 +379,11 @@ object frmMain: TfrmMain Left = 40 Top = 3 Width = 170 - Height = 15 + Height = 30 Align = alLeft Caption = 'Visualizzatore Fattura Elettronica' Layout = tlCenter + ExplicitHeight = 15 end object SettingsToolBar: TToolBar AlignWithMargins = True diff --git a/Source/FExplorer.ViewerMainForm.pas b/Source/FExplorer.ViewerMainForm.pas index 171f62f..94ace45 100644 --- a/Source/FExplorer.ViewerMainForm.pas +++ b/Source/FExplorer.ViewerMainForm.pas @@ -87,7 +87,6 @@ TEditingFile = class FFileName : string; FName : string; FExtension: string; - FShowXMLText: Boolean; FInvoice: TLegalInvoice; FAllegatiButtons: TObjectList; FFileContentType: TFileContentType; @@ -351,6 +350,7 @@ TfrmMain = class(TForm, IDragDrop) procedure FileSavedAskToOpen(const AFileName: string); function CanAcceptFileName(const AFileName: string): Boolean; function AcceptedExtensions: string; + procedure ShowXMLEditor(AEditingFile: TEditingFile; const AVisible: Boolean); property XMLFontSize: Integer read FXMLFontSize write SetXMLFontSize; property HTMLFontSize: Integer read FHTMLFontSize write SetHTMLFontSize; protected @@ -533,7 +533,6 @@ constructor TEditingFile.Create(const EditFileName: string); Filter : Word; begin inherited Create; - FShowXMLText := False; FAllegatiButtons := TObjectList.Create(True); if not IsStyleHookRegistered(TCustomSynEdit, TScrollingStyleHook) then @@ -825,6 +824,14 @@ procedure TfrmMain.ShowSRDialog(aReplace: boolean); end; end; +procedure TfrmMain.ShowXMLEditor(AEditingFile: TEditingFile; + const AVisible: Boolean); +begin + AEditingFile.SynEditor.Visible := AVisible; + AEditingFile.Splitter.Visible := AVisible; + AEditingFile.Splitter.Left := AEditingFile.SynEditor.Left + 1; +end; + procedure TfrmMain.SVClosed(Sender: TObject); begin // When TSplitView is closed, adjust ButtonOptions and Width @@ -1192,7 +1199,8 @@ function TfrmMain.AddEditingFile(EditingFile: TEditingFile): Integer; LEditor.OnChange := SynEditChange; LEditor.OnEnter := SynEditEnter; LEditor.MaxUndo := 5000; - LEditor.Align := alClient; + LEditor.Align := alLeft; + LEditor.Width := LTabSheet.Width div 2; LEditor.Parent := LTabSheet; LEditor.SearchEngine := SynEditSearch; LEditor.PopupMenu := popEditor; @@ -1203,8 +1211,7 @@ function TfrmMain.AddEditingFile(EditingFile: TEditingFile): Integer; LFEViewer := THtmlViewer.Create(nil); LFEViewer.ScrollBars := ssNone; - LFEViewer.Align := alRight; - LFEViewer.Width := LTabSheet.Width div 2; + LFEViewer.Align := alClient; LFEViewer.Parent := LTabSheet; LFEViewer.PopupMenu := PopHTMLViewer; @@ -1217,8 +1224,8 @@ function TfrmMain.AddEditingFile(EditingFile: TEditingFile): Integer; LToolBarAllegati.Images := VirtualImageList; LSplitter := TSplitter.Create(LTabSheet); - LSplitter.Align := alRight; - LSplitter.Left := LFEViewer.Left-1; + LSplitter.Align := alLeft; + LSplitter.Left := LEditor.Left+1; LSplitter.AutoSnap := False; LSplitter.Width := 6; LSplitter.Parent := LTabSheet; @@ -1230,7 +1237,7 @@ function TfrmMain.AddEditingFile(EditingFile: TEditingFile): Integer; UpdateFromSettings(LEditor); UpdateHighlighter(LEditor); - LEditor.Visible := True; + //LEditor.Visible := True; //Visualizzo il tabsheet LTabSheet.Visible := True; @@ -1687,11 +1694,15 @@ procedure TfrmMain.UpdateEditorsOptions; end; procedure TfrmMain.UpdateFromSettings(AEditor: TSynEdit); +var + LEditingFile: TEditingfile; begin if AEditor <> nil then begin FEditorSettings.ReadSettings(AEditor.Highlighter, self.FEditorOptions); AEditor.ReadOnly := not FEditorSettings.AllowEdit; + LEditingfile := TEditingFile(TTAbSheet(AEditor.Parent).Tag); + ShowXMLEditor(LEditingfile, FEditorSettings.ShowXML); end else FEditorSettings.ReadSettings(nil, self.FEditorOptions); @@ -1703,6 +1714,7 @@ procedure TfrmMain.UpdateFromSettings(AEditor: TSynEdit); HTMLFontSize := FEditorSettings.HTMLFontSize else HTMLFontSize := MinfontSize; + ImagePanel.Visible := FEditorSettings.ShowIcon; InitEditorOptions; UpdateEditorsOptions; UpdateApplicationStyle(FEditorSettings.StyleName); diff --git a/Source/FExplorer.dpr b/Source/FExplorer.dpr index 818d944..7631de3 100644 --- a/Source/FExplorer.dpr +++ b/Source/FExplorer.dpr @@ -40,8 +40,8 @@ uses uCommonPreviewHandler in 'uCommonPreviewHandler.pas', uPreviewHandler in 'uPreviewHandler.pas', uPreviewContainer in 'uPreviewContainer.pas' {PreviewContainer}, + uPreviewHandlerRegister in 'uPreviewHandlerRegister.pas', FExplorer.PreviewHandler in 'FExplorer.PreviewHandler.pas', - FExplorer.PreviewHandlerRegister in 'FExplorer.PreviewHandlerRegister.pas', FExplorer.ThumbnailHandler in 'FExplorer.ThumbnailHandler.pas', FExplorer.ThumbnailHandlerRegister in 'FExplorer.ThumbnailHandlerRegister.pas', FExplorer.ContextMenuHandler in 'FExplorer.ContextMenuHandler.pas', diff --git a/Source/FExplorer.dproj b/Source/FExplorer.dproj index 647d547..f12b2d4 100644 --- a/Source/FExplorer.dproj +++ b/Source/FExplorer.dproj @@ -58,7 +58,7 @@ ..\Icons\logo.ico $(BDS)\bin\default_app.manifest 1040 - CompanyName=Ethea S.r.l.;FileDescription=Fattura Elettronica Explorer 64bit;FileVersion=2.0.0.0;InternalName=;LegalCopyright=Copyright © 2021-2022 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=Fattura Elettronica Explorer 64bit;ProductVersion=2.0;Comments= + CompanyName=Ethea S.r.l.;FileDescription=Fattura Elettronica Explorer 64bit;FileVersion=2.1.0.0;InternalName=;LegalCopyright=Copyright © 2021-2022 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=Fattura Elettronica Explorer 64bit;ProductVersion=2.1;Comments= Glow|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Glow.vsf;Sky|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Sky.vsf;Windows10|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10.vsf;"Windows10 Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Dark.vsf";"Windows10 SlateGray|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10SlateGray.vsf";"Windows11 Modern Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Dark.vsf";"Windows11 Modern Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Light.vsf" rtl;vcl;vclx;vclactnband;xmlrtl;VclSmp;vclimg;svnui;svn;bdertl;TeeUI;TeeDB;Tee;vcldb;dbrtl;vcldbx;vcltouch;dsnap;dsnapcon;vclib;ibxpress;adortl;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_110_150;Intraweb_110_150;vclie;websnap;webdsnap;inetdb;inetdbbde;inetdbxpress;soaprtl;vclribbon;dbexpress;DbxCommonDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;DbxClientDriver;DataSnapClient;dbxcds;DataSnapServer;AzureCloud;DBXInterBaseDriver;DBXMySQLDriver;DBXFirebirdDriver;DBXSybaseASEDriver;DBXSybaseASADriver;DBXOracleDriver;DBXMSSQLDriver;DBXInformixDriver;DBXDb2Driver;Hydra_Core_D15;SynEdit_RXE;mbColorLibDXE;JclDeveloperTools;Jcl;JclVcl;JclContainers;JvCore;JvSystem;JvStdCtrls;JvAppFrm;JvBands;JvDB;JvDlgs;JvBDE;JvControls;JvCmp;JvCrypt;JvCustom;JvDocking;JvDotNetCtrls;JvGlobus;JvHMI;JvJans;JvManagedThreads;JvMM;JvNet;JvPageComps;JvPascalInterpreter;JvPluginSystem;JvPrintPreview;JvRuntimeDesign;JvTimeFramework;JvWizards;JvXPCtrls;WinSkinDXE;bsfd2011;IceTabSet;$(DCC_UsePackage) ..\Dcu\$(Platform)\$(Config) @@ -68,6 +68,7 @@ ..\Bin64 true 2 + 1 D:\ETHEA\FExplorer\Debug\Preview Handlers\OpenDialog\OpenDialogTest.exe @@ -122,8 +123,8 @@
PreviewContainer
+ - @@ -215,7 +216,6 @@ True - diff --git a/Source/FExplorer.res b/Source/FExplorer.res index 917d700..f555015 100644 Binary files a/Source/FExplorer.res and b/Source/FExplorer.res differ diff --git a/Source/FExplorer32.dpr b/Source/FExplorer32.dpr index 57af49c..015cae2 100644 --- a/Source/FExplorer32.dpr +++ b/Source/FExplorer32.dpr @@ -40,8 +40,8 @@ uses uCommonPreviewHandler in 'uCommonPreviewHandler.pas', uPreviewHandler in 'uPreviewHandler.pas', uPreviewContainer in 'uPreviewContainer.pas' {PreviewContainer}, + uPreviewHandlerRegister in 'uPreviewHandlerRegister.pas', FExplorer.PreviewHandler in 'FExplorer.PreviewHandler.pas', - FExplorer.PreviewHandlerRegister in 'FExplorer.PreviewHandlerRegister.pas', FExplorer.ThumbnailHandler in 'FExplorer.ThumbnailHandler.pas', FExplorer.ThumbnailHandlerRegister in 'FExplorer.ThumbnailHandlerRegister.pas', FExplorer.ContextMenuHandler in 'FExplorer.ContextMenuHandler.pas', diff --git a/Source/FExplorer32.dproj b/Source/FExplorer32.dproj index 1a7f210..b45893d 100644 --- a/Source/FExplorer32.dproj +++ b/Source/FExplorer32.dproj @@ -58,7 +58,7 @@ ..\Icons\logo.ico $(BDS)\bin\default_app.manifest 1040 - CompanyName=Ethea S.r.l.;FileDescription=Fattura Elettronica Explorer 32bit;FileVersion=2.0.0.0;InternalName=;LegalCopyright=Copyright © 2021-2022 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=Fattura Elettronica Explorer 32bit;ProductVersion=2.0;Comments= + CompanyName=Ethea S.r.l.;FileDescription=Fattura Elettronica Explorer 32bit;FileVersion=2.1.0.0;InternalName=;LegalCopyright=Copyright © 2021-2022 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=Fattura Elettronica Explorer 32bit;ProductVersion=2.1;Comments= Glow|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Glow.vsf;Sky|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Sky.vsf;Windows10|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10.vsf;"Windows10 Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Dark.vsf";"Windows10 SlateGray|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10SlateGray.vsf";"Windows11 Modern Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Dark.vsf";"Windows11 Modern Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Light.vsf" rtl;vcl;vclx;vclactnband;xmlrtl;VclSmp;vclimg;svnui;svn;bdertl;TeeUI;TeeDB;Tee;vcldb;dbrtl;vcldbx;vcltouch;dsnap;dsnapcon;vclib;ibxpress;adortl;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_110_150;Intraweb_110_150;vclie;websnap;webdsnap;inetdb;inetdbbde;inetdbxpress;soaprtl;vclribbon;dbexpress;DbxCommonDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;DbxClientDriver;DataSnapClient;dbxcds;DataSnapServer;AzureCloud;DBXInterBaseDriver;DBXMySQLDriver;DBXFirebirdDriver;DBXSybaseASEDriver;DBXSybaseASADriver;DBXOracleDriver;DBXMSSQLDriver;DBXInformixDriver;DBXDb2Driver;Hydra_Core_D15;SynEdit_RXE;mbColorLibDXE;JclDeveloperTools;Jcl;JclVcl;JclContainers;JvCore;JvSystem;JvStdCtrls;JvAppFrm;JvBands;JvDB;JvDlgs;JvBDE;JvControls;JvCmp;JvCrypt;JvCustom;JvDocking;JvDotNetCtrls;JvGlobus;JvHMI;JvJans;JvManagedThreads;JvMM;JvNet;JvPageComps;JvPascalInterpreter;JvPluginSystem;JvPrintPreview;JvRuntimeDesign;JvTimeFramework;JvWizards;JvXPCtrls;WinSkinDXE;bsfd2011;IceTabSet;$(DCC_UsePackage) ..\Dcu\$(Platform)\$(Config) @@ -68,6 +68,7 @@ ..\Bin32 true 2 + 1
D:\ETHEA\FExplorer\Debug\Preview Handlers\OpenDialog\OpenDialogTest.exe @@ -91,9 +92,8 @@ true - c:\Windows\SysWoW64 false - D:\ETHEA\FExplorer\FExplorer.dll + D:\ETHEA\FExplorer\Debug\Preview Handlers\PreviewHandler Host\Bin\PreviewHost.exe true @@ -122,8 +122,8 @@
PreviewContainer
+ - diff --git a/Source/FExplorer32.res b/Source/FExplorer32.res index 3599129..64d67aa 100644 Binary files a/Source/FExplorer32.res and b/Source/FExplorer32.res differ diff --git a/Source/uCommonPreviewHandler.pas b/Source/uCommonPreviewHandler.pas index 67670c5..7677ed8 100644 --- a/Source/uCommonPreviewHandler.pas +++ b/Source/uCommonPreviewHandler.pas @@ -44,126 +44,8 @@ TBasePreviewHandler = class(TStreamPreviewHandler) {$ELSE} TBasePreviewHandler = class(TFilePreviewHandler) {$ENDIF} - private - FEditor: TFrmPreview; - public - constructor Create(AParent: TWinControl); override; - procedure Unload; override; -{$IFDEF USE_TStreamPreviewHandler} - procedure DoPreview(Stream: TIStreamAdapter); override; -{$ELSE} - procedure DoPreview(const FilePath: string); override; -{$ENDIF} - property Editor: TFrmPreview read FEditor write FEditor; end; implementation -Uses - uLogExcept, - SynEdit, - Windows, - Forms, - uMisc, uPreviewContainer; - -constructor TBasePreviewHandler.Create(AParent: TWinControl); -begin - inherited; - FEditor := nil; -end; - -{$IFDEF USE_TStreamPreviewHandler} - -procedure TBasePreviewHandler.DoPreview(Stream: TIStreamAdapter); -begin - try - TLogPreview.Add('DoPreview ' + Self.ClassName); - //if (Editor <> nil) and IsWindow(Editor.Handle) then - begin - Initialize_GDI; - TLogPreview.Add('TGlobalPreviewHandler TFrmPreview.Create'); - Editor := TFrmPreview.Create(nil); - Editor.Parent := TPreviewContainer(TFrmPreview.AParent); - Editor.Align := alClient; - Editor.BorderStyle := bsNone; - - TLogPreview.Add('DoPreview Visible'); - Editor.Visible := True; - TLogPreview.Add('DoPreview LoadFromStream'); - Editor.LoadFromStream(Stream); - end; - except - on E: Exception do - TLogPreview.Add(Format('Error in TBasePreviewHandler.DoPreview(Stream) - Message: %s: Trace %s', [E.Message, E.StackTrace])); - end; -end; -{$ELSE} - -procedure TBasePreviewHandler.DoPreview(const FilePath: string); -begin - try - TLogPreview.Add('DoPreview ' + Self.ClassName); - //if (Editor <> nil) and IsWindow(Editor.Handle) then - begin - Initialize_GDI; - TLogPreview.Add('TGlobalPreviewHandler TFrmPreview.Create'); - Editor := TFrmPreview.Create(nil); - Editor.Align := alClient; - Editor.Parent := TPreviewContainer(TFrmPreview.AParent); - Editor.BorderStyle := bsNone; - - TLogPreview.Add('DoPreview Visible'); - Editor.Visible := True; - TLogPreview.Add('DoPreview LoadFile'); - Editor.LoadFromFile(FilePath); - end; - except - on E: Exception do - TLogPreview.Add(Format('Error in TBasePreviewHandler.DoPreview(FilePath) - Message: %s: Trace %s', [E.Message, E.StackTrace])); - end; -end; -{$ENDIF} -{ - http://msdn.microsoft.com/en-us/library/bb776865%28v=vs.85%29.aspx - IPreviewHandler::Unload - When this method is called, stop any rendering, release any resources allocated by reading data from the stream, and release the IStream itself. - Once this method is called, the handler must be reinitialized before any attempt to call IPreviewHandler::DoPreview again. -} - -type - TWinControlClass = class(TWinControl); - -procedure TBasePreviewHandler.Unload; -begin - try - TLogPreview.Add('Unload Init ' + Self.ClassName); - // if IsWindow(TWinControlClass(Editor).WindowHandle) then - // begin - // Editor.Visible:=False; - // Editor.SynEdit1.Lines.Clear; - // end; - - if Editor<>nil then - begin - Editor.Free; - Editor:=nil; - end; - - if (TFrmPreview.AParent<>nil) then - begin - if TPreviewContainer(TFrmPreview.AParent).PreviewHandler <> nil then - TComPreviewHandler(TPreviewContainer(TFrmPreview.AParent).PreviewHandler).Container := nil; - - TFrmPreview.AParent.Free; - TFrmPreview.AParent:=nil; - end; - inherited; - Finalize_GDI; - TLogPreview.Add('Unload Done ' + Self.ClassName); - except - on E: Exception do - TLogPreview.Add(Format('Error in TBasePreviewHandler.Unload - Message: %s: Trace %s', [E.Message, E.StackTrace])); - end; -end; - end. diff --git a/Source/uFilePreviewHandler.pas b/Source/uFilePreviewHandler.pas index e8a2a34..06e9909 100644 --- a/Source/uFilePreviewHandler.pas +++ b/Source/uFilePreviewHandler.pas @@ -13,9 +13,9 @@ // // The Original Code is uFilePreviewHandler.pas. // -// The Initial Developer of the Original Code is Rodrigo Ruz V. -// Portions created by Rodrigo Ruz V. are Copyright (C) 2011-2021 Rodrigo Ruz V. -// All Rights Reserved. +// The Initial Developer of the Original Code is Rodrigo Ruz V. +// Portions created by Rodrigo Ruz V. are Copyright (C) 2011-2021 Rodrigo Ruz V. +// All Rights Reserved. // // ************************************************************************************************* @@ -30,7 +30,6 @@ interface type TFilePreviewHandler = class abstract(TPreviewHandler) public - procedure DoPreview(const FilePath: String); virtual; abstract; class function GetComClass: TComClass; override; final; end; @@ -39,7 +38,8 @@ implementation uses Windows, PropSys, - SysUtils; + SysUtils, + uLogExcept; type TComFilePreviewHandler = class(TComPreviewHandler, IInitializeWithFile) @@ -72,7 +72,10 @@ function TComFilePreviewHandler.IInitializeWithFile_Initialize(pszFilePath: LPCW procedure TComFilePreviewHandler.InternalDoPreview; begin - PreviewHandler.DoPreview(FFilePath); + TLogPreview.Add('TComFilePreviewHandler.InternalDoPreview'); + CheckContainer; + Container.LoadFromFile(FFilePath); + Container.Show; end; procedure TComFilePreviewHandler.InternalUnload; diff --git a/Source/uLogExcept.pas b/Source/uLogExcept.pas index f543846..3813503 100644 --- a/Source/uLogExcept.pas +++ b/Source/uLogExcept.pas @@ -77,7 +77,7 @@ procedure AppendAllText(const FileName, Contents: string); class procedure TLogPreview.InitLogFile; begin if FLogFile = '' then - FLogFile := IncludeTrailingPathDelimiter(GetTempDirectory) + 'MDShellExtensions.log'; + FLogFile := IncludeTrailingPathDelimiter(GetTempDirectory) + 'FExplorer.log'; end; class procedure TLogPreview.Add(const AMessage: string); @@ -85,7 +85,7 @@ class procedure TLogPreview.Add(const AMessage: string); {$IFDEF ENABLELOG} try InitLogFile; - //if Copy(AMessage,1,14) = 'TMDContextMenu' then + //if (Copy(AMessage,1,4) = 'GDI+') then AppendAllText(FLogFile, FormatDateTime('hh:nn:ss.zzz', Now) + ' ' + AMessage + sLineBreak); except on e: EFOpenError do; @@ -97,7 +97,8 @@ class procedure TLogPreview.Add(const AException: Exception); begin try InitLogFile; - AppendAllText(FLogFile, Format('%s %s StackTrace %s %s', [FormatDateTime('hh:nn:ss.zzz', Now), AException.Message, + AppendAllText(FLogFile, Format('%s %s StackTrace %s %s', [FormatDateTime('hh:nn:ss.zzz', Now), + AException.ClassName+': '+AException.Message, AException.StackTrace, sLineBreak])); except on e: EFOpenError do; diff --git a/Source/uMisc.pas b/Source/uMisc.pas index 6de74a6..67a4b87 100644 --- a/Source/uMisc.pas +++ b/Source/uMisc.pas @@ -23,6 +23,7 @@ { limitations under the License. } { } { The Original Code is uMisc.pas: } +{ Delphi Preview Handler https://github.com/RRUZ/delphi-preview-handler } { } { The Initial Developer of the Original Code is Rodrigo Ruz V. } { Portions created by Rodrigo Ruz V. are Copyright 2011-2021 Rodrigo Ruz V. } @@ -63,7 +64,7 @@ implementation procedure Initialize_GDI; stdcall; begin //Initialize GDI+ - TLogPreview.Add('Initialize GDI+'); + TLogPreview.Add('GDI+: Initialize'); StartupInput.DebugEventCallback := nil; StartupInput.SuppressBackgroundThread := False; StartupInput.SuppressExternalCodecs := False; @@ -73,6 +74,7 @@ procedure Initialize_GDI; stdcall; procedure Finalize_GDI; stdcall; begin + TLogPreview.Add('GDI+: Finalize'); GdiplusShutdown(gdiplusToken); end; @@ -115,8 +117,6 @@ function GetSpecialFolder(const CSIDL: integer): string; end; end; - - function GetFileVersion(const FileName: string): string; var FSO: OleVariant; diff --git a/Source/uPreviewContainer.dfm b/Source/uPreviewContainer.dfm index 4cb5d4a..6551a5f 100644 --- a/Source/uPreviewContainer.dfm +++ b/Source/uPreviewContainer.dfm @@ -1,17 +1,15 @@ object PreviewContainer: TPreviewContainer Left = 753 Top = 443 - ClientHeight = 447 - ClientWidth = 684 + ClientHeight = 273 + ClientWidth = 296 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] - OldCreateOrder = False OnCreate = FormCreate OnDestroy = FormDestroy - PixelsPerInch = 96 TextHeight = 13 end diff --git a/Source/uPreviewContainer.pas b/Source/uPreviewContainer.pas index f75d15e..b42a148 100644 --- a/Source/uPreviewContainer.pas +++ b/Source/uPreviewContainer.pas @@ -22,6 +22,8 @@ { See the License for the specific language governing permissions and } { limitations under the License. } { } +{ The Original Code is: } +{ Delphi Preview Handler https://github.com/RRUZ/delphi-preview-handler } { } { The Initial Developer of the Original Code is Rodrigo Ruz V. } { Portions created by Rodrigo Ruz V. are Copyright 2011-2021 Rodrigo Ruz V. } @@ -41,17 +43,20 @@ TPreviewContainer = class(TForm) procedure FormDestroy(Sender: TObject); private FPreviewHandler: TObject; + FActualRect: TRect; public procedure SetFocusTabFirst; procedure SetFocusTabLast; procedure SetBackgroundColor(color: TColorRef); - procedure SetBoundsRectAndPPI(const ARect: TRect; - const AOldPPI, ANewPPI: Integer); virtual; + procedure SetBoundsRectAndPPI(const ARect: TRect; AOldPPI, ANewPPI: Integer); virtual; procedure SetTextColor(color: TColorRef); procedure SetTextFont(const plf: TLogFont); - property PreviewHandler: TObject read FPreviewHandler write FPreviewHandler; + property PreviewHandler: TObject read FPreviewHandler write FPreviewHandler; + property ActualRect: TRect read FActualRect; end; +function GetRect(const ARect: TRect; const ATxt: string): string; + implementation uses @@ -67,6 +72,12 @@ implementation {$R *.dfm} +function GetRect(const ARect: TRect; const ATxt: string): string; +begin + Result := Format('%s: L:%d - T:%d - W:%d - H:%d', + [ATxt, ARect.Left, ARect.Top, ARect.Width, ARect.Height]); +end; + procedure TPreviewContainer.SetFocusTabFirst; begin SelectNext(nil, True, True); @@ -109,38 +120,47 @@ procedure TPreviewContainer.SetBackgroundColor(color: TColorRef); end; procedure TPreviewContainer.SetBoundsRectAndPPI(const ARect: TRect; - const AOldPPI, ANewPPI: Integer); + AOldPPI, ANewPPI: Integer); +var + Lmsg: string; + LActualMonitor, LMainMonitor: TMonitor; + LScaleFactor: Double; + I: Integer; begin - if (ARect.Width <> 0) and (ARect.Height <> 0) then + LActualMonitor := Screen.MonitorFromWindow(Self.Handle); + LMainMonitor := LActualMonitor; + for I := 0 to Screen.MonitorCount do begin - TLogPreview.Add('TPreviewContainer.SetBoundsRect:'+ - ' Visible: '+Self.Visible.Tostring+ - ' CurrentPPI:'+Self.CurrentPPI.ToString+ - ' AOldPPI:'+AOldPPI.ToString+ - ' ANewPPI:'+ANewPPI.ToString+ - ' Scaled:'+Self.Scaled.ToString+ - ' ARect.Width: '+ARect.Width.ToString+ - ' ARect.Height: '+ARect.Height.ToString); - - if ANewPPI <> AOldPPI then - begin - SetBounds( - ARect.Left, - ARect.Top, - MulDiv(ARect.Width, ANewPPI, AOldPPI), - MulDiv(ARect.Height, ANewPPI, AOldPPI)); - end - else - begin - SetBounds( - ARect.Left, - ARect.Top, - ARect.Width, - ARect.Height); - end; - - FCurrentPPI := ANewPPI; + LMainMonitor := Screen.Monitors[I]; + if LMainMonitor.Primary then + Break; end; + + if LMainMonitor <> LActualMonitor then + begin + LScaleFactor := LActualMonitor.PixelsPerInch / LMainMonitor.PixelsPerInch; + ARect.Width := Round(ARect.Width * LScaleFactor); + ARect.Height := Round(ARect.Height * LScaleFactor); + end; + + Lmsg := 'TPreviewContainer.SetBoundsRect:'+ + ' Visible: '+Self.Visible.Tostring+slineBreak+ + ' ANewPPI = AOldPPI'+slineBreak+ + ' Form.CurrentPPI:'+Self.CurrentPPI.ToString+slineBreak+ + ' Form.Scaled:'+Self.Scaled.ToString+slineBreak+ + ' AOldPPI:'+AOldPPI.ToString+slineBreak+ + ' ANewPPI:'+ANewPPI.ToString+slineBreak+ + ' Scaled:'+Self.Scaled.ToString+slineBreak+ + ' ARect.Width: '+ARect.Width.ToString+slineBreak+ + ' ARect.Height: '+ARect.Height.ToString+slineBreak; + + SetWindowPos(WindowHandle, 0, ARect.Left, ARect.Top, ARect.Width, ARect.Height, SWP_NOZORDER + SWP_NOACTIVATE); + //if LMainMonitor <> LActualMonitor then + // ChangeScale(LMainMonitor.PixelsPerInch, LActualMonitor.PixelsPerInch); + FActualRect := ARect; + FCurrentPPI := ANewPPI; + + TLogPreview.Add(Lmsg); end; procedure TPreviewContainer.SetTextColor(color: TColorRef); diff --git a/Source/uPreviewHandler.pas b/Source/uPreviewHandler.pas index 930f832..73fb73d 100644 --- a/Source/uPreviewHandler.pas +++ b/Source/uPreviewHandler.pas @@ -34,7 +34,8 @@ interface Windows, uPreviewContainer, System.Generics.Collections, - ActiveX; + ActiveX, + FExplorer.PreviewForm; type @@ -70,7 +71,7 @@ TComPreviewHandler = class(TComObject, IOleWindow, IObjectWithSite, IPreviewHa FCurrentPPI: Integer; FBackgroundColor: TColorRef; FBounds: TRect; - FContainer: TPreviewContainer; + FContainer: TFrmPreview; FLogFont: TLogFont; FParentWindow: HWND; FPreviewHandler: TPreviewHandler; @@ -81,7 +82,7 @@ TComPreviewHandler = class(TComObject, IOleWindow, IObjectWithSite, IPreviewHa procedure SetBounds(const Value: TRect); procedure UpdateContainerBoundsRect; protected - procedure CheckContainer; + function CheckContainer: Boolean; procedure CheckPreviewHandler; procedure InternalUnload; virtual; abstract; procedure InternalDoPreview; virtual; abstract; @@ -95,7 +96,7 @@ TComPreviewHandler = class(TComObject, IOleWindow, IObjectWithSite, IPreviewHa property Site: IInterface read FSite; public destructor Destroy; override; - property Container: TPreviewContainer read FContainer write FContainer; + property Container: TFrmPreview read FContainer write FContainer; property PreviewHandlerClass: TPreviewHandlerClass read FPreviewHandlerClass write FPreviewHandlerClass; end; @@ -110,16 +111,15 @@ implementation ExtCtrls, uMisc, uLogExcept, - FExplorer.PreviewForm, - FExplorer.PreviewHandlerRegister; + uPreviewHandlerRegister; destructor TComPreviewHandler.Destroy; begin TLogPreview.Add('Destroy Init'); - inherited Destroy; FreeAndNil(FContainer); FreeAndNil(FPreviewHandler); + inherited Destroy; TLogPreview.Add('Destroy Done'); end; @@ -138,35 +138,39 @@ procedure TComPreviewHandler.UpdateContainerBoundsRect; end; end; -procedure TComPreviewHandler.CheckContainer; +function TComPreviewHandler.CheckContainer: Boolean; +var + LRect: TRect; begin TLogPreview.Add('CheckContainer Init'); - TLogPreview.Add('CheckContainer FContainer = nil '+BoolToStr(FContainer = nil, True)+ - 'Fbounds.Width: '+FBounds.width.ToString); if (FContainer = nil) and IsWindow(FParentWindow) then begin - TLogPreview.Add('ParentWindow '+IntToHex(ParentWindow, 8)); + TLogPreview.Add('ParentWindow '+IntToHex(FParentWindow, 8)); - FContainer := TPreviewContainer.Create(nil); + GetWindowRect(FParentWindow, LRect); + TLogPreview.Add('CheckContainer'+GetRect(LRect,' - GetWindowRect')); + + FContainer := TFrmPreview.Create(nil); + + TLogPreview.Add('FContainer created:'+GetRect(FBounds,' FBounds')); FContainer.ParentWindow := FParentWindow; FContainer.BorderStyle := bsNone; - FContainer.Visible := True; UpdateContainerBoundsRect; FContainer.PreviewHandler := Self; TFrmPreview.AParent := FContainer; end; TLogPreview.Add('CheckContainer Done'); + Result := Assigned(FContainer); end; procedure TComPreviewHandler.CheckPreviewHandler; begin TLogPreview.Add('CheckPreviewHandler Init'); - if FContainer = nil then - CheckContainer; - - if FPreviewHandler = nil then - FPreviewHandler := PreviewHandlerClass.Create(Container); - + if CheckContainer then + begin + if FPreviewHandler = nil then + FPreviewHandler := PreviewHandlerClass.Create(Container); + end; TLogPreview.Add('CheckPreviewHandler Done'); end; @@ -190,6 +194,8 @@ function TComPreviewHandler.GetSite(const riid: TGUID; out site: IInterface): HR end; function TComPreviewHandler.GetWindow(out wnd: HWND): HRESULT; +var + LRect: TRect; begin TLogPreview.Add('GetWindow Init'); if (Container = nil) or (Container.Handle = 0) then @@ -200,6 +206,9 @@ function TComPreviewHandler.GetWindow(out wnd: HWND): HRESULT; else begin wnd := Container.Handle; + GetWindowRect(wnd, LRect); + TLogPreview.Add('GetWindow'+GetRect(LRect,' - GetWindowRect')); + result := S_OK; end; TLogPreview.Add('GetWindow Done'); @@ -207,6 +216,7 @@ function TComPreviewHandler.GetWindow(out wnd: HWND): HRESULT; function TComPreviewHandler.IPreviewHandler_DoPreview: HRESULT; begin + Result := S_OK; TLogPreview.Add('IPreviewHandler_DoPreview Init'); try CheckPreviewHandler; @@ -216,14 +226,14 @@ function TComPreviewHandler.IPreviewHandler_DoPreview: HRESULT; TLogPreview.Add(Format('Error in TComPreviewHandler.IPreviewHandler_DoPreview - Message: %s: Trace %s', [E.Message, E.StackTrace])); end; - Result := S_OK; TLogPreview.Add('IPreviewHandler_DoPreview Done'); end; function TComPreviewHandler.QueryFocus(var phwnd: HWND): HRESULT; begin TLogPreview.Add('QueryFocus Init'); - phwnd := GetFocus; + if Container <> nil then + phwnd := GetFocus; Result := S_OK; TLogPreview.Add('QueryFocus Done'); end; @@ -248,7 +258,9 @@ procedure TComPreviewHandler.SetBounds(const Value: TRect); if (Value.Width <> 0) and (Value.Height <> 0) then begin FBounds := Value; - CheckPreviewHandler; + FBounds.Left := 0; + FBounds.Top := 0; + //CheckPreviewHandler; UpdateContainerBoundsRect; end; end; @@ -258,6 +270,7 @@ function TComPreviewHandler.SetFocus: HRESULT; TLogPreview.Add('SetFocus Init'); if Container <> nil then begin + Container.Visible := True; if GetKeyState(VK_SHIFT) < 0 then Container.SetFocusTabLast else @@ -280,6 +293,7 @@ function TComPreviewHandler.SetFont(const plf: TLogFont): HRESULT; function TComPreviewHandler.SetRect(var prc: TRect): HRESULT; var LNewPPI: Integer; + LRect: TRect; begin LNewPPI := GetDpiForWindow(FParentWindow); @@ -287,16 +301,13 @@ function TComPreviewHandler.SetRect(var prc: TRect): HRESULT; ' prc.Width: '+prc.Width.ToString+ ' prc.Height: '+prc.Height.ToString+ ' GetDpiForWindow: '+LNewPPI.ToString); -(* - if (LNewPPI <> FCurrentPPI) then - begin - FreeAndNil(FPreviewHandler); - FreeAndNil(FContainer); - CheckPreviewHandler; - InternalDoPreview; - end; -*) - Bounds := prc; + + GetWindowRect(FParentWindow, LRect); + TLogPreview.Add('SetRect'+GetRect(LRect,' - GetWindowRect')); + + //Bounds is calculated on Windows Rect + TLogPreview.Add('SetRect: Imposto Bounds dalla Window'+GetRect(LRect, ' LRect')); + Bounds := TRect.Create(0,0,LRect.Width,LRect.Height); FCurrentPPI := LNewPPI; TLogPreview.Add('FCurrentPPI := LNewPPI: '+LNewPPI.ToString); Result := S_OK; @@ -308,13 +319,14 @@ function TComPreviewHandler.SetSite(const pUnkSite: IInterface): HRESULT; TLogPreview.Add('SetSite Init'); FSite := PUnkSite; FPreviewHandlerFrame := FSite as IPreviewHandlerFrame; + FBounds := TRect.Create(0,0,0,0); result := S_OK; TLogPreview.Add('SetSite Done'); end; function TComPreviewHandler.SetTextColor(color: Cardinal): HRESULT; begin - TLogPreview.Add('SetTextColor Init'); + TLogPreview.Add('SetTextColor Init - Color:'+Color.ToString); FTextColor := color; if Container <> nil then Container.SetTextColor(FTextColor); @@ -327,11 +339,14 @@ function TComPreviewHandler.SetWindow(hwnd: HWND; var prc: TRect): HRESULT; LMonitor: TMonitor; LRect: TRect; begin - TLogPreview.Add('SetWindow Init'); + TLogPreview.Add('SetWindow Init'+GetRect(prc, '-prc:')); FParentWindow := hwnd; // FCurrentPPI := 96; FCurrentPPI := GetDpiForWindow(hwnd); + GetWindowRect(FParentWindow, LRect); + TLogPreview.Add('SetWindow'+GetRect(LRect,' - GetWindowRect')); + TLogPreview.Add('SetWindow: Window DPI: '+FCurrentPPI.ToString); LMonitor := Screen.MonitorFromWindow(hwnd); @@ -341,6 +356,11 @@ function TComPreviewHandler.SetWindow(hwnd: HWND; var prc: TRect): HRESULT; ' Height: '+LMonitor.Height.ToString+ ' PPI: '+LMonitor.PixelsPerInch.ToString); + TLogPreview.Add('SetWindow: Imposto Bounds'+GetRect(LRect, ' LRect')); + Bounds := TRect.Create(0,0,LRect.Width,LRect.Height); + + Result := S_OK; +(* if (prc.Width <> 0) and (prc.Height <> 0) then begin Bounds := prc; @@ -354,6 +374,7 @@ function TComPreviewHandler.SetWindow(hwnd: HWND; var prc: TRect): HRESULT; Bounds := LRect; Result := S_OK; end; +*) TLogPreview.Add('SetWindow Done'); end; @@ -367,12 +388,12 @@ function TComPreviewHandler.TranslateAccelerator(var pmsg: tagMSG): HRESULT; function TComPreviewHandler.Unload: HRESULT; begin - TLogPreview.Add('Unload Init'); + TLogPreview.Add('TComPreviewHandler Unload Init'); if PreviewHandler <> nil then PreviewHandler.Unload; InternalUnload; result := S_OK; - TLogPreview.Add('Unload Done'); + TLogPreview.Add('TComPreviewHandler Unload Done'); end; constructor TPreviewHandler.Create(AParent: TWinControl); diff --git a/Source/uPreviewHandlerRegister.pas b/Source/uPreviewHandlerRegister.pas new file mode 100644 index 0000000..2da527c --- /dev/null +++ b/Source/uPreviewHandlerRegister.pas @@ -0,0 +1,225 @@ +{******************************************************************************} +{ } +{ FExplorer: Shell extensions per Fattura Elettronica } +{ (Preview Panel, Thumbnail Icon, F.E.Viewer) } +{ } +{ Copyright (c) 2021-2022 (Ethea S.r.l.) } +{ Author: Carlo Barazzetta } +{ } +{ https://github.com/EtheaDev/FExplorer } +{ } +{******************************************************************************} +{ } +{ Licensed under the Apache License, Version 2.0 (the "License"); } +{ you may not use this file except in compliance with the License. } +{ You may obtain a copy of the License at } +{ } +{ http://www.apache.org/licenses/LICENSE-2.0 } +{ } +{ Unless required by applicable law or agreed to in writing, software } +{ distributed under the License is distributed on an "AS IS" BASIS, } +{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } +{ See the License for the specific language governing permissions and } +{ limitations under the License. } +{ } +{ The Original Code is: } +{ Delphi Preview Handler https://github.com/RRUZ/delphi-preview-handler } +{ } +{ The Initial Developer of the Original Code is Rodrigo Ruz V. } +{ Portions created by Rodrigo Ruz V. are Copyright 2011-2021 Rodrigo Ruz V. } +{ All Rights Reserved. } +{******************************************************************************} +unit uPreviewHandlerRegister; + +interface + +uses + ComObj, + Classes, + Windows, + uPreviewHandler; + +type + TPreviewHandlerRegister = class(TComObjectFactory) + private + FPreviewHandlerClass: TPreviewHandlerClass; + class procedure DeleteRegValue(const Key, ValueName: string; RootKey: HKEY); + protected + public + constructor Create(APreviewHandlerClass: TPreviewHandlerClass; + const APreviewClassID: TGUID; const AName, ADescription: string); + destructor Destroy; override; + function CreateComObject(const Controller: IUnknown): TComObject; override; + procedure UpdateRegistry(ARegister: Boolean); override; + property PreviewHandlerClass: TPreviewHandlerClass read FPreviewHandlerClass; + end; + +implementation + +uses + Math, + StrUtils, + SysUtils, + ShlObj, + System.Win.ComConst, + ComServ; + +constructor TPreviewHandlerRegister.Create(APreviewHandlerClass: TPreviewHandlerClass; + const APreviewClassID: TGUID; const AName, ADescription: string); +begin + inherited Create(ComServ.ComServer, APreviewHandlerClass.GetComClass, + APreviewClassID, AName, ADescription, ciMultiInstance, tmApartment); + FPreviewHandlerClass := APreviewHandlerClass; +end; + +function TPreviewHandlerRegister.CreateComObject(const Controller: IUnknown): TComObject; +begin + result := inherited CreateComObject(Controller); + TComPreviewHandler(result).PreviewHandlerClass := PreviewHandlerClass; +end; + +class procedure TPreviewHandlerRegister.DeleteRegValue(const Key, ValueName: string; RootKey: HKEY); +var + RegKey: HKEY; +begin + if RegOpenKeyEx(RootKey, PChar(Key), 0, KEY_ALL_ACCESS, regKey) = ERROR_SUCCESS then + begin + try + RegDeleteValue(regKey, PChar(ValueName)); + finally + RegCloseKey(regKey) + end; + end; +end; + +destructor TPreviewHandlerRegister.Destroy; +begin + inherited; +end; + +//How to Register a Preview Handler +//http://msdn.microsoft.com/en-us/library/cc144144%28v=vs.85%29.aspx +procedure TPreviewHandlerRegister.UpdateRegistry(ARegister: Boolean); + + function IsWow64Process: Boolean; + type + TIsWow64Process = function( hProcess: Windows.THandle; var Wow64Process: Windows.BOOL): Windows.BOOL; stdcall; + var + IsWow64Process: TIsWow64Process; + Wow64Process: Windows.BOOL; + begin + Result := False; + IsWow64Process := GetProcAddress(GetModuleHandle(Windows.kernel32), 'IsWow64Process'); + if Assigned(IsWow64Process) then + begin + if not IsWow64Process(GetCurrentProcess, Wow64Process) then + Raise Exception.Create('Error: Invalid handle'); + Result := Wow64Process; + end; + end; + + + procedure CreateRegKeyDWORD(const Key, ValueName: string;Value: DWORD; RootKey: HKEY); + var + Handle: HKey; + Status, Disposition: Integer; + begin + Status := RegCreateKeyEx(RootKey, PChar(Key), 0, '', + REG_OPTION_NON_VOLATILE, KEY_READ or KEY_WRITE, nil, Handle, + @Disposition); + if Status = 0 then + begin + { + Status := RegSetValueEx(Handle, PChar(ValueName), 0, REG_SZ, + PChar(Value), (Length(Value) + 1)* sizeof(char)); + } + Status := RegSetValueEx(Handle, PChar(ValueName), 0, REG_DWORD, + @Value, sizeof(Value)); + RegCloseKey(Handle); + end; + if Status <> 0 then raise EOleRegistrationError.CreateRes(@SCreateRegKeyError); + end; + + procedure CreateRegKeyREG_SZ(const Key, ValueName: string;Value: string; RootKey: HKEY); + var + Handle: HKey; + Status, Disposition: Integer; + begin + Status := RegCreateKeyEx(RootKey, PChar(Key), 0, '', + REG_OPTION_NON_VOLATILE, KEY_READ or KEY_WRITE, nil, Handle, + @Disposition); + if Status = 0 then + begin + Status := RegSetValueEx(Handle, PChar(ValueName), 0, REG_SZ, + PChar(Value), (Length(Value) + 1)* sizeof(char)); + RegCloseKey(Handle); + end; + if Status <> 0 then raise EOleRegistrationError.CreateRes(@SCreateRegKeyError); + end; + +const + Prevhost_32 = '{534A1E02-D58F-44f0-B58B-36CBED287C7C}'; + Prevhost_64 = '{6d2b5079-2f0b-48dd-ab7f-97cec514d30b}'; + +var + RootKey: HKEY; + RootUserReg: HKEY; + RootPrefix: string; + sComServerKey: string; + ProgID: string; + sAppID: string; + sClassID: string; + LRegKey: string; +begin + + if Instancing = ciInternal then + Exit; + + ComServer.GetRegRootAndPrefix(RootKey, RootPrefix); + RootUserReg := IfThen(ComServer.PerUserRegistration, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE); + sClassID := SysUtils.GUIDToString(ClassID); + ProgID := GetProgID; + sComServerKey := Format('%sCLSID\%s\%s',[RootPrefix,sClassID,ComServer.ServerKey]); + sAppID := IfThen(IsWow64Process, Prevhost_32, Prevhost_64); + if ARegister then + begin + inherited UpdateRegistry(True); + + LRegKey := Format('%sCLSID\%s',[RootPrefix, sClassID]); + CreateRegKey(LRegKey, 'AppID', sAppID, RootKey); + CreateRegKey(LRegKey, 'DisplayName', 'Delphi F.E. Preview Handler', RootKey); + CreateRegKeyDWORD(LRegKey, 'DisableLowILProcessIsolation', 1, RootKey); + CreateRegKeyREG_SZ(LRegKey, 'DllSurrogate', '%SystemRoot%\system32\prevhost.exe', RootKey); + + if ProgID <> '' then + begin + CreateRegKey(sComServerKey, 'ProgID', ProgID, RootKey); + + //Add extension for .xml files + CreateRegKey(RootPrefix + '.xml' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey); + CreateRegKey(RootPrefix + '.p7m' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey); + CreateRegKey(RootPrefix + '.xml.p7m' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey); + + CreateRegKey(sComServerKey, 'VersionIndependentProgID', ProgID, RootKey); + CreateRegKey(RootPrefix + ProgID + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey); + CreateRegKey('SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers', sClassID, Description, RootUserReg); + end; + end + else + begin + if ProgID <> '' then + begin + DeleteRegValue('SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers', sClassID, RootUserReg); + DeleteRegKey(RootPrefix + ProgID + '\shellex', RootKey); + DeleteRegValue(Format('%sCLSID\%s',[RootPrefix, sClassID]), 'DllSurrogate', RootKey); + DeleteRegValue(Format('%sCLSID\%s',[RootPrefix, sClassID]), 'DisableLowILProcessIsolation', RootKey); + //Delete extension for xml + DeleteRegKey(RootPrefix + '.xml.p7m' + '\shellex\' + SID_IPreviewHandler, RootKey); + DeleteRegKey(RootPrefix + '.p7m' + '\shellex\' + SID_IPreviewHandler, RootKey); + DeleteRegKey(RootPrefix + '.xml' + '\shellex\' + SID_IPreviewHandler, RootKey); + end; + inherited UpdateRegistry(False); + end; +end; + +end. diff --git a/Source/uStreamPreviewHandler.pas b/Source/uStreamPreviewHandler.pas index e75b144..2e2355c 100644 --- a/Source/uStreamPreviewHandler.pas +++ b/Source/uStreamPreviewHandler.pas @@ -33,7 +33,6 @@ interface type TStreamPreviewHandler = class abstract(TPreviewHandler) public - procedure DoPreview(Stream: TIStreamAdapter); virtual; abstract; class function GetComClass: TComClass; override; final; end; @@ -72,12 +71,11 @@ function TComStreamPreviewHandler.GetPreviewHandler: TStreamPreviewHandler; function TComStreamPreviewHandler.IInitializeWithStream_Initialize(const pstream: IStream; grfMode: Cardinal): HRESULT; begin - TLogPreview.Add('TComStreamPreviewHandler.IInitializeWithStream_Initialize'); + TLogPreview.Add('TComStreamPreviewHandler.IInitializeWithStream_Initialize Init'); FIStream := pstream; FMode := grfMode; Result := S_OK; - //Result := E_NOTIMPL; - TLogPreview.Add('TComStreamPreviewHandler.IInitializeWithStream_Initialize'); + TLogPreview.Add('TComStreamPreviewHandler.IInitializeWithStream_Initialize Done'); end; procedure TComStreamPreviewHandler.InternalUnload; @@ -94,7 +92,8 @@ procedure TComStreamPreviewHandler.InternalDoPreview; AStream := TIStreamAdapter.Create(FIStream); try CheckContainer; - PreviewHandler.DoPreview(AStream); + Container.LoadFromStream(AStream); + Container.Show; finally AStream.Free; end; diff --git a/Source/vmHtmlToPdf.pas b/Source/vmHtmlToPdf.pas index 9ae0349..281fb8f 100644 --- a/Source/vmHtmlToPdf.pas +++ b/Source/vmHtmlToPdf.pas @@ -11,7 +11,7 @@ // a class derived from TPdfDocumentGDI // is a public domain. // ------------------------------------------------------------------------------------------------- - +{$WARN IMPLICIT_STRING_CAST OFF} unit vmHtmlToPdf; interface @@ -385,18 +385,18 @@ procedure TvmHtmlToPdfGDI.Execute; case FPageNumberPositionPrint of ppTop: begin - VCLCanvas.TextOut(Trunc(lMarginR + (lPointsWidth - VCLCanvas.TextWidth(lPageText))/2), - Trunc(0 + VCLCanvas.Font.Size), lPageText); + VCLCanvas.TextOut(Trunc(lMarginR + (lPointsWidth - VCLCanvas.TextWidth(PDFString(lPageText)))/2), + Trunc(0 + VCLCanvas.Font.Size), PDFString(lPageText)); end; ppBottom: begin - VCLCanvas.TextOut(Trunc(lMarginR + (lPointsWidth - VCLCanvas.TextWidth(lPageText))/2), - lHeight + (VCLCanvas.Font.Size * 2), lPageText); + VCLCanvas.TextOut(Trunc(lMarginR + (lPointsWidth - VCLCanvas.TextWidth(PDFString(lPageText)))/2), + lHeight + (VCLCanvas.Font.Size * 2), PDFString(lPageText)); end; end; end; - FreeAndNil(LMFPage); end; + FreeAndNil(LMFPage); finally FreeAndNil(lPages); end;