[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - odk/examples sfx2/inc sfx2/source
Ariel Constenla-Haile
arielch at apache.org
Sun Feb 24 17:08:16 PST 2013
dev/null |binary
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/LICENSE | 202 ---
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/Makefile | 228 ----
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/ModifiedStatusbarController.cxx | 259 ----
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/ModifiedStatusbarController.hxx | 65 -
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/StatusbarController.cxx | 540 ----------
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/StatusbarController.hxx | 124 --
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/compfactory.cxx | 62 -
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/defines.hxx | 45
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/description/description_en-US.txt | 1
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/macros.hxx | 56 -
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/project.mk | 41
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/registry/data/org/openoffice/Office/Addons.xcu | 69 -
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/registry/data/org/openoffice/Office/UI/Controller.xcu | 39
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/components.xml | 28
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/description.xml | 51
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/manifest.xml | 30
odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/update.xml | 34
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/LICENSE | 202 ---
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/Makefile | 225 ----
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/SelectionModeStatusbarController.cxx | 259 ----
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/SelectionModeStatusbarController.hxx | 77 -
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/StatusbarController.cxx | 540 ----------
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/StatusbarController.hxx | 124 --
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/compfactory.cxx | 62 -
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/defines.hxx | 40
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/description/description_en-US.txt | 1
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/macros.hxx | 56 -
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/project.mk | 41
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/registry/data/org/openoffice/Office/Addons.xcu | 69 -
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/registry/data/org/openoffice/Office/UI/Controller.xcu | 39
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/xml/components.xml | 28
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/xml/description.xml | 51
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/xml/manifest.xml | 30
odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/xml/update.xml | 34
odk/examples/cpp/StatusbarController/WordCountStatusbarController/BaseDispatch.cxx | 237 ----
odk/examples/cpp/StatusbarController/WordCountStatusbarController/BaseDispatch.hxx | 95 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/DispatchPool.cxx | 290 -----
odk/examples/cpp/StatusbarController/WordCountStatusbarController/DispatchPool.hxx | 57 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/LICENSE | 202 ---
odk/examples/cpp/StatusbarController/WordCountStatusbarController/Makefile | 243 ----
odk/examples/cpp/StatusbarController/WordCountStatusbarController/ProtocolHandler.cxx | 207 ---
odk/examples/cpp/StatusbarController/WordCountStatusbarController/ProtocolHandler.hxx | 100 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/StatusbarController.cxx | 539 ---------
odk/examples/cpp/StatusbarController/WordCountStatusbarController/StatusbarController.hxx | 124 --
odk/examples/cpp/StatusbarController/WordCountStatusbarController/WordCountDispatch.cxx | 497 ---------
odk/examples/cpp/StatusbarController/WordCountStatusbarController/WordCountDispatch.hxx | 86 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/WordCountStatusbarController.cxx | 209 ---
odk/examples/cpp/StatusbarController/WordCountStatusbarController/WordCountStatusbarController.hxx | 66 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/compfactory.cxx | 71 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/defines.hxx | 81 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/description/description_en-US.txt | 1
odk/examples/cpp/StatusbarController/WordCountStatusbarController/macros.hxx | 55 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/project.mk | 43
odk/examples/cpp/StatusbarController/WordCountStatusbarController/registry/data/org/openoffice/Office/Addons.xcu | 69 -
odk/examples/cpp/StatusbarController/WordCountStatusbarController/registry/data/org/openoffice/Office/ProtocolHandler.xcu | 38
odk/examples/cpp/StatusbarController/WordCountStatusbarController/registry/data/org/openoffice/Office/UI/Controller.xcu | 39
odk/examples/cpp/StatusbarController/WordCountStatusbarController/xml/components.xml | 31
odk/examples/cpp/StatusbarController/WordCountStatusbarController/xml/description.xml | 51
odk/examples/cpp/StatusbarController/WordCountStatusbarController/xml/manifest.xml | 34
odk/examples/cpp/StatusbarController/WordCountStatusbarController/xml/update.xml | 34
sfx2/inc/sfx2/event.hxx | 54 -
sfx2/source/doc/printhelper.cxx | 51
sfx2/source/view/viewprn.cxx | 13
64 files changed, 70 insertions(+), 7299 deletions(-)
New commits:
commit 1bfae56dd9d633a80924bfeefc03368100d75a8f
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Feb 24 18:23:21 2013 +0000
i121810 - Adapt SfxPrintingHint to work with the "new" XDocumentEventBroadcaster
diff --git a/sfx2/inc/sfx2/event.hxx b/sfx2/inc/sfx2/event.hxx
index 9ff14f8..de542e6 100644
--- a/sfx2/inc/sfx2/event.hxx
+++ b/sfx2/inc/sfx2/event.hxx
@@ -25,6 +25,7 @@
#include "sal/config.h"
#include "sfx2/dllapi.h"
+#include "sfx2/sfx.hrc"
#include <tools/string.hxx>
#include <svl/hint.hxx>
#include <unotools/eventcfg.hxx>
@@ -33,6 +34,9 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XController2.hpp>
+#include <com/sun/star/view/PrintableState.hpp>
+
+namespace css = ::com::sun::star;
class SfxObjectShell;
@@ -66,22 +70,22 @@ public:
class SFX2_DLLPUBLIC SfxViewEventHint : public SfxEventHint
{
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 > xViewController;
+ ::com::sun::star::uno::Reference< css::frame::XController2 > xViewController;
public:
TYPEINFO();
- SfxViewEventHint( sal_uInt16 nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController )
+ SfxViewEventHint( sal_uInt16 nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const css::uno::Reference< css::frame::XController >& xController )
: SfxEventHint( nId, aName, pObj )
- , xViewController( xController, ::com::sun::star::uno::UNO_QUERY )
+ , xViewController( xController, css::uno::UNO_QUERY )
{}
- SfxViewEventHint( sal_uInt16 nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController )
+ SfxViewEventHint( sal_uInt16 nId, const ::rtl::OUString& aName, SfxObjectShell *pObj, const css::uno::Reference< css::frame::XController2 >& xController )
: SfxEventHint( nId, aName, pObj )
, xViewController( xController )
{}
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 > GetController() const
+ css::uno::Reference< css::frame::XController2 > GetController() const
{ return xViewController; }
};
@@ -116,23 +120,35 @@ public:
};
class Printer;
-class SfxPrintingHint : public SfxHint
+
+class SfxPrintingHint : public SfxViewEventHint
{
- sal_Int32 nWhich;
+ sal_Int32 mnPrintableState;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aOpts;
public:
- TYPEINFO();
- SfxPrintingHint( sal_Int32 nEvent, const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
- : nWhich( nEvent )
- , aOpts( rOpts )
- {}
-
- SfxPrintingHint( sal_Int32 nEvent )
- : nWhich( nEvent )
- {}
-
- sal_Int32 GetWhich() const { return nWhich; }
- const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& GetOptions() { return aOpts; }
+ TYPEINFO();
+
+ SfxPrintingHint(
+ sal_Int32 nEvent,
+ const css::uno::Sequence < css::beans::PropertyValue >& rOpts,
+ SfxObjectShell *pObj,
+ const css::uno::Reference< css::frame::XController2 >& xController )
+ : SfxViewEventHint(
+ SFX_EVENT_PRINTDOC,
+ GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ),
+ pObj,
+ xController )
+ , mnPrintableState( nEvent )
+ , aOpts( rOpts )
+ {}
+
+ SfxPrintingHint( sal_Int32 nEvent )
+ : SfxViewEventHint( SFX_EVENT_PRINTDOC, rtl::OUString(), 0, css::uno::Reference< css::frame::XController >() )
+ , mnPrintableState( nEvent )
+ {}
+
+ sal_Int32 GetWhich() const { return mnPrintableState; }
+ const css::uno::Sequence < css::beans::PropertyValue >& GetOptions() { return aOpts; }
};
#endif
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index c5ae0dd..29512bc 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -60,6 +60,8 @@
#include <sfx2/objsh.hxx>
#include <sfx2/event.hxx>
+#define SFX_PRINTABLESTATE_CANCELJOB -2
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -143,7 +145,7 @@ void SAL_CALL SfxPrintJob_Impl::cancelJob() throw (RuntimeException)
{
// FIXME: how to cancel PrintJob via API?!
if( m_pData->m_pObjectShell.Is() )
- m_pData->m_pObjectShell->Broadcast( SfxPrintingHint( -2 ) );
+ m_pData->m_pObjectShell->Broadcast( SfxPrintingHint( SFX_PRINTABLESTATE_CANCELJOB ) );
}
SfxPrintHelper::SfxPrintHelper()
@@ -788,7 +790,7 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint );
if ( &rBC != m_pObjectShell
|| !pPrintHint
- || pPrintHint->GetWhich() == -2 ) // -2 : CancelPrintJob
+ || pPrintHint->GetWhich() == SFX_PRINTABLESTATE_CANCELJOB )
return;
if ( pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_STARTED )
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index c70abf8..d60dc9d 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -25,7 +25,6 @@
#include "precompiled_sfx2.hxx"
#include <com/sun/star/document/XDocumentProperties.hpp>
-#include <com/sun/star/view/PrintableState.hpp>
#include "com/sun/star/view/XRenderable.hpp"
#include <svl/itempool.hxx>
@@ -61,7 +60,7 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-TYPEINIT1(SfxPrintingHint, SfxHint);
+TYPEINIT1(SfxPrintingHint, SfxViewEventHint);
// -----------------------------------------------------------------------
class SfxPrinterController : public vcl::PrinterController, public SfxListener
@@ -305,9 +304,15 @@ void SfxPrinterController::jobStarted()
now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
now.GetDay(), now.GetMonth(), now.GetYear() ) );
- // FIXME: how to get all print options incl. AdditionalOptions easily?
uno::Sequence < beans::PropertyValue > aOpts;
- mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) );
+ aOpts = getJobProperties( aOpts );
+
+ uno::Reference< frame::XController2 > xController;
+ if ( mpViewShell )
+ xController.set( mpViewShell->GetController(), uno::UNO_QUERY );
+
+ mpObjectShell->Broadcast( SfxPrintingHint(
+ view::PrintableState_JOB_STARTED, aOpts, mpObjectShell, xController ) );
}
}
commit 914cb68eed75ee8aa38fbf48d029057a66a21f30
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Feb 24 18:23:09 2013 +0000
i114817 - Fix missing css::view::PrintableState_JOB_STARTED notification
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index d21d330..c5ae0dd 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -785,32 +785,31 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- if ( &rBC == m_pObjectShell )
+ SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint );
+ if ( &rBC != m_pObjectShell
+ || !pPrintHint
+ || pPrintHint->GetWhich() == -2 ) // -2 : CancelPrintJob
+ return;
+
+ if ( pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_STARTED )
{
- SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint );
- if ( pPrintHint )
- {
- if ( pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_STARTED )
- {
- if ( !m_xPrintJob.is() )
- m_xPrintJob = new SfxPrintJob_Impl( this );
- m_aPrintOptions = pPrintHint->GetOptions();
- }
- else if ( pPrintHint->GetWhich() != -2 ) // -2 : CancelPrintJob
- {
- view::PrintJobEvent aEvent;
- aEvent.Source = m_xPrintJob;
- aEvent.State = (com::sun::star::view::PrintableState) pPrintHint->GetWhich();
- ::cppu::OInterfaceContainerHelper* pContainer = m_aInterfaceContainer.getContainer( ::getCppuType( ( const uno::Reference< view::XPrintJobListener >*) NULL ) );
- if ( pContainer!=NULL )
- {
- ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
- while (pIterator.hasMoreElements())
- ((view::XPrintJobListener*)pIterator.next())->printJobEvent( aEvent );
- }
- }
- }
+ if ( !m_xPrintJob.is() )
+ m_xPrintJob = new SfxPrintJob_Impl( this );
+ m_aPrintOptions = pPrintHint->GetOptions();
}
+
+ ::cppu::OInterfaceContainerHelper* pContainer = m_aInterfaceContainer.getContainer(
+ ::getCppuType( ( const uno::Reference< view::XPrintJobListener >*) NULL ) );
+ if ( !pContainer )
+ return;
+
+ view::PrintJobEvent aEvent;
+ aEvent.Source = m_xPrintJob;
+ aEvent.State = (com::sun::star::view::PrintableState) pPrintHint->GetWhich();
+
+ ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
+ while (pIterator.hasMoreElements())
+ ((view::XPrintJobListener*)pIterator.next())->printJobEvent( aEvent );
}
void SAL_CALL SfxPrintHelper::addPrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
commit 3e3649d13c0ba99b2797474e8986067becd6a7ce
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Feb 24 11:36:08 2013 +0000
Move the StatusbarController examples out of odk
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/LICENSE b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/LICENSE
deleted file mode 100644
index 6af7155..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2011, 2012 Apache Software Foundation
-
- 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.
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/Makefile b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/Makefile
deleted file mode 100644
index 471cb1a..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/Makefile
+++ /dev/null
@@ -1,228 +0,0 @@
-#**************************************************************
-#
-# 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
-#
-# 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.
-#
-#**************************************************************
-
-PRJ=../../../..
-SETTINGS=$(PRJ)/settings
-
-include $(SETTINGS)/settings.mk
-include $(SETTINGS)/std.mk
-include $(SETTINGS)/dk.mk
-include $(SETTINGS)/platform.mk
-
-include project.mk
-
-COMP_NAME=ModifiedStatusController
-
-OUT_COMP_INC=$(OUT_INC)/$(COMP_NAME)
-OUT_COMP_GEN=$(OUT_MISC)/$(COMP_NAME)
-OUT_COMP_SLO=$(OUT_SLO)/$(COMP_NAME)
-OUT_COMP_LIB=$(SHAREDLIB_OUT)/$(COMP_NAME)
-OUT_COMP_BIN=$(OUT_BIN)/$(COMP_NAME)
-OUT_COMP_DEPLOY=$(OUT_DEPLOY)/$(COMP_NAME)
-
-COMP_IMPL_NAME=$(COMP_NAME).uno.$(SHAREDLIB_EXT)
-COMP_PACKAGE_FILENAME=$(COMP_NAME)-$(EXTENSION_VERSION)-$(subst _,-,$(EXTENSION_PLATFORM)).$(UNOOXT_EXT)
-COMP_PACKAGE = $(OUT_COMP_BIN)/$(COMP_PACKAGE_FILENAME)
-COMP_PACKAGE_URL = $(subst \\,\,"$(COMP_PACKAGE)")
-COMP_UNOPKG_MANIFEST = $(OUT_COMP_GEN)/$(COMPONENT_NAME)/META-INF/manifest.xml
-COMP_UNOPKG_DESCRIPTION = $(OUT_COMP_GEN)/$(COMPONENT_NAME)/description.xml
-COMP_MAPFILE = $(OUT_COMP_GEN)/$(COMP_NAME).uno.map
-COMP_COMPONENTS = $(OUT_COMP_GEN)/$(COMP_NAME).components
-
-# xcu
-COMP_ADDONS_CFG=registry/data/org/openoffice/Office/Addons.xcu
-COMP_CONTROLLER_CFG=registry/data/org/openoffice/Office/UI/Controller.xcu
-
-DESCRIPTION_IDENTIFIER=$(EXTENSION_ID)
-DESCRIPTION_PLATFORM=$(TARGET_PLATFORM)
-DESCRIPTION_UPDATE_FILENAME=$(EXTENSION_PLATFORM)-update.xml
-
-# Allow deploying the extension when running it
-ENV_USER_INSTALL=-env:"UserInstallation=$(URLPREFIX)$(OUT_COMP_DEPLOY)"
-OFFICE_START_OPTIONS=-nologo -nofirststartwizard -norestore -quickstart=no -writer
-OXT_DEPLOYEDFLAG=$(OUT_COMP_GEN)/so_deployed_$(COMP_NAME).flag
-
-# Files
-COMP_CXXFILES = \
- StatusbarController.cxx \
- ModifiedStatusbarController.cxx \
- compfactory.cxx
-
-COMP_SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(COMP_CXXFILES))
-
-CC_DEFINES+= \
- -DSTATUSBAR_CONTROLLER_IMPL_NAME=\"$(STATUSBARCONTROLLER_IMPLNAME)\" \
- -DSTATUSBAR_CONTROLLER_SERVICE_NAME=\"$(STATUSBARCONTROLLER_SERVICE_NAME)\" \
- -DEXTENSION_IDENTIFIER=\"$(EXTENSION_ID)\"
-
-
-# Targets and rules
-.PHONY: ALL update-desc ModifiedStatusController ModifiedStatusController.run
-ALL : \
- update-desc \
- ModifiedStatusController
-
-include $(SETTINGS)/stdtarget.mk
-
-$(OUT_COMP_SLO)/%.$(OBJ_EXT) : %.cxx $(SDKTYPEFLAG)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(CC) $(CC_FLAGS) $(STL_INCLUDES) $(CC_INCLUDES) -I$(OUT_COMP_INC) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $<
-
-
-ifeq "$(OS)" "WIN"
-$(OUT_COMP_LIB)/%.$(SHAREDLIB_EXT) : $(COMP_SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN))
- $(LINK) \
- $(COMP_LINK_FLAGS) \
- /OUT:$@ \
- /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) \
- $(COMP_SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) \
- msvcrt.lib kernel32.lib
- $(LINK_MANIFEST)
-else
-$(OUT_COMP_LIB)/%.$(SHAREDLIB_EXT) : $(COMP_SLOFILES)
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(LINK) $(COMP_LINK_FLAGS) $(LINK_LIBS) -o $@ $(COMP_SLOFILES) \
- $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) \
- $(STLPORTLIB) $(STC++LIB) $(CPPUHELPERDYLIB) $(CPPUDYLIB) $(SALDYLIB)
-ifeq "$(OS)" "MACOSX"
- $(INSTALL_NAME_URELIBS) $@
-endif
-endif
-
-
-# rule for extension Addons.xcu
-$(OUT_COMP_GEN)/$(COMP_ADDONS_CFG) : $(COMP_ADDONS_CFG)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_CAT) $< | $(SDK_SED) \
- -e "s/#PROTOCOLHANDLER_PROTOCOL#/$(PROTOCOLHANDLER_PROTOCOL)/" > $@
-
-
-# rule for extension Addons.xcu
-$(OUT_COMP_GEN)/$(COMP_CONTROLLER_CFG) : $(COMP_CONTROLLER_CFG)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_CAT) $< | $(SDK_SED) \
- -e "s/#PROTOCOLHANDLER_PROTOCOL#/$(PROTOCOLHANDLER_PROTOCOL)/" \
- -e "s/#STATUSBARCONTROLLER_IMPLNAME#/$(STATUSBARCONTROLLER_IMPLNAME)/" > $@
-
-# rule for extension description.xml
-$(COMP_UNOPKG_DESCRIPTION) : xml/description.xml
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_CAT) $< | $(SDK_SED) \
- -e "s/#EXTENSION_VERSION#/$(EXTENSION_VERSION)/" \
- -e "s/#DESCRIPTION_IDENTIFIER#/$(DESCRIPTION_IDENTIFIER)/" \
- -e "s/#EXTENSION_PLATFORM#/$(EXTENSION_PLATFORM)/" \
- -e "s/#DESCRIPTION_OOO_MIN_VER#/$(DESCRIPTION_OOO_MIN_VER)/" \
- -e "s/#DESCRIPTION_OOO_MAX_VER#/$(DESCRIPTION_OOO_MAX_VER)/" \
- -e "s/#DESCRIPTION_DEP_NAME#/$(DESCRIPTION_DEP_NAME)/" \
- -e "s/#DESCRIPTION_PUBLISHER_URL#/$(subst /,\/,$(DESCRIPTION_PUBLISHER_URL))/" \
- -e "s/#DESCRIPTION_PUBLISHER_NAME#/$(DESCRIPTION_PUBLISHER_NAME)/" \
- -e "s/#DESCRIPTION_DISPLAY_NAME#/$(DESCRIPTION_DISPLAY_NAME)/" \
- -e "s/#DESCRIPTION_UPDATE#/$(subst /,\/,$(DESCRIPTION_UPDATE_BASEURL)$(DESCRIPTION_UPDATE_FILENAME))/" > $@
-
-
-# rule for update description
-$(OUT_COMP_BIN)/$(DESCRIPTION_UPDATE_FILENAME) : xml/update.xml
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_CAT) $< | $(SDK_SED) \
- -e "s/#DESCRIPTION_IDENTIFIER#/$(DESCRIPTION_IDENTIFIER)/" \
- -e "s/#EXTENSION_VERSION#/$(EXTENSION_VERSION)/" \
- -e "s/#DESCRIPTION_PUBLISHER_URL#/$(subst /,\/,$(DESCRIPTION_PUBLISHER_URL))/" \
- -e "s/#DESCRIPTION_PUBLISHER_NAME#/$(DESCRIPTION_PUBLISHER_NAME)/" \
- -e "s/#UPDATE_DOWNLOAD#/$(subst /,\/,$(UPDATE_DOWNLOAD_BASE)$(COMP_PACKAGE_FILENAME))/" \
- -e "s/#RELEASE_NOTES#/$(subst /,\/,$(RELEASE_NOTES))/" > $@
-
-# rule for component package manifest
-$(COMP_UNOPKG_MANIFEST) : xml/manifest.xml
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_CAT) $< | $(SDK_SED) \
- -e "s/#COMP_NAME#/$(COMP_NAME)/" \
- -e "s/#UNOPKG_PLATFORM#/$(UNOPKG_PLATFORM)/" > $@
-
-# rule for component pasive registration
-$(COMP_COMPONENTS) : xml/components.xml
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(SDK_CAT) $< | $(SDK_SED) \
- -e "s/#STATUSBARCONTROLLER_IMPLNAME#/$(STATUSBARCONTROLLER_IMPLNAME)/" \
- -e "s/#UNOPKG_PLATFORM#/$(UNOPKG_PLATFORM)/" \
- -e "s/#COMP_IMPL_NAME#/$(COMP_IMPL_NAME)/" > $@
-
-$(OUT_COMP_GEN)/images/%.png : images/%.png
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$@)
-
-$(OUT_COMP_GEN)/description/%.txt : description/%.txt
- -$(MKDIR) $(subst /,$(PS),$(@D))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$@)
-
-# rule for component package file
-$(COMP_PACKAGE) : $(OUT_COMP_LIB)/$(COMP_IMPL_NAME) \
- $(OUT_COMP_GEN)/$(COMP_ADDONS_CFG) \
- $(OUT_COMP_GEN)/$(COMP_CONTROLLER_CFG) \
- $(COMP_UNOPKG_MANIFEST) \
- $(COMP_COMPONENTS) \
- $(COMP_UNOPKG_DESCRIPTION) \
- LICENSE \
- $(OUT_COMP_GEN)/images/icon.png \
- $(OUT_COMP_GEN)/images/icon_hc.png \
- $(OUT_COMP_GEN)/images/statusbaricon.png \
- $(OUT_COMP_GEN)/description/description_en-US.txt
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(@D))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- $(COPY) $(subst /,$(PS),$<) $(subst /,$(PS),$(OUT_COMP_GEN)/$(UNOPKG_PLATFORM))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_GEN)/LICENSE)
- $(COPY) $(subst /,$(PS),LICENSE) $(subst /,$(PS),$(OUT_COMP_GEN)/LICENSE/)
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -u $(COMP_PACKAGE) $(COMP_NAME).components description.xml
- cd $(subst /,$(PS),$(OUT_COMP_GEN)) && $(SDK_ZIP) -ur $(COMP_PACKAGE) $(UNOPKG_PLATFORM)/ LICENSE/ META-INF/ registry/ images/ description/
-
-
-update-desc : $(OUT_COMP_BIN)/$(DESCRIPTION_UPDATE_FILENAME)
-
-ModifiedStatusController : $(COMP_PACKAGE)
- @echo --------------------------------------------------------------------------------
- @echo Please use the following command to deploy the example!
- @echo -
- @echo $(MAKE) ModifiedStatusController.run
- @echo -
- @echo --------------------------------------------------------------------------------
-
-ModifiedStatusController.run: $(OXT_DEPLOYEDFLAG)
- "$(OFFICE_PROGRAM_PATH)$(PS)soffice" $(OFFICE_START_OPTIONS) $(ENV_USER_INSTALL)
-
-$(OXT_DEPLOYEDFLAG) : $(COMP_PACKAGE)
- -$(DEL) $(subst \\,\,$(subst /,$(PS),$@))
- -$(MKDIR) $(subst /,$(PS),$(OUT_COMP_DEPLOY))
- $(DEPLOYTOOL) $(COMP_PACKAGE_URL) $(ENV_USER_INSTALL)
- @echo flagged > $(subst /,$(PS),$@)
-
-.PHONY: clean
-clean :
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_INC))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_GEN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_SLO))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_LIB))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_BIN))
- -$(DELRECURSIVE) $(subst /,$(PS),$(OUT_COMP_DEPLOY))
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/ModifiedStatusbarController.cxx b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/ModifiedStatusbarController.cxx
deleted file mode 100644
index e542498..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/ModifiedStatusbarController.cxx
+++ /dev/null
@@ -1,259 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * 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.
- *
- *************************************************************/
-
-#include "ModifiedStatusbarController.hxx"
-#include "defines.hxx"
-
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/graphic/XGraphicProvider.hpp>
-#include <com/sun/star/graphic/GraphicType.hpp>
-#include <com/sun/star/awt/ImageDrawMode.hpp>
-
-using namespace framework::statusbar_controller_modified;
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::ui;
-using namespace com::sun::star::awt;
-using namespace com::sun::star::graphic;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::beans;
-
-using rtl::OUString;
-
-namespace
-{
- static OUString st_ModifiedStatusCmd = OUSTR_COMMAND_UNO_MODIFIED_STATUS;
- static Size st_GraphicSize;
-
- struct StaticStatusGraphic
- : public rtl::Static< Reference< XGraphic >, StaticStatusGraphic >
- {
- };
-
- struct StaticSupportedServices
- : public rtl::StaticWithInit< Sequence< OUString >, StaticSupportedServices >
- {
-
- Sequence< OUString >
- operator( )( )
- {
- Sequence< OUString > aServices( 2 );
- aServices[0] = C2U( STATUSBAR_CONTROLLER_SERVICE_NAME );
- aServices[1] = C2U( "com.sun.star.frame.StatusbarController" );
- return aServices;
- }
- };
-}
-
-ModifiedStatusbarController::ModifiedStatusbarController(
- const Reference< XComponentContext> &rxContext )
- : ModifiedStatusbarController_Base( )
- , m_bEnabled( false )
- , m_bModifiedStatusEnabled( false )
- , m_bIsDocumentModified( false )
-{
- OSL_TRACE( "sbctlmodif::ModifiedStatusbarController::ModifiedStatusbarController" );
- m_xContext = rxContext;
-
- Reference< XGraphic > &xGraphic = StaticStatusGraphic::get( );
- if ( !xGraphic.is( ) )
- {
- try
- {
- Reference< XGraphicProvider > xProvider(
- m_xContext->getServiceManager( )->createInstanceWithContext(
- OUSTR_SERVICENAME_GRAPHICPROVIDER, m_xContext ),
- UNO_QUERY_THROW );
-
- Sequence< PropertyValue > aMediaProps( 1 );
- aMediaProps[0].Name = C2U( "URL" );
- aMediaProps[0].Value <<= C2U( "vnd.sun.star.extension://" EXTENSION_IDENTIFIER "/images/statusbaricon.png" );
-
- xGraphic.set( xProvider->queryGraphic( aMediaProps ) );
- Reference< XPropertySet > xGraphicProps( xGraphic, UNO_QUERY_THROW );
- xGraphicProps->getPropertyValue( C2U( "SizePixel" ) ) >>= st_GraphicSize;
-
- OSL_ENSURE( st_GraphicSize.Height > 0 && st_GraphicSize.Width > 0, "Empty status bar graphic!" );
- }
- catch ( const Exception &e )
- {
- DISPLAY_EXCEPTION_ENSURE( ModifiedStatusbarController, ModifiedStatusbarController, e );
- }
- }
-}
-
-ModifiedStatusbarController::~ModifiedStatusbarController( )
-{
- OSL_TRACE( "sbctlmodif::ModifiedStatusbarController::~ModifiedStatusbarController" );
-}
-
-void SAL_CALL
-ModifiedStatusbarController::statusChanged(
- const FeatureStateEvent &aFeatureState )
-throw ( RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::ModifiedStatusbarController::statusChanged" );
- osl::ResettableMutexGuard aGuard( m_aMutex );
-
- if ( aFeatureState.FeatureURL.Complete.equals( st_ModifiedStatusCmd ) )
- {
- OUString sTip;
- if ( ( m_bModifiedStatusEnabled = aFeatureState.IsEnabled ) )
- {
- OUString aStrValue;
- if ( aFeatureState.State >>= aStrValue )
- {
- m_bIsDocumentModified = aStrValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "*" ) );
- }
-
- if ( m_bIsDocumentModified )
- sTip = C2U( "The document is modified. Double-click to save it" );
- else
- sTip = C2U( "The document is not modified." );
- }
-
- m_xStatusbarItem->setQuickHelpText( sTip );
- m_xStatusbarItem->setAccessibleName( sTip );
- m_xStatusbarItem->repaint( );
- }
-}
-
-void SAL_CALL
-ModifiedStatusbarController::initialize(
- const Sequence< Any > &aArguments )
-throw ( Exception, RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::ModifiedStatusbarController::initialize" );
- ModifiedStatusbarController_Base::initialize( aArguments );
-
- osl::MutexGuard aGuard( m_aMutex );
- m_aListenerMap.insert( URLToDispatchMap::value_type( st_ModifiedStatusCmd, Reference< XDispatch > ( ) ) );
-}
-
-void SAL_CALL
-ModifiedStatusbarController::paint(
- const Reference< XGraphics > &xGraphics,
- const Rectangle &rOutputRectangle,
- ::sal_Int32 /*nStyle*/ )
-throw ( RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::ModifiedStatusbarController::paint" );
- Reference< XGraphic > &xGraphic = StaticStatusGraphic::get( );
- Reference< XStatusbarItem> xSbItem;
-
- osl::ClearableMutexGuard aGuard( m_aMutex );
- xSbItem = m_xStatusbarItem;
- bool bEnabled = m_bModifiedStatusEnabled && m_bIsDocumentModified;
- aGuard.clear( );
-
- if ( !xSbItem.is() || !xGraphics.is() )
- return;
-
- if ( xGraphic.is() && xGraphic->getType() != GraphicType::EMPTY )
- {
- sal_Int32 nOffset = xSbItem->getOffset( );
- Point aPos;
- aPos.X = ( rOutputRectangle.Width + nOffset ) / 2 - st_GraphicSize.Width / 2;
- aPos.Y = rOutputRectangle.Height / 2 - st_GraphicSize.Height / 2;
-
- xGraphics->drawImage( rOutputRectangle.X + aPos.X,
- rOutputRectangle.Y + aPos.Y,
- st_GraphicSize.Width,
- st_GraphicSize.Height,
- bEnabled ? ImageDrawMode::NONE : ImageDrawMode::DISABLE,
- xGraphic );
- }
- else
- {
- xGraphics->clear( rOutputRectangle );
- }
-}
-
-void SAL_CALL
-ModifiedStatusbarController::doubleClick(
- const Point &/*aPos*/ )
-throw ( RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::ModifiedStatusbarController::doubleClick" );
- osl::ClearableMutexGuard aGuard( m_aMutex );
- if ( !m_bIsDocumentModified )
- return;
- aGuard.clear( );
-
- static const Sequence< PropertyValue > aDummyArgs;
- Execute( OUSTR_COMMAND_UNO_SAVE, aDummyArgs );
-}
-
-OUString SAL_CALL
-ModifiedStatusbarController::getImplementationName( )
-throw ( RuntimeException )
-{
- return getImplementationName_static( );
-}
-
-::sal_Bool SAL_CALL
-ModifiedStatusbarController::supportsService(
- const OUString &ServiceName )
-throw ( RuntimeException )
-{
- const Sequence< OUString > &aServices = StaticSupportedServices::get( );
-
- for ( const OUString *pService = aServices.getConstArray( ),
- *pEnd = pService + aServices.getLength( );
- pService != pEnd;
- pService++ )
- {
- if ( pService->equals( ServiceName ) )
- return sal_True;
- }
-
- return sal_False;
-}
-
-Sequence< OUString > SAL_CALL
-ModifiedStatusbarController::getSupportedServiceNames( )
-throw ( RuntimeException )
-{
- return getSupportedServiceNames_static( );
-}
-
-Reference< XInterface >
-ModifiedStatusbarController::Create(
- const Reference< XComponentContext > &rxContext )
-throw ( Exception )
-{
- OSL_TRACE( "sbctlmodif::ModifiedStatusbarController::Create" );
- return Reference< XInterface > ( static_cast < cppu::OWeakObject * > ( new ModifiedStatusbarController( rxContext ) ) );
-}
-
-Sequence< OUString >
-ModifiedStatusbarController::getSupportedServiceNames_static( )
-{
- return StaticSupportedServices::get( );
-}
-
-OUString
-ModifiedStatusbarController::getImplementationName_static( )
-{
- static OUString st_ImplName( RTL_CONSTASCII_USTRINGPARAM( STATUSBAR_CONTROLLER_IMPL_NAME ) );
- return st_ImplName;
-}
-
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/ModifiedStatusbarController.hxx b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/ModifiedStatusbarController.hxx
deleted file mode 100644
index 2f29ba9..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/ModifiedStatusbarController.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * 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.
- *
- *************************************************************/
-
-#ifndef MODIFIEDSTATUSBARCONTROLLER_HXX
-#define MODIFIEDSTATUSBARCONTROLLER_HXX
-
-#include "StatusbarController.hxx"
-
-#include <cppuhelper/implbase1.hxx>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-namespace framework
-{
- namespace statusbar_controller_modified
- {
- typedef cppu::ImplInheritanceHelper1< StatusbarController, com::sun::star::lang::XServiceInfo >
- ModifiedStatusbarController_Base;
-
- class ModifiedStatusbarController : public ModifiedStatusbarController_Base
- {
- public:
- explicit ModifiedStatusbarController( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext> &rxContext );
- ~ModifiedStatusbarController();
-
- virtual void SAL_CALL paint( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > &xGraphics, const ::com::sun::star::awt::Rectangle &rOutputRectangle, ::sal_Int32 nStyle ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL doubleClick( const ::com::sun::star::awt::Point &aPos ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent &aFeatureState ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > &aArguments ) throw ( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
-
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException );
- virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString &ServiceName ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw ( ::com::sun::star::uno::RuntimeException );
-
- static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > Create( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > &rxContext ) throw ( com::sun::star::uno::Exception );
- static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static();
- static ::rtl::OUString getImplementationName_static();
-
- private:
- bool m_bEnabled;
- bool m_bModifiedStatusEnabled;
- bool m_bIsDocumentModified;
- };
- }
-}
-
-#endif
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/StatusbarController.cxx b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/StatusbarController.cxx
deleted file mode 100644
index c60fcdb..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/StatusbarController.cxx
+++ /dev/null
@@ -1,540 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * 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.
- *
- *************************************************************/
-
-#include "StatusbarController.hxx"
-#include "defines.hxx"
-
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/ui/ItemStyle.hpp>
-#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
-
-#include <functional>
-#include <algorithm>
-
-using namespace framework::statusbar_controller_modified;
-
-using namespace com::sun::star;
-using namespace com::sun::star::ui;
-using namespace com::sun::star::util;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::awt;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::beans;
-
-using rtl::OUString;
-using com::sun::star::ucb::AlreadyInitializedException;
-
-namespace
-{
- template< class MAP >
- struct lcl_StatusListenerRemove
- : public std::unary_function< typename MAP::value_type &, void >
- {
- private:
- Reference< XStatusListener > xListener;
- Reference< XURLTransformer > xURLTransformer;
- public:
- explicit lcl_StatusListenerRemove(
- const Reference< XStatusListener > &rxListener,
- const Reference< XURLTransformer > &rxTransformer )
- : xListener( rxListener )
- , xURLTransformer( rxTransformer ) {}
-
- void operator()( typename MAP::value_type &rPair ) const
- {
- if ( !rPair.second.is() )
- return;
- try
- {
- URL aURL;
- aURL.Complete = rPair.first;
- xURLTransformer->parseStrict( aURL );
- rPair.second->removeStatusListener( xListener, aURL );
- }
- catch ( ... )
- {
- }
-
- rPair.second.clear();
- }
- };
-}
-
-
-StatusbarController::StatusbarController()
- : StatusbarController_Base( m_aMutex )
- , m_bInitialized( false )
- , m_bOwnerDraw( false )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::StatusbarController" );
-}
-
-StatusbarController::~StatusbarController()
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::~StatusbarController" );
-}
-
-void SAL_CALL
-StatusbarController::dispose()
-throw ( RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::dispose" );
- osl::ClearableMutexGuard aGuard( m_aMutex );
- ThrowIfDisposed();
-
- UnbindListeners();
-
- m_xFrame.clear();
- m_xStatusbarWindow.clear();
- m_xStatusbarItem.clear();
- m_xURLTransformer.clear();
- m_aListenerMap.clear();
- aGuard.clear();
-
- StatusbarController_Base::dispose();
-}
-
-void SAL_CALL
-StatusbarController::initialize(
- const Sequence< Any > &aArguments )
-throw ( Exception, RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::initialize" );
- bool bInitialized( true );
-
- osl::ResettableMutexGuard aGuard( m_aMutex );
- bInitialized = m_bInitialized;
- aGuard.clear();
-
- if ( bInitialized )
- throw AlreadyInitializedException();
-
- Reference< XFrame > xFrame;
- Reference< XWindow > xStatusbarWindow;
- Reference< XStatusbarItem > xStatusbarItem;
- OUString sCommand, sModuleId;
- bool bOwnerDraw( false );
-
- PropertyValue aPropVal;
- for ( const Any *pAny = aArguments.getConstArray(),
- *pEnd = pAny + aArguments.getLength();
- pAny != pEnd;
- pAny++ )
- {
- if ( *pAny >>= aPropVal )
- {
- if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) ) )
- aPropVal.Value >>= xFrame;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CommandURL" ) ) )
- aPropVal.Value >>= sCommand;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ParentWindow" ) ) )
- aPropVal.Value >>= xStatusbarWindow;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ModuleName" ) ) )
- aPropVal.Value >>= sModuleId;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusbarItem" ) ) )
- aPropVal.Value >>= xStatusbarItem;
- }
- }
-
- if ( ( xStatusbarItem->getStyle() & ItemStyle::OWNER_DRAW ) == ItemStyle::OWNER_DRAW )
- bOwnerDraw = true;
-
- aGuard.reset();
- m_bInitialized = true;
- m_xFrame = xFrame;
- m_xStatusbarItem = xStatusbarItem;
- m_xStatusbarWindow = xStatusbarWindow;
- m_sModuleIdentifier = sModuleId;
- m_sCommandURL = sCommand;
- m_bOwnerDraw = bOwnerDraw;
- if ( m_sCommandURL.getLength() )
- m_aListenerMap.insert( URLToDispatchMap::value_type( m_sCommandURL, Reference< XDispatch >() ) );
- aGuard.clear();
-}
-
-void StatusbarController::BindListeners()
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::BindListeners" );
- std::vector< Listener > aListeners;
- Reference< XStatusListener > xStatusListener;
- OUString sOwnCommandURL;
-
- osl::ClearableMutexGuard aGuard( m_aMutex );
- if ( !m_bInitialized )
- return;
-
- sOwnCommandURL = m_sCommandURL;
- xStatusListener.set( static_cast< cppu::OWeakObject *>( this ), UNO_QUERY );
- Reference< XDispatchProvider > xProvider( m_xFrame, UNO_QUERY );
- if ( xProvider.is() )
- {
- for ( URLToDispatchMap::iterator it = m_aListenerMap.begin();
- it != m_aListenerMap.end(); it++ )
- {
- Reference< XURLTransformer > xURLTransformer = GetURLTransformer();
- URL aURL;
- aURL.Complete = it->first;
- xURLTransformer->parseStrict( aURL );
-
- // remove
- if ( it->second.is() )
- {
- try
- {
- it->second->removeStatusListener( xStatusListener, aURL );
- }
- catch ( ... ) {}
-
- it->second.clear();
- }
-
- // requery
- try
- {
- it->second = xProvider->queryDispatch( aURL, OUString(), 0 );
- }
- catch ( ... ) {}
-
- aListeners.push_back( Listener( aURL, it->second ) );
- }
- }
- aGuard.clear();
-
- if ( !xStatusListener.is() || aListeners.empty() )
- return;
-
- for ( std::vector< Listener >::const_iterator it = aListeners.begin();
- it != aListeners.end(); it++ )
- {
- try
- {
- if ( it->xDispatch.is() )
- it->xDispatch->addStatusListener( xStatusListener, it->aURL );
- else if ( it->aURL.Complete.equals( sOwnCommandURL ) )
- {
- // no dispatch for our own command,
- // send an update with the Feature disabled
- FeatureStateEvent aFeatureState;
- aFeatureState.FeatureURL = it->aURL;
- aFeatureState.IsEnabled = sal_False;
- aFeatureState.Source = xStatusListener;
-
- xStatusListener->statusChanged( aFeatureState );
- }
- }
- catch ( ... )
- {}
- }
-
-}
-
-void StatusbarController::UnbindListeners()
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::UnbindListeners" );
-
- Reference< XStatusListener > xStatusListener( static_cast< cppu::OWeakObject * >( this ), UNO_QUERY );
- std::for_each( m_aListenerMap.begin(),
- m_aListenerMap.end(),
- lcl_StatusListenerRemove< URLToDispatchMap >( xStatusListener, GetURLTransformer() ) );
-}
-
-bool StatusbarController::IsBound() const
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::IsBound" );
- osl::MutexGuard aGuard( m_aMutex );
- if ( !m_bInitialized )
- return false;
-
- const URLToDispatchMap::const_iterator it = m_aListenerMap.find( m_sCommandURL );
- return it != m_aListenerMap.end() && it->second.is();
-}
-
-Reference< XURLTransformer > StatusbarController::GetURLTransformer()
-{
- osl::MutexGuard aGuard( m_aMutex );
- if ( !m_xURLTransformer.is() && m_xContext.is() )
- {
- try
- {
- m_xURLTransformer.set(
- m_xContext->getServiceManager()->createInstanceWithContext(
- OUSTR_SERVICENAME_URLTRANSFORMER, m_xContext ), UNO_QUERY_THROW );
- }
- catch ( ... )
- {}
- }
-
- return m_xURLTransformer;
-}
-
-void
-StatusbarController::ThrowIfDisposed( ) throw ( RuntimeException )
-{
- if ( rBHelper.bDisposed || rBHelper.bInDispose )
- throw lang::DisposedException( );
-}
-
-void StatusbarController::Execute(
- const Sequence< PropertyValue > &aArgs )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::Execute" );
- Reference< XDispatch > xDispatch;
- Reference< XURLTransformer > xURLParser;
- OUString sCommandURL;
-
- osl::ClearableMutexGuard aGuard( m_aMutex );
- ThrowIfDisposed();
- if ( m_bInitialized && m_sCommandURL.getLength() )
- {
- sCommandURL = m_sCommandURL;
- xURLParser = GetURLTransformer();
- const URLToDispatchMap::const_iterator it = m_aListenerMap.find( m_sCommandURL );
- if ( it != m_aListenerMap.end() )
- xDispatch = it->second;
- }
- aGuard.clear();
-
- if ( xDispatch.is() && xURLParser.is() )
- {
- try
- {
- URL aURL;
- aURL.Complete = sCommandURL;
- xURLParser->parseStrict( aURL );
- xDispatch->dispatch( aURL, aArgs );
- }
- catch ( ... )
- {}
- }
-}
-
-void StatusbarController::Execute(
- const OUString &rCommandURL,
- const Sequence< PropertyValue > &aArgs )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::Execute" );
- Reference< XDispatch > xDispatch;
- URL aURL;
- aURL.Complete = rCommandURL;
-
- osl::ClearableMutexGuard aGuard( m_aMutex );
- ThrowIfDisposed();
- if ( m_bInitialized && rCommandURL.getLength() )
- {
- Reference< XURLTransformer > xURLParser = GetURLTransformer();
- xURLParser->parseStrict( aURL );
-
- const URLToDispatchMap::const_iterator it = m_aListenerMap.find( rCommandURL );
- if ( it != m_aListenerMap.end() )
- xDispatch = it->second;
-
- if ( !xDispatch.is() )
- {
- try
- {
- Reference< XDispatchProvider > xProvider( m_xFrame, UNO_QUERY_THROW );
- xDispatch = xProvider->queryDispatch( aURL, OUString(), 0 );
- }
- catch ( ... )
- {}
- }
- }
- aGuard.clear();
-
- if ( xDispatch.is() )
- {
- try
- {
- xDispatch->dispatch( aURL, aArgs );
- }
- catch ( ... )
- {}
- }
-}
-
-void StatusbarController::UpdateStatus()
-{
- BindListeners();
-}
-
-void StatusbarController::UpdateStatus( const OUString &rCommand )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::UpdateStatus" );
- Reference< XStatusListener > xStatusListener;
- Reference< XDispatch > xDispatch;
- URL aURL;
- aURL.Complete = rCommand;
-
- osl::ClearableMutexGuard aGuard( m_aMutex );
- Reference< XDispatchProvider > xProvider( m_xFrame, UNO_QUERY );
- Reference< XURLTransformer > xURLParser = GetURLTransformer();
- xStatusListener.set( static_cast< cppu::OWeakObject * >( this ), UNO_QUERY );
- if ( !xProvider.is() || !xURLParser.is() )
- return;
- try
- {
- xURLParser->parseStrict( aURL );
- xDispatch = xProvider->queryDispatch( aURL, OUString(), 0 );
- }
- catch ( ... )
- {}
- aGuard.clear();
-
- if ( !xStatusListener.is() || !xDispatch.is() )
- return;
-
- try
- {
- xDispatch->addStatusListener( xStatusListener, aURL );
- xDispatch->removeStatusListener( xStatusListener, aURL );
- }
- catch ( ... )
- {}
-}
-
-void SAL_CALL
-StatusbarController::statusChanged(
- const FeatureStateEvent &aFeatureState )
-throw ( RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::statusChanged" );
- osl::ClearableMutexGuard aGuard( m_aMutex );
-
- if ( rBHelper.bInDispose || rBHelper.bDisposed )
- return;
-
- if ( aFeatureState.FeatureURL.Complete.equals( m_sCommandURL ) )
- {
- OUString aStrVal;
- if ( aFeatureState.State >>= aStrVal )
- {
- m_xStatusbarItem->setText( aStrVal );
- }
- else if ( !aFeatureState.State.hasValue() && !aFeatureState.IsEnabled )
- m_xStatusbarItem->setText( OUString() );
- }
-}
-
-void SAL_CALL
-StatusbarController::disposing(
- const lang::EventObject &Source )
-throw ( RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::disposing" );
- osl::MutexGuard aGuard( m_aMutex );
-
- if ( rBHelper.bInDispose || rBHelper.bDisposed )
- return;
-
- Reference< XFrame > xFrame( Source.Source, UNO_QUERY );
- if ( xFrame.is() )
- {
- if ( xFrame == m_xFrame )
- m_xFrame.clear();
- return;
- }
-
- Reference< XDispatch > xDispatch( Source.Source, UNO_QUERY );
- if ( !xDispatch.is() )
- return;
-
- URLToDispatchMap::iterator pIter = m_aListenerMap.begin();
- while ( pIter != m_aListenerMap.end() )
- {
- // Compare references and release dispatch references if they are equal.
- if ( xDispatch == pIter->second )
- pIter->second.clear();
- pIter++;
- }
-}
-
-void SAL_CALL
-StatusbarController::update()
-throw ( RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::update" );
- osl::ClearableMutexGuard aGuard( m_aMutex );
- ThrowIfDisposed();
- aGuard.clear();
-
- BindListeners();
-}
-
-::sal_Bool SAL_CALL
-StatusbarController::mouseButtonDown( const MouseEvent &/*aMouseEvent*/ )
-throw ( RuntimeException )
-{
- return sal_False;
-}
-
-::sal_Bool SAL_CALL
-StatusbarController::mouseMove( const MouseEvent &/*aMouseEvent*/ )
-throw ( RuntimeException )
-{
- return sal_False;
-}
-
-::sal_Bool SAL_CALL
-StatusbarController::mouseButtonUp( const MouseEvent &/*aMouseEvent*/ )
-throw ( RuntimeException )
-{
- return sal_False;
-}
-
-void SAL_CALL
-StatusbarController::command(
- const Point &/*aPos*/,
- ::sal_Int32 /*nCommand*/,
- ::sal_Bool /*bMouseEvent*/,
- const Any &/*aData*/ )
-throw ( RuntimeException )
-{
-}
-
-void SAL_CALL
-StatusbarController::paint(
- const Reference< XGraphics > &/*xGraphics*/,
- const Rectangle &/*rOutputRectangle*/,
- ::sal_Int32 /*nStyle*/ )
-throw ( RuntimeException )
-{
-}
-
-void SAL_CALL
-StatusbarController::click( const ::com::sun::star::awt::Point &/*aPos*/ )
-throw ( RuntimeException )
-{
-}
-
-void SAL_CALL
-StatusbarController::doubleClick( const ::com::sun::star::awt::Point &/*aPos*/ )
-throw ( RuntimeException )
-{
- OSL_TRACE( "sbctlmodif::StatusbarController::doubleClick" );
- osl::ClearableMutexGuard aGuard( m_aMutex );
- if ( rBHelper.bDisposed || rBHelper.bInDispose )
- return;
- aGuard.clear();
-
- Sequence< PropertyValue > aDummyArgs;
- Execute( aDummyArgs );
-}
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/StatusbarController.hxx b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/StatusbarController.hxx
deleted file mode 100644
index dca1772..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/StatusbarController.hxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * 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.
- *
- *************************************************************/
-
-#ifndef STATUSBARCONTROLLER_HXX
-#define STATUSBARCONTROLLER_HXX
-
-#include <cppuhelper/compbase1.hxx>
-#include <cppuhelper/basemutex.hxx>
-
-#include <com/sun/star/ui/XStatusbarItem.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XStatusbarController.hpp>
-#include <com/sun/star/frame/XStatusListener.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/util/XUpdatable.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-#include <map>
-
-namespace framework
-{
- namespace statusbar_controller_modified
- {
- typedef cppu::WeakComponentImplHelper1 < com::sun::star::frame::XStatusbarController > StatusbarController_Base;
-
- class StatusbarController : protected cppu::BaseMutex,
- public StatusbarController_Base
- {
- public:
- explicit StatusbarController();
- virtual ~StatusbarController();
-
- virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
-
- // com::sun::star::frame::XStatusbarController Methods
- virtual ::sal_Bool SAL_CALL mouseButtonDown( const ::com::sun::star::awt::MouseEvent &aMouseEvent ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual ::sal_Bool SAL_CALL mouseMove( const ::com::sun::star::awt::MouseEvent &aMouseEvent ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual ::sal_Bool SAL_CALL mouseButtonUp( const ::com::sun::star::awt::MouseEvent &aMouseEvent ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL command( const ::com::sun::star::awt::Point &aPos, ::sal_Int32 nCommand, ::sal_Bool bMouseEvent, const ::com::sun::star::uno::Any &aData ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL paint( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > &xGraphics, const ::com::sun::star::awt::Rectangle &rOutputRectangle, ::sal_Int32 nStyle ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL click( const ::com::sun::star::awt::Point &aPos ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL doubleClick( const ::com::sun::star::awt::Point &aPos ) throw ( ::com::sun::star::uno::RuntimeException );
-
- // com::sun::star::frame::XStatusListener Methods
- virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent &State ) throw ( ::com::sun::star::uno::RuntimeException );
-
- // com::sun::star::lang::XEventListener Methods
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject &Source ) throw ( ::com::sun::star::uno::RuntimeException );
-
- // com::sun::star::util::XUpdatable Methods
- virtual void SAL_CALL update() throw ( ::com::sun::star::uno::RuntimeException );
-
- // com::sun::star::lang::XInitialization Methods
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > &aArguments ) throw ( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
-
- protected:
-
- struct Listener
- {
-
- explicit Listener(
- const ::com::sun::star::util::URL &rURL,
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > &rDispatch )
- : aURL( rURL )
- , xDispatch( rDispatch )
- {
- }
-
- ::com::sun::star::util::URL aURL;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
- };
-
- typedef ::std::map< ::rtl::OUString, com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > > URLToDispatchMap;
-
- void ThrowIfDisposed() throw ( com::sun::star::uno::RuntimeException );
- void BindListeners();
- void UnbindListeners();
- bool IsBound() const;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > GetURLTransformer();
- // execute methods
- void Execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &aArgs );
- void Execute( const rtl::OUString &rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &aArgs );
- void UpdateStatus();
- void UpdateStatus( const rtl::OUString &rCommand );
-
- bool m_bInitialized;
- bool m_bOwnerDraw;
- rtl::OUString m_sModuleIdentifier;
- rtl::OUString m_sCommandURL;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xStatusbarWindow;
- ::com::sun::star::uno::Reference< ::com::sun::star::ui::XStatusbarItem > m_xStatusbarItem;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
-
- URLToDispatchMap m_aListenerMap;
- };
- }
-}
-
-#endif /* STATUSBARCONTROLLER_HXX */
-
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/compfactory.cxx b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/compfactory.cxx
deleted file mode 100644
index 47db358..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/compfactory.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * 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.
- *
- *************************************************************/
-
-#include "ModifiedStatusbarController.hxx"
-
-#include <cppuhelper/factory.hxx>
-#include <cppuhelper/implementationentry.hxx>
-
-namespace framework
-{
- namespace statusbar_controller_modified
- {
- static ::cppu::ImplementationEntry const s_impl_entries[] =
- {
- {
- ModifiedStatusbarController::Create,
- ModifiedStatusbarController::getImplementationName_static,
- ModifiedStatusbarController::getSupportedServiceNames_static,
- ::cppu::createSingleComponentFactory,
- 0,
- 0
- },
- { 0, 0, 0, 0, 0, 0 }
- };
- }
-}
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
- const sal_Char **ppEnvTypeName, uno_Environment ** )
- {
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
- }
-
- SAL_DLLPUBLIC_EXPORT void *SAL_CALL component_getFactory(
- const sal_Char *pImplName, void *pServiceManager, void *pRegistryKey )
- {
- return ::cppu::component_getFactoryHelper( pImplName,
- pServiceManager,
- pRegistryKey ,
- framework::statusbar_controller_modified::s_impl_entries );
- }
-}
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/defines.hxx b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/defines.hxx
deleted file mode 100644
index af0d1ea..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/defines.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * 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.
- *
- *************************************************************/
-
-#ifndef GENERAL_DEFINES_HXX
-#define GENERAL_DEFINES_HXX
-
-#include "macros.hxx"
-
-#ifndef STATUSBAR_CONTROLLER_IMPL_NAME
-#error You must define STATUSBAR_CONTROLLER_IMPL_NAME
-#endif
-
-#ifndef STATUSBAR_CONTROLLER_SERVICE_NAME
-#error You must define STATUSBAR_CONTROLLER_SERVICE_NAME
-#endif
-
-#ifndef EXTENSION_IDENTIFIER
-#error You must define EXTENSION_IDENTIFIER
-#endif
-
-#define OUSTR_COMMAND_UNO_MODIFIED_STATUS C2U(".uno:ModifiedStatus")
-#define OUSTR_COMMAND_UNO_SAVE C2U(".uno:Save")
-
-#define OUSTR_SERVICENAME_GRAPHICPROVIDER C2U("com.sun.star.graphic.GraphicProvider")
-#define OUSTR_SERVICENAME_URLTRANSFORMER C2U("com.sun.star.util.URLTransformer")
-
-#endif
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/description/description_en-US.txt b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/description/description_en-US.txt
deleted file mode 100644
index ed63ac4..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/description/description_en-US.txt
+++ /dev/null
@@ -1 +0,0 @@
-This extension enhances Apache OpenOffice status bar by replacing the Modified status bar item in Apache OpenOffice Writer's status bar.
\ No newline at end of file
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/icon.png b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/icon.png
deleted file mode 100644
index 31f48ea..0000000
Binary files a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/icon.png and /dev/null differ
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/icon_hc.png b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/icon_hc.png
deleted file mode 100644
index 3870cc4..0000000
Binary files a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/icon_hc.png and /dev/null differ
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/statusbaricon.png b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/statusbaricon.png
deleted file mode 100644
index daf5853..0000000
Binary files a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/images/statusbaricon.png and /dev/null differ
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/macros.hxx b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/macros.hxx
deleted file mode 100755
index c2cb052..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/macros.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-/**************************************************************
- *
- * 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
- *
- * 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.
- *
- *************************************************************/
-
-#ifndef GENERAL_MACROS_HXX
-#define GENERAL_MACROS_HXX
-
-#define STRINGIFY(x) _STRINGIFY(x)
-#define _STRINGIFY(x) #x
-
-#define C2U( constAsciiStr ) \
- ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( constAsciiStr ) ) )
-
-#define U2C( ouString ) \
- ( ::rtl::OUStringToOString( ouString, RTL_TEXTENCODING_ASCII_US ).getStr() )
-
-#define GET_STR( OUSTR ) \
- ::rtl::OUStringToOString( OUSTR, RTL_TEXTENCODING_ASCII_US ).getStr()
-
-
-#if OSL_DEBUG_LEVEL > 0
-#define DISPLAY_EXCEPTION_ENSURE( ClassName, MethodName, e ) \
- ::rtl::OString sMessage( #ClassName "::" #MethodName ": caught an exception!\n" ); \
- sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_UTF8 ); \
- OSL_ENSURE( sal_False, sMessage.getStr() )
-#else
-#define DISPLAY_EXCEPTION_ENSURE( ClassName, MethodName, e ) ((void)e)
-#endif
-
-#if OSL_DEBUG_LEVEL > 0
-#define DISPLAY_EXCEPTION( ClassName, MethodName, e ) \
- ::rtl::OString sMessage( #ClassName "::" #MethodName ": caught an exception!\n" ); \
- sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_UTF8 ); \
- OSL_TRACE( sMessage.getStr() )
-#else
-#define DISPLAY_EXCEPTION( ClassName, MethodName, e ) ((void)e)
-#endif
-
-#endif
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/project.mk b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/project.mk
deleted file mode 100644
index d14cc3c..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/project.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-#**************************************************************
-#
-# 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
-#
-# 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.
-#
-#**************************************************************
-
-DESCRIPTION_OOO_MIN_VER=4.0
-DESCRIPTION_OOO_MAX_VER=4.9
-DESCRIPTION_DEP_NAME=Apache OpenOffice
-
-EXTENSION_ID=org.apache.openoffice.framework.statusbar.ModifiedStatus
-EXTENSION_VERSION=0.0.1
-
-DESCRIPTION_PUBLISHER_URL=http://www.openoffice.org/api
-DESCRIPTION_PUBLISHER_NAME=Apache OpenOffice
-DESCRIPTION_DISPLAY_NAME=Document Modified StatusBar Control
-
-DESCRIPTION_UPDATE_BASEURL=http://www.openoffice.org/api/dummyupdate
-DESCRIPTION_UPDATE_URL=http://www.openoffice.org/api/dummyupdate/update.xml
-UPDATE_DOWNLOAD_BASE=http://www.openoffice.org/api/dummydownload/
-RELEASE_NOTES=http://www.openoffice.org/api/dummy_release_notes
-
-PROTOCOLHANDLER_PROTOCOL=org.apache.openoffice.framework.statusbar.ModifiedStatus
-
-STATUSBARCONTROLLER_IMPLNAME=org.apache.openoffice.framework.statusbar.comp.ModifiedStatus.StatusbarController
-STATUSBARCONTROLLER_SERVICE_NAME=org.apache.openoffice.framework.statusbar.ModifiedStatus.StatusbarController
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/registry/data/org/openoffice/Office/Addons.xcu b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/registry/data/org/openoffice/Office/Addons.xcu
deleted file mode 100644
index afb848c..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/registry/data/org/openoffice/Office/Addons.xcu
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--***********************************************************
- *
- * 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
- *
- * 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.
- *
- ***********************************************************-->
-<oor:component-data
-xmlns:oor="http://openoffice.org/2001/registry"
-xmlns:xs="http://www.w3.org/2001/XMLSchema"
-oor:name="Addons"
-oor:package="org.openoffice.Office">
- <node oor:name="AddonUI">
- <node oor:name="OfficeStatusbarMerging">
- <node oor:name="org.apache.openoffice.framework.OfficeStatusbarMerging.ModifiedStatus" oor:op="replace">
- <node oor:name="S1" oor:op="replace">
- <prop oor:name="MergePoint">
- <value>.uno:ModifiedStatus</value>
- </prop>
- <prop oor:name="MergeCommand">
- <value>Replace</value>
- </prop>
- <prop oor:name="MergeFallback">
- <value>Ignore</value>
- </prop>
- <prop oor:name="MergeContext" oor:type="xs:string">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <node oor:name="StatusBarItems">
- <node oor:name="M1" oor:op="replace">
- <prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Modified Status</value>
- </prop>
- <prop oor:name="URL" oor:type="xs:string">
- <value>#PROTOCOLHANDLER_PROTOCOL#:ModifiedStatus</value>
- </prop>
- <prop oor:name="Alignment" oor:type="xs:string">
- <value>center</value>
- </prop>
- <prop oor:name="AutoSize" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="OwnerDraw" oor:type="xs:boolean">
- <value>true</value>
- </prop>
- <prop oor:name="Width" oor:type="xs:long">
- <value>16</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/registry/data/org/openoffice/Office/UI/Controller.xcu b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/registry/data/org/openoffice/Office/UI/Controller.xcu
deleted file mode 100644
index 17bb696..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--***********************************************************
- *
- * 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
- *
- * 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.
- *
- ***********************************************************-->
-<!DOCTYPE oor:component-data SYSTEM "../../../../../component-update.dtd">
-<oor:component-data oor:name="Controller" oor:package="org.openoffice.Office.UI" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="Registered">
- <node oor:name="StatusBar">
- <node oor:name="org.apache.openoffice.framework.statusbar.ModifiedStatus.StatusbarController" oor:op="replace">
- <prop oor:name="Command">
- <value>#PROTOCOLHANDLER_PROTOCOL#:ModifiedStatus</value>
- </prop>
- <prop oor:name="Module">
- <value>com.sun.star.text.TextDocument</value>
- </prop>
- <prop oor:name="Controller">
- <value>#STATUSBARCONTROLLER_IMPLNAME#</value>
- </prop>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/components.xml b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/components.xml
deleted file mode 100644
index 9013b3f..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/components.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--***********************************************************
- *
- * 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
- *
- * 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.
- *
- ***********************************************************-->
-<components xmlns="http://openoffice.org/2010/uno-components">
- <component loader="com.sun.star.loader.SharedLibrary" uri="#UNOPKG_PLATFORM#/#COMP_IMPL_NAME#">
- <implementation name="#STATUSBARCONTROLLER_IMPLNAME#">
- <service name="com.sun.star.frame.StatusbarController"/>
- </implementation>
- </component>
-</components>
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/description.xml b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/description.xml
deleted file mode 100644
index d9bbbb6..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/description.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--***********************************************************
- *
- * 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
- *
- * 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.
- *
- ***********************************************************-->
-<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
- <version value="#EXTENSION_VERSION#"/>
- <identifier value="#DESCRIPTION_IDENTIFIER#"/>
- <platform value="#EXTENSION_PLATFORM#"/>
- <dependencies>
- <OpenOffice.org-minimal-version value="#DESCRIPTION_OOO_MIN_VER#" d:name="#DESCRIPTION_DEP_NAME#"/>
- <OpenOffice.org-maximal-version value="#DESCRIPTION_OOO_MAX_VER#" d:name="#DESCRIPTION_DEP_NAME#"/>
- </dependencies>
- <publisher>
- <name xlink:href="#DESCRIPTION_PUBLISHER_URL#" lang="en">#DESCRIPTION_PUBLISHER_NAME#</name>
- </publisher>
- <display-name>
- <name lang="en-US">#DESCRIPTION_DISPLAY_NAME#</name>
- </display-name>
- <icon>
- <default xlink:href="images/icon.png"/>
- <high-contrast xlink:href="images/icon_hc.png"/>
- </icon>
- <registration>
- <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" >
- <license-text xlink:href="LICENSE/LICENSE" lang="en-US" license-id="lic-en-US"/>
- </simple-license>
- </registration>
- <extension-description>
- <src xlink:href="description/description_en-US.txt" lang="en-US"/>
- </extension-description>
- <update-information>
- <src xlink:href="#DESCRIPTION_UPDATE#" />
- </update-information>
-</description>
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/manifest.xml b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/manifest.xml
deleted file mode 100644
index 63950dc..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/manifest.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--***********************************************************
- *
- * 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
- *
- * 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.
- *
- ***********************************************************-->
-<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
-<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
- manifest:full-path="registry/data/org/openoffice/Office/Addons.xcu"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
- manifest:full-path="registry/data/org/openoffice/Office/UI/Controller.xcu"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-components;platform=#UNOPKG_PLATFORM#"
- manifest:full-path="#COMP_NAME#.components"/>
-</manifest:manifest>
diff --git a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/update.xml b/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/update.xml
deleted file mode 100644
index dc33411..0000000
--- a/odk/examples/cpp/StatusbarController/ModifiedStatusbarController/xml/update.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--***********************************************************
- *
- * 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
- *
- * 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.
- *
- ***********************************************************-->
-<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
- <identifier value="#DESCRIPTION_IDENTIFIER#"/>
- <version value="#EXTENSION_VERSION#"/>
- <publisher>
- <name xlink:href="#DESCRIPTION_PUBLISHER_URL#" lang="en">#DESCRIPTION_PUBLISHER_NAME#</name>
- </publisher>
- <update-download>
- <src xlink:href="#UPDATE_DOWNLOAD#"/>
- </update-download>
- <release-notes>
- <src xlink:href="#RELEASE_NOTES#" lang="en"/>
- </release-notes>
-</description>
diff --git a/odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/LICENSE b/odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/LICENSE
deleted file mode 100644
index 6af7155..0000000
--- a/odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list