[Libreoffice-commits] core.git: 2 commits - filter/source filter/uiconfig filter/UIConfig_xsltdlg.mk framework/inc framework/Library_fwl.mk framework/source framework/util vcl/source

Caolán McNamara caolanm at redhat.com
Fri Mar 14 04:47:34 PDT 2014


 filter/UIConfig_xsltdlg.mk                 |    1 
 filter/source/pdf/impdialog.cxx            |   81 +---
 filter/source/pdf/impdialog.hrc            |   39 --
 filter/source/pdf/impdialog.hxx            |   10 
 filter/source/pdf/impdialog.src            |  104 ++---
 filter/uiconfig/ui/warnpdfdialog.ui        |   89 ++++
 framework/Library_fwl.mk                   |    1 
 framework/inc/classes/resource.hrc         |   16 
 framework/inc/services.h                   |    2 
 framework/inc/services/license.hxx         |   83 ----
 framework/inc/services/licensedlg.hxx      |   97 -----
 framework/source/classes/resource.src      |  149 --------
 framework/source/register/registertemp.cxx |    2 
 framework/source/services/license.cxx      |  529 -----------------------------
 framework/util/fwl.component               |    3 
 vcl/source/window/layout.cxx               |    1 
 16 files changed, 185 insertions(+), 1022 deletions(-)

New commits:
commit f35b1958e3519887355f74e1ffdc60dca9de8de5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 14 09:14:41 2014 +0000

    convert pdf warn dialog to .ui
    
    Change-Id: I379c7f06ae87bee5571c1f2ef5053b3b863d6e61

diff --git a/filter/UIConfig_xsltdlg.mk b/filter/UIConfig_xsltdlg.mk
index abef4d3..3442112 100644
--- a/filter/UIConfig_xsltdlg.mk
+++ b/filter/UIConfig_xsltdlg.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UIConfig_add_uifiles,filter,\
     filter/uiconfig/ui/pdfuserinterfacepage \
     filter/uiconfig/ui/pdfviewpage \
 	filter/uiconfig/ui/testxmlfilter \
+	filter/uiconfig/ui/warnpdfdialog \
 	filter/uiconfig/ui/xmlfiltersettings \
 	filter/uiconfig/ui/xmlfiltertabpagegeneral \
 	filter/uiconfig/ui/xmlfiltertabpagetransformation \
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 9062ba5..1c18bce 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -1450,15 +1450,18 @@ IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl)
     return 0;
 }
 
-ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& rErrors ) :
-    ModalDialog( NULL, PDFFilterResId( RID_PDF_ERROR_DLG ) ),
-    maFI( this, 0 ),
-    maProcessText( this, PDFFilterResId( FT_PROCESS ) ),
-    maErrors( this, WB_BORDER | WB_AUTOVSCROLL ),
-    maExplanation( this, WB_WORDBREAK ),
-    maButton( this, WB_DEFBUTTON )
-
+ImplErrorDialog::ImplErrorDialog(const std::set< vcl::PDFWriter::ErrorCode >& rErrors)
+    : MessageDialog(NULL, "WarnPDFDialog", "filter/ui/warnpdfdialog.ui")
 {
+    get(m_pErrors, "errors");
+    get(m_pExplanation, "message");
+
+    Size aSize(LogicToPixel(Size(100, 75), MapMode(MAP_APPFONT)));
+    m_pErrors->set_width_request(aSize.Width());
+    m_pErrors->set_height_request(aSize.Height());
+    m_pExplanation->set_width_request(aSize.Width());
+    m_pExplanation->set_height_request(aSize.Height());
+
     // load images
     Image aWarnImg( BitmapEx( PDFFilterResId( IMG_WARN ) ) );
     Image aErrImg( BitmapEx( PDFFilterResId( IMG_ERR ) ) );
@@ -1470,30 +1473,30 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r
         {
         case vcl::PDFWriter::Warning_Transparency_Omitted_PDFA:
         {
-            sal_uInt16 nPos = maErrors.InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_PDFA_SHORT ) ),
+            sal_uInt16 nPos = m_pErrors->InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_PDFA_SHORT ) ),
                                                 aWarnImg );
-            maErrors.SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_PDFA ) ) );
+            m_pErrors->SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_PDFA ) ) );
         }
         break;
         case vcl::PDFWriter::Warning_Transparency_Omitted_PDF13:
         {
-            sal_uInt16 nPos = maErrors.InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_VERSION_SHORT ) ),
+            sal_uInt16 nPos = m_pErrors->InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_VERSION_SHORT ) ),
                                                 aWarnImg );
-            maErrors.SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_VERSION ) ) );
+            m_pErrors->SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_VERSION ) ) );
         }
         break;
         case vcl::PDFWriter::Warning_FormAction_Omitted_PDFA:
         {
-            sal_uInt16 nPos = maErrors.InsertEntry( OUString( PDFFilterResId( STR_WARN_FORMACTION_PDFA_SHORT ) ),
+            sal_uInt16 nPos = m_pErrors->InsertEntry( OUString( PDFFilterResId( STR_WARN_FORMACTION_PDFA_SHORT ) ),
                                                 aWarnImg );
-            maErrors.SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_FORMACTION_PDFA ) ) );
+            m_pErrors->SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_FORMACTION_PDFA ) ) );
         }
         break;
         case vcl::PDFWriter::Warning_Transparency_Converted:
         {
-            sal_uInt16 nPos = maErrors.InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_CONVERTED_SHORT ) ),
+            sal_uInt16 nPos = m_pErrors->InsertEntry( OUString( PDFFilterResId( STR_WARN_TRANSP_CONVERTED_SHORT ) ),
                                                 aWarnImg );
-            maErrors.SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) );
+            m_pErrors->SetEntryData( nPos, new OUString( PDFFilterResId( STR_WARN_TRANSP_CONVERTED ) ) );
         }
         break;
         default:
@@ -1501,55 +1504,27 @@ ImplErrorDialog::ImplErrorDialog( const std::set< vcl::PDFWriter::ErrorCode >& r
         }
     }
 
-    FreeResource();
-
-    if( maErrors.GetEntryCount() > 0 )
+    if( m_pErrors->GetEntryCount() > 0 )
     {
-        maErrors.SelectEntryPos( 0 );
-        OUString* pStr = reinterpret_cast<OUString*>(maErrors.GetEntryData( 0 ));
-        maExplanation.SetText( pStr ? *pStr : OUString() );
+        m_pErrors->SelectEntryPos( 0 );
+        OUString* pStr = reinterpret_cast<OUString*>(m_pErrors->GetEntryData( 0 ));
+        m_pExplanation->SetText( pStr ? *pStr : OUString() );
     }
 
-    // adjust layout
-    Image aWarnImage( WarningBox::GetStandardImage() );
-    Size aImageSize( aWarnImage.GetSizePixel() );
-    Size aDlgSize( GetSizePixel() );
-    aImageSize.Width() += 6;
-    aImageSize.Height() += 6;
-    maFI.SetImage( aWarnImage );
-    maFI.SetPosSizePixel( Point( 5, 5 ), aImageSize );
-    maFI.Show();
-
-    maProcessText.SetStyle( maProcessText.GetStyle() | WB_VCENTER );
-    maProcessText.SetPosSizePixel( Point( aImageSize.Width() + 10, 5 ),
-                                   Size(  aDlgSize.Width() - aImageSize.Width() - 15, aImageSize.Height() ) );
-
-    Point aErrorLBPos( 5, aImageSize.Height() + 10 );
-    Size aErrorLBSize( aDlgSize.Width()/2 - 10, aDlgSize.Height() - aErrorLBPos.Y() - 35 );
-    maErrors.SetPosSizePixel( aErrorLBPos, aErrorLBSize );
-    maErrors.SetSelectHdl( LINK( this, ImplErrorDialog, SelectHdl ) );
-    maErrors.Show();
-
-    maExplanation.SetPosSizePixel( Point( aErrorLBPos.X() + aErrorLBSize.Width() + 5, aErrorLBPos.Y() ),
-                                   Size( aDlgSize.Width() - aErrorLBPos.X() - aErrorLBSize.Width() - 10, aErrorLBSize.Height() ) );
-    maExplanation.Show();
-
-    maButton.SetPosSizePixel( Point( (aDlgSize.Width() - 50)/2, aDlgSize.Height() - 30 ),
-                              Size( 50, 25 ) );
-    maButton.Show();
+    m_pErrors->SetSelectHdl( LINK( this, ImplErrorDialog, SelectHdl ) );
 }
 
 ImplErrorDialog::~ImplErrorDialog()
 {
     // free strings again
-    for( sal_uInt16 n = 0; n < maErrors.GetEntryCount(); n++ )
-        delete (OUString*)maErrors.GetEntryData( n );
+    for( sal_uInt16 n = 0; n < m_pErrors->GetEntryCount(); n++ )
+        delete (OUString*)m_pErrors->GetEntryData( n );
 }
 
 IMPL_LINK_NOARG(ImplErrorDialog, SelectHdl)
 {
-    OUString* pStr = reinterpret_cast<OUString*>(maErrors.GetEntryData( maErrors.GetSelectEntryPos() ));
-    maExplanation.SetText( pStr ? *pStr : OUString() );
+    OUString* pStr = reinterpret_cast<OUString*>(m_pErrors->GetEntryData( m_pErrors->GetSelectEntryPos() ));
+    m_pExplanation->SetText( pStr ? *pStr : OUString() );
     return 0;
 }
 
diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc
index 0351742..0927cb0 100644
--- a/filter/source/pdf/impdialog.hrc
+++ b/filter/source/pdf/impdialog.hrc
@@ -19,32 +19,25 @@
 
 #include <filter.hrc>
 
-#define RID_PDF_WARNPDFAPASSWORD    (RID_PDF_DIALOG_START +   6)
+#define RID_PDF_WARNPDFAPASSWORD        (RID_PDF_DIALOG_START + 6)
 
 //strings for PDF security, user password management
-#define STR_PDF_EXPORT_UDPWD         (RID_PDF_DIALOG_START +  7)
+#define STR_PDF_EXPORT_UDPWD            (RID_PDF_DIALOG_START + 7)
 
 //strings for PDF security, owner password management
-#define STR_PDF_EXPORT_ODPWD         (RID_PDF_DIALOG_START + 10)
-
-#define RID_PDF_ERROR_DLG            (RID_PDF_DIALOG_START + 11)
-#define FT_PROCESS                        1
-#define IMG_WARN                          2
-#define IMG_ERR                           3
-#define STR_WARN_TRANSP_PDFA              4
-#define STR_WARN_TRANSP_PDFA_SHORT        5
-#define STR_WARN_TRANSP_VERSION           6
-#define STR_WARN_TRANSP_VERSION_SHORT     7
-#define STR_WARN_FORMACTION_PDFA          8
-#define STR_WARN_FORMACTION_PDFA_SHORT    9
-#define STR_WARN_TRANSP_CONVERTED        10
-#define STR_WARN_TRANSP_CONVERTED_SHORT  11
-
-//ATTENTION: maximum allowed value is( RID_PDF_DIALOG_START +   19)
-
-#define FL_GENERAL_VERTICAL  157
-#define FL_INITVIEW_VERTICAL 158
-#define FL_VPREFER_VERTICAL  158
-#define FL_SECURITY_VERTICAL 160
+#define STR_PDF_EXPORT_ODPWD            (RID_PDF_DIALOG_START + 8)
+
+#define STR_WARN_TRANSP_PDFA            (RID_PDF_DIALOG_START + 9)
+#define STR_WARN_TRANSP_PDFA_SHORT      (RID_PDF_DIALOG_START + 10)
+#define STR_WARN_TRANSP_VERSION         (RID_PDF_DIALOG_START + 11)
+#define STR_WARN_TRANSP_VERSION_SHORT   (RID_PDF_DIALOG_START + 12)
+#define STR_WARN_FORMACTION_PDFA        (RID_PDF_DIALOG_START + 13)
+#define STR_WARN_FORMACTION_PDFA_SHORT  (RID_PDF_DIALOG_START + 14)
+#define STR_WARN_TRANSP_CONVERTED       (RID_PDF_DIALOG_START + 15)
+#define STR_WARN_TRANSP_CONVERTED_SHORT (RID_PDF_DIALOG_START + 16)
+#define IMG_WARN                        (RID_PDF_DIALOG_START + 17)
+#define IMG_ERR                         (RID_PDF_DIALOG_START + 18)
+
+//ATTENTION: maximum allowed value is   (RID_PDF_DIALOG_START + 19)
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 89a7648..be76a67 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -54,14 +54,10 @@ public:
     PDFFilterResId( sal_uInt32 nId );
 };
 
-class ImplErrorDialog : public ModalDialog
+class ImplErrorDialog : public MessageDialog
 {
-    FixedImage      maFI;
-    FixedText       maProcessText;
-    ListBox         maErrors;
-    FixedText       maExplanation;
-
-    OKButton        maButton;
+    ListBox*        m_pErrors;
+    FixedText*      m_pExplanation;
 
     DECL_LINK(SelectHdl, void *);
     public:
diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src
index ca9c21b..32d81a4 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -39,64 +39,54 @@ WarningBox RID_PDF_WARNPDFAPASSWORD
     Message[ en-US ] = "PDF/A does not allow encryption. The exported PDF file will not be password protected.";
 };
 
-ModalDialog RID_PDF_ERROR_DLG
+String STR_WARN_TRANSP_PDFA_SHORT
 {
-    HelpID = "filter:ModalDialog:RID_PDF_ERROR_DLG";
-    OutputSize = TRUE;
-    SVLook = TRUE;
-    Moveable = TRUE;
-    Text [en-US] = "Problems during PDF export";
-    Size = MAP_APPFONT( 200, 150 );
-
-    FixedText FT_PROCESS
-    {
-        WordBreak = TRUE;
-        Pos = MAP_APPFONT( 5, 5 );
-        Size = MAP_APPFONT( 210, 24 );
-        Text [en-US] = "During PDF export the following problems occurred:";
-    };
-
-    Bitmap IMG_WARN
-    {
-        File = "ballgreen_7.png";
-    };
-    Bitmap IMG_ERR
-    {
-        File = "ballred_7.png";
-    };
-
-    String STR_WARN_TRANSP_PDFA_SHORT
-    {
-        Text [en-US] = "PDF/A transparency";
-    };
-    String STR_WARN_TRANSP_PDFA
-    {
-        Text [en-US] = "PDF/A forbids transparency. A transparent object was painted opaque instead.";
-    };
-    String STR_WARN_TRANSP_VERSION_SHORT
-    {
-        Text [en-US] = "PDF version conflict";
-    };
-    String STR_WARN_TRANSP_VERSION
-    {
-        Text [en-US] = "Transparency is not supported in PDF versions earlier than PDF 1.4. A transparent object was painted opaque instead";
-    };
-    String STR_WARN_FORMACTION_PDFA_SHORT
-    {
-        Text [en-US] = "PDF/A form action";
-    };
-    String STR_WARN_FORMACTION_PDFA
-    {
-        Text [en-US] = "A form control contained an action not supported by the PDF/A standard. The action was skipped";
-    };
-    String STR_WARN_TRANSP_CONVERTED
-    {
-        Text [en-US] = "Some objects were converted to an image in order to remove transparencies, because the target PDF format does not support transparencies. Possibly better results can be achieved if you remove the transparent objects before exporting.";
-    };
-    String STR_WARN_TRANSP_CONVERTED_SHORT
-    {
-        Text [en-US] = "Transparencies removed";
-    };
+    Text [en-US] = "PDF/A transparency";
+};
+
+String STR_WARN_TRANSP_PDFA
+{
+    Text [en-US] = "PDF/A forbids transparency. A transparent object was painted opaque instead.";
+};
+
+String STR_WARN_TRANSP_VERSION_SHORT
+{
+    Text [en-US] = "PDF version conflict";
+};
+
+String STR_WARN_TRANSP_VERSION
+{
+    Text [en-US] = "Transparency is not supported in PDF versions earlier than PDF 1.4. A transparent object was painted opaque instead";
+};
+
+String STR_WARN_FORMACTION_PDFA_SHORT
+{
+    Text [en-US] = "PDF/A form action";
+};
+
+String STR_WARN_FORMACTION_PDFA
+{
+    Text [en-US] = "A form control contained an action not supported by the PDF/A standard. The action was skipped";
+};
+
+String STR_WARN_TRANSP_CONVERTED
+{
+    Text [en-US] = "Some objects were converted to an image in order to remove transparencies, because the target PDF format does not support transparencies. Possibly better results can be achieved if you remove the transparent objects before exporting.";
+};
+
+String STR_WARN_TRANSP_CONVERTED_SHORT
+{
+    Text [en-US] = "Transparencies removed";
+};
+
+Bitmap IMG_WARN
+{
+    File = "ballgreen_7.png";
+};
+
+Bitmap IMG_ERR
+{
+    File = "ballred_7.png";
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/uiconfig/ui/warnpdfdialog.ui b/filter/uiconfig/ui/warnpdfdialog.ui
new file mode 100644
index 0000000..1192d5e
--- /dev/null
+++ b/filter/uiconfig/ui/warnpdfdialog.ui
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.6"/>
+  <object class="GtkMessageDialog" id="WarnPDFDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="type">popup</property>
+    <property name="title" translatable="yes">Problems during PDF export</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="message_type">warning</property>
+    <property name="buttons">ok</property>
+    <property name="text" translatable="yes">During PDF export the following problems occurred:</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="messagedialog-vbox">
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">24</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="messagedialog-action_area">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="column_spacing">12</property>
+            <property name="column_homogeneous">True</property>
+            <child>
+              <object class="GtkLabel" id="message">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="xalign">0</property>
+                <property name="yalign">0</property>
+                <property name="wrap">True</property>
+                <property name="width_chars">30</property>
+                <property name="max_width_chars">30</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTreeView" id="errors:border">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <child internal-child="selection">
+                  <object class="GtkTreeSelection" id="treeview-selection1"/>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 4da3a8f..bbac6a4 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2208,6 +2208,7 @@ bool MessageDialog::set_property(const OString &rKey, const OString &rValue)
     }
     else if (rKey == "buttons")
     {
+        fprintf(stderr, "vcl.layout buttons type mode %s",  rValue.getStr());
         VclButtonsType eMode = VCL_BUTTONS_NONE;
         if (rValue.equals("none"))
             eMode = VCL_BUTTONS_NONE;
commit 538492352b0d584941a9435cdd7a7d6321bdabf1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 14 09:27:45 2014 +0000

    remove com.sun.star.comp.framework.License
    
    its unused and removing it allows us to remove the
    associated dialog and resources
    
    Change-Id: If2796ca67428f3ba9b12e92728194967a1ab124a

diff --git a/framework/Library_fwl.mk b/framework/Library_fwl.mk
index fe87449..a2b2b53 100644
--- a/framework/Library_fwl.mk
+++ b/framework/Library_fwl.mk
@@ -58,7 +58,6 @@ $(eval $(call gb_Library_add_exception_objects,fwl,\
     framework/source/recording/dispatchrecordersupplier \
     framework/source/register/registertemp \
     framework/source/services/dispatchhelper \
-    framework/source/services/license \
     framework/source/services/mediatypedetectionhelper \
     framework/source/services/uriabbreviation \
     framework/source/uielement/fontmenucontroller \
diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
index 673e90d..9c02511 100644
--- a/framework/inc/classes/resource.hrc
+++ b/framework/inc/classes/resource.hrc
@@ -60,22 +60,6 @@
 #define MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION    5
 #define MENUITEM_TOOLBAR_CLOSE                  6
 
-// License Dialog
-#define DLG_LICENSE                             (RID_FWK_DIALOG_START+256)
-#define ML_LICENSE                              (RID_FWK_DIALOG_START+11)
-#define FT_INFO1                                (RID_FWK_DIALOG_START+12)
-#define FT_INFO2                                (RID_FWK_DIALOG_START+13)
-#define FT_INFO3                                (RID_FWK_DIALOG_START+14)
-#define FT_INFO2_1                              (RID_FWK_DIALOG_START+15)
-#define FT_INFO3_1                              (RID_FWK_DIALOG_START+16)
-#define FL_DIVIDE                               (RID_FWK_DIALOG_START+17)
-#define PB_PAGEDOWN                             (RID_FWK_DIALOG_START+18)
-#define IMG_ARROW                               (RID_FWK_DIALOG_START+19)
-#define LICENSE_ACCEPT                          (RID_FWK_DIALOG_START+20)
-#define LICENSE_NOTACCEPT                       (RID_FWK_DIALOG_START+21)
-#define PB_DECLINE                              (RID_FWK_DIALOG_START+22)
-#define PB_ACCEPT                               (RID_FWK_DIALOG_START+23)
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/services.h b/framework/inc/services.h
index 2ae3e01..f7ccaad 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -39,7 +39,6 @@ namespace framework{
 #define SERVICENAME_MENUBARFACTORY                              DECLARE_ASCII("com.sun.star.ui.UIElementFactory"             )
 #define SERVICENAME_TOOLBARFACTORY                              DECLARE_ASCII("com.sun.star.ui.ToolBarFactory"               )
 #define SERVICENAME_TOOLBARCONTROLLERFACTORY                    DECLARE_ASCII("com.sun.star.frame.ToolbarControllerFactory"         )
-#define SERVICENAME_LICENSE                                     SERVICENAME_JOB
 #define SERVICENAME_STATUSBARFACTORY                            DECLARE_ASCII("com.sun.star.ui.StatusBarFactory"             )
 #define SERVICENAME_STATUSBARCONTROLLERFACTORY                  DECLARE_ASCII("com.sun.star.frame.StatusbarControllerFactory"       )
 #define SERVICENAME_STATUSBARCONTROLLER                         DECLARE_ASCII("com.sun.star.frame.StatusbarController"              )
@@ -86,7 +85,6 @@ namespace framework{
 #define IMPLEMENTATIONNAME_ADDONSTOOLBARFACTORY                 DECLARE_ASCII("com.sun.star.comp.framework.AddonsToolBarFactory"    )
 #define IMPLEMENTATIONNAME_TOOLBARSMENUCONTROLLER               DECLARE_ASCII("com.sun.star.comp.framework.ToolBarsMenuController"  )
 #define IMPLEMENTATIONNAME_TOOLBARCONTROLLERFACTORY             DECLARE_ASCII("com.sun.star.comp.framework.ToolBarControllerFactory"    )
-#define IMPLEMENTATIONNAME_LICENSE                              DECLARE_ASCII("com.sun.star.comp.framework.License"             )
 #define IMPLEMENTATIONNAME_AUTORECOVERY                         DECLARE_ASCII("com.sun.star.comp.framework.AutoRecovery"            )
 #define IMPLEMENTATIONNAME_RECENTFILESMENUCONTROLLER            DECLARE_ASCII("com.sun.star.comp.framework.RecentFilesMenuController" )
 #define IMPLEMENTATIONNAME_STATUSBARFACTORY                     DECLARE_ASCII("com.sun.star.comp.framework.StatusBarFactory"        )
diff --git a/framework/inc/services/license.hxx b/framework/inc/services/license.hxx
deleted file mode 100644
index b838387..0000000
--- a/framework/inc/services/license.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you 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 .
- */
-
-#ifndef INCLUDED_FRAMEWORK_INC_SERVICES_LICENSE_HXX
-#define INCLUDED_FRAMEWORK_INC_SERVICES_LICENSE_HXX
-
-/** Attention: stl headers must(!) be included at first. Otherwise it can make trouble
-               with solaris headers ...
-*/
-#include <vector>
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <threadhelp/resetableguard.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <threadhelp/readguard.hxx>
-#include <macros/generic.hxx>
-#include <macros/xinterface.hxx>
-#include <macros/xtypeprovider.hxx>
-#include <macros/xserviceinfo.hxx>
-#include <properties.h>
-#include <stdtypes.h>
-#include <uielement/menubarmanager.hxx>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/task/XJob.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
-#include <com/sun/star/util/CloseVetoException.hpp>
-
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/propshlp.hxx>
-
-namespace framework
-{
-    class License : // base classes
-                    // Order is necessary for right initialization!
-                    private ThreadHelpBase                      , // Struct for right initalization of mutex member! Must be first of baseclasses.
-                    public cppu::WeakImplHelper3<
-                               css::lang::XServiceInfo,
-                               css::task::XJob,
-                               css::util::XCloseable>             // => XWeak, XInterface
-    {
-    private:
-        css::uno::Reference< css::uno::XComponentContext > m_xContext;
-        sal_Bool m_bTerminate;
-    public:
-        License( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
-        virtual ~License();
-
-        /** declaration of XInterface, XTypeProvider, XServiceInfo */
-        DECLARE_XSERVICEINFO
-
-        virtual css::uno::Any SAL_CALL execute(const css::uno::Sequence<css::beans::NamedValue>& args)
-            throw( css::lang::IllegalArgumentException, css::uno::Exception, std::exception);
-
-        virtual void SAL_CALL close(sal_Bool bDeliverOwnership) throw (css::util::CloseVetoException, std::exception);
-
-        virtual void SAL_CALL addCloseListener(const css::uno::Reference< css::util::XCloseListener >& aListener) throw (css::uno::RuntimeException, std::exception);
-        virtual void SAL_CALL removeCloseListener(const css::uno::Reference< css::util::XCloseListener >& aListener) throw (css::uno::RuntimeException, std::exception);
-
-};
-
-} // namespace framework
-
-#endif // INCLUDED_FRAMEWORK_INC_SERVICES_LICENSE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/services/licensedlg.hxx b/framework/inc/services/licensedlg.hxx
deleted file mode 100644
index ccd5bb4..0000000
--- a/framework/inc/services/licensedlg.hxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you 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 .
- */
-#ifndef INCLUDED_FRAMEWORK_INC_SERVICES_LICENSEDLG_HXX
-#define INCLUDED_FRAMEWORK_INC_SERVICES_LICENSEDLG_HXX
-
-#include <sal/types.h>
-#include <rtl/string.hxx>
-#include <rtl/ustring.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <tools/resmgr.hxx>
-#include <vcl/button.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/scrbar.hxx>
-#include <svtools/svmedit.hxx>
-#include <svl/lstner.hxx>
-
-namespace framework {
-
-class LicenseView : public MultiLineEdit, public SfxListener
-{
-    sal_Bool            mbEndReached;
-    Link            maEndReachedHdl;
-    Link            maScrolledHdl;
-
-public:
-    LicenseView( Window* pParent, const ResId& rResId );
-    ~LicenseView();
-
-    void ScrollDown( ScrollType eScroll );
-
-    sal_Bool IsEndReached() const;
-    sal_Bool EndReached() const { return mbEndReached; }
-    void SetEndReached( sal_Bool bEnd ) { mbEndReached = bEnd; }
-
-    void SetEndReachedHdl( const Link& rHdl )  { maEndReachedHdl = rHdl; }
-    const Link& GetAutocompleteHdl() const { return maEndReachedHdl; }
-
-    void SetScrolledHdl( const Link& rHdl )  { maScrolledHdl = rHdl; }
-    const Link& GetScrolledHdl() const { return maScrolledHdl; }
-
-    using MultiLineEdit::Notify;
-    virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
-};
-
-class LicenseDialog : public ModalDialog
-{
-    LicenseView     aLicenseML;
-    FixedText       aInfo1FT;
-    FixedText       aInfo2FT;
-    FixedText       aInfo3FT;
-    FixedText       aInfo2_1FT;
-    FixedText       aInfo3_1FT;
-    FixedLine       aFixedLine;
-    PushButton      aPBPageDown;
-    PushButton      aPBDecline;
-    PushButton      aPBAccept;
-    FixedImage      aArrow;
-    OUString        aStrAccept;
-    OUString        aStrNotAccept;
-    OUString        aOldCancelText;
-    sal_Bool        bEndReached;
-
-    void                EnableControls();
-
-    DECL_LINK(PageDownHdl, void *);
-    DECL_LINK(EndReachedHdl, void *);
-    DECL_LINK(ScrolledHdl, void *);
-    DECL_LINK(AcceptBtnHdl, void *);
-    DECL_LINK(DeclineBtnHdl, void *);
-
-    public:
-        LicenseDialog(const OUString& aLicense, ResMgr *pResMgr);
-        virtual ~LicenseDialog();
-
-};
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index 54e3cc4..1f4f5df 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -119,155 +119,6 @@ String STR_TOOLBAR_TITLE_ADDON
     Text [ en-US ] = "Add-On %num%";
 };
 
-// ***********************************************************************
-//       License Dialog
-// ***********************************************************************
-#define LICENSE_DIALOG_WIDTH  260
-#define LICENSE_RIGHT_BORDER  7
-#define LICENSE_ROW_1 (7)
-#define LICENSE_COL_1 (7)
-
-#define OFFSET        2
-#define COL2_WIDTH   10
-#define OFFSET_IMG   10
-#define FT_HEIGHT     8
-#define PB_HEIGHT    14
-#define PD_WIDTH     40
-
-#define LICENSE_HEIGHT 102
-#define LICENSE_ROW_2 (LICENSE_ROW_1 + OFFSET + LICENSE_HEIGHT)
-#define LICENSE_ROW_3 (LICENSE_ROW_2 + OFFSET + FT_HEIGHT)
-#define LICENSE_ROW_4 (LICENSE_ROW_3 + OFFSET + 3*FT_HEIGHT )
-#define LICENSE_ROW_5 (LICENSE_ROW_4 + FT_HEIGHT+ OFFSET )
-#define LICENSE_ROW_6 (LICENSE_ROW_5 + 2*OFFSET )
-
-#define LICENSE_DIALOG_HEIGHT (LICENSE_ROW_6 + + PB_HEIGHT + 7)
-
-#define LICENSE_COL_2 (LICENSE_COL_1 + OFFSET_IMG)
-#define LICENSE_COL_3 (LICENSE_COL_2 + COL2_WIDTH +1)
-#define LICENSE_COL_4 (LICENSE_DIALOG_WIDTH - LICENSE_RIGHT_BORDER - PD_WIDTH)
-
-#define LICENSE_WIDTH (LICENSE_DIALOG_WIDTH - LICENSE_RIGHT_BORDER - LICENSE_ROW_1)
-#define COL3_WIDTH    (LICENSE_COL_4 - LICENSE_COL_3)
-
-
-ModalDialog DLG_LICENSE
-{
-    HelpId = HID_LICENSEDIALOG;
-    Moveable        = TRUE ;
-    Closeable       = TRUE ;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Hide = TRUE ;
-    Size = MAP_APPFONT ( LICENSE_DIALOG_WIDTH , LICENSE_DIALOG_HEIGHT ) ;
-    Text [ en-US ] = "License Agreement";
-
-    MultiLineEdit ML_LICENSE
-    {
-        HelpID = "framework:MultiLineEdit:DLG_LICENSE:ML_LICENSE";
-        PosSize = MAP_APPFONT ( LICENSE_COL_1 , LICENSE_ROW_1 , LICENSE_WIDTH , LICENSE_HEIGHT ) ;
-        Border = TRUE ;
-        VScroll = TRUE ;
-        ReadOnly = TRUE ;
-    };
-
-    FixedText FT_INFO1
-    {
-        WordBreak = TRUE ;
-        Pos = MAP_APPFONT ( LICENSE_COL_1 , LICENSE_ROW_2 ) ;
-        Size = MAP_APPFONT ( LICENSE_WIDTH , FT_HEIGHT ) ;
-        Text [ en-US ] = "Please follow these steps to proceed with the installation:" ;
-    };
-
-    FixedImage IMG_ARROW
-    {
-        Pos = MAP_APPFONT ( LICENSE_COL_1 , LICENSE_ROW_3 ) ;
-        Size = MAP_PIXEL ( 16 , 16 ) ;
-        Fixed = Image
-        {
-            ImageBitmap = Bitmap
-            {
-                File = "arrow.bmp" ;
-            };
-            MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
-        };
-    };
-
-    FixedText FT_INFO2_1
-    {
-        WordBreak = TRUE ;
-        Pos = MAP_APPFONT ( LICENSE_COL_2 , LICENSE_ROW_3 ) ;
-        Size = MAP_APPFONT ( COL2_WIDTH , FT_HEIGHT ) ;
-        Text [ en-US ] = "1." ;
-    };
-
-    FixedText FT_INFO2
-    {
-        WordBreak = TRUE ;
-        Pos = MAP_APPFONT ( LICENSE_COL_3 , LICENSE_ROW_3 ) ;
-        Size = MAP_APPFONT ( COL3_WIDTH, 3*FT_HEIGHT ) ;
-        Text [ en-US ] = "View the complete License Agreement. Please use the scroll bar or the '%PAGEDOWN' button in this dialog to view the entire license text." ;
-    };
-
-    PushButton PB_PAGEDOWN
-    {
-        HelpID = "framework:PushButton:DLG_LICENSE:PB_PAGEDOWN";
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( LICENSE_COL_4 , LICENSE_ROW_3 ) ;
-        Size = MAP_APPFONT ( PD_WIDTH , PB_HEIGHT ) ;
-        Text [ en-US ] = "Scroll Down" ;
-    };
-
-    FixedText FT_INFO3_1
-    {
-        WordBreak = TRUE ;
-        Pos = MAP_APPFONT ( LICENSE_COL_2 , LICENSE_ROW_4 ) ;
-        Size = MAP_APPFONT ( COL2_WIDTH, FT_HEIGHT ) ;
-        Text [ en-US ] = "2." ;
-    };
-
-    FixedText FT_INFO3
-    {
-        WordBreak = TRUE ;
-        Pos = MAP_APPFONT ( LICENSE_COL_3, LICENSE_ROW_4 ) ;
-        Size = MAP_APPFONT ( COL3_WIDTH, FT_HEIGHT ) ;
-        Text [ en-US ] = "Accept the License Agreement." ;
-    };
-
-    String LICENSE_ACCEPT
-    {
-        Text [ en-US ] = "~Accept" ;
-    };
-
-    String LICENSE_NOTACCEPT
-    {
-        Text [ en-US ] = "Decline" ;
-    };
-
-    FixedLine FL_DIVIDE
-    {
-        Pos = MAP_APPFONT ( LICENSE_COL_1, LICENSE_ROW_5 ) ;
-        Size = MAP_APPFONT ( LICENSE_WIDTH, 1 ) ;
-    };
-
-    PushButton PB_ACCEPT
-    {
-        HelpID = "framework:PushButton:DLG_LICENSE:PB_ACCEPT";
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( LICENSE_COL_4 - PD_WIDTH - OFFSET_IMG , LICENSE_ROW_6 ) ;
-        Size = MAP_APPFONT ( PD_WIDTH , PB_HEIGHT ) ;
-    };
-
-    PushButton PB_DECLINE
-    {
-        HelpID = "framework:PushButton:DLG_LICENSE:PB_DECLINE";
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( LICENSE_COL_4 , LICENSE_ROW_6 ) ;
-        Size = MAP_APPFONT ( PD_WIDTH , PB_HEIGHT ) ;
-    };
-
-};
-
 String STR_FULL_DISC_RETRY_BUTTON
 {
     Text [ en-US ] = "Retry" ;
diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx
index 703e79e..e02195c 100644
--- a/framework/source/register/registertemp.cxx
+++ b/framework/source/register/registertemp.cxx
@@ -40,7 +40,6 @@
 #include <services/dispatchhelper.hxx>
 #include <recording/dispatchrecorder.hxx>
 #include <recording/dispatchrecordersupplier.hxx>
-#include <services/license.hxx>
 #include <services/uriabbreviation.hxx>
 #include <uielement/fontmenucontroller.hxx>
 #include <uielement/fontsizemenucontroller.hxx>
@@ -55,7 +54,6 @@ COMPONENTGETFACTORY ( fwl,
                         IFFACTORY( ::framework::MediaTypeDetectionHelper        )
                         IFFACTORY( ::framework::MailToDispatcher                        ) else
                         IFFACTORY( ::framework::ServiceHandler                          )   else
-                        IFFACTORY( ::framework::License                                 )   else
                         IFFACTORY( ::framework::PopupMenuDispatcher                     )   else
                         IFFACTORY( ::framework::DispatchHelper                          )   else
                         IFFACTORY( ::framework::DispatchRecorder                        )   else
diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx
deleted file mode 100644
index bcde6a9..0000000
--- a/framework/source/services/license.cxx
+++ /dev/null
@@ -1,529 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you 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 .
- */
-
-#include <config_folders.h>
-
-#include <services/license.hxx>
-#include <threadhelp/resetableguard.hxx>
-#include <services.h>
-
-// local header for UI implementation
-#include "services/licensedlg.hxx"
-#include "classes/resource.hrc"
-
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/configuration/theDefaultProvider.hpp>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/util/XChangesBatch.hpp>
-#include <com/sun/star/office/Quickstart.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-
-#include <rtl/ustrbuf.hxx>
-#include <rtl/strbuf.hxx>
-#include <rtl/ustring.hxx>
-#include <rtl/string.hxx>
-#include <unotools/bootstrap.hxx>
-#include <osl/file.hxx>
-#include <vcl/xtextedt.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/settings.hxx>
-#include <comphelper/processfactory.hxx>
-#include <tools/date.hxx>
-#include <tools/time.hxx>
-#include <tools/datetime.hxx>
-#include <osl/time.h>
-
-#include <boost/scoped_ptr.hpp>
-
-namespace framework{
-using namespace utl;
-using namespace ::osl                           ;
-using namespace ::cppu                          ;
-using namespace ::com::sun::star::uno           ;
-using namespace ::com::sun::star::beans         ;
-using namespace ::com::sun::star::configuration ;
-using namespace ::com::sun::star::lang          ;
-using namespace ::com::sun::star::util          ;
-using namespace ::com::sun::star::frame         ;
-
-using ::Date;
-using ::Time;
-using ::DateTime;
-
-// license file name
-static const char *szLicensePath = "/" LIBO_SHARE_FOLDER "/readme";
-#ifdef UNX
-static const char *szUNXLicenseName = "/LICENSE";
-static const char *szUNXLicenseExt = "";
-#elif defined(WNT)
-static const char *szWNTLicenseName = "/license";
-static const char *szWNTLicenseExt = ".txt";
-#endif
-
-
-//  constructor
-
-License::License( const Reference< XComponentContext >& rxContext )
-        //  Init baseclasses first
-        //  Attention:
-        //      Don't change order of initialization!
-        //      ThreadHelpBase is a struct with a mutex as member. We can't use a mutex as member, while
-        //      we must garant right initialization and a valid value of this! First initialize
-        //      baseclasses and then members. And we need the mutex for other baseclasses !!!
-        :   ThreadHelpBase  ( &Application::GetSolarMutex() )
-        // Init member
-        ,   m_xContext      ( rxContext                     )
-        ,   m_bTerminate    ( sal_False                     )
-{
-}
-
-
-//  destructor
-
-License::~License()
-{
-}
-
-
-//  XInterface, XTypeProvider, XServiceInfo
-
-
-DEFINE_XSERVICEINFO_MULTISERVICE_2  (   License,
-                                        OWeakObject                 ,
-                                        SERVICENAME_LICENSE         ,
-                                        IMPLEMENTATIONNAME_LICENSE
-                                    )
-
-DEFINE_INIT_SERVICE                 (   License,
-                                        {
-                                        }
-                                    )
-
-
-
-static DateTime _oslDateTimeToDateTime(const oslDateTime& aDateTime)
-{
-    return DateTime(
-        Date(aDateTime.Day, aDateTime.Month, aDateTime.Year),
-        Time(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds));
-}
-
-static OUString _makeDateTimeString (const DateTime& aDateTime, sal_Bool bUTC = sal_False)
-{
-    OStringBuffer aDateTimeString;
-    aDateTimeString.append((sal_Int32)aDateTime.GetYear());
-    aDateTimeString.append("-");
-    if (aDateTime.GetMonth()<10) aDateTimeString.append("0");
-    aDateTimeString.append((sal_Int32)aDateTime.GetMonth());
-    aDateTimeString.append("-");
-    if (aDateTime.GetDay()<10) aDateTimeString.append("0");
-    aDateTimeString.append((sal_Int32)aDateTime.GetDay());
-    aDateTimeString.append("T");
-    if (aDateTime.GetHour()<10) aDateTimeString.append("0");
-    aDateTimeString.append((sal_Int32)aDateTime.GetHour());
-    aDateTimeString.append(":");
-    if (aDateTime.GetMin()<10) aDateTimeString.append("0");
-    aDateTimeString.append((sal_Int32)aDateTime.GetMin());
-    aDateTimeString.append(":");
-    if (aDateTime.GetSec()<10) aDateTimeString.append("0");
-    aDateTimeString.append((sal_Int32)aDateTime.GetSec());
-    if (bUTC) aDateTimeString.append("Z");
-
-    return OStringToOUString(aDateTimeString.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
-}
-
-static sal_Bool _parseDateTime(const OUString& aString, DateTime& aDateTime)
-{
-    // take apart a canonical literal xsd:dateTime string
-    //CCYY-MM-DDThh:mm:ss(Z)
-
-    OUString aDateTimeString = aString.trim();
-
-    // check length
-    if (aDateTimeString.getLength() < 19 || aDateTimeString.getLength() > 20)
-        return sal_False;
-
-    sal_Int32 nDateLength = 10;
-    sal_Int32 nTimeLength = 8;
-
-    OUString aUTCString("Z");
-
-    OUString aDateString = aDateTimeString.copy(0, nDateLength);
-    OUString aTimeString = aDateTimeString.copy(nDateLength+1, nTimeLength);
-
-    sal_Int32 nIndex = 0;
-    sal_Int32 nYear = aDateString.getToken(0, '-', nIndex).toInt32();
-    sal_Int32 nMonth = aDateString.getToken(0, '-', nIndex).toInt32();
-    sal_Int32 nDay = aDateString.getToken(0, '-', nIndex).toInt32();
-    nIndex = 0;
-    sal_Int32 nHour = aTimeString.getToken(0, ':', nIndex).toInt32();
-    sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32();
-    sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32();
-
-    Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear);
-    Time tmpTime(nHour, nMinute, nSecond);
-    DateTime tmpDateTime(tmpDate, tmpTime);
-    if (aString.indexOf(aUTCString) < 0)
-        tmpDateTime.ConvertToUTC();
-
-    aDateTime = tmpDateTime;
-    return sal_True;
-}
-
-static OUString _getCurrentDateString()
-{
-    return _makeDateTimeString(DateTime( DateTime::SYSTEM));
-}
-
-// execution of license check...
-css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::NamedValue >& )
-    throw( css::lang::IllegalArgumentException, css::uno::Exception, std::exception)
-{
-    // return value
-    Any aRet; aRet <<= sal_False;
-
-    try
-    {
-        OUString aBaseInstallPath;
-        Bootstrap::PathStatus aBaseLocateResult =
-            Bootstrap::locateBaseInstallation(aBaseInstallPath);
-        if (aBaseLocateResult != Bootstrap::PATH_EXISTS)
-        {
-            aRet <<= sal_False;
-            return aRet;
-        }
-
-        // determine the filename of the license to show
-        OUString aLangString( Application::GetSettings().GetUILanguageTag().getBcp47());
-#if defined(WNT)
-        OUString aLicensePath =
-            aBaseInstallPath + OUString::createFromAscii(szLicensePath)
-            + OUString::createFromAscii(szWNTLicenseName)
-            + "_"
-            + aLangString
-            + OUString::createFromAscii(szWNTLicenseExt);
-#else
-        OUString aLicensePath =
-            aBaseInstallPath + OUString::createFromAscii(szLicensePath)
-            + OUString::createFromAscii(szUNXLicenseName)
-            + "_"
-            + aLangString
-            + OUString::createFromAscii(szUNXLicenseExt);
-#endif
-        // check if we need to show the license at all
-        // open org.openoffice.Setup/Office/ooLicenseAcceptDate
-        OUString sAccessSrvc("com.sun.star.configuration.ConfigurationUpdateAccess");
-
-        // get configuration provider
-        Reference< XMultiServiceFactory > theConfigProvider = theDefaultProvider::get( m_xContext );
-        Sequence< Any > theArgs(1);
-        NamedValue v;
-        v.Name = "NodePath";
-        v.Value <<= OUString("org.openoffice.Setup/Office");
-        theArgs[0] <<= v;
-        Reference< XPropertySet > pset = Reference< XPropertySet >(
-            theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
-
-        // if we find a date there, compare it to baseinstall license date
-        OUString aAcceptDate;
-        if (pset->getPropertyValue("ooLicenseAcceptDate") >>= aAcceptDate)
-        {
-            // get LicenseFileDate from base install
-            OUString aLicenseURL = aLicensePath;
-            DirectoryItem aDirItem;
-            if (DirectoryItem::get(aLicenseURL, aDirItem) != FileBase::E_None)
-                return makeAny(sal_False);
-            FileStatus aStatus(osl_FileStatus_Mask_All);
-            if (aDirItem.getFileStatus(aStatus) != FileBase::E_None)
-                return makeAny(sal_False);
-            TimeValue aTimeVal = aStatus.getModifyTime();
-            oslDateTime aDateTimeVal;
-            if (!osl_getDateTimeFromTimeValue(&aTimeVal, &aDateTimeVal))
-                return makeAny(sal_False);
-
-            // compare dates
-            DateTime aLicenseDateTime = _oslDateTimeToDateTime(aDateTimeVal);
-            DateTime aAcceptDateTime( DateTime::EMPTY);
-            if (!_parseDateTime(aAcceptDate, aAcceptDateTime))
-                return makeAny(sal_False);
-
-            if ( aAcceptDateTime > aLicenseDateTime )
-                return makeAny(sal_True);
-        }
-        // prepare to show
-        // display license dialog
-        LanguageTag aLanguageTag( Application::GetSettings().GetUILanguageTag());
-        boost::scoped_ptr<ResMgr> pResMgr( ResMgr::SearchCreateResMgr("fwe", aLanguageTag));
-        boost::scoped_ptr<LicenseDialog> pDialog(new LicenseDialog(aLicensePath, pResMgr.get()));
-        sal_Bool bAgreed = (pDialog->Execute() == 1);
-
-        if (bAgreed) {
-
-            // write org.openoffice.Setup/ooLicenseAcceptDate
-            aAcceptDate = _getCurrentDateString();
-            pset->setPropertyValue("ooLicenseAcceptDate", makeAny(aAcceptDate));
-            Reference< XChangesBatch >(pset, UNO_QUERY_THROW)->commitChanges();
-
-            // enable quickstarter
-
-            Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
-            css::office::Quickstart::createAutoStart(xContext, true/*Quickstart*/, true/*Autostart*/);
-
-            aRet <<= sal_True;
-        }
-        else
-        {
-            aRet <<= sal_False;
-        }
-    }
-    catch (const RuntimeException&)
-    {
-        // license could not be verified
-        aRet <<= sal_False;
-    }
-    return aRet;
-}
-
-void SAL_CALL License::close(sal_Bool /*bDeliverOwnership*/) throw (css::util::CloseVetoException, std::exception)
-{
-    if (!m_bTerminate)
-        throw CloseVetoException();
-}
-void SAL_CALL License::addCloseListener(const css::uno::Reference< css::util::XCloseListener >&)
-    throw (css::uno::RuntimeException, std::exception)
-{
-}
-void SAL_CALL License::removeCloseListener(const css::uno::Reference< css::util::XCloseListener >&)
-    throw (css::uno::RuntimeException, std::exception)
-{
-}
-
-
-
-//   License Dialog
-
-
-LicenseDialog::LicenseDialog(const OUString & aLicensePath, ResMgr *pResMgr) :
-    ModalDialog(NULL, ResId(DLG_LICENSE, *pResMgr)),
-    aLicenseML(this, ResId(ML_LICENSE, *pResMgr)),
-    aInfo1FT(this, ResId(FT_INFO1, *pResMgr)),
-    aInfo2FT(this, ResId(FT_INFO2, *pResMgr)),
-    aInfo3FT(this, ResId(FT_INFO3, *pResMgr)),
-    aInfo2_1FT(this, ResId(FT_INFO2_1, *pResMgr)),
-    aInfo3_1FT(this, ResId(FT_INFO3_1, *pResMgr)),
-    aFixedLine(this, ResId(FL_DIVIDE, *pResMgr)),
-    aPBPageDown(this, ResId(PB_PAGEDOWN, *pResMgr)),
-    aPBDecline( this, ResId(PB_DECLINE, *pResMgr) ),
-    aPBAccept( this, ResId(PB_ACCEPT, *pResMgr) ),
-    aArrow(this, ResId(IMG_ARROW, *pResMgr)),
-    aStrAccept( ResId(LICENSE_ACCEPT, *pResMgr) ),
-    aStrNotAccept( ResId(LICENSE_NOTACCEPT, *pResMgr) ),
-    bEndReached(sal_False)
-{
-    FreeResource();
-
-    aLicenseML.SetEndReachedHdl( LINK(this, LicenseDialog, EndReachedHdl) );
-    aLicenseML.SetScrolledHdl( LINK(this, LicenseDialog, ScrolledHdl) );
-
-    aPBPageDown.SetClickHdl( LINK(this, LicenseDialog, PageDownHdl) );
-    aPBDecline.SetClickHdl( LINK(this, LicenseDialog, DeclineBtnHdl) );
-    aPBAccept.SetClickHdl( LINK(this, LicenseDialog, AcceptBtnHdl) );
-
-    // We want a automatic repeating page down button
-    WinBits aStyle = aPBPageDown.GetStyle();
-    aStyle |= WB_REPEAT;
-    aPBPageDown.SetStyle( aStyle );
-
-    OUString aText = aInfo2FT.GetText();
-    aText = aText.replaceAll( "%PAGEDOWN", aPBPageDown.GetText() );
-    aInfo2FT.SetText( aText );
-
-    aPBDecline.SetText( aStrNotAccept );
-    aPBAccept.SetText( aStrAccept );
-
-    aPBAccept.Disable();
-
-    // load license text
-    File aLicenseFile(aLicensePath);
-    if ( aLicenseFile.open(osl_File_OpenFlag_Read) == FileBase::E_None)
-    {
-        DirectoryItem d;
-        DirectoryItem::get(aLicensePath, d);
-        FileStatus fs(osl_FileStatus_Mask_FileSize);
-        d.getFileStatus(fs);
-        sal_uInt64 nBytesRead = 0;
-        sal_uInt64 nPosition = 0;
-        sal_uInt32 nBytes = (sal_uInt32)fs.getFileSize();
-        sal_Char *pBuffer = new sal_Char[nBytes];
-        while (aLicenseFile.read(pBuffer+nPosition, nBytes-nPosition, nBytesRead) == FileBase::E_None
-            && nPosition + nBytesRead < nBytes)
-        {
-            nPosition += nBytesRead;
-        }
-        OUString aLicenseString(pBuffer, nBytes, RTL_TEXTENCODING_UTF8,
-                OSTRING_TO_OUSTRING_CVTFLAGS | RTL_TEXTTOUNICODE_FLAGS_GLOBAL_SIGNATURE);
-        delete[] pBuffer;
-        aLicenseML.SetText(aLicenseString);
-    }
-
-}
-
-LicenseDialog::~LicenseDialog()
-{
-}
-
-IMPL_LINK_NOARG(LicenseDialog, PageDownHdl)
-{
-    aLicenseML.ScrollDown( SCROLL_PAGEDOWN );
-    return 0;
-}
-
-IMPL_LINK_NOARG(LicenseDialog, EndReachedHdl)
-{
-    bEndReached = sal_True;
-
-    EnableControls();
-
-    return 0;
-}
-
-IMPL_LINK_NOARG(LicenseDialog, ScrolledHdl)
-{
-    EnableControls();
-
-    return 0;
-}
-
-IMPL_LINK_NOARG(LicenseDialog, DeclineBtnHdl)
-{
-    EndDialog(0);
-    return 0;
-}
-IMPL_LINK_NOARG(LicenseDialog, AcceptBtnHdl)
-{
-    EndDialog(1);
-    return 0;
-}
-
-
-void LicenseDialog::EnableControls()
-{
-    if( !bEndReached &&
-        ( aLicenseML.IsEndReached() || aLicenseML.GetText().isEmpty() ) )
-        bEndReached = sal_True;
-
-    if ( bEndReached )
-    {
-        Point aPos( aInfo1FT.GetPosPixel().X(),
-                aInfo3_1FT.GetPosPixel().Y() );
-        aArrow.SetPosPixel( aPos );
-        aPBAccept.Enable();
-    }
-    else
-    {
-        Point aPos( aInfo1FT.GetPosPixel().X(),
-                aInfo2_1FT.GetPosPixel().Y() );
-        aArrow.SetPosPixel( aPos );
-        aPBAccept.Disable();
-    }
-
-    if ( aLicenseML.IsEndReached() )
-        aPBPageDown.Disable();
-    else
-        aPBPageDown.Enable();
-
-}
-
-
-LicenseView::LicenseView( Window* pParent, const ResId& rResId )
-    : MultiLineEdit( pParent, rResId )
-{
-    SetLeftMargin( 5 );
-
-    mbEndReached = IsEndReached();
-
-    StartListening( *GetTextEngine() );
-}
-
-LicenseView::~LicenseView()
-{
-    maEndReachedHdl = Link();
-    maScrolledHdl   = Link();
-
-    EndListeningAll();
-}
-
-void LicenseView::ScrollDown( ScrollType eScroll )
-{
-    ScrollBar*  pScroll = GetVScrollBar();
-
-    if ( pScroll )
-        pScroll->DoScrollAction( eScroll );
-}
-
-sal_Bool LicenseView::IsEndReached() const
-{
-    sal_Bool bEndReached;
-
-    ExtTextView*    pView = GetTextView();
-    ExtTextEngine*  pEdit = GetTextEngine();
-    sal_uLong           nHeight = pEdit->GetTextHeight();
-    Size            aOutSize = pView->GetWindow()->GetOutputSizePixel();
-    Point           aBottom( 0, aOutSize.Height() );
-
-    if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 )
-        bEndReached = sal_True;
-    else
-        bEndReached = sal_False;
-
-    return bEndReached;
-}
-
-void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint )
-{
-    if ( rHint.IsA( TYPE(TextHint) ) )
-    {
-        sal_Bool    bLastVal = EndReached();
-        sal_uLong   nId = ((const TextHint&)rHint).GetId();
-
-        if ( nId == TEXT_HINT_PARAINSERTED )
-        {
-            if ( bLastVal )
-                mbEndReached = IsEndReached();
-        }
-        else if ( nId == TEXT_HINT_VIEWSCROLLED )
-        {
-            if ( ! mbEndReached )
-                mbEndReached = IsEndReached();
-            maScrolledHdl.Call( this );
-        }
-
-        if ( EndReached() && !bLastVal )
-        {
-            maEndReachedHdl.Call( this );
-        }
-    }
-}
-
-}       //  namespace framework
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/util/fwl.component b/framework/util/fwl.component
index 9583b17..b035083 100644
--- a/framework/util/fwl.component
+++ b/framework/util/fwl.component
@@ -40,9 +40,6 @@
   <implementation name="com.sun.star.comp.framework.HeaderMenuController">
     <service name="com.sun.star.frame.PopupMenuController"/>
   </implementation>
-  <implementation name="com.sun.star.comp.framework.License">
-    <service name="com.sun.star.task.Job"/>
-  </implementation>
   <implementation name="com.sun.star.comp.framework.MacrosMenuController">
     <service name="com.sun.star.frame.PopupMenuController"/>
   </implementation>


More information about the Libreoffice-commits mailing list