Files
libreoffice/cui/source/inc/macropg.hxx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

132 lines
4.7 KiB
C++
Raw Normal View History

2010-10-27 12:45:03 +01:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: clarify Option->Language UI option Patch contributed by Herbert Duerr http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117709#: add missing string resource Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172348 cws mba34issues01: #i117716#: fix missing resources my removing unused code Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172345 re-add Crystal, Tango, Oxygen icon theme listings. correct method signature Patch contributed by Jean-Louis 'Hans' Fuchs http://svn.apache.org/viewvc?view=revision&revision=1306725 i#119063 - correct serf integration Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1300521 i#119036 - adapt serf integration -- use transfer-encoding 'chunked' on HTTPS -- switch transfer-encoding between 'chunked' and none on 413 HTTP status code -- refactoring -- improve user experience of certification dialog - only shown once Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1299727 118569: Use whole certification chain for verification. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1295493 serf integration: improve credential input handling Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1294557 warning-free ucb/source/ucp/webdav Patch contributed by Pavel Janik http://svn.apache.org/viewvc?view=revision&revision=1294086 some refactoring to PROPPATCH and PROPFIND requests Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1293281 i#118569: Replace neon with serf Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1292832 http://svn.apache.org/viewvc?view=revision&revision=1292794 remove OS/2 conditionals for now. re-enable webdav unit tests.
2012-10-04 11:25:41 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_CUI_SOURCE_INC_MACROPG_HXX
#define INCLUDED_CUI_SOURCE_INC_MACROPG_HXX
2009-10-31 00:36:06 +01:00
#include <sfx2/basedlgs.hxx>
#include <sfx2/tabdlg.hxx>
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustring.hxx>
#include <unordered_map>
2009-10-31 00:36:06 +01:00
#include <vector>
typedef std::unordered_map< OUString, std::pair< OUString, OUString > > EventsHash;
2009-10-31 00:36:06 +01:00
struct EventDisplayName
{
const sal_Char* pAsciiEventName;
migrate to boost::gettext * all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-06-11 20:56:30 +01:00
const char* pEventResourceID;
EventDisplayName(const sal_Char* pAsciiName, const char* pResId)
: pAsciiEventName(pAsciiName)
, pEventResourceID(pResId)
2009-10-31 00:36:06 +01:00
{
}
};
typedef std::vector< EventDisplayName > EventDisplayNames;
2009-10-31 00:36:06 +01:00
class SvxMacroTabPage_;
2009-10-31 00:36:06 +01:00
class SvTabListBox;
class SvxMacroTabPage_Impl;
2009-10-31 00:36:06 +01:00
class SvxMacroTabPage_ : public SfxTabPage
2009-10-31 00:36:06 +01:00
{
DECL_LINK( SelectEvent_Impl, weld::TreeView&, void );
DECL_LINK( AssignDeleteHdl_Impl, weld::Button&, void );
DECL_LINK( DoubleClickHdl_Impl, weld::TreeView&, bool );
2009-10-31 00:36:06 +01:00
static void GenericHandler_Impl( SvxMacroTabPage_* pThis, const weld::Button* pBtn );
2009-10-31 00:36:06 +01:00
css::uno::Reference< css::container::XNameReplace > m_xAppEvents;
2009-10-31 00:36:06 +01:00
protected:
std::unique_ptr<SvxMacroTabPage_Impl> mpImpl;
css::uno::Reference< css::container::XNameReplace > m_xDocEvents;
css::uno::Reference< css::util::XModifiable > m_xModifiable;
2009-10-31 00:36:06 +01:00
EventsHash m_appEventsHash;
EventsHash m_docEventsHash;
bool bDocModified, bAppEvents, bInitialized;
2009-10-31 00:36:06 +01:00
EventDisplayNames aDisplayNames;
SvxMacroTabPage_(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OString& rID, const SfxItemSet& rItemSet);
2009-10-31 00:36:06 +01:00
void EnableButtons();
static css::uno::Any GetPropsByName( const OUString& eventName, EventsHash& eventsHash );
static std::pair< OUString, OUString > GetPairFromAny( const css::uno::Any& aAny );
2009-10-31 00:36:06 +01:00
public:
virtual ~SvxMacroTabPage_() override;
2009-10-31 00:36:06 +01:00
void InitResources();
void InitAndSetHandler( const css::uno::Reference< css::container::XNameReplace >& xAppEvents, const css::uno::Reference< css::container::XNameReplace >& xDocEvents, const css::uno::Reference< css::util::XModifiable >& xModifiable );
virtual bool FillItemSet( SfxItemSet* rSet ) override;
2009-10-31 00:36:06 +01:00
virtual void Reset( const SfxItemSet* ) override;
2009-10-31 00:36:06 +01:00
void DisplayAppEvents( bool appEvents);
void SetReadOnly( bool bSet );
bool IsReadOnly() const override;
2009-10-31 00:36:06 +01:00
};
class SvxMacroTabPage : public SvxMacroTabPage_
2009-10-31 00:36:06 +01:00
{
public:
SvxMacroTabPage(
weld::Container* pPage, weld::DialogController* pController,
const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame,
2009-10-31 00:36:06 +01:00
const SfxItemSet& rSet,
css::uno::Reference< css::container::XNameReplace > const & xNameReplace,
2009-10-31 00:36:06 +01:00
sal_uInt16 nSelectedIndex
);
};
// class SvxMacroAssignDlg --------------------------------------------------
typedef const sal_uInt16* (*GetTabPageRanges)(); // gives international Which-values
2009-10-31 00:36:06 +01:00
class SvxMacroAssignSingleTabDialog : public SfxSingleTabDialogController
2009-10-31 00:36:06 +01:00
{
public:
SvxMacroAssignSingleTabDialog(weld::Window* pParent, const SfxItemSet& rOptionsSet);
2009-10-31 00:36:06 +01:00
private:
DECL_LINK(OKHdl_Impl, weld::Button&, void);
2009-10-31 00:36:06 +01:00
};
class SvxMacroAssignDlg : public SvxMacroAssignSingleTabDialog
{
public:
SvxMacroAssignDlg(
weld::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& _rxDocumentFrame,
2009-10-31 00:36:06 +01:00
const SfxItemSet& rSet,
const css::uno::Reference< css::container::XNameReplace >& xNameReplace,
2009-10-31 00:36:06 +01:00
sal_uInt16 nSelectedIndex
);
};
#endif
2010-10-27 12:45:03 +01:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */