diff options
author | Daniel Rentz <dr@openoffice.org> | 2010-06-17 11:32:18 +0200 |
---|---|---|
committer | Daniel Rentz <dr@openoffice.org> | 2010-06-17 11:32:18 +0200 |
commit | 0fb004299f88eff2e6077b8aabac07dde3ec3f02 (patch) | |
tree | 610bce7fab84cba84744c0bc74aed70b21a72853 | |
parent | 00cb4072a3052e4dca32a39fb692f34a1d7e4d35 (diff) | |
parent | 79fa123bd79e794dfa9bf57e1df28ff46b16671d (diff) |
mib16: rebase to m82
411 files changed, 19903 insertions, 10755 deletions
diff --git a/basic/inc/pch/precompiled_basic.hxx b/basic/inc/pch/precompiled_basic.hxx index cab46edc0185..e8f9e004ca6a 100644 --- a/basic/inc/pch/precompiled_basic.hxx +++ b/basic/inc/pch/precompiled_basic.hxx @@ -187,7 +187,7 @@ #include "svtools/svmedit.hxx" #include "svl/svstdarr.hxx" #include "svtools/svtdata.hxx" -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" #include "svtools/svtreebx.hxx" #include "unotools/syslocale.hxx" #include "svtools/taskbar.hxx" diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 6a00e5b6649b..1b49a376c9bd 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1951,7 +1951,7 @@ void SbUserFormModule::InitObject() triggerInitializeEvent(); } } - catch( uno::Exception& e ) + catch( uno::Exception& ) { } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index e963de871c32..36fbda5c9097 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -121,8 +121,6 @@ using namespace com::sun::star::io; #include <io.h> #endif -using namespace rtl; - #include <basic/sbobjmod.hxx> static void FilterWhiteSpace( String& rStr ) @@ -210,15 +208,15 @@ String implGetCurDir( void ) } // TODO: -> SbiGlobals -static Reference< XSimpleFileAccess3 > getFileAccess( void ) +static com::sun::star::uno::Reference< XSimpleFileAccess3 > getFileAccess( void ) { - static Reference< XSimpleFileAccess3 > xSFI; + static com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI; if( !xSFI.is() ) { - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); + com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); if( xSMgr.is() ) { - xSFI = Reference< XSimpleFileAccess3 >( xSMgr->createInstance + xSFI = com::sun::star::uno::Reference< XSimpleFileAccess3 >( xSMgr->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY ); } } @@ -557,7 +555,7 @@ RTLFUNC(ChDrive) // JSM // Implementation of StepRENAME with UCB void implStepRenameUCB( const String& aSource, const String& aDest ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -605,7 +603,7 @@ RTLFUNC(FileCopy) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -656,7 +654,7 @@ RTLFUNC(Kill) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { String aFullPath = getFullPath( aFileSpec ); @@ -703,7 +701,7 @@ RTLFUNC(MkDir) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -804,7 +802,7 @@ RTLFUNC(RmDir) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -891,7 +889,7 @@ RTLFUNC(FileLen) // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -1639,7 +1637,7 @@ RTLFUNC(StrComp) ::utl::TransliterationWrapper* pTransliterationWrapper = GetSbData()->pTransliterationWrapper; if( !pTransliterationWrapper ) { - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); + com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); pTransliterationWrapper = GetSbData()->pTransliterationWrapper = new ::utl::TransliterationWrapper( xSMgr, ::com::sun::star::i18n::TransliterationModules_IGNORE_CASE | @@ -2634,7 +2632,7 @@ RTLFUNC(Dir) // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { if ( nParCount >= 2 ) @@ -2997,7 +2995,7 @@ RTLFUNC(GetAttr) // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -3067,7 +3065,7 @@ RTLFUNC(FileDateTime) Date aDate; if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -4032,7 +4030,7 @@ RTLFUNC(StrConv) String aNewStr( aOldStr ); if( nType != 0 ) { - Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); + com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory(); ::utl::TransliterationWrapper aTransliterationWrapper( xSMgr,nType ); com::sun::star::uno::Sequence<sal_Int32> aOffsets; aTransliterationWrapper.loadModuleIfNeeded( nLanguage ); @@ -4360,7 +4358,7 @@ RTLFUNC(SetAttr) // JSM // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try @@ -4474,7 +4472,7 @@ RTLFUNC(FileExists) // <-- UCB if( hasUno() ) { - Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); + com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess(); if( xSFI.is() ) { try diff --git a/basic/source/sbx/format.src b/basic/source/sbx/format.src index 8ebe6e93c4bb..7e576134fad5 100644 --- a/basic/source/sbx/format.src +++ b/basic/source/sbx/format.src @@ -25,7 +25,7 @@ * ************************************************************************/ -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" String STR_BASICKEY_FORMAT_ON { diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 6d5d24fcb951..3d45818e6401 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -47,7 +47,7 @@ #include "sbxres.hxx" #include <basic/sbxbase.hxx> #include <basic/sbxform.hxx> -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #include "basrid.hxx" #include "runtime.hxx" diff --git a/configmgr/prj/d.lst b/configmgr/prj/d.lst index a9d91980b213..17ccdbe86a08 100644 --- a/configmgr/prj/d.lst +++ b/configmgr/prj/d.lst @@ -1,8 +1,3 @@ -mkdir: %_DEST%\inc%_EXT%\configmgr -mkdir: %_DEST%\inc%_EXT%\configmgr\detail -..\%__SRC%\bin\configmgr.dll %_DEST%\bin%_EXT%\configmgr.dll -..\%__SRC%\lib\iconfigmgr.lib %_DEST%\lib%_EXT%\iconfigmgr.lib -..\%__SRC%\lib\libconfigmgr.dylib %_DEST%\lib%_EXT%\libconfigmgr.dylib -..\%__SRC%\lib\libconfigmgr.so %_DEST%\lib%_EXT%\libconfigmgr.so -..\inc\configmgr\detail\configmgrdllapi.hxx %_DEST%\inc%_EXT%\configmgr\detail\configmgrdllapi.hxx -..\inc\configmgr\update.hxx %_DEST%\inc%_EXT%\configmgr\update.hxx +..\%__SRC%\bin\configmgr.uno.dll %_DEST%\bin%_EXT%\configmgr.uno.dll +..\%__SRC%\lib\configmgr.uno.dylib %_DEST%\lib%_EXT%\configmgr.uno.dylib +..\%__SRC%\lib\configmgr.uno.so %_DEST%\lib%_EXT%\configmgr.uno.so diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 7af9c1f8d9c0..190db364cdfe 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -1229,7 +1229,19 @@ rtl::OUString Access::getHierarchicalName() throw (css::uno::RuntimeException) { OSL_ASSERT(thisIs(IS_ANY)); osl::MutexGuard g(lock); checkLocalizedPropertyAccess(); - return getRelativePathRepresentation(); + // For backwards compatibility, return an absolute path representation where + // available: + rtl::OUStringBuffer path; + rtl::Reference< RootAccess > root(getRootAccess()); + if (root.is()) { + path.append(root->getAbsolutePathRepresentation()); + } + rtl::OUString rel(getRelativePathRepresentation()); + if (path.getLength() != 0 && rel.getLength() != 0) { + path.append(sal_Unicode('/')); + } + path.append(rel); + return path.makeStringAndClear(); } rtl::OUString Access::composeHierarchicalName( @@ -1917,7 +1929,7 @@ css::uno::Reference< css::uno::XInterface > Access::createInstance() tmplName), static_cast< cppu::OWeakObject * >(this)); } - rtl::Reference< Node > node(tmpl->clone()); + rtl::Reference< Node > node(tmpl->clone(true)); node->setLayer(Data::NO_LAYER); return static_cast< cppu::OWeakObject * >( new ChildAccess(components_, getRootAccess(), node)); diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 6d97971e1a2c..5b30e9491eb4 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -149,11 +149,12 @@ bool Components::allLocales(rtl::OUString const & locale) { } rtl::Reference< Node > Components::resolvePathRepresentation( - rtl::OUString const & pathRepresentation, Path * path, - int * finalizedLayer) const + rtl::OUString const & pathRepresentation, + rtl::OUString * canonicRepresentation, Path * path, int * finalizedLayer) + const { return data_.resolvePathRepresentation( - pathRepresentation, path, finalizedLayer); + pathRepresentation, canonicRepresentation, path, finalizedLayer); } rtl::Reference< Node > Components::getTemplate( @@ -494,12 +495,10 @@ void Components::parseFileList( try { (*parseFile)(url, layer, data_, 0, 0); } catch (css::container::NoSuchElementException & e) { - throw css::uno::RuntimeException( - (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "stat'ed file does not exist: ")) + - e.Message), - css::uno::Reference< css::uno::XInterface >()); + OSL_TRACE( + "configmgr file does not exist: %s", + rtl::OUStringToOString( + e.Message, RTL_TEXTENCODING_UTF8).getStr()); } } if (i == -1) { diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx index a78ed325969d..2e635680c1ce 100644 --- a/configmgr/source/components.hxx +++ b/configmgr/source/components.hxx @@ -72,8 +72,9 @@ public: static bool allLocales(rtl::OUString const & locale); rtl::Reference< Node > resolvePathRepresentation( - rtl::OUString const & pathRepresentation, Path * path, - int * finalizedLayer) const; + rtl::OUString const & pathRepresentation, + rtl::OUString * canonicRepresenation, Path * path, int * finalizedLayer) + const; rtl::Reference< Node > getTemplate( int layer, rtl::OUString const & fullName) const; diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx index 5540a40fd5f4..e12f9596940b 100644 --- a/configmgr/source/data.cxx +++ b/configmgr/source/data.cxx @@ -205,7 +205,8 @@ rtl::Reference< Node > Data::findNode( } rtl::Reference< Node > Data::resolvePathRepresentation( - rtl::OUString const & pathRepresentation, Path * path, int * finalizedLayer) + rtl::OUString const & pathRepresentation, + rtl::OUString * canonicRepresentation, Path * path, int * finalizedLayer) const { if (pathRepresentation.getLength() == 0 || pathRepresentation[0] != '/') { @@ -216,6 +217,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation( } rtl::OUString seg; bool setElement; + rtl::OUString templateName; sal_Int32 n = parseSegment(pathRepresentation, 1, &seg, &setElement, 0); if (n == -1 || setElement) { @@ -225,6 +227,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation( css::uno::Reference< css::uno::XInterface >()); } NodeMap::const_iterator i(components.find(seg)); + rtl::OUStringBuffer canonic; if (path != 0) { path->clear(); } @@ -234,6 +237,10 @@ rtl::Reference< Node > Data::resolvePathRepresentation( if (!p.is()) { return p; } + if (canonicRepresentation != 0) { + canonic.append(sal_Unicode('/')); + canonic.append(createSegment(templateName, seg)); + } if (path != 0) { path->push_back(seg); } @@ -248,13 +255,16 @@ rtl::Reference< Node > Data::resolvePathRepresentation( } // for backwards compatibility, ignore a final slash if (n == pathRepresentation.getLength()) { + if (canonicRepresentation != 0) { + *canonicRepresentation = canonic.makeStringAndClear(); + } if (finalizedLayer != 0) { *finalizedLayer = finalized; } return p; } parent = p; - rtl::OUString templateName; + templateName = rtl::OUString(); n = parseSegment( pathRepresentation, n, &seg, &setElement, &templateName); if (n == -1) { diff --git a/configmgr/source/data.hxx b/configmgr/source/data.hxx index 495ca1233878..52353d066b67 100644 --- a/configmgr/source/data.hxx +++ b/configmgr/source/data.hxx @@ -74,8 +74,9 @@ struct Data: private boost::noncopyable { int layer, NodeMap const & map, rtl::OUString const & name); rtl::Reference< Node > resolvePathRepresentation( - rtl::OUString const & pathRepresentation, Path * path, - int * finalizedLayer) const; + rtl::OUString const & pathRepresentation, + rtl::OUString * canonicRepresenation, Path * path, int * finalizedLayer) + const; rtl::Reference< Node > getTemplate( int layer, rtl::OUString const & fullName) const; diff --git a/configmgr/source/groupnode.cxx b/configmgr/source/groupnode.cxx index 60d825451d69..59c0f89df5d1 100644 --- a/configmgr/source/groupnode.cxx +++ b/configmgr/source/groupnode.cxx @@ -44,8 +44,8 @@ GroupNode::GroupNode( mandatory_(Data::NO_LAYER) {} -rtl::Reference< Node > GroupNode::clone() const { - return new GroupNode(*this); +rtl::Reference< Node > GroupNode::clone(bool keepTemplateName) const { + return new GroupNode(*this, keepTemplateName); } NodeMap & GroupNode::getMembers() { @@ -68,11 +68,13 @@ bool GroupNode::isExtensible() const { return extensible_; } -GroupNode::GroupNode(GroupNode const & other): - Node(other), extensible_(other.extensible_), - templateName_(other.templateName_), mandatory_(other.mandatory_) +GroupNode::GroupNode(GroupNode const & other, bool keepTemplateName): + Node(other), extensible_(other.extensible_), mandatory_(other.mandatory_) { cloneNodeMap(other.members_, &members_); + if (keepTemplateName) { + templateName_ = other.templateName_; + } } GroupNode::~GroupNode() {} diff --git a/configmgr/source/groupnode.hxx b/configmgr/source/groupnode.hxx index be4907b86ce3..9d7bbbafa5b3 100644 --- a/configmgr/source/groupnode.hxx +++ b/configmgr/source/groupnode.hxx @@ -42,7 +42,7 @@ class GroupNode: public Node { public: GroupNode(int layer, bool extensible, rtl::OUString const & templateName); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); @@ -55,7 +55,7 @@ public: bool isExtensible() const; private: - GroupNode(GroupNode const & other); + GroupNode(GroupNode const & other, bool keepTemplateName); virtual ~GroupNode(); diff --git a/configmgr/source/localizedpropertynode.cxx b/configmgr/source/localizedpropertynode.cxx index 9c5fa3328a58..54560d7aded4 100644 --- a/configmgr/source/localizedpropertynode.cxx +++ b/configmgr/source/localizedpropertynode.cxx @@ -51,7 +51,7 @@ LocalizedPropertyNode::LocalizedPropertyNode( Node(layer), staticType_(staticType), nillable_(nillable) {} -rtl::Reference< Node > LocalizedPropertyNode::clone() const { +rtl::Reference< Node > LocalizedPropertyNode::clone(bool) const { return new LocalizedPropertyNode(*this); } diff --git a/configmgr/source/localizedpropertynode.hxx b/configmgr/source/localizedpropertynode.hxx index d5a16af0e54d..4ebcf8e243da 100644 --- a/configmgr/source/localizedpropertynode.hxx +++ b/configmgr/source/localizedpropertynode.hxx @@ -47,7 +47,7 @@ class LocalizedPropertyNode: public Node { public: LocalizedPropertyNode(int layer, Type staticType, bool nillable); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); diff --git a/configmgr/source/localizedvaluenode.cxx b/configmgr/source/localizedvaluenode.cxx index f6246106c8fe..c0e3bc333187 100644 --- a/configmgr/source/localizedvaluenode.cxx +++ b/configmgr/source/localizedvaluenode.cxx @@ -48,7 +48,7 @@ LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any const & value): Node(layer), value_(value) {} -rtl::Reference< Node > LocalizedValueNode::clone() const { +rtl::Reference< Node > LocalizedValueNode::clone(bool) const { return new LocalizedValueNode(*this); } diff --git a/configmgr/source/localizedvaluenode.hxx b/configmgr/source/localizedvaluenode.hxx index 7f8a5dd987ce..bfcbdea1de51 100644 --- a/configmgr/source/localizedvaluenode.hxx +++ b/configmgr/source/localizedvaluenode.hxx @@ -43,7 +43,7 @@ class LocalizedValueNode: public Node { public: LocalizedValueNode(int layer, com::sun::star::uno::Any const & value); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual rtl::OUString getTemplateName() const; diff --git a/configmgr/source/makefile.mk b/configmgr/source/makefile.mk index 317e08bdf49c..777fed3323d8 100644 --- a/configmgr/source/makefile.mk +++ b/configmgr/source/makefile.mk @@ -34,7 +34,7 @@ VISIBILITY_HIDDEN = TRUE .INCLUDE: settings.mk -CDEFS += -DOOO_DLLIMPLEMENTATION_CONFIGMGR +DLLPRE = SLOFILES = \ $(SLO)/access.obj \ @@ -77,7 +77,7 @@ SHL1STDLIBS = \ $(CPPULIB) \ $(SALHELPERLIB) \ $(SALLIB) -SHL1TARGET = configmgr +SHL1TARGET = configmgr.uno SHL1USE_EXPORTS = name DEF1NAME = $(SHL1TARGET) diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx index 10f168520595..7c9417e68ea9 100644 --- a/configmgr/source/node.hxx +++ b/configmgr/source/node.hxx @@ -46,7 +46,7 @@ public: virtual Kind kind() const = 0; - virtual rtl::Reference< Node > clone() const = 0; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const = 0; virtual NodeMap & getMembers(); diff --git a/configmgr/source/nodemap.cxx b/configmgr/source/nodemap.cxx index 6b22863b5672..8e4d06030bdf 100644 --- a/configmgr/source/nodemap.cxx +++ b/configmgr/source/nodemap.cxx @@ -42,7 +42,7 @@ void cloneNodeMap(NodeMap const & source, NodeMap * target) { OSL_ASSERT(target != 0 && target->empty()); NodeMap clone(source); for (NodeMap::iterator i(clone.begin()); i != clone.end(); ++i) { - i->second = i->second->clone(); + i->second = i->second->clone(true); } std::swap(clone, *target); } diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx index 070b56d9be9a..f3e459998e7e 100644 --- a/configmgr/source/propertynode.cxx +++ b/configmgr/source/propertynode.cxx @@ -55,7 +55,7 @@ PropertyNode::PropertyNode( extension_(extension) {} -rtl::Reference< Node > PropertyNode::clone() const { +rtl::Reference< Node > PropertyNode::clone(bool) const { return new PropertyNode(*this); } diff --git a/configmgr/source/propertynode.hxx b/configmgr/source/propertynode.hxx index 1566cbf72dbe..506526ffcc1e 100644 --- a/configmgr/source/propertynode.hxx +++ b/configmgr/source/propertynode.hxx @@ -48,7 +48,7 @@ public: int layer, Type staticType, bool nillable, com::sun::star::uno::Any const & value, bool extension); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; Type getStaticType() const; diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx index f8ccc6a31546..95a346d720c2 100644 --- a/configmgr/source/rootaccess.cxx +++ b/configmgr/source/rootaccess.cxx @@ -113,6 +113,11 @@ void RootAccess::release() throw () { Access::release(); } +rtl::OUString RootAccess::getAbsolutePathRepresentation() { + getNode(); // turn pathRepresentation_ into canonic form + return pathRepresentation_; +} + rtl::OUString RootAccess::getLocale() const { return locale_; } @@ -136,9 +141,10 @@ rtl::OUString RootAccess::getRelativePathRepresentation() { rtl::Reference< Node > RootAccess::getNode() { if (!node_.is()) { + rtl::OUString canonic; int finalizedLayer; node_ = getComponents().resolvePathRepresentation( - pathRepresentation_, &path_, &finalizedLayer); + pathRepresentation_, &canonic, &path_, &finalizedLayer); if (!node_.is()) { throw css::uno::RuntimeException( (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cannot find ")) + @@ -150,6 +156,7 @@ rtl::Reference< Node > RootAccess::getNode() { // queryInterface on it would cause trouble; therefore, // RuntimeException.Context is left null here } + pathRepresentation_ = canonic; OSL_ASSERT(!path_.empty()); name_ = path_.back(); finalized_ = finalizedLayer != Data::NO_LAYER; @@ -285,7 +292,7 @@ void RootAccess::commitChanges() Modifications globalMods; commitChildChanges( ((getComponents().resolvePathRepresentation( - pathRepresentation_, 0, &finalizedLayer) + pathRepresentation_, 0, 0, &finalizedLayer) == node_) && finalizedLayer == Data::NO_LAYER), &globalMods); diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx index 45d4193d70de..77d945cdbbed 100644 --- a/configmgr/source/rootaccess.hxx +++ b/configmgr/source/rootaccess.hxx @@ -78,6 +78,8 @@ public: virtual void SAL_CALL release() throw (); + rtl::OUString getAbsolutePathRepresentation(); + rtl::OUString getLocale() const; bool isUpdate() const; diff --git a/configmgr/source/services.cxx b/configmgr/source/services.cxx index 3a009b3cee15..f8c3289664ef 100644 --- a/configmgr/source/services.cxx +++ b/configmgr/source/services.cxx @@ -44,6 +44,7 @@ #include "configurationprovider.hxx" #include "configurationregistry.hxx" #include "defaultprovider.hxx" +#include "update.hxx" namespace { @@ -67,6 +68,9 @@ static cppu::ImplementationEntry const services[] = { { &dummy, &configmgr::configuration_registry::getImplementationName, &configmgr::configuration_registry::getSupportedServiceNames, &configmgr::configuration_registry::createFactory, 0, 0 }, + { &dummy, &configmgr::update::getImplementationName, + &configmgr::update::getSupportedServiceNames, + &configmgr::update::createFactory, 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; @@ -107,6 +111,19 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.DefaultProvider"))); + css::uno::Reference< css::registry::XRegistryKey >( + (css::uno::Reference< css::registry::XRegistryKey >( + static_cast< css::registry::XRegistryKey * >(pRegistryKey))-> + createKey( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "/com.sun.star.comp.configuration.Update/UNO/" + "SINGLETONS/com.sun.star.configuration.Update")))), + css::uno::UNO_SET_THROW)-> + setStringValue( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.Update_Service"))); } catch (css::uno::Exception & e) { (void) e; OSL_TRACE( diff --git a/configmgr/source/setnode.cxx b/configmgr/source/setnode.cxx index f19c36c0bba5..465345a5f856 100644 --- a/configmgr/source/setnode.cxx +++ b/configmgr/source/setnode.cxx @@ -69,8 +69,8 @@ SetNode::SetNode( templateName_(templateName), mandatory_(Data::NO_LAYER) {} -rtl::Reference< Node > SetNode::clone() const { - return new SetNode(*this); +rtl::Reference< Node > SetNode::clone(bool keepTemplateName) const { + return new SetNode(*this, keepTemplateName); } NodeMap & SetNode::getMembers() { @@ -105,12 +105,15 @@ bool SetNode::isValidTemplate(rtl::OUString const & templateName) const { additionalTemplateNames_.end()); } -SetNode::SetNode(SetNode const & other): +SetNode::SetNode(SetNode const & other, bool keepTemplateName): Node(other), defaultTemplateName_(other.defaultTemplateName_), additionalTemplateNames_(other.additionalTemplateNames_), - templateName_(other.templateName_), mandatory_(other.mandatory_) + mandatory_(other.mandatory_) { cloneNodeMap(other.members_, &members_); + if (keepTemplateName) { + templateName_ = other.templateName_; + } } SetNode::~SetNode() {} diff --git a/configmgr/source/setnode.hxx b/configmgr/source/setnode.hxx index 7bf1ab0a199e..94ce537adda1 100644 --- a/configmgr/source/setnode.hxx +++ b/configmgr/source/setnode.hxx @@ -46,7 +46,7 @@ public: int layer, rtl::OUString const & defaultTemplateName, rtl::OUString const & templateName); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); @@ -63,7 +63,7 @@ public: bool isValidTemplate(rtl::OUString const & templateName) const; private: - SetNode(SetNode const & other); + SetNode(SetNode const & other, bool keepTemplateName); virtual ~SetNode(); diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx index 57f45068d954..4c1d59d5d054 100644 --- a/configmgr/source/update.cxx +++ b/configmgr/source/update.cxx @@ -30,27 +30,84 @@ #include <set> -#include "configmgr/update.hxx" +#include "boost/noncopyable.hpp" +#include "com/sun/star/configuration/XUpdate.hpp" +#include "com/sun/star/lang/XSingleComponentFactory.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implbase1.hxx" +#include "cppuhelper/weak.hxx" #include "osl/mutex.hxx" #include "rtl/ref.hxx" +#include "rtl/unload.h" +#include "rtl/ustring.h" #include "rtl/ustring.hxx" +#include "sal/types.h" #include "broadcaster.hxx" #include "components.hxx" #include "lock.hxx" #include "modifications.hxx" #include "rootaccess.hxx" +#include "update.hxx" -namespace configmgr { +namespace configmgr { namespace update { -namespace update { +namespace { -void insertExtensionXcsFile(bool shared, rtl::OUString const & fileUri) { +namespace css = com::sun::star; + +std::set< rtl::OUString > seqToSet( + css::uno::Sequence< rtl::OUString > const & sequence) +{ + return std::set< rtl::OUString >( + sequence.getConstArray(), + sequence.getConstArray() + sequence.getLength()); +} + +class Service: + public cppu::WeakImplHelper1< css::configuration::XUpdate >, + private boost::noncopyable +{ +public: + Service() {} + +private: + virtual ~Service() {} + + virtual void SAL_CALL insertExtensionXcsFile( + sal_Bool shared, rtl::OUString const & fileUri) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL insertExtensionXcuFile( + sal_Bool shared, rtl::OUString const & fileUri) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL insertModificationXcuFile( + rtl::OUString const & fileUri, + css::uno::Sequence< rtl::OUString > const & includedPaths, + css::uno::Sequence< rtl::OUString > const & excludedPaths) + throw (css::uno::RuntimeException); +}; + +void Service::insertExtensionXcsFile( + sal_Bool shared, rtl::OUString const & fileUri) + throw (css::uno::RuntimeException) +{ osl::MutexGuard g(lock); Components::getSingleton().insertExtensionXcsFile(shared, fileUri); } -void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) { +void Service::insertExtensionXcuFile( + sal_Bool shared, rtl::OUString const & fileUri) + throw (css::uno::RuntimeException) +{ Broadcaster bc; { osl::MutexGuard g(lock); @@ -63,23 +120,91 @@ void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) { bc.send(); } -void insertModificationXcuFile( +void Service::insertModificationXcuFile( rtl::OUString const & fileUri, - std::set< rtl::OUString > const & includedPaths, - std::set< rtl::OUString > const & excludedPaths) + css::uno::Sequence< rtl::OUString > const & includedPaths, + css::uno::Sequence< rtl::OUString > const & excludedPaths) + throw (css::uno::RuntimeException) { Broadcaster bc; { osl::MutexGuard g(lock); Modifications mods; Components::getSingleton().insertModificationXcuFile( - fileUri, includedPaths, excludedPaths, &mods); + fileUri, seqToSet(includedPaths), seqToSet(excludedPaths), &mods); Components::getSingleton().initGlobalBroadcaster( mods, rtl::Reference< RootAccess >(), &bc); } bc.send(); } +class Factory: + public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, + private boost::noncopyable +{ +public: + Factory() {} + +private: + virtual ~Factory() {} + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithContext( + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException); + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any > const & Arguments, + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException); +}; + +css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext( + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException) +{ + return createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any >(), Context); +} + +css::uno::Reference< css::uno::XInterface > +Factory::createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any > const & Arguments, + css::uno::Reference< css::uno::XComponentContext > const &) + throw (css::uno::Exception, css::uno::RuntimeException) +{ + if (Arguments.getLength() != 0) { + throw css::uno::Exception( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.configuration.Update must be" + " instantiated without arguments")), + static_cast< cppu::OWeakObject * >(this)); + } + return static_cast< cppu::OWeakObject * >(new Service); } } + +rtl::OUString getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.Update")); +} + +css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.Update_Service")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +css::uno::Reference< css::lang::XSingleComponentFactory > createFactory( + cppu::ComponentFactoryFunc, rtl::OUString const &, + css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) + SAL_THROW(()) +{ + return new Factory; +} + +} } diff --git a/configmgr/inc/configmgr/update.hxx b/configmgr/source/update.hxx index 3a152959342b..faa5c86b15fa 100644 --- a/configmgr/inc/configmgr/update.hxx +++ b/configmgr/source/update.hxx @@ -25,34 +25,35 @@ * ************************************************************************/ -#ifndef INCLUDED_CONFIGMGR_UPDATE_HXX -#define INCLUDED_CONFIGMGR_UPDATE_HXX +#ifndef INCLUDED_CONFIGMGR_SOURCE_UPDATE_HXX +#define INCLUDED_CONFIGMGR_SOURCE_UPDATE_HXX #include "sal/config.h" -#include <set> - -#include "configmgr/detail/configmgrdllapi.hxx" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppuhelper/factory.hxx" +#include "rtl/unload.h" +#include "sal/types.h" +namespace com { namespace sun { namespace star { namespace lang { + class XSingleComponentFactory; +} } } } namespace rtl { class OUString; } -namespace configmgr { - -namespace update { - -OOO_DLLPUBLIC_CONFIGMGR void insertExtensionXcsFile( - bool shared, rtl::OUString const & fileUri); +namespace configmgr { namespace update { -OOO_DLLPUBLIC_CONFIGMGR void insertExtensionXcuFile( - bool shared, rtl::OUString const & fileUri); +rtl::OUString SAL_CALL getImplementationName(); -OOO_DLLPUBLIC_CONFIGMGR void insertModificationXcuFile( - rtl::OUString const & fileUri, - std::set< rtl::OUString > const & includedPaths, - std::set< rtl::OUString > const & excludedPaths); +com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL +getSupportedServiceNames(); -} +com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory > +SAL_CALL createFactory( + cppu::ComponentFactoryFunc, rtl::OUString const &, + com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) + SAL_THROW(()); -} +} } #endif diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 12e64ebbe171..79e122759fc8 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -78,19 +78,19 @@ void merge( case Node::KIND_LOCALIZED_VALUE: break; //TODO: merge certain parts? case Node::KIND_GROUP: - if (dynamic_cast< GroupNode * >(original.get())->isExtensible()) { - for (NodeMap::iterator i2(update->getMembers().begin()); - i2 != update->getMembers().end(); ++i2) - { - NodeMap::iterator i1( - original->getMembers().find(i2->first)); - if (i1 == original->getMembers().end()) { - if (i2->second->kind() == Node::KIND_PROPERTY) { - original->getMembers().insert(*i2); - } - } else if (i2->second->kind() == i1->second->kind()) { - merge(i1->second, i2->second); + for (NodeMap::iterator i2(update->getMembers().begin()); + i2 != update->getMembers().end(); ++i2) + { + NodeMap::iterator i1(original->getMembers().find(i2->first)); + if (i1 == original->getMembers().end()) { + if (i2->second->kind() == Node::KIND_PROPERTY && + dynamic_cast< GroupNode * >( + original.get())->isExtensible()) + { + original->getMembers().insert(*i2); } + } else if (i2->second->kind() == i1->second->kind()) { + merge(i1->second, i2->second); } } break; @@ -456,7 +456,7 @@ void XcsParser::handleNodeRef(XmlReader & reader) { reader.getUrl()), css::uno::Reference< css::uno::XInterface >()); } - rtl::Reference< Node > node(tmpl->clone()); + rtl::Reference< Node > node(tmpl->clone(false)); node->setLayer(valueParser_.getLayer()); elements_.push(Element(node, name)); } diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index 77b0f747f313..eda478b18b70 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -395,7 +395,8 @@ void XcuParser::handleItem(XmlReader & reader) { rtl::OUString path(xmldata::convertFromUtf8(attrPath)); int finalizedLayer; rtl::Reference< Node > node( - data_.resolvePathRepresentation(path, &path_, &finalizedLayer)); + data_.resolvePathRepresentation( + path, 0, &path_, &finalizedLayer)); if (!node.is()) { OSL_TRACE( "configmgr unknown item %s in %s", @@ -1056,7 +1057,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { if (state_.top().locked || finalizedLayer < valueParser_.getLayer()) { state_.push(State(true)); // ignored } else { - rtl::Reference< Node > member(tmpl->clone()); + rtl::Reference< Node > member(tmpl->clone(true)); member->setLayer(valueParser_.getLayer()); member->setFinalized(finalizedLayer); member->setMandatory(mandatoryLayer); @@ -1070,7 +1071,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { { state_.push(State(true)); // ignored } else { - rtl::Reference< Node > member(tmpl->clone()); + rtl::Reference< Node > member(tmpl->clone(true)); member->setLayer(valueParser_.getLayer()); member->setFinalized(finalizedLayer); member->setMandatory(mandatoryLayer); diff --git a/connectivity/inc/connectivity/PColumn.hxx b/connectivity/inc/connectivity/PColumn.hxx index 8f22de0be964..547cc8fb9970 100644 --- a/connectivity/inc/connectivity/PColumn.hxx +++ b/connectivity/inc/connectivity/PColumn.hxx @@ -33,6 +33,7 @@ #include <vos/ref.hxx> #include <com/sun/star/sdbc/XResultSetMetaData.hpp> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> +#include <com/sun/star/container/XNameAccess.hpp> #include <comphelper/proparrhlp.hxx> namespace connectivity @@ -49,6 +50,7 @@ namespace connectivity { ::rtl::OUString m_aRealName; ::rtl::OUString m_aTableName; + ::rtl::OUString m_sLabel; sal_Bool m_bFunction; sal_Bool m_bDbasePrecisionChanged; sal_Bool m_bAggregateFunction; @@ -64,6 +66,7 @@ namespace connectivity OParseColumn(const ::rtl::OUString& _Name, const ::rtl::OUString& _TypeName, const ::rtl::OUString& _DefaultValue, + const ::rtl::OUString& _Description, sal_Int32 _IsNullable, sal_Int32 _Precision, sal_Int32 _Scale, @@ -75,15 +78,17 @@ namespace connectivity virtual void construct(); void setRealName(const ::rtl::OUString& _rName) { m_aRealName = _rName; } + void setLabel(const ::rtl::OUString& i_sLabel) { m_sLabel = i_sLabel; } void setTableName(const ::rtl::OUString& _rName) { m_aTableName = _rName; } void setFunction(sal_Bool _bFunction) { m_bFunction = _bFunction; } void setAggregateFunction(sal_Bool _bFunction) { m_bAggregateFunction = _bFunction; } void setIsSearchable( sal_Bool _bIsSearchable ) { m_bIsSearchable = _bIsSearchable; } void setDbasePrecisionChanged(sal_Bool _bDbasePrecisionChanged) { m_bDbasePrecisionChanged = _bDbasePrecisionChanged; } - ::rtl::OUString getRealName() const { return m_aRealName; } - ::rtl::OUString getTableName() const { return m_aTableName; } - sal_Bool getFunction() const { return m_bFunction; } + ::rtl::OUString getRealName() const { return m_aRealName; } + ::rtl::OUString getLabel() const { return m_sLabel; } + ::rtl::OUString getTableName() const { return m_aTableName; } + sal_Bool getFunction() const { return m_bFunction; } sal_Bool getDbasePrecisionChanged() const { return m_bDbasePrecisionChanged; } public: @@ -92,16 +97,20 @@ namespace connectivity static ::vos::ORef< OSQLColumns > createColumnsForResultSet( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData >& _rxResMetaData, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMetaData + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMetaData, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& i_xQueryColumns ); - /** creates a single OParseColumn, as described by a result set meta data instance + DECLARE_STL_USTRINGACCESS_MAP(int,StringMap); + /** creates a single OParseColumn, as described by a result set meta data instance. + The column names are unique. */ static OParseColumn* createColumnForResultSet( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData >& _rxResMetaData, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMetaData, - sal_Int32 _nColumnPos + sal_Int32 _nColumnPos, + StringMap& _rColumns ); private: @@ -125,17 +134,6 @@ namespace connectivity virtual ~OOrderColumn(); public: OOrderColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn,sal_Bool _bCase,sal_Bool _bAscending); - OOrderColumn(const ::rtl::OUString& _Name, - const ::rtl::OUString& _TypeName, - const ::rtl::OUString& _DefaultValue, - sal_Int32 _IsNullable, - sal_Int32 _Precision, - sal_Int32 _Scale, - sal_Int32 _Type, - sal_Bool _IsAutoIncrement, - sal_Bool _IsCurrency, - sal_Bool _bCase - ,sal_Bool _bAscending); virtual void construct(); diff --git a/connectivity/inc/connectivity/SQLStatementHelper.hxx b/connectivity/inc/connectivity/SQLStatementHelper.hxx new file mode 100644 index 000000000000..0d1bb97c7b7f --- /dev/null +++ b/connectivity/inc/connectivity/SQLStatementHelper.hxx @@ -0,0 +1,54 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: dbtools.hxx,v $ + * $Revision: 1.37 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _CONNECTIVITY_SQLSTATEMENTHELPER_HXX_ +#define _CONNECTIVITY_SQLSTATEMENTHELPER_HXX_ + +#include "connectivity/dbtoolsdllapi.hxx" +#include <com/sun/star/beans/XPropertySet.hpp> +namespace rtl +{ + class OUStringBuffer; +} +//......................................................................... +namespace dbtools +{ + class OOO_DLLPUBLIC_DBTOOLS ISQLStatementHelper + { + public: + virtual void addComment(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut) = 0; + }; + +//......................................................................... +} // namespace dbtools +//......................................................................... + +#endif // _CONNECTIVITY_SQLSTATEMENTHELPER_HXX_ + diff --git a/connectivity/inc/connectivity/TTableHelper.hxx b/connectivity/inc/connectivity/TTableHelper.hxx index 9f0a644e0b6d..f99a106bce37 100644 --- a/connectivity/inc/connectivity/TTableHelper.hxx +++ b/connectivity/inc/connectivity/TTableHelper.hxx @@ -45,6 +45,7 @@ namespace connectivity { ::rtl::OUString sName; ::rtl::OUString aField6; + ::rtl::OUString sField12; // REMARKS ::rtl::OUString sField13; sal_Int32 nField5 , nField7 @@ -60,10 +61,12 @@ namespace connectivity , sal_Int32 _nField7 , sal_Int32 _nField9 , sal_Int32 _nField11 + , const ::rtl::OUString& _sField12 , const ::rtl::OUString& _sField13 ,OrdinalPosition _nPosition ) :sName( _rName ) ,aField6(_aField6) + ,sField12(_sField12) ,sField13(_sField13) ,nField5(_nField5) ,nField7(_nField7) diff --git a/connectivity/inc/connectivity/dbtools.hxx b/connectivity/inc/connectivity/dbtools.hxx index 1503291ef9b7..9b93830aeefe 100644 --- a/connectivity/inc/connectivity/dbtools.hxx +++ b/connectivity/inc/connectivity/dbtools.hxx @@ -87,6 +87,7 @@ namespace rtl //......................................................................... namespace dbtools { + class ISQLStatementHelper; typedef ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XConnection > SharedConnection; enum EComposeRule @@ -225,6 +226,15 @@ namespace dbtools const ::rtl::OUString& _rName ); + /** returns the primary key columns of the table + */ + OOO_DLLPUBLIC_DBTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getPrimaryKeyColumns_throw( + const ::com::sun::star::uno::Any& i_aTable + ); + OOO_DLLPUBLIC_DBTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getPrimaryKeyColumns_throw( + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_xTable + ); + /** get fields for a result set given by a "command descriptor" <p>A command descriptor here means: @@ -661,6 +671,7 @@ namespace dbtools OOO_DLLPUBLIC_DBTOOLS ::rtl::OUString createStandardCreateStatement( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, + ISQLStatementHelper* _pHelper, const ::rtl::OUString& _sCreatePattern = ::rtl::OUString()); /** creates the standard sql statement for the key part of a create table statement. @@ -674,32 +685,39 @@ namespace dbtools const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection); /** creates the standard sql statement for the column part of a create table statement. + @param _pHelper + Allow to add special SQL constructs. @param descriptor The descriptor of the column. @param _xConnection The connection. - @param _bAddScale - The scale will also be added when the value is 0. + @param _pHelper + Allow to add special SQL constructs. */ OOO_DLLPUBLIC_DBTOOLS - ::rtl::OUString createStandardColumnPart( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, - const ::rtl::OUString& _sCreatePattern = ::rtl::OUString()); + ::rtl::OUString createStandardColumnPart( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor + ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection + ,ISQLStatementHelper* _pHelper = NULL + ,const ::rtl::OUString& _sCreatePattern = ::rtl::OUString()); /** creates a SQL CREATE TABLE statement + @param descriptor The descriptor of the new table. @param _xConnection The connection. - @param _bAddScale - The scale will also be added when the value is 0. + @param _pHelper + Allow to add special SQL constructs. + @param _sCreatePattern + @return The CREATE TABLE statement. */ OOO_DLLPUBLIC_DBTOOLS - ::rtl::OUString createSqlCreateTableStatement( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, - const ::rtl::OUString& _sCreatePattern = ::rtl::OUString()); + ::rtl::OUString createSqlCreateTableStatement( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor + ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection + ,ISQLStatementHelper* _pHelper = NULL + ,const ::rtl::OUString& _sCreatePattern = ::rtl::OUString()); /** creates a SDBC column with the help of getColumns. @param _xTable diff --git a/connectivity/inc/connectivity/sdbcx/VColumn.hxx b/connectivity/inc/connectivity/sdbcx/VColumn.hxx index 2c9fa31a2d7e..0a8c5498cf60 100644 --- a/connectivity/inc/connectivity/sdbcx/VColumn.hxx +++ b/connectivity/inc/connectivity/sdbcx/VColumn.hxx @@ -84,6 +84,7 @@ namespace connectivity OColumn( const ::rtl::OUString& _Name, const ::rtl::OUString& _TypeName, const ::rtl::OUString& _DefaultValue, + const ::rtl::OUString& _Description, sal_Int32 _IsNullable, sal_Int32 _Precision, sal_Int32 _Scale, diff --git a/connectivity/inc/connectivity/sqliterator.hxx b/connectivity/inc/connectivity/sqliterator.hxx index 3b7db6968671..5152b7221f85 100644 --- a/connectivity/inc/connectivity/sqliterator.hxx +++ b/connectivity/inc/connectivity/sqliterator.hxx @@ -40,6 +40,7 @@ #include <map> #include <memory> +#include <vector> namespace connectivity { @@ -47,6 +48,8 @@ namespace connectivity class OSQLParseNode; class OSQLParser; + typedef ::std::pair<const OSQLParseNode*,const OSQLParseNode* > TNodePair; + enum OSQLStatementType { SQL_STATEMENT_UNKNOWN, SQL_STATEMENT_SELECT, @@ -279,6 +282,10 @@ namespace connectivity // tries to find the correct type of the function sal_Int32 getFunctionReturnType(const OSQLParseNode* _pNode ); + + // returns a lis of all joined columns + ::std::vector< TNodePair >& getJoinConditions() const; + private: /** traverses the list of table names, and filles _rTables */ @@ -351,6 +358,7 @@ namespace connectivity { m_aErrors = ::com::sun::star::sdbc::SQLException(); } + void impl_fillJoinConditions(const OSQLParseNode* i_pJoinCondition); }; } diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx index 5f1d7137e678..fa283cb5cf04 100644 --- a/connectivity/inc/connectivity/sqlnode.hxx +++ b/connectivity/inc/connectivity/sqlnode.hxx @@ -226,6 +226,11 @@ namespace connectivity concatenation, char_factor, bit_value_fct, + comparison_predicate_part_2, + parenthesized_boolean_value_expression, + character_string_type, + other_like_predicate_part_2, + between_predicate_part_2, rule_count, // letzter_wert UNKNOWN_RULE // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID) }; diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst index dd386c7c7161..0b15c06acf15 100644 --- a/connectivity/prj/build.lst +++ b/connectivity/prj/build.lst @@ -1,4 +1,4 @@ -cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb QADEVOOO:qadevOOo officecfg NSS:nss NULL +cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss NULL cn connectivity usr1 - all cn_mkout NULL cn connectivity\inc nmake - all cn_inc NULL cn connectivity\com\sun\star\sdbcx\comp\hsqldb nmake - all cn_jhsqldbdb cn_hsqldb cn_inc NULL diff --git a/connectivity/qa/connectivity/tools/CRMDatabase.java b/connectivity/qa/connectivity/tools/CRMDatabase.java index c35faac75ff7..a1b457884948 100644 --- a/connectivity/qa/connectivity/tools/CRMDatabase.java +++ b/connectivity/qa/connectivity/tools/CRMDatabase.java @@ -285,7 +285,7 @@ public class CRMDatabase m_database.getDataSource().createQuery( "parseable", "SELECT * FROM \"customers\"" ); m_database.getDataSource().createQuery( "parseable native", "SELECT * FROM INFORMATION_SCHEMA.SYSTEM_VIEWS", false ); m_database.getDataSource().createQuery( "unparseable", - "SELECT CAST( \"ID\" AS VARCHAR(3) ) AS \"ID_VARCHAR\" FROM \"products\"", false ); + "SELECT {fn DAYOFMONTH ('2001-01-01')} AS \"ID_VARCHAR\" FROM \"products\"", false ); validateUnparseable(); } diff --git a/connectivity/qa/connectivity/tools/makefile.mk b/connectivity/qa/connectivity/tools/makefile.mk index 0f3c9c84b92e..07490532a1b1 100644 --- a/connectivity/qa/connectivity/tools/makefile.mk +++ b/connectivity/qa/connectivity/tools/makefile.mk @@ -38,7 +38,6 @@ all: @echo "Java not available. Build skipped" .ELSE -.IF "$(BUILD_QADEVOOO)" == "YES" #----- compile .java files ----------------------------------------- JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunnerLight.jar @@ -61,8 +60,6 @@ ALL : ALLTAR ALL: ALLDEP .ENDIF -.ENDIF - .ENDIF # "$(SOLAR_JAVA)" == "" .INCLUDE : target.mk diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index a09260782fd6..9f5be37f208f 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -126,9 +126,27 @@ using namespace ::com::sun::star::beans; case DataType::TIMESTAMP: { DateTime aDateTime; + bool bOk = false; + if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE) + { + double nValue = 0.0; + _rVal >>= nValue; + aDateTime = DBTypeConversion::toDateTime(nValue); + bOk = true; + } + else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING) + { + ::rtl::OUString sValue; + _rVal >>= sValue; + aDateTime = DBTypeConversion::toDateTime(sValue); + bOk = true; + } + else + bOk = _rVal >>= aDateTime; + OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not datetime!"); // check if this is really a timestamp or only a date - if ( _rVal >>= aDateTime ) + if ( bOk ) { if (bQuote) aRet.appendAscii("{TS '"); @@ -142,7 +160,24 @@ using namespace ::com::sun::star::beans; case DataType::DATE: { Date aDate; - OSL_VERIFY_RES( _rVal >>= aDate, "DBTypeConversion::toSQLString: _rVal is not date!"); + bool bOk = false; + if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE) + { + double nValue = 0.0; + _rVal >>= nValue; + aDate = DBTypeConversion::toDate(nValue); + bOk = true; + } + else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING) + { + ::rtl::OUString sValue; + _rVal >>= sValue; + aDate = DBTypeConversion::toDate(sValue); + bOk = true; + } + else + bOk = _rVal >>= aDate; + OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not date!"); if (bQuote) aRet.appendAscii("{D '"); aRet.append(DBTypeConversion::toDateString(aDate)); @@ -152,7 +187,24 @@ using namespace ::com::sun::star::beans; case DataType::TIME: { Time aTime; - OSL_VERIFY_RES( _rVal >>= aTime,"DBTypeConversion::toSQLString: _rVal is not time!"); + bool bOk = false; + if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE) + { + double nValue = 0.0; + _rVal >>= nValue; + aTime = DBTypeConversion::toTime(nValue); + bOk = true; + } + else if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_STRING) + { + ::rtl::OUString sValue; + _rVal >>= sValue; + aTime = DBTypeConversion::toTime(sValue); + bOk = true; + } + else + bOk = _rVal >>= aTime; + OSL_VERIFY_RES( bOk,"DBTypeConversion::toSQLString: _rVal is not time!"); if (bQuote) aRet.appendAscii("{T '"); aRet.append(DBTypeConversion::toTimeString(aTime)); diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index f99c637fa396..48c2736cd05a 100755 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -136,26 +136,26 @@ DriversConfig::DriversConfig(const uno::Reference< lang::XMultiServiceFactory >& } // ----------------------------------------------------------------------------- -DriversConfig::~DriversConfig()
-{
-}
-
+DriversConfig::~DriversConfig() +{ +} + // ----------------------------------------------------------------------------- -DriversConfig::DriversConfig( const DriversConfig& _rhs )
-{
- *this = _rhs;
-}
-
+DriversConfig::DriversConfig( const DriversConfig& _rhs ) +{ + *this = _rhs; +} + // ----------------------------------------------------------------------------- -DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs )
-{
- if ( this != &_rhs )
- {
- m_aNode = _rhs.m_aNode;
- }
- return *this;
-}
-
+DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) +{ + if ( this != &_rhs ) + { + m_aNode = _rhs.m_aNode; + } + return *this; +} + // ----------------------------------------------------------------------------- ::rtl::OUString DriversConfig::getDriverFactoryName(const ::rtl::OUString& _sURL) const { diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index d6b26dffbe92..325fcfbd0f42 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -121,29 +121,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName) if ( pColDesc ) { Reference<XPropertySet> xPr = m_pTable; - Reference<XKeysSupplier> xKeysSup(xPr,UNO_QUERY); - Reference<XNameAccess> xPrimaryKeyColumns; - if ( xKeysSup.is() ) - { - const Reference<XIndexAccess> xKeys = xKeysSup->getKeys(); - if ( xKeys.is() ) - { - ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); - const sal_Int32 nKeyCount = xKeys->getCount(); - for(sal_Int32 nKeyIter = 0; nKeyIter < nKeyCount;++nKeyIter) - { - const Reference<XPropertySet> xKey(xKeys->getByIndex(nKeyIter),UNO_QUERY_THROW); - sal_Int32 nType = 0; - xKey->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; - if ( nType == KeyType::PRIMARY ) - { - const Reference<XColumnsSupplier> xColS(xKey,UNO_QUERY_THROW); - xPrimaryKeyColumns = xColS->getColumns(); - break; - } - } // for(sal_Int32 nKeyIter = 0; nKeyIter < nKeyCount;++) - } - } + const Reference<XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(xPr); sal_Int32 nField11 = pColDesc->nField11; if ( nField11 != ColumnValue::NO_NULLS && xPrimaryKeyColumns.is() && xPrimaryKeyColumns->hasByName(_rName) ) { @@ -152,6 +130,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const ::rtl::OUString& _rName) connectivity::sdbcx::OColumn* pRet = new connectivity::sdbcx::OColumn(_rName, pColDesc->aField6, pColDesc->sField13, + pColDesc->sField12, nField11, pColDesc->nField7, pColDesc->nField9, @@ -207,7 +186,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const ::rtl::OUString& _rForName aSql += ::dbtools::composeTableName( xMetaData, m_pTable, ::dbtools::eInTableDefinitions, false, false, true ); aSql += ::rtl::OUString::createFromAscii(" ADD "); - aSql += ::dbtools::createStandardColumnPart(descriptor,m_pTable->getConnection(),m_pTable->getTypeCreatePattern()); + aSql += ::dbtools::createStandardColumnPart(descriptor,m_pTable->getConnection(),NULL,m_pTable->getTypeCreatePattern()); Reference< XStatement > xStmt = m_pTable->getConnection()->createStatement( ); if ( xStmt.is() ) diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx index f44b08fa15b7..7d020e9fc4a6 100644 --- a/connectivity/source/commontools/TTableHelper.cxx +++ b/connectivity/source/commontools/TTableHelper.cxx @@ -210,9 +210,10 @@ namespace sal_Int32 nField7 = xRow->getInt(7) , nField9 = xRow->getInt(9) , nField11= xRow->getInt(11); - ::rtl::OUString sField13 = xRow->getString(13); + ::rtl::OUString sField12 = xRow->getString(12) + ,sField13 = xRow->getString(13); nOrdinalPosition = xRow->getInt( 17 ); // ORDINAL_POSITION - _out_rColumns.push_back( ColumnDesc( sName,nField5,aField6,nField7,nField9,nField11,sField13, nOrdinalPosition ) ); + _out_rColumns.push_back( ColumnDesc( sName,nField5,aField6,nField7,nField9,nField11,sField12,sField13, nOrdinalPosition ) ); } } diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 0b7cb5b5df58..05bcf997268f 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -60,8 +60,10 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XRowSet.hpp> #include <com/sun/star/sdbc/XRowUpdate.hpp> +#include <com/sun/star/sdbcx/KeyType.hpp> #include <com/sun/star/sdbcx/Privilege.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> +#include <com/sun/star/sdbcx/XKeysSupplier.hpp> #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/task/XInteractionRequest.hpp> @@ -528,6 +530,46 @@ Reference< XNameAccess> getTableFields(const Reference< XConnection>& _rxConn,co Reference< XComponent > xDummy; return getFieldsByCommandDescriptor( _rxConn, CommandType::TABLE, _rName, xDummy ); } +//------------------------------------------------------------------------------ +Reference< XNameAccess> getPrimaryKeyColumns_throw(const Any& i_aTable) +{ + const Reference< XPropertySet > xTable(i_aTable,UNO_QUERY_THROW); + return getPrimaryKeyColumns_throw(xTable); +} +//------------------------------------------------------------------------------ +Reference< XNameAccess> getPrimaryKeyColumns_throw(const Reference< XPropertySet >& i_xTable) +{ + Reference<XNameAccess> xKeyColumns; + const Reference<XKeysSupplier> xKeySup(i_xTable,UNO_QUERY); + if ( xKeySup.is() ) + { + const Reference<XIndexAccess> xKeys = xKeySup->getKeys(); + if ( xKeys.is() ) + { + ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap(); + const ::rtl::OUString sPropName = rPropMap.getNameByIndex(PROPERTY_ID_TYPE); + Reference<XPropertySet> xProp; + const sal_Int32 nCount = xKeys->getCount(); + for(sal_Int32 i = 0;i< nCount;++i) + { + xProp.set(xKeys->getByIndex(i),UNO_QUERY_THROW); + if ( xProp.is() ) + { + sal_Int32 nKeyType = 0; + xProp->getPropertyValue(sPropName) >>= nKeyType; + if(KeyType::PRIMARY == nKeyType) + { + const Reference<XColumnsSupplier> xKeyColsSup(xProp,UNO_QUERY_THROW); + xKeyColumns = xKeyColsSup->getColumns(); + break; + } + } + } + } + } + + return xKeyColumns; +} //------------------------------------------------------------------------------ namespace @@ -2051,7 +2093,7 @@ namespace connectivity void release(oslInterlockedCount& _refCount, ::cppu::OBroadcastHelper& rBHelper, - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, + Reference< XInterface >& _xInterface, ::com::sun::star::lang::XComponent* _pObject) { if (osl_decrementInterlockedCount( &_refCount ) == 0) @@ -2061,7 +2103,7 @@ void release(oslInterlockedCount& _refCount, if (!rBHelper.bDisposed && !rBHelper.bInDispose) { // remember the parent - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xParent; + Reference< XInterface > xParent; { ::osl::MutexGuard aGuard( rBHelper.rMutex ); xParent = _xInterface; diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 7cf12345ae67..c9a878fe1840 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -30,11 +30,10 @@ #include "connectivity/dbtools.hxx" #include "connectivity/dbconversion.hxx" #include "connectivity/dbcharset.hxx" +#include "connectivity/SQLStatementHelper.hxx" #include <unotools/confignode.hxx> #include "resource/sharedresources.hxx" -#ifndef CONNECTIVITY_RESOURCE_COMMON_HRC #include "resource/common_res.hrc" -#endif #include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/sdbc/ColumnValue.hpp> #include <com/sun/star/sdbc/DataType.hpp> @@ -71,7 +70,7 @@ namespace dbtools using namespace connectivity; using namespace comphelper; -::rtl::OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,const Reference< XConnection>& _xConnection,const ::rtl::OUString& _sCreatePattern) +::rtl::OUString createStandardColumnPart(const Reference< XPropertySet >& xColProp,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const ::rtl::OUString& _sCreatePattern) { Reference<XDatabaseMetaData> xMetaData = _xConnection->getMetaData(); @@ -186,11 +185,14 @@ namespace dbtools aSql.append(sAutoIncrementValue); } + if ( _pHelper ) + _pHelper->addComment(xColProp,aSql); + return aSql.makeStringAndClear(); } // ----------------------------------------------------------------------------- -::rtl::OUString createStandardCreateStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection,const ::rtl::OUString& _sCreatePattern) +::rtl::OUString createStandardCreateStatement(const Reference< XPropertySet >& descriptor,const Reference< XConnection>& _xConnection,ISQLStatementHelper* _pHelper,const ::rtl::OUString& _sCreatePattern) { ::rtl::OUStringBuffer aSql = ::rtl::OUString::createFromAscii("CREATE TABLE "); ::rtl::OUString sCatalog,sSchema,sTable,sComposedName; @@ -223,7 +225,7 @@ namespace dbtools { if ( (xColumns->getByIndex(i) >>= xColProp) && xColProp.is() ) { - aSql.append(createStandardColumnPart(xColProp,_xConnection,_sCreatePattern)); + aSql.append(createStandardColumnPart(xColProp,_xConnection,_pHelper,_sCreatePattern)); aSql.appendAscii(","); } } @@ -364,9 +366,10 @@ namespace // ----------------------------------------------------------------------------- ::rtl::OUString createSqlCreateTableStatement( const Reference< XPropertySet >& descriptor, const Reference< XConnection>& _xConnection, + ISQLStatementHelper* _pHelper, const ::rtl::OUString& _sCreatePattern) { - ::rtl::OUString aSql = ::dbtools::createStandardCreateStatement(descriptor,_xConnection,_sCreatePattern); + ::rtl::OUString aSql = ::dbtools::createStandardCreateStatement(descriptor,_xConnection,_pHelper,_sCreatePattern); const ::rtl::OUString sKeyStmt = ::dbtools::createStandardKeyStatement(descriptor,_xConnection); if ( sKeyStmt.getLength() ) aSql += sKeyStmt; @@ -411,7 +414,8 @@ namespace sal_Int32 nField7 = xRow->getInt(7) , nField9 = xRow->getInt(9) , nField11= xRow->getInt(11); - ::rtl::OUString sField13 = xRow->getString(13); + ::rtl::OUString sField12 = xRow->getString(12), + sField13 = xRow->getString(13); ::comphelper::disposeComponent(xRow); sal_Bool bAutoIncrement = _bIsAutoIncrement @@ -471,6 +475,7 @@ namespace connectivity::sdbcx::OColumn* pRet = new connectivity::sdbcx::OColumn(_rName, aField6, sField13, + sField12, nField11, nField7, nField9, @@ -526,28 +531,7 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_SCHEMANAME)) >>= aSchema; _xTable->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)) >>= aTable; - Reference<XKeysSupplier> xKeysSup(_xTable,UNO_QUERY); - Reference<XNameAccess> xPrimaryKeyColumns; - if ( xKeysSup.is() ) - { - const Reference<XIndexAccess> xKeys = xKeysSup->getKeys(); - if ( xKeys.is() ) - { - const sal_Int32 nKeyCount = xKeys->getCount(); - for(sal_Int32 nKeyIter = 0; nKeyIter < nKeyCount;++nKeyIter) - { - const Reference<XPropertySet> xKey(xKeys->getByIndex(nKeyIter),UNO_QUERY_THROW); - sal_Int32 nType = 0; - xKey->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; - if ( nType == KeyType::PRIMARY ) - { - const Reference<XColumnsSupplier> xColS(xKey,UNO_QUERY_THROW); - xPrimaryKeyColumns = xColS->getColumns(); - break; - } - } // for(sal_Int32 nKeyIter = 0; nKeyIter < nKeyCount;++) - } - } + Reference<XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(_xTable); xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, _rName,_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType); if ( !xProp.is() ) @@ -555,7 +539,7 @@ Reference<XPropertySet> createSDBCXColumn(const Reference<XPropertySet>& _xTable xProp = lcl_createSDBCXColumn(xPrimaryKeyColumns,_xConnection,aCatalog, aSchema, aTable, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")),_rName,_bCase,_bQueryForInfo,_bIsAutoIncrement,_bIsCurrency,_nDataType); if ( !xProp.is() ) xProp = new connectivity::sdbcx::OColumn(_rName, - ::rtl::OUString(),::rtl::OUString(), + ::rtl::OUString(),::rtl::OUString(),::rtl::OUString(), ColumnValue::NULLABLE_UNKNOWN, 0, 0, @@ -665,19 +649,9 @@ Reference< XTablesSupplier> getDataDefinitionByURLAndConnection( Reference< XDataDefinitionSupplier > xSupp( xManager->getDriverByURL( _rsUrl ), UNO_QUERY ); if ( xSupp.is() ) + { xTablesSup = xSupp->getDataDefinitionByConnection( _xConnection ); - - // if we don't get the catalog from the original driver we have to try them all. - if ( !xTablesSup.is() ) - { // !TODO: Why? - Reference< XEnumerationAccess> xEnumAccess( xManager, UNO_QUERY_THROW ); - Reference< XEnumeration > xEnum( xEnumAccess->createEnumeration(), UNO_QUERY_THROW ); - while ( xEnum.is() && xEnum->hasMoreElements() && !xTablesSup.is() ) - { - xEnum->nextElement() >>= xSupp; - if ( xSupp.is() ) - xTablesSup = xSupp->getDataDefinitionByConnection( _xConnection ); - } + OSL_ENSURE(xTablesSup.is(),"No table supplier!"); } } catch( const Exception& ) diff --git a/connectivity/source/commontools/propertyids.cxx b/connectivity/source/commontools/propertyids.cxx index f1e31a2c7f0e..b6bae373a7db 100644 --- a/connectivity/source/commontools/propertyids.cxx +++ b/connectivity/source/commontools/propertyids.cxx @@ -93,6 +93,7 @@ namespace dbtools const sal_Char* getPROPERTY_ID_FIELDTYPE() { return "FieldType"; } const sal_Char* getPROPERTY_ID_VALUE() { return "Value"; } const sal_Char* getPROPERTY_ID_ACTIVE_CONNECTION() { return "ActiveConnection"; } + const sal_Char* getPROPERTY_ID_LABEL() { return "Label"; } //============================================================ //= error messages @@ -180,6 +181,7 @@ namespace dbtools case PROPERTY_ID_HAVINGCLAUSE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_HAVINGCLAUSE() ); break; } case PROPERTY_ID_ISSIGNED: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_ISSIGNED() ); break; } case PROPERTY_ID_ISSEARCHABLE: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_ISSEARCHABLE() ); break; } + case PROPERTY_ID_LABEL: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_LABEL() ); break; } case PROPERTY_ID_APPLYFILTER: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_APPLYFILTER() ); break; } case PROPERTY_ID_FILTER: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_FILTER() ); break; } case PROPERTY_ID_MASTERFIELDS: { rtl_uString_newFromAscii(&pStr,getPROPERTY_ID_MASTERFIELDS() ); break; } diff --git a/connectivity/source/drivers/adabas/BColumns.cxx b/connectivity/source/drivers/adabas/BColumns.cxx index 8fc009917fb2..bb0363792c12 100644 --- a/connectivity/source/drivers/adabas/BColumns.cxx +++ b/connectivity/source/drivers/adabas/BColumns.cxx @@ -96,6 +96,7 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName) xRet = new OColumn(_rName, sTypeName, xRow->getString(13), + xRow->getString(12), xRow->getInt(11), nPrec, xRow->getInt(9), diff --git a/connectivity/source/drivers/adabas/adabas.xcu b/connectivity/source/drivers/adabas/adabas.xcu index 20c811bd2d5a..b92067235e15 100755 --- a/connectivity/source/drivers/adabas/adabas.xcu +++ b/connectivity/source/drivers/adabas/adabas.xcu @@ -65,6 +65,11 @@ <value></value> </prop> </node> + <node oor:name="AddIndexAppendix" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> <node oor:name="Features"> <node oor:name="UseSQL92NamingConstraints" oor:op="replace"> diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index bb4b985e3bfc..aa287c185b26 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -65,7 +65,7 @@ void WpADOColumn::Create() } // ------------------------------------------------------------------------- OAdoColumn::OAdoColumn(sal_Bool _bCase,OConnection* _pConnection,_ADOColumn* _pColumn) - : connectivity::sdbcx::OColumn(::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),0,0,0,0,sal_False,sal_False,sal_False,_bCase) + : connectivity::sdbcx::OColumn(::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),::rtl::OUString(),0,0,0,0,sal_False,sal_False,sal_False,_bCase) ,m_pConnection(_pConnection) { construct(); @@ -183,12 +183,13 @@ void OAdoColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r OTools::putValue( m_aColumn.get_Properties(), ::rtl::OUString::createFromAscii( "Autoincrement" ), getBOOL( rValue ) ); break; + case PROPERTY_ID_IM001: case PROPERTY_ID_DESCRIPTION: - pAdoPropertyName = "Default"; + pAdoPropertyName = "Description"; break; case PROPERTY_ID_DEFAULTVALUE: - pAdoPropertyName = "Description"; + pAdoPropertyName = "Default"; break; } diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu index 5859d5eecf3e..50c29cf7ba2e 100755 --- a/connectivity/source/drivers/ado/ado.xcu +++ b/connectivity/source/drivers/ado/ado.xcu @@ -134,6 +134,11 @@ <value>UserPassword</value> </prop> </node> + <node oor:name="SupportsColumnDescription" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> </node> <node oor:name="sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=*" oor:op="replace"> @@ -228,6 +233,11 @@ <value>mdb</value> </prop> </node> + <node oor:name="SupportsColumnDescription" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> </node> <node oor:name="sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=*" oor:op="replace"> diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 1d19c05a46c0..a4e5f35825f5 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -347,14 +347,15 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, switch (nType) { case DataType::VARCHAR: - if ( eCellType == CellContentType_TEXT ) + if ( eCellType == CellContentType_EMPTY ) + rValue.setNull(); + else { + // #i25840# still let Calc convert numbers to text const Reference<XText> xText( xCell, UNO_QUERY ); if ( xText.is() ) rValue = xText->getString(); - } // if ( eCellType == CellContentType_TEXT ) - else - rValue.setNull(); + } break; case DataType::DECIMAL: if ( eCellType == CellContentType_VALUE ) @@ -525,7 +526,7 @@ void OCalcTable::fillColumns() aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase); } - sdbcx::OColumn* pColumn = new sdbcx::OColumn( aAlias, aTypeName, ::rtl::OUString(), + sdbcx::OColumn* pColumn = new sdbcx::OColumn( aAlias, aTypeName, ::rtl::OUString(),::rtl::OUString(), ColumnValue::NULLABLE, nPrecision, nDecimals, eType, sal_False, sal_False, bCurrency, bStoresMixedCaseQuotedIdentifiers); diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 15da50651250..8544e4affda7 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -449,6 +449,7 @@ OSL_TRACE("column type: %c",aDBFColumn.db_typ); Reference< XPropertySet> xCol = new sdbcx::OColumn(aColumnName, aTypeName, ::rtl::OUString(), + ::rtl::OUString(), ColumnValue::NULLABLE, nPrecision, aDBFColumn.db_dez, diff --git a/connectivity/source/drivers/dbase/dbase.xcu b/connectivity/source/drivers/dbase/dbase.xcu index 5e6e7596c3fe..f5de1d53ab0e 100755 --- a/connectivity/source/drivers/dbase/dbase.xcu +++ b/connectivity/source/drivers/dbase/dbase.xcu @@ -50,6 +50,11 @@ <value>false</value> </prop> </node> + <node oor:name="AddIndexAppendix" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> </node> <node oor:name="Features"> <node oor:name="UseSQL92NamingConstraints" oor:op="replace"> diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx index ddad36e52262..d1854e62181d 100644 --- a/connectivity/source/drivers/evoab2/NColumns.cxx +++ b/connectivity/source/drivers/evoab2/NColumns.cxx @@ -66,6 +66,7 @@ sdbcx::ObjectType OEvoabColumns::createObject(const ::rtl::OUString& _rName) _rName, xRow->getString(6), xRow->getString(13), + xRow->getString(12), xRow->getInt(11), xRow->getInt(7), xRow->getInt(9), diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index 77598f97380c..feca8f55aeff 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -381,15 +381,16 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree ) // SQL like else if( SQL_ISRULE( parseTree, like_predicate ) ) { - ENSURE_OR_THROW( parseTree->count() >= 4, "unexpected like_predicate structure" ); + ENSURE_OR_THROW( parseTree->count() == 2, "unexpected like_predicate structure" ); + const OSQLParseNode* pPart2 = parseTree->getChild(1); if( ! SQL_ISRULE( parseTree->getChild( 0 ), column_ref) ) m_pConnection->throwGenericSQLException(STR_QUERY_INVALID_LIKE_COLUMN,*this); ::rtl::OUString aColumnName( impl_getColumnRefColumnName_throw( *parseTree->getChild( 0 ) ) ); - OSQLParseNode *pAtom = parseTree->getChild( parseTree->count() - 2 ); // Match String - bool bNotLike = parseTree->count() == 5; + OSQLParseNode *pAtom = pPart2->getChild( pPart2->count() - 2 ); // Match String + bool bNotLike = pPart2->getChild(0)->isToken(); if( !( pAtom->getNodeType() == SQL_NODE_STRING || pAtom->getNodeType() == SQL_NODE_NAME || diff --git a/connectivity/source/drivers/file/FColumns.cxx b/connectivity/source/drivers/file/FColumns.cxx index 7c70d4c4372d..3c3929a80c50 100644 --- a/connectivity/source/drivers/file/FColumns.cxx +++ b/connectivity/source/drivers/file/FColumns.cxx @@ -64,6 +64,7 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName) sdbcx::OColumn* pRet = new sdbcx::OColumn(_rName, xRow->getString(6), xRow->getString(13), + xRow->getString(12), xRow->getInt(11), xRow->getInt(7), xRow->getInt(9), diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index 080b2a592aef..68e23360331b 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -511,6 +511,7 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere Reference<XPropertySet> xParaColumn = new connectivity::parse::OParseColumn(sParameterName ,::rtl::OUString() ,::rtl::OUString() + ,::rtl::OUString() ,nNullable ,nPrecision ,nScale diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 9cf9874dbf10..eeaec1ff40f1 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -288,17 +288,14 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th //------------------------------------------------------------------ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { - DBG_ASSERT(pPredicateNode->count() >= 4,"OFILECursor: Fehler im Parse Tree"); + DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); + const OSQLParseNode* pPart2 = pPredicateNode->getChild(1); - sal_Int32 ePredicateType; sal_Unicode cEscape = L'\0'; - if (pPredicateNode->count() == 5) - ePredicateType = SQLFilterOperator::NOT_LIKE; - else - ePredicateType = SQLFilterOperator::LIKE; + const bool bNotLike = pPart2->getChild(0)->isToken(); - OSQLParseNode* pAtom = pPredicateNode->getChild(pPredicateNode->count()-2); - OSQLParseNode* pOptEscape = pPredicateNode->getChild(pPredicateNode->count()-1); + OSQLParseNode* pAtom = pPart2->getChild(pPart2->count()-2); + OSQLParseNode* pOptEscape = pPart2->getChild(pPart2->count()-1); if (!(pAtom->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(pAtom,parameter))) { @@ -322,9 +319,9 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( execute(pPredicateNode->getChild(0)); execute(pAtom); - OBoolOperator* pOperator = (ePredicateType == SQLFilterOperator::LIKE) - ? new OOp_LIKE(cEscape) - : new OOp_NOTLIKE(cEscape); + OBoolOperator* pOperator = bNotLike + ? new OOp_NOTLIKE(cEscape) + : new OOp_LIKE(cEscape); m_aCodeList.push_back(pOperator); return NULL; @@ -332,11 +329,12 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( //------------------------------------------------------------------ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { - DBG_ASSERT(pPredicateNode->count() == 6,"OFILECursor: Fehler im Parse Tree"); + DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); OSQLParseNode* pColumn = pPredicateNode->getChild(0); - OSQLParseNode* p1stValue = pPredicateNode->getChild(3); - OSQLParseNode* p2ndtValue = pPredicateNode->getChild(5); + const OSQLParseNode* pPart2 = pPredicateNode->getChild(1); + OSQLParseNode* p1stValue = pPart2->getChild(2); + OSQLParseNode* p2ndtValue = pPart2->getChild(4); if ( !(p1stValue->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(p1stValue,parameter)) @@ -346,7 +344,7 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_BETWEEN,NULL); } - sal_Bool bNot = SQL_ISTOKEN(pPredicateNode->getChild(1),NOT); + sal_Bool bNot = SQL_ISTOKEN(pPart2->getChild(0),NOT); OOperand* pColumnOp = execute(pColumn); OOperand* pOb1 = execute(p1stValue); @@ -411,11 +409,12 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr //------------------------------------------------------------------ OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { - DBG_ASSERT(pPredicateNode->count() >= 3,"OFILECursor: Fehler im Parse Tree"); - DBG_ASSERT(SQL_ISTOKEN(pPredicateNode->getChild(1),IS),"OFILECursor: Fehler im Parse Tree"); + DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); + const OSQLParseNode* pPart2 = pPredicateNode->getChild(1); + DBG_ASSERT(SQL_ISTOKEN(pPart2->getChild(0),IS),"OFILECursor: Fehler im Parse Tree"); sal_Int32 ePredicateType; - if (SQL_ISTOKEN(pPredicateNode->getChild(2),NOT)) + if (SQL_ISTOKEN(pPart2->getChild(1),NOT)) ePredicateType = SQLFilterOperator::NOT_SQLNULL; else ePredicateType = SQLFilterOperator::SQLNULL; @@ -635,7 +634,6 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) switch ( nTokenId ) { case SQL_TOKEN_CHAR_LENGTH: - case SQL_TOKEN_CHARACTER_LENGTH: case SQL_TOKEN_LENGTH: case SQL_TOKEN_OCTET_LENGTH: case SQL_TOKEN_ASCII: @@ -677,7 +675,6 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) switch( nTokenId ) { case SQL_TOKEN_CHAR_LENGTH: - case SQL_TOKEN_CHARACTER_LENGTH: case SQL_TOKEN_LENGTH: case SQL_TOKEN_OCTET_LENGTH: pOperator = new OOp_CharLength(); diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 2d46c3be5bf3..eff2464ce533 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -304,7 +304,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase); } - sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,aTypeName,::rtl::OUString(), + sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,aTypeName,::rtl::OUString(),::rtl::OUString(), ColumnValue::NULLABLE, nPrecision, nScale, diff --git a/connectivity/source/drivers/hsqldb/hsqldb.xcu b/connectivity/source/drivers/hsqldb/hsqldb.xcu index e5ab3cc4ba14..f97b5e357179 100755 --- a/connectivity/source/drivers/hsqldb/hsqldb.xcu +++ b/connectivity/source/drivers/hsqldb/hsqldb.xcu @@ -50,6 +50,11 @@ <value>true</value> </prop> </node> + <node oor:name="AddIndexAppendix" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> </node> <node oor:name="MetaData"> <node oor:name="SupportsTableCreation" oor:op="replace"> diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu index 59fb95460aa2..f4f599a701d9 100755 --- a/connectivity/source/drivers/jdbc/jdbc.xcu +++ b/connectivity/source/drivers/jdbc/jdbc.xcu @@ -189,6 +189,11 @@ <value>oracle.jdbc.driver.OracleDriver</value> </prop> </node> + <node oor:name="AddIndexAppendix" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> </node> <node oor:name="Features"> <node oor:name="IgnoreCurrency" oor:op="replace"> diff --git a/connectivity/source/drivers/kab/KColumns.cxx b/connectivity/source/drivers/kab/KColumns.cxx index d75e782aed7b..4adcbe304c82 100644 --- a/connectivity/source/drivers/kab/KColumns.cxx +++ b/connectivity/source/drivers/kab/KColumns.cxx @@ -66,6 +66,7 @@ sdbcx::ObjectType KabColumns::createObject(const ::rtl::OUString& _rName) _rName, xRow->getString(6), xRow->getString(13), + xRow->getString(12), xRow->getInt(11), xRow->getInt(7), xRow->getInt(9), diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index 4164ffe0ee52..f0069fc6875e 100644 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx @@ -185,12 +185,13 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse } } } - else if (pParseNode->count() == 4) + else if (SQL_ISRULE(pParseNode, test_for_null) || SQL_ISRULE(pParseNode, like_predicate)) { - const OSQLParseNode *pLeft = pParseNode->getChild(0), - *pMiddleLeft = pParseNode->getChild(1), - *pMiddleRight = pParseNode->getChild(2), - *pRight = pParseNode->getChild(3); + const OSQLParseNode *pLeft = pParseNode->getChild(0); + const OSQLParseNode* pPart2 = pParseNode->getChild(1); + const OSQLParseNode *pMiddleLeft = pPart2->getChild(0), + *pMiddleRight = pPart2->getChild(1), + *pRight = pPart2->getChild(2); if (SQL_ISRULE(pParseNode, test_for_null)) { diff --git a/connectivity/source/drivers/macab/MacabColumns.cxx b/connectivity/source/drivers/macab/MacabColumns.cxx index 9eccf1a11b73..c1ba3f1fe6d0 100755 --- a/connectivity/source/drivers/macab/MacabColumns.cxx +++ b/connectivity/source/drivers/macab/MacabColumns.cxx @@ -66,6 +66,7 @@ sdbcx::ObjectType MacabColumns::createObject(const ::rtl::OUString& _rName) _rName, xRow->getString(6), xRow->getString(13), + xRow->getString(12), xRow->getInt(11), xRow->getInt(7), xRow->getInt(9), diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx index 8ee24921667a..9960ea7a4d97 100755 --- a/connectivity/source/drivers/macab/MacabStatement.cxx +++ b/connectivity/source/drivers/macab/MacabStatement.cxx @@ -188,12 +188,13 @@ MacabCondition *MacabCommonStatement::analyseWhereClause(const OSQLParseNode *pP } } } - else if (pParseNode->count() == 4) + else if (SQL_ISRULE(pParseNode, test_for_null) || SQL_ISRULE(pParseNode, like_predicate)) { - const OSQLParseNode *pLeft = pParseNode->getChild(0), - *pMiddleLeft = pParseNode->getChild(1), - *pMiddleRight = pParseNode->getChild(2), - *pRight = pParseNode->getChild(3); + const OSQLParseNode *pLeft = pParseNode->getChild(0); + const OSQLParseNode* pPart2 = pParseNode->getChild(1); + const OSQLParseNode *pMiddleLeft = pPart2->getChild(0), + *pMiddleRight = pPart2->getChild(1), + *pRight = pPart2->getChild(2); if (SQL_ISRULE(pParseNode, test_for_null)) { diff --git a/connectivity/source/drivers/mozab/MColumns.cxx b/connectivity/source/drivers/mozab/MColumns.cxx index 17b418899f45..42a33bbc2a98 100644 --- a/connectivity/source/drivers/mozab/MColumns.cxx +++ b/connectivity/source/drivers/mozab/MColumns.cxx @@ -74,6 +74,7 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName) OColumn* pRet = new OColumn(_rName, sTypeName, xRow->getString(13), + xRow->getString(12), xRow->getInt(11), nPrec, xRow->getInt(9), diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx index 38caad53b551..5aad943b151a 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx @@ -450,6 +450,7 @@ sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Re Reference<XPropertySet> xParaColumn = new connectivity::sdbcx::OColumn(sParameterName ,::rtl::OUString() ,::rtl::OUString() + ,::rtl::OUString() ,nNullable ,nPrecision ,nScale diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index 9602a35a8b29..c7c85770419e 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -882,7 +882,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT } else if (SQL_ISRULE(parseTree,like_predicate)) { - OSL_ENSURE(parseTree->count() >= 4, "Error parsing LIKE predicate"); + OSL_ENSURE(parseTree->count() == 2, "Error parsing LIKE predicate"); OSL_TRACE("analyseSQL : Got LIKE rule\n"); @@ -895,9 +895,11 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT OSQLParseNode *pColumn; OSQLParseNode *pAtom; OSQLParseNode *pOptEscape; + const OSQLParseNode* pPart2 = parseTree->getChild(1); pColumn = parseTree->getChild(0); // Match Item - pAtom = parseTree->getChild(parseTree->count()-2); // Match String - pOptEscape = parseTree->getChild(parseTree->count()-1); // Opt Escape Rule + pAtom = pPart2->getChild(parseTree->count()-2); // Match String + pOptEscape = pPart2->getChild(parseTree->count()-1); // Opt Escape Rule + const bool bNot = SQL_ISTOKEN(pPart2->getChild(0), NOT); if (!(pAtom->getNodeType() == SQL_NODE_STRING || pAtom->getNodeType() == SQL_NODE_NAME || @@ -945,7 +947,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT matchString.indexOf ( MATCHCHAR ) == -1 ) { // Simple string , eg. "to match" - if ( parseTree->count() == 5 ) + if ( bNot ) op = MQueryOp::DoesNotContain; else op = MQueryOp::Contains; @@ -961,12 +963,12 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT matchString = matchString.replaceAt( 0, 1, rtl::OUString() ); matchString = matchString.replaceAt( matchString.getLength() -1 , 1, rtl::OUString() ); - if ( parseTree->count() == 5 ) + if (bNot) op = MQueryOp::DoesNotContain; else op = MQueryOp::Contains; } - else if ( parseTree->count() == 5 ) + else if ( bNot ) { // We currently can't handle a 'NOT LIKE' when there are '%' or // '_' dispersed throughout @@ -1020,15 +1022,16 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT } else if (SQL_ISRULE(parseTree,test_for_null)) { - OSL_ENSURE(parseTree->count() >= 3,"Error in ParseTree"); - OSL_ENSURE(SQL_ISTOKEN(parseTree->getChild(1),IS),"Error in ParseTree"); + OSL_ENSURE(parseTree->count() == 2,"Error in ParseTree"); + const OSQLParseNode* pPart2 = parseTree->getChild(1); + OSL_ENSURE(SQL_ISTOKEN(pPart2->getChild(0),IS),"Error in ParseTree"); if (!SQL_ISRULE(parseTree->getChild(0),column_ref)) { m_pStatement->getOwnConnection()->throwSQLException( STR_QUERY_INVALID_IS_NULL_COLUMN, *this ); } - if (SQL_ISTOKEN(parseTree->getChild(2),NOT)) + if (SQL_ISTOKEN(pPart2->getChild(1),NOT)) { op = MQueryOp::Exists; } diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index 72383be76c58..06be64f83313 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -220,12 +220,16 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bOldAutoIncrement; descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT)) >>= bAutoIncrement; bool bColumnNameChanged = false; + ::rtl::OUString sOldDesc,sNewDesc; + xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sOldDesc; + descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sNewDesc; if ( nOldType != nNewType || nOldPrec != nNewPrec || nOldScale != nNewScale || nNewNullable != nOldNullable - || bOldAutoIncrement != bAutoIncrement ) + || bOldAutoIncrement != bAutoIncrement + || sOldDesc != sNewDesc ) { // special handling because they change dthe type names to distinguish // if a column should be an auto_incmrement one @@ -281,7 +285,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const ::rtl::OUString& colName, co const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( ); sSql += ::dbtools::quoteName(sQuote,colName); sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); - sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),getTypeCreatePattern())); + sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern())); executeStatement(sSql); } m_pColumns->refresh(); @@ -310,7 +314,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const ::rtl::OUString& _rCo ::comphelper::copyProperties(_xDescriptor,xProp); xProp->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE),makeAny(nNewType)); - sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(xProp,getConnection(),getTypeCreatePattern())); + sSql += OTables::adjustSQL(::dbtools::createStandardColumnPart(xProp,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern())); executeStatement(sSql); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index b337ddc92390..80bb2baf58c0 100644 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx @@ -204,7 +204,7 @@ void OTables::createTable( const Reference< XPropertySet >& descriptor ) { const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); static const ::rtl::OUString s_sCreatePattern(RTL_CONSTASCII_USTRINGPARAM("(M,D)")); - const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,s_sCreatePattern)); + const ::rtl::OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern)); Reference< XStatement > xStmt = xConnection->createStatement( ); if ( xStmt.is() ) { @@ -230,4 +230,14 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable) return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false ); } // ----------------------------------------------------------------------------- - +void OTables::addComment(const Reference< XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut) +{ + ::rtl::OUString sDesc; + descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION)) >>= sDesc; + if ( sDesc.getLength() ) + { + _rOut.appendAscii(" COMMENT '"); + _rOut.append(sDesc); + _rOut.appendAscii("'"); + } +} diff --git a/connectivity/source/drivers/mysql/mysql.xcu b/connectivity/source/drivers/mysql/mysql.xcu index 2fc59be5bdc3..afc5c0d07f5d 100755 --- a/connectivity/source/drivers/mysql/mysql.xcu +++ b/connectivity/source/drivers/mysql/mysql.xcu @@ -45,6 +45,11 @@ <value>com.mysql.jdbc.Driver</value> </prop> </node> + <node oor:name="AddIndexAppendix" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> <node oor:name="Features"> <node oor:name="UseKeywordAsBeforeAlias" oor:op="replace"> @@ -94,6 +99,11 @@ <value>UserPassword</value> </prop> </node> + <node oor:name="SupportsColumnDescription" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> </node> <node oor:name="sdbc:mysql:odbc:*" oor:op="replace"> @@ -109,6 +119,11 @@ <value></value> </prop> </node> + <node oor:name="AddIndexAppendix" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> <node oor:name="Features"> <node oor:name="UseKeywordAsBeforeAlias" oor:op="replace"> @@ -183,6 +198,11 @@ <value></value> </prop> </node> + <node oor:name="AddIndexAppendix" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> <node oor:name="Features"> <node oor:name="UseKeywordAsBeforeAlias" oor:op="replace"> @@ -227,6 +247,11 @@ <value>UserPassword</value> </prop> </node> + <node oor:name="SupportsColumnDescription" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> </node> </node> </node> diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx index 80aacacef576..751ab7cf2988 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx @@ -97,7 +97,7 @@ ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet() osl_incrementInterlockedCount( &m_refCount ); dispose(); } - delete m_pRowStatusArray; + delete [] m_pRowStatusArray; } // ------------------------------------------------------------------------- void ODatabaseMetaDataResultSet::disposing(void) diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index da29bcf08c17..7055bd273370 100644 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx @@ -162,7 +162,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) : // ------------------------------------------------------------------------- OResultSet::~OResultSet() { - delete m_pRowStatusArray; + delete [] m_pRowStatusArray; delete m_pSkipDeletedSet; } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx index b892e6336b19..43de55e3505c 100644 --- a/connectivity/source/drivers/odbcbase/OTools.cxx +++ b/connectivity/source/drivers/odbcbase/OTools.cxx @@ -391,6 +391,7 @@ void OTools::bindValue( OConnection* _pConnection, case SQL_TIMESTAMP: *pLen = sizeof(TIMESTAMP_STRUCT); *((TIMESTAMP_STRUCT*)_pData) = *(TIMESTAMP_STRUCT*)_pValue; + break; } } catch ( ... ) diff --git a/connectivity/source/inc/mysql/YTables.hxx b/connectivity/source/inc/mysql/YTables.hxx index 421012e3678e..ec19ac83140b 100644 --- a/connectivity/source/inc/mysql/YTables.hxx +++ b/connectivity/source/inc/mysql/YTables.hxx @@ -28,12 +28,14 @@ #define CONNECTIVITY_MYSQL_TABLES_HXX #include "connectivity/sdbcx/VCollection.hxx" +#include "connectivity/SQLStatementHelper.hxx" #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> namespace connectivity { namespace mysql { - class OTables : public sdbcx::OCollection + class OTables : public sdbcx::OCollection, + public ::dbtools::ISQLStatementHelper { ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; @@ -76,6 +78,9 @@ namespace connectivity @param _sSql in/out */ static ::rtl::OUString adjustSQL(const ::rtl::OUString& _sSql); + + // ISQLStatementHelper + virtual void addComment(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut); }; } } diff --git a/connectivity/source/inc/propertyids.hxx b/connectivity/source/inc/propertyids.hxx index 1f7252158918..b28278b0477d 100644 --- a/connectivity/source/inc/propertyids.hxx +++ b/connectivity/source/inc/propertyids.hxx @@ -133,7 +133,7 @@ pProperties[nPos++] = ::com::sun::star::beans::Property(::connectivity::OMetaCon #define PROPERTY_ID_INVALID_INDEX 41 #define PROPERTY_ID_HY010 43 - // FREE +#define PROPERTY_ID_LABEL 44 #define PROPERTY_ID_DELIMITER 45 #define PROPERTY_ID_FORMATKEY 46 #define PROPERTY_ID_LOCALE 47 diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx index 21e78ec61fea..43e38f5a1674 100644 --- a/connectivity/source/parse/PColumn.cxx +++ b/connectivity/source/parse/PColumn.cxx @@ -42,12 +42,14 @@ using namespace connectivity::parse; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::container; // ------------------------------------------------------------------------- OParseColumn::OParseColumn(const Reference<XPropertySet>& _xColumn,sal_Bool _bCase) : connectivity::sdbcx::OColumn( getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))) , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE))) + , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION))) , getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))) , getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))) , getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))) @@ -69,6 +71,7 @@ OParseColumn::OParseColumn(const Reference<XPropertySet>& _xColumn,sal_Bool OParseColumn::OParseColumn( const ::rtl::OUString& _Name, const ::rtl::OUString& _TypeName, const ::rtl::OUString& _DefaultValue, + const ::rtl::OUString& _Description, sal_Int32 _IsNullable, sal_Int32 _Precision, sal_Int32 _Scale, @@ -79,6 +82,7 @@ OParseColumn::OParseColumn( const ::rtl::OUString& _Name, ) : connectivity::sdbcx::OColumn(_Name, _TypeName, _DefaultValue, + _Description, _IsNullable, _Precision, _Scale, @@ -97,25 +101,52 @@ OParseColumn::OParseColumn( const ::rtl::OUString& _Name, // ------------------------------------------------------------------------- ::vos::ORef< OSQLColumns > OParseColumn::createColumnsForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData, - const Reference< XDatabaseMetaData >& _rxDBMetaData ) + const Reference< XDatabaseMetaData >& _rxDBMetaData,const Reference< XNameAccess>& i_xQueryColumns ) { sal_Int32 nColumnCount = _rxResMetaData->getColumnCount(); ::vos::ORef< OSQLColumns > aReturn( new OSQLColumns ); aReturn->get().reserve( nColumnCount ); + StringMap aColumnMap; for ( sal_Int32 i = 1; i <= nColumnCount; ++i ) - aReturn->get().push_back( createColumnForResultSet( _rxResMetaData, _rxDBMetaData, i ) ); + { + OParseColumn* pColumn = createColumnForResultSet( _rxResMetaData, _rxDBMetaData, i,aColumnMap ); + aReturn->get().push_back( pColumn ); + if ( i_xQueryColumns.is() && i_xQueryColumns->hasByName(pColumn->getRealName()) ) + { + Reference<XPropertySet> xColumn(i_xQueryColumns->getByName(pColumn->getRealName()),UNO_QUERY_THROW); + ::rtl::OUString sLabel; + xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LABEL)) >>= sLabel; + if ( sLabel.getLength() ) + pColumn->setLabel(sLabel); + } + } return aReturn; } // ------------------------------------------------------------------------- OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSetMetaData >& _rxResMetaData, - const Reference< XDatabaseMetaData >& _rxDBMetaData, sal_Int32 _nColumnPos ) + const Reference< XDatabaseMetaData >& _rxDBMetaData, sal_Int32 _nColumnPos,StringMap& _rColumns ) { + ::rtl::OUString sLabel = _rxResMetaData->getColumnLabel( _nColumnPos ); + // retrieve the name of the column + // check for duplicate entries + if(_rColumns.find(sLabel) != _rColumns.end()) + { + ::rtl::OUString sAlias(sLabel); + sal_Int32 searchIndex=1; + while(_rColumns.find(sAlias) != _rColumns.end()) + { + (sAlias = sLabel) += ::rtl::OUString::valueOf(searchIndex++); + } + sLabel = sAlias; + } + _rColumns.insert(StringMap::value_type(sLabel,0)); OParseColumn* pColumn = new OParseColumn( - _rxResMetaData->getColumnLabel( _nColumnPos ), + sLabel, _rxResMetaData->getColumnTypeName( _nColumnPos ), ::rtl::OUString(), + ::rtl::OUString(), _rxResMetaData->isNullable( _nColumnPos ), _rxResMetaData->getPrecision( _nColumnPos ), _rxResMetaData->getScale( _nColumnPos ), @@ -133,6 +164,7 @@ OParseColumn* OParseColumn::createColumnForResultSet( const Reference< XResultSe ) ); pColumn->setIsSearchable( _rxResMetaData->isSearchable( _nColumnPos ) ); pColumn->setRealName(_rxResMetaData->getColumnName( _nColumnPos )); + pColumn->setLabel(sLabel); return pColumn; } @@ -149,7 +181,7 @@ void OParseColumn::construct() registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME), PROPERTY_ID_REALNAME, 0, &m_aRealName, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DBASEPRECISIONCHANGED), PROPERTY_ID_DBASEPRECISIONCHANGED, 0, &m_bDbasePrecisionChanged, ::getCppuType(reinterpret_cast<sal_Bool*>(NULL))); registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISSEARCHABLE), PROPERTY_ID_ISSEARCHABLE, 0, &m_bIsSearchable, ::getCppuType(reinterpret_cast< sal_Bool*>(NULL))); - + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LABEL), PROPERTY_ID_LABEL, 0, &m_sLabel, ::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); } // ----------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* OParseColumn::createArrayHelper() const @@ -169,6 +201,7 @@ OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn : connectivity::sdbcx::OColumn( getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))) , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE))) + , getString(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION))) , getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))) , getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))) , getINT32(_xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))) @@ -183,33 +216,6 @@ OOrderColumn::OOrderColumn( const Reference<XPropertySet>& _xColumn construct(); } // ------------------------------------------------------------------------- -OOrderColumn::OOrderColumn( const ::rtl::OUString& _Name, - const ::rtl::OUString& _TypeName, - const ::rtl::OUString& _DefaultValue, - sal_Int32 _IsNullable, - sal_Int32 _Precision, - sal_Int32 _Scale, - sal_Int32 _Type, - sal_Bool _IsAutoIncrement, - sal_Bool _IsCurrency, - sal_Bool _bCase - ,sal_Bool _bAscending - ) : connectivity::sdbcx::OColumn(_Name, - _TypeName, - _DefaultValue, - _IsNullable, - _Precision, - _Scale, - _Type, - _IsAutoIncrement, - sal_False, - _IsCurrency, - _bCase) - , m_bAscending(_bAscending) -{ - construct(); -} -// ------------------------------------------------------------------------- OOrderColumn::~OOrderColumn() { } diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 4151314d36eb..84e9aa2532ff 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -145,7 +145,7 @@ using namespace connectivity; %union { connectivity::OSQLParseNode * pParseNode; } -%type <pParseNode> '(' ')' ',' ':' ';' '?' '[' ']' '{' '}' '.' +%type <pParseNode> '(' ')' ',' ':' ';' '?' '[' ']' '{' '}' '.' 'K' 'M' 'G' 'T' 'P' %token <pParseNode> SQL_TOKEN_STRING SQL_TOKEN_ACCESS_DATE SQL_TOKEN_INT SQL_TOKEN_REAL_NUM %token <pParseNode> SQL_TOKEN_INTNUM SQL_TOKEN_APPROXNUM SQL_TOKEN_NOT SQL_TOKEN_NAME @@ -188,7 +188,7 @@ using namespace connectivity; /* ODBC KEYWORDS */ %token <pParseNode> SQL_TOKEN_CALL SQL_TOKEN_D SQL_TOKEN_FN SQL_TOKEN_T SQL_TOKEN_TS SQL_TOKEN_OJ /* string functions */ -%token <pParseNode> SQL_TOKEN_ASCII SQL_TOKEN_BIT_LENGTH SQL_TOKEN_CHAR SQL_TOKEN_CHAR_LENGTH SQL_TOKEN_CHARACTER_LENGTH +%token <pParseNode> SQL_TOKEN_ASCII SQL_TOKEN_BIT_LENGTH SQL_TOKEN_CHAR SQL_TOKEN_CHAR_LENGTH SQL_TOKEN_SQL_TOKEN_INTNUM %token <pParseNode> SQL_TOKEN_CONCAT %token <pParseNode> SQL_TOKEN_DIFFERENCE SQL_TOKEN_INSERT SQL_TOKEN_LCASE SQL_TOKEN_LEFT SQL_TOKEN_LENGTH SQL_TOKEN_LOCATE %token <pParseNode> SQL_TOKEN_LOCATE_2 SQL_TOKEN_LTRIM SQL_TOKEN_POSITION SQL_TOKEN_REPEAT SQL_TOKEN_REPLACE @@ -210,6 +210,13 @@ using namespace connectivity; %token <pParseNode> SQL_TOKEN_EVERY SQL_TOKEN_INTERSECTION SQL_TOKEN_FUSION SQL_TOKEN_COLLECT SQL_TOKEN_VAR_POP SQL_TOKEN_VAR_SAMP %token <pParseNode> SQL_TOKEN_STDDEV_SAMP SQL_TOKEN_STDDEV_POP +%token <pParseNode> SQL_TOKEN_RANK SQL_TOKEN_DENSE_RANK SQL_TOKEN_PERCENT_RANK SQL_TOKEN_CUME_DIST SQL_TOKEN_PERCENTILE_CONT SQL_TOKEN_PERCENTILE_DISC SQL_TOKEN_WITHIN SQL_TOKEN_ARRAY_AGG +%token <pParseNode> SQL_TOKEN_CASE SQL_TOKEN_THEN SQL_TOKEN_END SQL_TOKEN_NULLIF SQL_TOKEN_COALESCE SQL_TOKEN_WHEN SQL_TOKEN_ELSE +%token <pParseNode> SQL_TOKEN_BEFORE SQL_TOKEN_AFTER SQL_TOKEN_INSTEAD SQL_TOKEN_EACH SQL_TOKEN_REFERENCING SQL_TOKEN_BEGIN SQL_TOKEN_ATOMIC SQL_TOKEN_TRIGGER SQL_TOKEN_ROW SQL_TOKEN_STATEMENT +%token <pParseNode> SQL_TOKEN_NEW SQL_TOKEN_OLD +%token <pParseNode> SQL_TOKEN_VALUE SQL_TOKEN_CURRENT_CATALOG SQL_TOKEN_CURRENT_DEFAULT_TRANSFORM_GROUP SQL_TOKEN_CURRENT_PATH SQL_TOKEN_CURRENT_ROLE SQL_TOKEN_CURRENT_SCHEMA SQL_TOKEN_CURRENT_USER +%token <pParseNode> SQL_TOKEN_SESSION_USER SQL_TOKEN_SYSTEM_USER SQL_TOKEN_VARCHAR SQL_TOKEN_VARBINARY SQL_TOKEN_VARYING SQL_TOKEN_OBJECT SQL_TOKEN_NCLOB SQL_TOKEN_NATIONAL +%token <pParseNode> SQL_TOKEN_LARGE SQL_TOKEN_CLOB SQL_TOKEN_BLOB SQL_TOKEN_BIGINT SQL_TOKEN_BINARY SQL_TOKEN_WITHOUT SQL_TOKEN_BOOLEAN SQL_TOKEN_INTERVAL /* operators */ %left SQL_TOKEN_NAME %left <pParseNode> SQL_TOKEN_OR @@ -242,10 +249,10 @@ using namespace connectivity; %type <pParseNode> update_statement_searched target_commalist target opt_where_clause %type <pParseNode> select_statement selection table_exp from_clause table_ref_commalist table_ref %type <pParseNode> where_clause opt_group_by_clause column_ref_commalist opt_having_clause -%type <pParseNode> search_condition predicate comparison_predicate between_predicate -%type <pParseNode> like_predicate opt_escape test_for_null in_predicate -%type <pParseNode> all_or_any_predicate any_all_some existence_test subquery -%type <pParseNode> scalar_exp_commalist parameter_ref literal +%type <pParseNode> search_condition predicate comparison_predicate comparison_predicate_part_2 between_predicate between_predicate_part_2 +%type <pParseNode> like_predicate opt_escape test_for_null null_predicate_part_2 in_predicate in_predicate_part_2 character_like_predicate_part_2 other_like_predicate_part_2 +%type <pParseNode> all_or_any_predicate any_all_some existence_test subquery quantified_comparison_predicate_part_2 +%type <pParseNode> scalar_exp_commalist parameter_ref literal parenthesized_boolean_value_expression %type <pParseNode> column_ref data_type column cursor parameter range_variable user /*like_check*/ /* neue Regeln bei OJ */ %type <pParseNode> derived_column as_clause table_name num_primary term num_value_exp @@ -257,8 +264,8 @@ using namespace connectivity; %type <pParseNode> qualified_join value_exp query_term join_type outer_join_type join_condition boolean_term %type <pParseNode> boolean_factor truth_value boolean_test boolean_primary named_columns_join join_spec %type <pParseNode> cast_operand cast_target factor datetime_value_exp /*interval_value_exp*/ datetime_term datetime_factor -%type <pParseNode> datetime_primary datetime_value_fct time_zone time_zone_specifier /*interval_term*/ /*interval_qualifier*/ -%type <pParseNode> /*start_field*/ non_second_datetime_field /*end_field*/ /*single_datetime_field*/ extract_field datetime_field time_zone_field +%type <pParseNode> datetime_primary datetime_value_fct time_zone time_zone_specifier /*interval_term*/ interval_qualifier +%type <pParseNode> start_field non_second_datetime_field end_field single_datetime_field extract_field datetime_field time_zone_field %type <pParseNode> extract_source char_length_exp octet_length_exp bit_length_exp select_sublist string_value_exp %type <pParseNode> char_value_exp concatenation char_factor char_primary string_value_fct char_substring_fct fold %type <pParseNode> form_conversion char_translation trim_fct trim_operands trim_spec bit_value_fct bit_substring_fct op_column_commalist @@ -270,6 +277,15 @@ using namespace connectivity; %type <pParseNode> column_def odbc_fct_spec odbc_call_spec odbc_fct_type op_parameter union_statement %type <pParseNode> op_odbc_call_parameter odbc_parameter_commalist odbc_parameter function_args_commalist function_arg %type <pParseNode> catalog_name schema_name table_node numeric_function string_function function_name date_function table_primary_as_range_column opt_as +%type <pParseNode> ordered_set_function inverse_distribution_function hypothetical_set_function hypothetical_set_function_value_expression_list rank_function_type within_group_specification inverse_distribution_function_type array_aggregate_function inverse_distribution_function_argument +%type <pParseNode> case_expression else_clause result_expression result case_abbreviation case_specification searched_when_clause simple_when_clause searched_case simple_case +%type <pParseNode> when_operand_list when_operand case_operand +%type <pParseNode> trigger_definition trigger_name trigger_action_time trigger_event transition_table_or_variable_list triggered_action trigger_column_list triggered_when_clause triggered_SQL_statement SQL_procedure_statement old_transition_variable_name new_transition_variable_name +%type <pParseNode> op_referencing op_trigger_columnlist op_triggered_action_for opt_row trigger_for SQL_procedure_statement_list transition_table_or_variable old_transition_table_name new_transition_table_name transition_table_name +%type <pParseNode> searched_when_clause_list simple_when_clause_list predefined_type opt_char_set_spec opt_collate_clause character_string_type national_character_string_type +%type <pParseNode> binary_string_type numeric_type boolean_type datetime_type interval_type opt_paren_precision paren_char_length opt_paren_char_large_length paren_character_large_object_length +%type <pParseNode> large_object_length opt_multiplier character_large_object_type national_character_large_object_type binary_large_object_string_type opt_with_or_without_time_zone +%type <pParseNode> approximate_numeric_type exact_numeric_type opt_paren_precision_scale %% /* Parse Tree an OSQLParser zurueckliefern @@ -282,25 +298,20 @@ sql_single_statement: | sql ';' { xxx_pGLOBAL_SQLPARSER->setParseTree( $1 ); } ; -/* -sql_list: - sql_ ';' - {$$ = SQL_NEW_LISTRULE; - $$->append($1); - pSqlParseTreeRoot = $1; -- obsolete - Ergebnis in yyval! rdm } - | sql_list sql ';' - {$1->append($2); - $$ = $1;} - ; -*/ - /* schema definition language */ /* Note: other ``sql:sal_Unicode() rules appear later in the grammar */ -/*** + sql: - schema + manipulative_statement + | schema_element + { + $$ = SQL_NEW_RULE; + $$->append($1); + } ; + +/*** op_authorization: {$$ = SQL_NEW_RULE;} @@ -336,7 +347,7 @@ schema: ; opt_schema_element_list: - /* empty * / {$$ = SQL_NEW_RULE;} + {$$ = SQL_NEW_RULE;} | schema_glement_list ; @@ -349,17 +360,12 @@ schema_element_list: $$ = $1;} ; */ -sql: - schema_element - {$$ = SQL_NEW_RULE; - $$->append($1); - } - ; schema_element: base_table_def | view_def | privilege_def + | trigger_definition ; base_table_def: @@ -676,9 +682,6 @@ sql_not: /* manipulative statements */ -sql: manipulative_statement - ; - manipulative_statement: commit_statement /* | delete_statement_positioned*/ @@ -953,6 +956,10 @@ opt_as: /* empty */ {$$ = SQL_NEW_RULE;} | SQL_TOKEN_AS ; +opt_row: + /* empty */ {$$ = SQL_NEW_RULE;} + | SQL_TOKEN_ROW + ; table_primary_as_range_column: {$$ = SQL_NEW_RULE;} | opt_as SQL_TOKEN_NAME op_column_commalist @@ -1073,7 +1080,15 @@ boolean_primary: YYERROR; } ; - +parenthesized_boolean_value_expression: + '(' search_condition ')' + { // boolean_primary: rule 2 + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); + $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION)); + } + ; boolean_test: boolean_primary | boolean_primary SQL_TOKEN_IS sql_not truth_value @@ -1124,7 +1139,13 @@ predicate: | in_predicate | like_predicate ; - +comparison_predicate_part_2: + comparison row_value_constructor + { + $$ = SQL_NEW_RULE; // comparison_predicate: rule 1 + $$->append($1); + $$->append($2); + } comparison_predicate: row_value_constructor comparison row_value_constructor { @@ -1165,17 +1186,8 @@ comparison: | SQL_LESSEQ | SQL_GREATEQ ; -between_predicate: - row_value_constructor sql_not SQL_TOKEN_BETWEEN row_value_constructor SQL_TOKEN_AND row_value_constructor - {$$ = SQL_NEW_RULE; // between_predicate: rule 1 - $$->append($1); - $$->append($2); - $$->append($3); - $$->append($4); - $$->append($5); - $$->append($6); - } - | sql_not SQL_TOKEN_BETWEEN row_value_constructor SQL_TOKEN_AND row_value_constructor +between_predicate_part_2: + sql_not SQL_TOKEN_BETWEEN row_value_constructor SQL_TOKEN_AND row_value_constructor { if (xxx_pGLOBAL_SQLPARSER->inPredicateCheck()) // between_predicate: rule 2 { @@ -1186,7 +1198,13 @@ between_predicate: { OSQLParseNode* pTemp = $$; $$ = pTemp->removeAt((sal_uInt32)0); - $$->insert(1,$1); + OSQLParseNode* pColumnRef = $$->removeAt((sal_uInt32)0); + $$->insert(0,$1); + OSQLParseNode* pBetween_predicate = new OSQLInternalNode(aEmptyString, SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::between_predicate)); + pBetween_predicate->append(pColumnRef); + pBetween_predicate->append($$); + $$ = pBetween_predicate; + delete pTemp; delete $4; } @@ -1197,46 +1215,58 @@ between_predicate: } } else - YYERROR; + { + $$ = SQL_NEW_RULE; // between_predicate: rule 1 + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + $$->append($5); + } + } +between_predicate: + row_value_constructor between_predicate_part_2 + { + $$ = SQL_NEW_RULE; // between_predicate: rule 1 + $$->append($1); + $$->append($2); } + | between_predicate_part_2 ; - -like_predicate: - row_value_constructor SQL_TOKEN_NOT SQL_TOKEN_LIKE string_value_exp opt_escape +character_like_predicate_part_2: + sql_not SQL_TOKEN_LIKE string_value_exp opt_escape { $$ = SQL_NEW_RULE; // like_predicate: rule 1 $$->append($1); $$->append($2); $$->append($3); $$->append($4); - $$->append($5); } - | row_value_constructor SQL_TOKEN_LIKE string_value_exp opt_escape + ; +other_like_predicate_part_2: + sql_not SQL_TOKEN_LIKE value_exp_primary opt_escape { - $$ = SQL_NEW_RULE; // like_predicate: rule 2 + $$ = SQL_NEW_RULE; // like_predicate: rule 1 $$->append($1); $$->append($2); $$->append($3); $$->append($4); } - | row_value_constructor SQL_TOKEN_NOT SQL_TOKEN_LIKE value_exp_primary opt_escape + ; +like_predicate: + row_value_constructor character_like_predicate_part_2 { - $$ = SQL_NEW_RULE; // like_predicate: rule 3 + $$ = SQL_NEW_RULE; // like_predicate: rule 1 $$->append($1); $$->append($2); - $$->append($3); - $$->append($4); - $$->append($5); } - | row_value_constructor SQL_TOKEN_LIKE value_exp_primary opt_escape + | row_value_constructor other_like_predicate_part_2 { - $$ = SQL_NEW_RULE; // like_predicate: rule 4 + $$ = SQL_NEW_RULE; // like_predicate: rule 3 $$->append($1); $$->append($2); - $$->append($3); - $$->append($4); } - | sql_not SQL_TOKEN_LIKE string_value_exp opt_escape + | character_like_predicate_part_2 { if (xxx_pGLOBAL_SQLPARSER->inPredicateCheck()) // like_predicate: rule 5 { @@ -1246,19 +1276,19 @@ like_predicate: $$ = SQL_NEW_RULE; $$->append(pColumnRef); $$->append($1); - $$->append($2); - if (xxx_pGLOBAL_SQLPARSER->buildLikeRule($$,$3,$4)) - $$->append($4); - else + OSQLParseNode* p2nd = $1->removeAt(2); + OSQLParseNode* p3rd = $1->removeAt(2); + if ( !xxx_pGLOBAL_SQLPARSER->buildLikeRule($1,p2nd,p3rd) ) { delete $$; YYABORT; } + $1->append(p3rd); } else YYERROR; } - | sql_not SQL_TOKEN_LIKE value_exp_primary opt_escape + | other_like_predicate_part_2 { if (xxx_pGLOBAL_SQLPARSER->inPredicateCheck()) // like_predicate: rule 6 { @@ -1268,14 +1298,14 @@ like_predicate: $$ = SQL_NEW_RULE; $$->append(pColumnRef); $$->append($1); - $$->append($2); - if (xxx_pGLOBAL_SQLPARSER->buildLikeRule($$,$3,$4)) - $$->append($4); - else + OSQLParseNode* p2nd = $1->removeAt(2); + OSQLParseNode* p3rd = $1->removeAt(2); + if ( !xxx_pGLOBAL_SQLPARSER->buildLikeRule($1,p2nd,p3rd) ) { delete $$; YYABORT; } + $1->append(p3rd); } else YYERROR; @@ -1298,16 +1328,23 @@ opt_escape: } ; +null_predicate_part_2: + SQL_TOKEN_IS sql_not SQL_TOKEN_NULL + { + $$ = SQL_NEW_RULE; // test_for_null: rule 1 + $$->append($1); + $$->append($2); + $$->append($3); + } + ; test_for_null: - row_value_constructor SQL_TOKEN_IS sql_not truth_value + row_value_constructor null_predicate_part_2 { $$ = SQL_NEW_RULE; // test_for_null: rule 1 $$->append($1); $$->append($2); - $$->append($3); - $$->append($4); } - | SQL_TOKEN_IS sql_not truth_value + | null_predicate_part_2 { if (xxx_pGLOBAL_SQLPARSER->inPredicateCheck())// test_for_null: rule 2 { @@ -1317,8 +1354,6 @@ test_for_null: $$ = SQL_NEW_RULE; $$->append(pColumnRef); $$->append($1); - $$->append($2); - $$->append($3); } else YYERROR; @@ -1336,16 +1371,23 @@ in_predicate_value: $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION)); } ; +in_predicate_part_2: + sql_not SQL_TOKEN_IN in_predicate_value + { + $$ = SQL_NEW_RULE;// in_predicate: rule 1 + $$->append($1); + $$->append($2); + $$->append($3); + } + ; in_predicate: - row_value_constructor sql_not SQL_TOKEN_IN in_predicate_value + row_value_constructor in_predicate_part_2 { $$ = SQL_NEW_RULE;// in_predicate: rule 1 $$->append($1); $$->append($2); - $$->append($3); - $$->append($4); } - | sql_not SQL_TOKEN_IN in_predicate_value + | in_predicate_part_2 { if ( xxx_pGLOBAL_SQLPARSER->inPredicateCheck() )// in_predicate: rule 2 { @@ -1355,24 +1397,28 @@ in_predicate: $$ = SQL_NEW_RULE; $$->append(pColumnRef); $$->append($1); - $$->append($2); - $$->append($3); - // hello } else YYERROR; } ; +quantified_comparison_predicate_part_2: + comparison any_all_some subquery + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + ; all_or_any_predicate: - row_value_constructor comparison any_all_some subquery + row_value_constructor quantified_comparison_predicate_part_2 { $$ = SQL_NEW_RULE; $$->append($1); $$->append($2); - $$->append($3); - $$->append($4); } - | comparison any_all_some subquery + | quantified_comparison_predicate_part_2 { if(xxx_pGLOBAL_SQLPARSER->inPredicateCheck()) { @@ -1382,8 +1428,6 @@ all_or_any_predicate: $$ = SQL_NEW_RULE; $$->append(pColumnRef); $$->append($1); - $$->append($2); - $$->append($3); } else YYERROR; @@ -1576,7 +1620,7 @@ char_length_exp: $$->append($3); $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); } - | SQL_TOKEN_CHARACTER_LENGTH '(' value_exp ')' + | SQL_TOKEN_SQL_TOKEN_INTNUM '(' value_exp ')' { $$ = SQL_NEW_RULE; $$->append($1); @@ -1682,10 +1726,19 @@ unsigned_value_spec: ; general_value_spec: parameter - | SQL_TOKEN_USER - | SQL_TOKEN_NULL - | SQL_TOKEN_FALSE - | SQL_TOKEN_TRUE + | SQL_TOKEN_USER + /* | SQL_TOKEN_NULL*/ + | SQL_TOKEN_FALSE + | SQL_TOKEN_TRUE + | SQL_TOKEN_VALUE + | SQL_TOKEN_CURRENT_CATALOG + | SQL_TOKEN_CURRENT_DEFAULT_TRANSFORM_GROUP + | SQL_TOKEN_CURRENT_PATH + | SQL_TOKEN_CURRENT_ROLE + | SQL_TOKEN_CURRENT_SCHEMA + | SQL_TOKEN_CURRENT_USER + | SQL_TOKEN_SESSION_USER + | SQL_TOKEN_SYSTEM_USER ; set_fct_spec: general_set_fct @@ -1962,7 +2015,7 @@ odbc_fct_type: ; general_set_fct: - set_fct_type '(' opt_all_distinct value_exp ')' + set_fct_type '(' opt_all_distinct function_arg ')' { $$ = SQL_NEW_RULE; $$->append($1); @@ -1979,7 +2032,7 @@ general_set_fct: $$->append($3 = newNode("*", SQL_NODE_PUNCTUATION)); $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); } - | SQL_TOKEN_COUNT '(' opt_all_distinct value_exp ')' + | SQL_TOKEN_COUNT '(' opt_all_distinct function_arg ')' { $$ = SQL_NEW_RULE; $$->append($1); @@ -1988,6 +2041,8 @@ general_set_fct: $$->append($4); $$->append($5 = newNode(")", SQL_NODE_PUNCTUATION)); } + | ordered_set_function + | array_aggregate_function ; set_fct_type: SQL_TOKEN_AVG @@ -2006,6 +2061,87 @@ set_fct_type: | SQL_TOKEN_INTERSECTION ; +ordered_set_function: + hypothetical_set_function + | inverse_distribution_function + ; +hypothetical_set_function: + rank_function_type '(' hypothetical_set_function_value_expression_list ')' within_group_specification + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($3); + $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); + $$->append($5); + } + | rank_function_type '(' hypothetical_set_function_value_expression_list SQL_TOKEN_BY value_exp_commalist ')' within_group_specification + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($3); + $$->append($4); + $$->append($5); + $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION)); + $$->append($7); + } + ; + +within_group_specification: + { + $$ = SQL_NEW_RULE; + } + | SQL_TOKEN_WITHIN SQL_TOKEN_GROUP '(' opt_order_by_clause ')' + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($4); + $$->append($5 = newNode(")", SQL_NODE_PUNCTUATION)); + } + ; +hypothetical_set_function_value_expression_list: + value_exp_commalist + ; + +inverse_distribution_function: + inverse_distribution_function_type '('inverse_distribution_function_argument ')' within_group_specification + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($3); + $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); + } + ; +inverse_distribution_function_argument: + num_value_exp + ; +inverse_distribution_function_type: + SQL_TOKEN_PERCENTILE_CONT + | SQL_TOKEN_PERCENTILE_DISC + ; + +array_aggregate_function: + SQL_TOKEN_ARRAY_AGG '(' value_exp opt_order_by_clause ')' + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($3); + $$->append($4); + $$->append($5 = newNode(")", SQL_NODE_PUNCTUATION)); + } + ; + +rank_function_type: + SQL_TOKEN_RANK + | SQL_TOKEN_DENSE_RANK + | SQL_TOKEN_PERCENT_RANK + | SQL_TOKEN_CUME_DIST + ; outer_join_type: SQL_TOKEN_LEFT %prec SQL_TOKEN_LEFT { @@ -2051,7 +2187,7 @@ join_type: } ; cross_union: - table_ref /*[SQL_TOKEN_CROSS]*/ SQL_TOKEN_CROSS SQL_TOKEN_JOIN table_ref + table_ref SQL_TOKEN_CROSS SQL_TOKEN_JOIN table_ref { $$ = SQL_NEW_RULE; $$->append($1); @@ -2063,7 +2199,7 @@ cross_union: qualified_join: /* wenn SQL_TOKEN_NATURAL, dann keine join_spec */ - table_ref /*[SQL_TOKEN_NATURAL]*/ SQL_TOKEN_NATURAL join_type SQL_TOKEN_JOIN table_ref + table_ref SQL_TOKEN_NATURAL join_type SQL_TOKEN_JOIN table_ref { $$ = SQL_NEW_RULE; $$->append($1); @@ -2178,6 +2314,7 @@ value_exp_primary: | column_ref | set_fct_spec | scalar_subquery + | case_expression | '(' value_exp ')' { $$ = SQL_NEW_RULE; @@ -2401,83 +2538,39 @@ non_second_datetime_field: | SQL_TOKEN_HOUR | SQL_TOKEN_MINUTE ; -/*start_field: - non_second_datetime_field +start_field: + non_second_datetime_field opt_paren_precision { $$ = SQL_NEW_RULE; $$->append($1); - } - | non_second_datetime_field '(' SQL_TOKEN_INTNUM ')' - { - $$ = SQL_NEW_RULE; - $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); - $$->append($3); - $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); + $$->append($2); } ; end_field: non_second_datetime_field + | SQL_TOKEN_SECOND opt_paren_precision { $$ = SQL_NEW_RULE; $$->append($1); - } - | SQL_TOKEN_SECOND - { - $$ = SQL_NEW_RULE; - $$->append($1); - } - | SQL_TOKEN_SECOND '(' SQL_TOKEN_INTNUM ')' - { - $$ = SQL_NEW_RULE; - $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); - $$->append($3); - $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); + $$->append($2); } ; -*/ -/* + single_datetime_field: - non_second_datetime_field + non_second_datetime_field opt_paren_precision { $$ = SQL_NEW_RULE; $$->append($1); + $$->append($2); } - | non_second_datetime_field '(' SQL_TOKEN_INTNUM ')' - { - $$ = SQL_NEW_RULE; - $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); - $$->append($3); - $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); - } - | SQL_TOKEN_SECOND - { - $$ = SQL_NEW_RULE; - $$->append($1); - } - | SQL_TOKEN_SECOND '(' SQL_TOKEN_INTNUM ')' - { - $$ = SQL_NEW_RULE; - $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); - $$->append($3); - $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); - } - | SQL_TOKEN_SECOND '(' SQL_TOKEN_INTNUM ',' SQL_TOKEN_INTNUM ')' + | SQL_TOKEN_SECOND opt_paren_precision_scale { $$ = SQL_NEW_RULE; $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); - $$->append($3); - $$->append($4 = newNode(",", SQL_NODE_PUNCTUATION)); - $$->append($5); - $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION)); + $$->append($2); } ; -*/ -/* + interval_qualifier: start_field SQL_TOKEN_TO end_field { @@ -2486,13 +2579,9 @@ interval_qualifier: $$->append($2); $$->append($3); } - | single_datetime_field - { - $$ = SQL_NEW_RULE; - $$->append($1); - } + | single_datetime_field ; -*/ + function_arg_commalist2: function_arg ',' function_arg {$$ = SQL_NEW_COMMALISTRULE; @@ -2546,6 +2635,21 @@ function_arg: $$->append($2); $$->append($3); } + | value_exp SQL_TOKEN_USING value_exp comparison value_exp + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | value_exp SQL_TOKEN_BY value_exp_commalist + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } ; function_args_commalist: function_arg @@ -2952,59 +3056,384 @@ column_val: } ; data_type: - SQL_TOKEN_CHARACTER - | SQL_TOKEN_CHARACTER '(' SQL_TOKEN_INTNUM ')' - {$$ = SQL_NEW_RULE; + predefined_type + ; +opt_char_set_spec: + {$$ = SQL_NEW_RULE;} + | SQL_TOKEN_CHARACTER SQL_TOKEN_SET SQL_TOKEN_NAME + { + $$ = SQL_NEW_RULE; $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); $$->append($3); - $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));} - | SQL_TOKEN_NUMERIC - | SQL_TOKEN_NUMERIC '(' SQL_TOKEN_INTNUM ')' - {$$ = SQL_NEW_RULE; + } + ; +opt_collate_clause: + {$$ = SQL_NEW_RULE;} + | collate_clause + ; +predefined_type: + character_string_type opt_char_set_spec opt_collate_clause + { + $$ = SQL_NEW_RULE; $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); $$->append($3); - $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));} - | SQL_TOKEN_NUMERIC '(' SQL_TOKEN_INTNUM ',' SQL_TOKEN_INTNUM ')' - {$$ = SQL_NEW_RULE; + } + | national_character_string_type opt_collate_clause + { + $$ = SQL_NEW_RULE; $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); + } + | binary_string_type + | numeric_type + | boolean_type + | datetime_type + | interval_type + ; +character_string_type: + SQL_TOKEN_CHARACTER opt_paren_precision + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + | SQL_TOKEN_CHAR opt_paren_precision + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + | SQL_TOKEN_CHARACTER SQL_TOKEN_VARYING paren_char_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); $$->append($3); - $$->append($4 = newNode(",", SQL_NODE_PUNCTUATION)); - $$->append($5); - $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION));} - | SQL_TOKEN_DECIMAL - | SQL_TOKEN_DECIMAL '(' SQL_TOKEN_INTNUM ')' - {$$ = SQL_NEW_RULE; + } + | SQL_TOKEN_CHAR SQL_TOKEN_VARYING paren_char_length + { + $$ = SQL_NEW_RULE; $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); $$->append($3); - $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));} - | SQL_TOKEN_DECIMAL '(' SQL_TOKEN_INTNUM ',' SQL_TOKEN_INTNUM ')' - {$$ = SQL_NEW_RULE; + } + | SQL_TOKEN_VARCHAR paren_char_length + { + $$ = SQL_NEW_RULE; $$->append($1); - $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); + } + | character_large_object_type + ; +opt_paren_precision: + {$$ = SQL_NEW_RULE;} + | paren_char_length + ; +paren_char_length: + '(' SQL_TOKEN_INTNUM ')' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); + $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION)); + } + ; +opt_paren_char_large_length: + {$$ = SQL_NEW_RULE;} + | paren_character_large_object_length + ; +paren_character_large_object_length: + '(' large_object_length ')' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); + $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION)); + } + ; + +large_object_length: + SQL_TOKEN_INTNUM opt_multiplier + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +opt_multiplier: + {$$ = SQL_NEW_RULE;} + | 'K' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("K", SQL_NODE_PUNCTUATION)); + } + | 'M' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("M", SQL_NODE_PUNCTUATION)); + } + | 'G' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("G", SQL_NODE_PUNCTUATION)); + } + | 'T' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("T", SQL_NODE_PUNCTUATION)); + } + | 'P' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("P", SQL_NODE_PUNCTUATION)); + } + ; +character_large_object_type: + SQL_TOKEN_CHARACTER SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); $$->append($3); - $$->append($4 = newNode(",", SQL_NODE_PUNCTUATION)); + $$->append($4); + } + | SQL_TOKEN_CHAR SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | SQL_TOKEN_CLOB opt_paren_char_large_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +national_character_string_type: + SQL_TOKEN_NATIONAL SQL_TOKEN_CHARACTER opt_paren_precision + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + | SQL_TOKEN_NATIONAL SQL_TOKEN_CHAR opt_paren_precision + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + | SQL_TOKEN_NCHAR opt_paren_precision + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + | SQL_TOKEN_NATIONAL SQL_TOKEN_CHARACTER SQL_TOKEN_VARYING paren_char_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | SQL_TOKEN_NATIONAL SQL_TOKEN_CHAR SQL_TOKEN_VARYING paren_char_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | SQL_TOKEN_NCHAR SQL_TOKEN_VARYING paren_char_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + | national_character_large_object_type + ; +national_character_large_object_type: + SQL_TOKEN_NATIONAL SQL_TOKEN_CHARACTER SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); $$->append($5); - $$->append($6 = newNode(")", SQL_NODE_PUNCTUATION));} - | SQL_TOKEN_INTEGER - | SQL_TOKEN_SMALLINT - | SQL_TOKEN_FLOAT - | SQL_TOKEN_FLOAT '(' SQL_TOKEN_INTNUM ')' - {$$ = SQL_NEW_RULE; + } + | SQL_TOKEN_NCHAR SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | SQL_TOKEN_NCLOB opt_paren_char_large_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +binary_string_type: + SQL_TOKEN_BINARY opt_paren_precision + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + | SQL_TOKEN_BINARY SQL_TOKEN_VARYING paren_char_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + | SQL_TOKEN_VARBINARY paren_char_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + | binary_large_object_string_type + ; +binary_large_object_string_type: + SQL_TOKEN_BINARY SQL_TOKEN_LARGE SQL_TOKEN_OBJECT opt_paren_char_large_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | SQL_TOKEN_BLOB opt_paren_char_large_length + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +numeric_type: + exact_numeric_type + | approximate_numeric_type + ; +opt_paren_precision_scale: + {$$ = SQL_NEW_RULE;} + | '(' SQL_TOKEN_INTNUM ')' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); + $$->append($3 = newNode(")", SQL_NODE_PUNCTUATION)); + } + | '(' SQL_TOKEN_INTNUM ',' SQL_TOKEN_INTNUM ')' + { + $$ = SQL_NEW_RULE; + $$->append($1 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($2); + $$->append($3 = newNode(",", SQL_NODE_PUNCTUATION)); + $$->append($4); + $$->append($5 = newNode(")", SQL_NODE_PUNCTUATION)); + } + ; +exact_numeric_type: + SQL_TOKEN_NUMERIC opt_paren_precision_scale + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + | SQL_TOKEN_DECIMAL opt_paren_precision_scale + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + | SQL_TOKEN_DEC opt_paren_precision_scale + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + | SQL_TOKEN_SMALLINT + | SQL_TOKEN_INTEGER + | SQL_TOKEN_INT + | SQL_TOKEN_BIGINT + ; +approximate_numeric_type: + SQL_TOKEN_FLOAT '(' SQL_TOKEN_INTNUM ')' + { + $$ = SQL_NEW_RULE; $$->append($1); $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); $$->append($3); - $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION));} - | SQL_TOKEN_REAL - | SQL_TOKEN_DOUBLE SQL_TOKEN_PRECISION - {$$ = SQL_NEW_RULE; + $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); + } + | SQL_TOKEN_FLOAT + | SQL_TOKEN_REAL + | SQL_TOKEN_DOUBLE + | SQL_TOKEN_DOUBLE SQL_TOKEN_PRECISION + { + $$ = SQL_NEW_RULE; $$->append($1); - $$->append($2);} + $$->append($2); + } + ; +boolean_type: + SQL_TOKEN_BOOLEAN +; +datetime_type: + SQL_TOKEN_DATE + | SQL_TOKEN_TIME opt_paren_precision opt_with_or_without_time_zone + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + | SQL_TOKEN_TIMESTAMP opt_paren_precision opt_with_or_without_time_zone + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + ; +opt_with_or_without_time_zone: + {$$ = SQL_NEW_RULE;} + | SQL_TOKEN_WITH SQL_TOKEN_TIME SQL_TOKEN_ZONE + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + | SQL_TOKEN_WITHOUT SQL_TOKEN_TIME SQL_TOKEN_ZONE + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + ; +interval_type: + SQL_TOKEN_INTERVAL interval_qualifier + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } ; - /* the various things you can name */ column: @@ -3028,7 +3457,141 @@ column: $$ = newNode(xxx_pGLOBAL_SQLPARSER->TokenIDToStr(nNod), SQL_NODE_NAME); } ; - +case_expression: + case_abbreviation + | case_specification + ; +case_abbreviation: + SQL_TOKEN_NULLIF '(' value_exp_commalist ')' + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($3); + $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); + } + | SQL_TOKEN_COALESCE '(' value_exp ')' + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($3); + $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); + } + | SQL_TOKEN_COALESCE '(' value_exp_commalist ')' + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2 = newNode("(", SQL_NODE_PUNCTUATION)); + $$->append($3); + $$->append($4 = newNode(")", SQL_NODE_PUNCTUATION)); + } + ; +case_specification: + simple_case + | searched_case + ; +simple_case: + SQL_TOKEN_CASE case_operand simple_when_clause_list else_clause SQL_TOKEN_END + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + $$->append($5); + } + ; +searched_case: + SQL_TOKEN_CASE searched_when_clause_list else_clause SQL_TOKEN_END + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + ; +simple_when_clause_list: + simple_when_clause + { + $$ = SQL_NEW_LISTRULE; + $$->append($1); + } + | searched_when_clause_list simple_when_clause + { + $1->append($2); + $$ = $1; + } + ; +simple_when_clause: + SQL_TOKEN_WHEN when_operand_list SQL_TOKEN_THEN result + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + ; +when_operand_list: + when_operand + {$$ = SQL_NEW_COMMALISTRULE; + $$->append($1);} + | when_operand_list ',' when_operand + {$1->append($3); + $$ = $1;} + ; +when_operand: + row_value_constructor_elem + | comparison_predicate_part_2 + | between_predicate_part_2 + | in_predicate_part_2 + | character_like_predicate_part_2 + | null_predicate_part_2 +; +searched_when_clause_list: + searched_when_clause + { + $$ = SQL_NEW_LISTRULE; + $$->append($1); + } + | searched_when_clause_list searched_when_clause + { + $1->append($2); + $$ = $1; + } + ; +searched_when_clause: + SQL_TOKEN_WHEN search_condition SQL_TOKEN_THEN result + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + ; +else_clause: + {$$ = SQL_NEW_RULE;} + | SQL_TOKEN_ELSE result + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +result: + result_expression + | SQL_TOKEN_NULL + ; +result_expression: + value_exp + ; +case_operand: + row_value_constructor_elem + ; + cursor: SQL_TOKEN_NAME {$$ = SQL_NEW_RULE; $$->append($1);} @@ -3093,6 +3656,195 @@ sql: } | '(' sql ')' /* checking predicats */ ; +trigger_definition: + SQL_TOKEN_CREATE SQL_TOKEN_TRIGGER trigger_name trigger_action_time trigger_event SQL_TOKEN_ON table_name op_referencing triggered_action + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + $$->append($5); + $$->append($6); + $$->append($7); + $$->append($8); + $$->append($9); + } + ; +op_referencing: + { + $$ = SQL_NEW_RULE; + } + | SQL_TOKEN_REFERENCING transition_table_or_variable_list + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +trigger_action_time: + SQL_TOKEN_BEFORE + | SQL_TOKEN_AFTER + | SQL_TOKEN_INSTEAD SQL_TOKEN_OF + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } +; +trigger_event: + SQL_TOKEN_INSERT + | SQL_TOKEN_DELETE + | SQL_TOKEN_UPDATE op_trigger_columnlist + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +op_trigger_columnlist: + { + $$ = SQL_NEW_RULE; + } + | SQL_TOKEN_OF trigger_column_list + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +trigger_column_list: + column_commalist + ; +triggered_action: + op_triggered_action_for triggered_when_clause triggered_SQL_statement + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + ; +op_triggered_action_for: + { + $$ = SQL_NEW_RULE; + } + | SQL_TOKEN_FOR SQL_TOKEN_EACH trigger_for + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + } + ; +trigger_for: + SQL_TOKEN_ROW + | SQL_TOKEN_STATEMENT + ; +triggered_when_clause: + { + $$ = SQL_NEW_RULE; + } + | SQL_TOKEN_WHEN parenthesized_boolean_value_expression + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + } + ; +triggered_SQL_statement: + SQL_procedure_statement + | SQL_TOKEN_BEGIN SQL_TOKEN_ATOMIC SQL_procedure_statement_list ';' SQL_TOKEN_END + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4 = newNode(";", SQL_NODE_PUNCTUATION)); + $$->append($5); + } + ; +SQL_procedure_statement_list: + SQL_procedure_statement + { + $$ = SQL_NEW_LISTRULE; + $$->append($1); + } + | SQL_procedure_statement_list ';' SQL_procedure_statement + { + $1->append($3); + $$ = $1; + } + ; +SQL_procedure_statement: + sql + ; + +transition_table_or_variable_list: + transition_table_or_variable + { + $$ = SQL_NEW_LISTRULE; + $$->append($1); + } + | transition_table_or_variable_list transition_table_or_variable + { + $1->append($2); + $$ = $1; + } + ; + +transition_table_or_variable: + SQL_TOKEN_OLD opt_row opt_as old_transition_variable_name + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | SQL_TOKEN_NEW opt_row opt_as new_transition_variable_name + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | SQL_TOKEN_OLD SQL_TOKEN_TABLE opt_as old_transition_table_name + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } + | SQL_TOKEN_NEW SQL_TOKEN_TABLE opt_as new_transition_table_name + { + $$ = SQL_NEW_RULE; + $$->append($1); + $$->append($2); + $$->append($3); + $$->append($4); + } +; +old_transition_table_name: + transition_table_name +; +new_transition_table_name: + transition_table_name +; +transition_table_name: + SQL_TOKEN_NAME +; +old_transition_variable_name: + SQL_TOKEN_NAME +; +new_transition_variable_name: + SQL_TOKEN_NAME +; +trigger_name: + SQL_TOKEN_NAME +; %% @@ -3507,7 +4259,7 @@ sal_Int16 OSQLParser::buildNode(OSQLParseNode*& pAppend,OSQLParseNode* pCompare, pColumnRef->append(new OSQLInternalNode(m_sFieldName,SQL_NODE_NAME)); OSQLParseNode* pComp = NULL; if ( SQL_ISTOKEN( pCompare, BETWEEN) && pLiteral2 ) - pComp = new OSQLInternalNode(aEmptyString, SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::between_predicate)); + pComp = new OSQLInternalNode(aEmptyString, SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::between_predicate_part_2)); else pComp = new OSQLInternalNode(aEmptyString, SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::comparison_predicate)); diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l index 275bd5b34619..c6723dfd6869 100644 --- a/connectivity/source/parse/sqlflex.l +++ b/connectivity/source/parse/sqlflex.l @@ -86,15 +86,11 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL; SQLyylval.pParseNode = new OSQLInternalNode(text, token); #define SQL_NEW_KEYWORD(token) \ - SQLyylval.pParseNode = new OSQLInternalNode(aEmptyString, SQL_NODE_KEYWORD, (token)); + SQLyylval.pParseNode = new OSQLInternalNode(aEmptyString, SQL_NODE_KEYWORD, (token)); return token; -#define SQL_NEW_NAME SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_NAME) -#define SQL_NEW_INTNUM SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_INTNUM) -#define SQL_NEW_APPROXNUM SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_APPROXNUM) -#define SQL_NEW_STRING SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_STRING) -#define SQL_NEW_COMPARISON SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_COMPARISON) -#define SQL_NEW_AMMSC SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_AMMSC) -#define SQL_NEW_DATE SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_ACCESS_DATE) +#define SQL_NEW_INTNUM SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_INTNUM); return SQL_TOKEN_INTNUM; +#define SQL_NEW_APPROXNUM SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_APPROXNUM); return SQL_TOKEN_APPROXNUM; +#define SQL_NEW_DATE SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_ACCESS_DATE); return SQL_TOKEN_ACCESS_DATE; #define YY_INPUT(buf,result,max_size) \ { \ @@ -122,231 +118,280 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL; %option never-interactive %% -[Aa][Bb][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_ABS); return SQL_TOKEN_ABS; } -[Aa][Cc][Oo][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_ACOS); return SQL_TOKEN_ACOS; } -[Aa][Ll][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_ALL); return SQL_TOKEN_ALL; } -[Aa][Ll][Tt][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_ALTER); return SQL_TOKEN_ALTER; } -[Aa][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_AND); return SQL_TOKEN_AND; } -[Aa][Nn][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_ANY); return SQL_TOKEN_ANY; } -[Aa][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_AS); return SQL_TOKEN_AS; } -[Aa][Ss][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_ASC); return SQL_TOKEN_ASC; } -[Aa][Ss][Cc][Ii][Ii] {SQL_NEW_KEYWORD(SQL_TOKEN_ASCII); return SQL_TOKEN_ASCII; } -[Aa][Ss][Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_ASIN); return SQL_TOKEN_ASIN; } -[Aa][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_AT); return SQL_TOKEN_AT; } -[Aa][Tt][Aa][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN); return SQL_TOKEN_ATAN; } -[Aa][Tt][Aa][Nn]2 {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN2); return SQL_TOKEN_ATAN2; } -[Aa][Uu][Tt][Hh][Oo][Rr][Ii][Zz][Aa][Tt][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_AUTHORIZATION); return SQL_TOKEN_AUTHORIZATION; } -[Aa][Vv][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_AVG); return SQL_TOKEN_AVG; } - -[Bb][Ee][Tt][Ww][Ee][Ee][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_BETWEEN); return SQL_TOKEN_BETWEEN; } -[Bb][Ii][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_BIT); return SQL_TOKEN_BIT; } -[Bb][Ii][Tt]_[Ll][Ee][Nn][Gg][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_BIT_LENGTH); return SQL_TOKEN_BIT_LENGTH; } -[Bb][Oo][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_BOTH); return SQL_TOKEN_BOTH; } -[Bb][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_BY); return SQL_TOKEN_BY; } - -[Cc][Aa][Ll][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_CALL); return SQL_TOKEN_CALL; } -[Cc][Aa][Ss][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_CAST); return SQL_TOKEN_CAST; } -[Cc][Hh][Aa][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR); return SQL_TOKEN_CHAR; } -[Cc][Hh][Aa][Rr][Aa][Cc][Tt][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_CHARACTER); return SQL_TOKEN_CHARACTER; } -[Cc][Hh][Aa][Rr]([Aa][Cc][Tt][Ee][Rr])?_[Ll][Ee][Nn][Gg][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR_LENGTH); return SQL_TOKEN_CHAR_LENGTH; } -[Cc][Hh][Ee][Cc][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_CHECK); return SQL_TOKEN_CHECK; } -[Cc][Ee][Ii][Ll][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_CEILING); return SQL_TOKEN_CEILING; } -[Cc][Oo][Ll][Ll][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_COLLATE); return SQL_TOKEN_COLLATE; } -COLLECT {SQL_NEW_KEYWORD(SQL_TOKEN_COLLECT); return SQL_TOKEN_COLLECT; } -[Cc][Oo][Mm][Mm][Ii][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_COMMIT); return SQL_TOKEN_COMMIT; } -[Cc][Oo][Nn][Cc][Aa][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_CONCAT); return SQL_TOKEN_CONCAT; } -[Cc][Oo][Nn][Tt][Ii][Nn][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CONTINUE); return SQL_TOKEN_CONTINUE; } -[Cc][Oo][Nn][Vv][Ee][Rr][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_CONVERT); return SQL_TOKEN_CONVERT; } -[Cc][Oo][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_COS); return SQL_TOKEN_COS; } -[Cc][Oo][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_COT); return SQL_TOKEN_COT; } -[Cc][Oo][Uu][Nn][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_COUNT); return SQL_TOKEN_COUNT; } -[Cc][Rr][Ee][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CREATE); return SQL_TOKEN_CREATE; } -[Cc][Rr][Oo][Ss][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_CROSS); return SQL_TOKEN_CROSS; } -[Cc][Uu][Rr][Rr][Ee][Nn][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT); return SQL_TOKEN_CURRENT; } -[Cc][Uu][Rr][Rr][Ee][Nn][Tt]_[Dd][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_DATE); return SQL_TOKEN_CURRENT_DATE; } -[Cc][Uu][Rr][Dd][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CURDATE); return SQL_TOKEN_CURDATE; } -[Cc][Uu][Rr][Rr][Ee][Nn][Tt]_[Tt][Ii][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIME); return SQL_TOKEN_CURRENT_TIME; } -[Cc][Uu][Rr][Tt][Ii][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_CURTIME); return SQL_TOKEN_CURTIME; } -[Cc][Uu][Rr][Rr][Ee][Nn][Tt]_[Tt][Ii][Mm][Ee][Ss][Tt][Aa][Mm][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIMESTAMP); return SQL_TOKEN_CURRENT_TIMESTAMP; } -[Cc][Uu][Rr][Ss][Oo][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_CURSOR); return SQL_TOKEN_CURSOR; } - -[Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_D); return SQL_TOKEN_D; } -[Dd][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DATE); return SQL_TOKEN_DATE; } -[Dd][Aa][Tt][Ee][Dd][Ii][Ff][Ff] {SQL_NEW_KEYWORD(SQL_TOKEN_DATEDIFF); return SQL_TOKEN_DATEDIFF; } -[Dd][Aa][Tt][Ee][Vv][Aa][Ll][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DATEVALUE); return SQL_TOKEN_DATEVALUE; } -[Dd][Aa][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_DAY); return SQL_TOKEN_DAY; } -[Dd][Aa][Yy][Nn][Aa][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DAYNAME); return SQL_TOKEN_DAYNAME; } -[Dd][Aa][Yy][Oo][Ff][Mm][Oo][Nn][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFMONTH); return SQL_TOKEN_DAYOFMONTH; } -[Dd][Aa][Yy][Oo][Ff][Ww][Ee][Ee][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFWEEK); return SQL_TOKEN_DAYOFWEEK; } -[Dd][Aa][Yy][Oo][Ff][Yy][Ee][Aa][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFYEAR); return SQL_TOKEN_DAYOFYEAR; } -[Dd][Ee][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_DEC); return SQL_TOKEN_DEC; } -[Dd][Ee][Cc][Ii][Mm][Aa][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_DECIMAL); return SQL_TOKEN_DECIMAL; } -[Dd][Ee][Cc][Ll][Aa][Rr][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DECLARE); return SQL_TOKEN_DECLARE; } -[Dd][Ee][Ff][Aa][Uu][Ll][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_DEFAULT); return SQL_TOKEN_DEFAULT; } -[Dd][Ee][Gg][Rr][Ee][Ee][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_DEGREES); return SQL_TOKEN_DEGREES; } -[Dd][Ee][Ll][Ee][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DELETE); return SQL_TOKEN_DELETE; } -[Dd][Ee][Ss][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_DESC); return SQL_TOKEN_DESC; } -[Dd][Ii][Ff][Ff][Ee][Rr][Ee][Nn][Cc][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DIFFERENCE); return SQL_TOKEN_DIFFERENCE; } -[Dd][Ii][Ss][Tt][Ii][Nn][Cc][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_DISTINCT); return SQL_TOKEN_DISTINCT; } -[Dd][Oo][Uu][Bb][Ll][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_DOUBLE); return SQL_TOKEN_DOUBLE; } -[Dd][Rr][Oo][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_DROP); return SQL_TOKEN_DROP; } - -EVERY {SQL_NEW_KEYWORD(SQL_TOKEN_EVERY); return SQL_TOKEN_EVERY; } -[Ee][Ss][Cc][Aa][Pp][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_ESCAPE); return SQL_TOKEN_ESCAPE; } -[Ee][Xx][Cc][Ee][Pp][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_EXCEPT); return SQL_TOKEN_EXCEPT; } -[Ee][Xx][Ii][Ss][Tt][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_EXISTS); return SQL_TOKEN_EXISTS; } -[Ee][Xx][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_EXP); return SQL_TOKEN_EXP; } -[Ee][Xx][Tt][Rr][Aa][Cc][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_EXTRACT); return SQL_TOKEN_EXTRACT; } - -[Ff][Aa][Ll][Ss][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_FALSE); return SQL_TOKEN_FALSE; } -[Ff][Ee][Tt][Cc][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_FETCH); return SQL_TOKEN_FETCH; } -[Ff][Ll][Oo][Aa][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_FLOAT); return SQL_TOKEN_FLOAT; } -[Ff][Ll][Oo][Oo][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_FLOOR); return SQL_TOKEN_FLOOR; } -[Ff][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_FN); return SQL_TOKEN_FN; } -[Ff][Oo][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_FOR); return SQL_TOKEN_FOR; } -[Ff][Oo][Rr][Ee][Ii][Gg][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_FOREIGN); return SQL_TOKEN_FOREIGN; } -[Ff][Oo][Uu][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_FOUND); return SQL_TOKEN_FOUND; } -[Ff][Rr][Oo][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_FROM); return SQL_TOKEN_FROM; } -[Ff][Uu][Ll][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_FULL); return SQL_TOKEN_FULL; } -FUSION {SQL_NEW_KEYWORD(SQL_TOKEN_FUSION); return SQL_TOKEN_FUSION; } - -[Gg][Rr][Aa][Nn][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_GRANT); return SQL_TOKEN_GRANT; } -[Gg][Rr][Oo][Uu][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_GROUP); return SQL_TOKEN_GROUP; } - -[Hh][Aa][Vv][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_HAVING); return SQL_TOKEN_HAVING; } -[Hh][Oo][Uu][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_HOUR); return SQL_TOKEN_HOUR; } - -[Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_IN); return SQL_TOKEN_IN; } -[Ii][Nn][Nn][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_INNER); return SQL_TOKEN_INNER; } -[Ii][Nn][Ss][Ee][Rr][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_INSERT); return SQL_TOKEN_INSERT; } -[Ii][Nn][Tt]([Ee][Gg][Ee][Rr])? {SQL_NEW_KEYWORD(SQL_TOKEN_INTEGER); return SQL_TOKEN_INTEGER; } -[Ii][Nn][Tt][Ee][Rr][Ss][Ee][Cc][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECT); return SQL_TOKEN_INTERSECT; } -INTERSECTION {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECTION); return SQL_TOKEN_INTERSECTION; } -[Ii][Nn][Tt][Oo] {SQL_NEW_KEYWORD(SQL_TOKEN_INTO); return SQL_TOKEN_INTO; } -[Ii][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_IS); return SQL_TOKEN_IS; } - -[Jj][Oo][Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_JOIN); return SQL_TOKEN_JOIN; } - -[Kk][Ee][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_KEY); return SQL_TOKEN_KEY; } - -[Ll][Cc][Aa][Ss][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_LCASE); return SQL_TOKEN_LCASE; } -[Ll][Ee][Aa][Dd][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_LEADING); return SQL_TOKEN_LEADING; } -[Ll][Ee][Ff][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_LEFT); return SQL_TOKEN_LEFT; } -[Ll][Ee][Nn][Gg][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_LENGTH); return SQL_TOKEN_LENGTH; } -[Ll][Ii][Kk][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_LIKE); return SQL_TOKEN_LIKE; } -[Ll][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_LN); return SQL_TOKEN_LN; } -[Ll][Oo][Cc][Aa][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_LOCAL); return SQL_TOKEN_LOCAL; } -[Ll][Oo][Cc][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_LOCATE); return SQL_TOKEN_LOCATE; } -[Ll][Oo][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_LOG); return SQL_TOKEN_LOG; } -[Ll][Oo][Gg][Ff] {SQL_NEW_KEYWORD(SQL_TOKEN_LOGF); return SQL_TOKEN_LOGF; } -[Ll][Oo][Gg]10 {SQL_NEW_KEYWORD(SQL_TOKEN_LOG10); return SQL_TOKEN_LOG10; } -[Ll][Oo][Ww][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_LOWER); return SQL_TOKEN_LOWER; } -[Ll][Tt][Rr][Ii][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_LTRIM); return SQL_TOKEN_LTRIM; } - -[Mm][Aa][Xx] {SQL_NEW_KEYWORD(SQL_TOKEN_MAX); return SQL_TOKEN_MAX; } -[Mm][Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_MIN); return SQL_TOKEN_MIN; } -[Mm][Ii][Nn][Uu][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_MINUTE); return SQL_TOKEN_MINUTE; } -[Mm][Oo][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_MOD); return SQL_TOKEN_MOD; } -[Mm][Oo][Nn][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_MONTH); return SQL_TOKEN_MONTH; } -[Mm][Oo][Nn][Tt][Hh][Nn][Aa][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_MONTHNAME); return SQL_TOKEN_MONTHNAME; } - -[Nn][Aa][Tt][Uu][Rr][Aa][LL] {SQL_NEW_KEYWORD(SQL_TOKEN_NATURAL); return SQL_TOKEN_NATURAL; } -[Nn][Cc][Hh][Aa][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_NCHAR); return SQL_TOKEN_NCHAR; } -[Nn][Oo][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_NOT); return SQL_TOKEN_NOT; } -[Nn][Oo][Ww] {SQL_NEW_KEYWORD(SQL_TOKEN_NOW); return SQL_TOKEN_NOW; } -[Nn][Uu][Ll][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_NULL); return SQL_TOKEN_NULL; } -[Nn][Uu][Mm][Ee][Rr][Ii][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_NUMERIC); return SQL_TOKEN_NUMERIC; } - -[Oo][Cc][Tt][Ee][Tt]_[Ll][Ee][Nn][Gg][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_OCTET_LENGTH); return SQL_TOKEN_OCTET_LENGTH; } -[Oo][Ff] {SQL_NEW_KEYWORD(SQL_TOKEN_OF); return SQL_TOKEN_OF; } -[Oo][Jj] {SQL_NEW_KEYWORD(SQL_TOKEN_OJ); return SQL_TOKEN_OJ; } -[Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_ON); return SQL_TOKEN_ON; } -[Oo][Pp][Tt][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_OPTION); return SQL_TOKEN_OPTION; } -[Oo][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_OR); return SQL_TOKEN_OR; } -[Oo][Rr][Dd][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_ORDER); return SQL_TOKEN_ORDER; } -[Oo][Uu][Tt][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_OUTER); return SQL_TOKEN_OUTER; } - -[Pp][Ii] {SQL_NEW_KEYWORD(SQL_TOKEN_PI); return SQL_TOKEN_PI; } -[Pp][Oo][Ss][Ii][Tt][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_POSITION); return SQL_TOKEN_POSITION; } -[Pp][Oo][Ww][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_POWER); return SQL_TOKEN_POWER; } -[Pp][Rr][Ee][Cc][Ii][Ss][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_PRECISION); return SQL_TOKEN_PRECISION; } -[Pp][Rr][Ii][Mm][Aa][Rr][Yy] {SQL_NEW_KEYWORD(SQL_TOKEN_PRIMARY); return SQL_TOKEN_PRIMARY; } -[Pp][Rr][Ii][Vv][Ii][Ll][Ee][Gg][Ee][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_PRIVILEGES); return SQL_TOKEN_PRIVILEGES; } -[Pp][Rr][Oo][Cc][Ee][Dd][Uu][Rr][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_PROCEDURE); return SQL_TOKEN_PROCEDURE; } -[Pp][Uu][Bb][Ll][Ii][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_PUBLIC); return SQL_TOKEN_PUBLIC; } - -[Qq][Uu][Aa][Rr][Tt][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_QUARTER); return SQL_TOKEN_QUARTER; } - -[Rr][Aa][Dd][Ii][Aa][Nn][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_RADIANS); return SQL_TOKEN_RADIANS; } -[Rr][Aa][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_RAND); return SQL_TOKEN_RAND; } -[Rr][Ee][Aa][Ll] {SQL_NEW_KEYWORD(SQL_TOKEN_REAL); return SQL_TOKEN_REAL; } -[Rr][Ee][Ff][Ee][Rr][Ee][Nn][Cc][Ee][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCES); return SQL_TOKEN_REFERENCES; } -[Rr][Ee][Pp][Ee][Aa][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_REPEAT); return SQL_TOKEN_REPEAT; } -[Rr][Ee][Pp][Ll][Aa][Cc][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_REPLACE); return SQL_TOKEN_REPLACE; } -[Rr][Oo][Ll][Ll][Bb][Aa][Cc][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_ROLLBACK); return SQL_TOKEN_ROLLBACK; } -[Rr][Oo][Uu][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_ROUND); return SQL_TOKEN_ROUND; } -[Rr][Oo][Uu][Nn][Dd][Mm][Aa][Gg][Ii][Cc] {SQL_NEW_KEYWORD(SQL_TOKEN_ROUNDMAGIC); return SQL_TOKEN_ROUNDMAGIC; } -[Rr][Ii][Gg][Hh][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_RIGHT); return SQL_TOKEN_RIGHT; } -[Rr][Tt][Rr][Ii][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_RTRIM); return SQL_TOKEN_RTRIM; } - -[Ss][Cc][Hh][Ee][Mm][Aa] {SQL_NEW_KEYWORD(SQL_TOKEN_SCHEMA); return SQL_TOKEN_SCHEMA; } -[Ss][Ee][Cc][Oo][Nn][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_SECOND); return SQL_TOKEN_SECOND; } -[Ss][Ee][Ll][Ee][Cc][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_SELECT); return SQL_TOKEN_SELECT; } -[Ss][Ee][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_SET); return SQL_TOKEN_SET; } -[Ss][Ii][Zz][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_SIZE); return SQL_TOKEN_SIZE; } -[Ss][Ii][Gg][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_SIGN); return SQL_TOKEN_SIGN; } -[Ss][Ii][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_SIN); return SQL_TOKEN_SIN; } -[Ss][Mm][Aa][Ll][Ll][Ii][Nn][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_SMALLINT); return SQL_TOKEN_SMALLINT; } -[Ss][Oo][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_SOME); return SQL_TOKEN_SOME; } -[Ss][Oo][Uu][Nn][Dd][Ee][Xx] {SQL_NEW_KEYWORD(SQL_TOKEN_SOUNDEX); return SQL_TOKEN_SOUNDEX; } -[Ss][Pp][Aa][Cc][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_SPACE); return SQL_TOKEN_SPACE; } -[Ss][Qq][Rr][Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_SQRT); return SQL_TOKEN_SQRT; } -STDDEV_POP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_POP); return SQL_TOKEN_STDDEV_POP; } -STDDEV_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_SAMP); return SQL_TOKEN_STDDEV_SAMP; } -[Ss][Uu][Bb][Ss][Tt][Rr][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_SUBSTRING); return SQL_TOKEN_SUBSTRING; } -[Ss][Uu][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_SUM); return SQL_TOKEN_SUM; } - -[Tt][Aa][Bb][Ll][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TABLE); return SQL_TOKEN_TABLE; } -[Tt][Aa][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_TAN); return SQL_TOKEN_TAN; } -[Tt][Ii][Mm][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TIME); return SQL_TOKEN_TIME; } -[Tt][Ii][Mm][Ee][Ss][Tt][Aa][Mm][Pp] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMP); return SQL_TOKEN_TIMESTAMP; } -[Tt][Ii][Mm][Ee][Ss][Tt][Aa][Mm][Pp][Aa][Dd][Dd] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPADD); return SQL_TOKEN_TIMESTAMPADD; } -[Tt][Ii][Mm][Ee][Ss][Tt][Aa][Mm][Pp][Dd][Ii][Ff][Ff] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPDIFF); return SQL_TOKEN_TIMESTAMPDIFF; } -[Tt][Ii][Mm][Ee][Vv][Aa][Ll][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEVALUE); return SQL_TOKEN_TIMEVALUE; } -[Tt][Ii][Mm][Ee][Zz][Oo][Nn][Ee]_[Hh][Oo][Uu][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_HOUR); return SQL_TOKEN_TIMEZONE_HOUR; } -[Tt][Ii][Mm][Ee][Zz][Oo][Nn][Ee]_[Mm][Ii][Nn][Uu][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_MINUTE); return SQL_TOKEN_TIMEZONE_MINUTE; } -[Tt][Oo] {SQL_NEW_KEYWORD(SQL_TOKEN_TO); return SQL_TOKEN_TO; } -[Tt][Rr][Aa][Ii][Ll][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_TRAILING); return SQL_TOKEN_TRAILING; } -[Tt][Rr][Aa][Nn][Ss][Ll][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TRANSLATE); return SQL_TOKEN_TRANSLATE; } -[Tt][Rr][Ii][Mm] {SQL_NEW_KEYWORD(SQL_TOKEN_TRIM); return SQL_TOKEN_TRIM; } -[Tt][Rr][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TRUE); return SQL_TOKEN_TRUE; } -[Tt][Rr][Uu][Nn][Cc][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_TRUNCATE); return SQL_TOKEN_TRUNCATE; } -[Tt][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_TS); return SQL_TOKEN_TS; } -[Tt] {SQL_NEW_KEYWORD(SQL_TOKEN_T); return SQL_TOKEN_T; } - -[Uu][Cc][Aa][Ss][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_UCASE); return SQL_TOKEN_UCASE; } -[Uu][Nn][Ii][Oo][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_UNION); return SQL_TOKEN_UNION; } -[Uu][Nn][Ii][Qq][Uu][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_UNIQUE); return SQL_TOKEN_UNIQUE; } -[Uu][Nn][Kk][Nn][Oo][Ww][Nn] {SQL_NEW_KEYWORD(SQL_TOKEN_UNKNOWN); return SQL_TOKEN_UNKNOWN; } -[Uu][Pp][Dd][Aa][Tt][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_UPDATE); return SQL_TOKEN_UPDATE; } -[Uu][Pp][Pp][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_UPPER); return SQL_TOKEN_UPPER; } -[Uu][Ss][Aa][Gg][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_USAGE); return SQL_TOKEN_USAGE; } -[Uu][Ss][Ee][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_USER); return SQL_TOKEN_USER; } -[Uu][Ss][Ii][Nn][Gg] {SQL_NEW_KEYWORD(SQL_TOKEN_USING); return SQL_TOKEN_USING; } - -VAR_POP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_POP); return SQL_TOKEN_VAR_POP; } -VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_SAMP); return SQL_TOKEN_VAR_SAMP; } -[Vv][Aa][Ll][Uu][Ee][Ss] {SQL_NEW_KEYWORD(SQL_TOKEN_VALUES); return SQL_TOKEN_VALUES; } -[Vv][Ii][Ee][Ww] {SQL_NEW_KEYWORD(SQL_TOKEN_VIEW); return SQL_TOKEN_VIEW; } - -[Ww][Ee][Ee][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_WEEK); return SQL_TOKEN_WEEK; } -[Ww][Hh][Ee][Rr][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_WHERE); return SQL_TOKEN_WHERE; } -[Ww][Ii][Tt][Hh] {SQL_NEW_KEYWORD(SQL_TOKEN_WITH); return SQL_TOKEN_WITH; } -[Ww][Oo][Rr][Kk] {SQL_NEW_KEYWORD(SQL_TOKEN_WORK); return SQL_TOKEN_WORK; } - -[Yy][Ee][Aa][Rr] {SQL_NEW_KEYWORD(SQL_TOKEN_YEAR); return SQL_TOKEN_YEAR; } - -[Zz][Oo][Nn][Ee] {SQL_NEW_KEYWORD(SQL_TOKEN_ZONE); return SQL_TOKEN_ZONE; } +ABS {SQL_NEW_KEYWORD(SQL_TOKEN_ABS); } +ACOS {SQL_NEW_KEYWORD(SQL_TOKEN_ACOS); } +AFTER {SQL_NEW_KEYWORD(SQL_TOKEN_AFTER); } +ALL {SQL_NEW_KEYWORD(SQL_TOKEN_ALL); } +ALTER {SQL_NEW_KEYWORD(SQL_TOKEN_ALTER); } +AND {SQL_NEW_KEYWORD(SQL_TOKEN_AND); } +ANY {SQL_NEW_KEYWORD(SQL_TOKEN_ANY); } +ARRAY_AGG {SQL_NEW_KEYWORD(SQL_TOKEN_ARRAY_AGG); } +AS {SQL_NEW_KEYWORD(SQL_TOKEN_AS); } +ASC {SQL_NEW_KEYWORD(SQL_TOKEN_ASC); } +ASCII {SQL_NEW_KEYWORD(SQL_TOKEN_ASCII); } +ASIN {SQL_NEW_KEYWORD(SQL_TOKEN_ASIN); } +AT {SQL_NEW_KEYWORD(SQL_TOKEN_AT); } +ATAN {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN); } +ATAN2 {SQL_NEW_KEYWORD(SQL_TOKEN_ATAN2); } +ATOMIC {SQL_NEW_KEYWORD(SQL_TOKEN_ATOMIC); } +AUTHORIZATION {SQL_NEW_KEYWORD(SQL_TOKEN_AUTHORIZATION); } +AVG {SQL_NEW_KEYWORD(SQL_TOKEN_AVG); } + +BEFORE {SQL_NEW_KEYWORD(SQL_TOKEN_BEFORE); } +BEGIN {SQL_NEW_KEYWORD(SQL_TOKEN_BEGIN); } +BETWEEN {SQL_NEW_KEYWORD(SQL_TOKEN_BETWEEN); } +BIGINT {SQL_NEW_KEYWORD(SQL_TOKEN_BIGINT); } +BINARY {SQL_NEW_KEYWORD(SQL_TOKEN_BINARY); } +BIT {SQL_NEW_KEYWORD(SQL_TOKEN_BIT); } +BIT_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_BIT_LENGTH); } +BLOB {SQL_NEW_KEYWORD(SQL_TOKEN_BLOB); } +BOTH {SQL_NEW_KEYWORD(SQL_TOKEN_BOTH); } +BY {SQL_NEW_KEYWORD(SQL_TOKEN_BY); } + +CALL {SQL_NEW_KEYWORD(SQL_TOKEN_CALL); } +CASE {SQL_NEW_KEYWORD(SQL_TOKEN_CASE); } +CAST {SQL_NEW_KEYWORD(SQL_TOKEN_CAST); } +CEILING {SQL_NEW_KEYWORD(SQL_TOKEN_CEILING); } +CHAR {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR); } +CHARACTER {SQL_NEW_KEYWORD(SQL_TOKEN_CHARACTER); } +CHAR(ACTER)?_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_CHAR_LENGTH); } +CHECK {SQL_NEW_KEYWORD(SQL_TOKEN_CHECK); } +CLOB {SQL_NEW_KEYWORD(SQL_TOKEN_CLOB); } +COALESCE {SQL_NEW_KEYWORD(SQL_TOKEN_COALESCE); } +COLLATE {SQL_NEW_KEYWORD(SQL_TOKEN_COLLATE); } +COLLECT {SQL_NEW_KEYWORD(SQL_TOKEN_COLLECT); } +COMMIT {SQL_NEW_KEYWORD(SQL_TOKEN_COMMIT); } +CONCAT {SQL_NEW_KEYWORD(SQL_TOKEN_CONCAT); } +CONTINUE {SQL_NEW_KEYWORD(SQL_TOKEN_CONTINUE); } +CONVERT {SQL_NEW_KEYWORD(SQL_TOKEN_CONVERT); } +COS {SQL_NEW_KEYWORD(SQL_TOKEN_COS); } +COT {SQL_NEW_KEYWORD(SQL_TOKEN_COT); } +COUNT {SQL_NEW_KEYWORD(SQL_TOKEN_COUNT); } +CREATE {SQL_NEW_KEYWORD(SQL_TOKEN_CREATE); } +CROSS {SQL_NEW_KEYWORD(SQL_TOKEN_CROSS); } +CUME_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_CUME_DIST); } +CURRENT {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT); } +CURRENT_DATE {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_DATE); } +CURRENT_CATALOG {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_CATALOG); } +CURRENT_DEFAULT_TRANSFORM_GROUP {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_DEFAULT_TRANSFORM_GROUP); } +CURRENT_PATH {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_PATH); } +CURRENT_ROLE {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_ROLE); } +CURRENT_SCHEMA {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_SCHEMA); } +CURRENT_USER {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_USER); } +CURDATE {SQL_NEW_KEYWORD(SQL_TOKEN_CURDATE); } +CURRENT_TIME {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIME); } +CURTIME {SQL_NEW_KEYWORD(SQL_TOKEN_CURTIME); } +CURRENT_TIMESTAMP {SQL_NEW_KEYWORD(SQL_TOKEN_CURRENT_TIMESTAMP); } +CURSOR {SQL_NEW_KEYWORD(SQL_TOKEN_CURSOR); } + +D {SQL_NEW_KEYWORD(SQL_TOKEN_D); } +DATE {SQL_NEW_KEYWORD(SQL_TOKEN_DATE); } +DATEDIFF {SQL_NEW_KEYWORD(SQL_TOKEN_DATEDIFF); } +DATEVALUE {SQL_NEW_KEYWORD(SQL_TOKEN_DATEVALUE); } +DAY {SQL_NEW_KEYWORD(SQL_TOKEN_DAY); } +DAYNAME {SQL_NEW_KEYWORD(SQL_TOKEN_DAYNAME); } +DAYOFMONTH {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFMONTH); } +DAYOFWEEK {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFWEEK); } +DAYOFYEAR {SQL_NEW_KEYWORD(SQL_TOKEN_DAYOFYEAR); } +DEC {SQL_NEW_KEYWORD(SQL_TOKEN_DEC); } +DECIMAL {SQL_NEW_KEYWORD(SQL_TOKEN_DECIMAL); } +DECLARE {SQL_NEW_KEYWORD(SQL_TOKEN_DECLARE); } +DEFAULT {SQL_NEW_KEYWORD(SQL_TOKEN_DEFAULT); } +DEGREES {SQL_NEW_KEYWORD(SQL_TOKEN_DEGREES); } +DELETE {SQL_NEW_KEYWORD(SQL_TOKEN_DELETE); } +DENSE_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_DENSE_RANK); } +DESC {SQL_NEW_KEYWORD(SQL_TOKEN_DESC); } +DIFFERENCE {SQL_NEW_KEYWORD(SQL_TOKEN_DIFFERENCE); } +DISTINCT {SQL_NEW_KEYWORD(SQL_TOKEN_DISTINCT); } +DOUBLE {SQL_NEW_KEYWORD(SQL_TOKEN_DOUBLE); } +DROP {SQL_NEW_KEYWORD(SQL_TOKEN_DROP); } + +EACH {SQL_NEW_KEYWORD(SQL_TOKEN_EACH); } +ELSE {SQL_NEW_KEYWORD(SQL_TOKEN_ELSE); } +END {SQL_NEW_KEYWORD(SQL_TOKEN_END); } +EVERY {SQL_NEW_KEYWORD(SQL_TOKEN_EVERY); } +ESCAPE {SQL_NEW_KEYWORD(SQL_TOKEN_ESCAPE); } +EXCEPT {SQL_NEW_KEYWORD(SQL_TOKEN_EXCEPT); } +EXISTS {SQL_NEW_KEYWORD(SQL_TOKEN_EXISTS); } +EXP {SQL_NEW_KEYWORD(SQL_TOKEN_EXP); } +EXTRACT {SQL_NEW_KEYWORD(SQL_TOKEN_EXTRACT); } + +FALSE {SQL_NEW_KEYWORD(SQL_TOKEN_FALSE); } +FETCH {SQL_NEW_KEYWORD(SQL_TOKEN_FETCH); } +FLOAT {SQL_NEW_KEYWORD(SQL_TOKEN_FLOAT); } +FLOOR {SQL_NEW_KEYWORD(SQL_TOKEN_FLOOR); } +FN {SQL_NEW_KEYWORD(SQL_TOKEN_FN); } +FOR {SQL_NEW_KEYWORD(SQL_TOKEN_FOR); } +FOREIGN {SQL_NEW_KEYWORD(SQL_TOKEN_FOREIGN); } +FOUND {SQL_NEW_KEYWORD(SQL_TOKEN_FOUND); } +FROM {SQL_NEW_KEYWORD(SQL_TOKEN_FROM); } +FULL {SQL_NEW_KEYWORD(SQL_TOKEN_FULL); } +FUSION {SQL_NEW_KEYWORD(SQL_TOKEN_FUSION); } + +GRANT {SQL_NEW_KEYWORD(SQL_TOKEN_GRANT); } +GROUP {SQL_NEW_KEYWORD(SQL_TOKEN_GROUP); } + +HAVING {SQL_NEW_KEYWORD(SQL_TOKEN_HAVING); } +HOUR {SQL_NEW_KEYWORD(SQL_TOKEN_HOUR); } + +IN {SQL_NEW_KEYWORD(SQL_TOKEN_IN); } +INNER {SQL_NEW_KEYWORD(SQL_TOKEN_INNER); } +INSERT {SQL_NEW_KEYWORD(SQL_TOKEN_INSERT); } +INSTEAD {SQL_NEW_KEYWORD(SQL_TOKEN_INSTEAD); } +INT(EGER)? {SQL_NEW_KEYWORD(SQL_TOKEN_INTEGER); } +INTERSECT {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECT); } +INTERVAL {SQL_NEW_KEYWORD(SQL_TOKEN_INTERVAL); } +INTERSECTION {SQL_NEW_KEYWORD(SQL_TOKEN_INTERSECTION); } +INTO {SQL_NEW_KEYWORD(SQL_TOKEN_INTO); } +IS {SQL_NEW_KEYWORD(SQL_TOKEN_IS); } + +JOIN {SQL_NEW_KEYWORD(SQL_TOKEN_JOIN); } + +KEY {SQL_NEW_KEYWORD(SQL_TOKEN_KEY); } + +LARGE {SQL_NEW_KEYWORD(SQL_TOKEN_LARGE); } +LCASE {SQL_NEW_KEYWORD(SQL_TOKEN_LCASE); } +LEADING {SQL_NEW_KEYWORD(SQL_TOKEN_LEADING); } +LEFT {SQL_NEW_KEYWORD(SQL_TOKEN_LEFT); } +LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_LENGTH); } +LIKE {SQL_NEW_KEYWORD(SQL_TOKEN_LIKE); } +LN {SQL_NEW_KEYWORD(SQL_TOKEN_LN); } +LOCAL {SQL_NEW_KEYWORD(SQL_TOKEN_LOCAL); } +LOCATE {SQL_NEW_KEYWORD(SQL_TOKEN_LOCATE); } +LOG {SQL_NEW_KEYWORD(SQL_TOKEN_LOG); } +LOGF {SQL_NEW_KEYWORD(SQL_TOKEN_LOGF); } +LOG10 {SQL_NEW_KEYWORD(SQL_TOKEN_LOG10); } +LOWER {SQL_NEW_KEYWORD(SQL_TOKEN_LOWER); } +LTRIM {SQL_NEW_KEYWORD(SQL_TOKEN_LTRIM); } + +MAX {SQL_NEW_KEYWORD(SQL_TOKEN_MAX); } +MIN {SQL_NEW_KEYWORD(SQL_TOKEN_MIN); } +MINUTE {SQL_NEW_KEYWORD(SQL_TOKEN_MINUTE); } +MOD {SQL_NEW_KEYWORD(SQL_TOKEN_MOD); } +MONTH {SQL_NEW_KEYWORD(SQL_TOKEN_MONTH); } +MONTHNAME {SQL_NEW_KEYWORD(SQL_TOKEN_MONTHNAME); } + +NATIONAL {SQL_NEW_KEYWORD(SQL_TOKEN_NATIONAL); } +NATURAL {SQL_NEW_KEYWORD(SQL_TOKEN_NATURAL); } +NCHAR {SQL_NEW_KEYWORD(SQL_TOKEN_NCHAR); } +NCLOB {SQL_NEW_KEYWORD(SQL_TOKEN_NCLOB); } +NEW {SQL_NEW_KEYWORD(SQL_TOKEN_NEW); } +NOT {SQL_NEW_KEYWORD(SQL_TOKEN_NOT); } +NOW {SQL_NEW_KEYWORD(SQL_TOKEN_NOW); } +NULL {SQL_NEW_KEYWORD(SQL_TOKEN_NULL); } +NULLIF {SQL_NEW_KEYWORD(SQL_TOKEN_NULLIF); } +NUMERIC {SQL_NEW_KEYWORD(SQL_TOKEN_NUMERIC); } + +OBJECT {SQL_NEW_KEYWORD(SQL_TOKEN_OBJECT); } +OCTET_LENGTH {SQL_NEW_KEYWORD(SQL_TOKEN_OCTET_LENGTH); } +OF {SQL_NEW_KEYWORD(SQL_TOKEN_OF); } +OJ {SQL_NEW_KEYWORD(SQL_TOKEN_OJ); } +OLD {SQL_NEW_KEYWORD(SQL_TOKEN_OLD); } +ON {SQL_NEW_KEYWORD(SQL_TOKEN_ON); } +OPTION {SQL_NEW_KEYWORD(SQL_TOKEN_OPTION); } +OR {SQL_NEW_KEYWORD(SQL_TOKEN_OR); } +ORDER {SQL_NEW_KEYWORD(SQL_TOKEN_ORDER); } +OUTER {SQL_NEW_KEYWORD(SQL_TOKEN_OUTER); } + +PERCENT_RANK {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENT_RANK); } +PERCENTILE_CONT {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENTILE_CONT); } +PERCENTILE_DISC {SQL_NEW_KEYWORD(SQL_TOKEN_PERCENTILE_DISC); } +PI {SQL_NEW_KEYWORD(SQL_TOKEN_PI); } +POSITION {SQL_NEW_KEYWORD(SQL_TOKEN_POSITION); } +POWER {SQL_NEW_KEYWORD(SQL_TOKEN_POWER); } +PRECISION {SQL_NEW_KEYWORD(SQL_TOKEN_PRECISION); } +PRIMARY {SQL_NEW_KEYWORD(SQL_TOKEN_PRIMARY); } +PRIVILEGES {SQL_NEW_KEYWORD(SQL_TOKEN_PRIVILEGES); } +PROCEDURE {SQL_NEW_KEYWORD(SQL_TOKEN_PROCEDURE); } +PUBLIC {SQL_NEW_KEYWORD(SQL_TOKEN_PUBLIC); } + +QUARTER {SQL_NEW_KEYWORD(SQL_TOKEN_QUARTER); } + +RADIANS {SQL_NEW_KEYWORD(SQL_TOKEN_RADIANS); } +RAND {SQL_NEW_KEYWORD(SQL_TOKEN_RAND); } +RANK {SQL_NEW_KEYWORD(SQL_TOKEN_RANK); } +REAL {SQL_NEW_KEYWORD(SQL_TOKEN_REAL); } +REFERENCES {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCES); } +REFERENCING {SQL_NEW_KEYWORD(SQL_TOKEN_REFERENCING); } +REPEAT {SQL_NEW_KEYWORD(SQL_TOKEN_REPEAT); } +REPLACE {SQL_NEW_KEYWORD(SQL_TOKEN_REPLACE); } +ROLLBACK {SQL_NEW_KEYWORD(SQL_TOKEN_ROLLBACK); } +ROUND {SQL_NEW_KEYWORD(SQL_TOKEN_ROUND); } +ROUNDMAGIC {SQL_NEW_KEYWORD(SQL_TOKEN_ROUNDMAGIC); } +ROW {SQL_NEW_KEYWORD(SQL_TOKEN_ROW); } +RIGHT {SQL_NEW_KEYWORD(SQL_TOKEN_RIGHT); } +RTRIM {SQL_NEW_KEYWORD(SQL_TOKEN_RTRIM); } + +SCHEMA {SQL_NEW_KEYWORD(SQL_TOKEN_SCHEMA); } +SECOND {SQL_NEW_KEYWORD(SQL_TOKEN_SECOND); } +SELECT {SQL_NEW_KEYWORD(SQL_TOKEN_SELECT); } +SET {SQL_NEW_KEYWORD(SQL_TOKEN_SET); } +SIZE {SQL_NEW_KEYWORD(SQL_TOKEN_SIZE); } +SIGN {SQL_NEW_KEYWORD(SQL_TOKEN_SIGN); } +SIN {SQL_NEW_KEYWORD(SQL_TOKEN_SIN); } +SMALLINT {SQL_NEW_KEYWORD(SQL_TOKEN_SMALLINT); } +SOME {SQL_NEW_KEYWORD(SQL_TOKEN_SOME); } +SOUNDEX {SQL_NEW_KEYWORD(SQL_TOKEN_SOUNDEX); } +SPACE {SQL_NEW_KEYWORD(SQL_TOKEN_SPACE); } +SQRT {SQL_NEW_KEYWORD(SQL_TOKEN_SQRT); } +STDDEV_POP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_POP); } +STDDEV_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_STDDEV_SAMP); } +STATEMENT {SQL_NEW_KEYWORD(SQL_TOKEN_STATEMENT); } +SUBSTRING {SQL_NEW_KEYWORD(SQL_TOKEN_SUBSTRING); } +SUM {SQL_NEW_KEYWORD(SQL_TOKEN_SUM); } +SESSION_USER {SQL_NEW_KEYWORD(SQL_TOKEN_SESSION_USER); } +SYSTEM_USER {SQL_NEW_KEYWORD(SQL_TOKEN_SYSTEM_USER); } + +TABLE {SQL_NEW_KEYWORD(SQL_TOKEN_TABLE); } +TAN {SQL_NEW_KEYWORD(SQL_TOKEN_TAN); } +THEN {SQL_NEW_KEYWORD(SQL_TOKEN_THEN); } +TIME {SQL_NEW_KEYWORD(SQL_TOKEN_TIME); } +TIMESTAMP {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMP); } +TIMESTAMPADD {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPADD); } +TIMESTAMPDIFF {SQL_NEW_KEYWORD(SQL_TOKEN_TIMESTAMPDIFF); } +TIMEVALUE {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEVALUE); } +TIMEZONE_HOUR {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_HOUR); } +TIMEZONE_MINUTE {SQL_NEW_KEYWORD(SQL_TOKEN_TIMEZONE_MINUTE); } +TO {SQL_NEW_KEYWORD(SQL_TOKEN_TO); } +TRAILING {SQL_NEW_KEYWORD(SQL_TOKEN_TRAILING); } +TRANSLATE {SQL_NEW_KEYWORD(SQL_TOKEN_TRANSLATE); } +TRIGGER {SQL_NEW_KEYWORD(SQL_TOKEN_TRIGGER); } +TRIM {SQL_NEW_KEYWORD(SQL_TOKEN_TRIM); } +TRUE {SQL_NEW_KEYWORD(SQL_TOKEN_TRUE); } +TRUNCATE {SQL_NEW_KEYWORD(SQL_TOKEN_TRUNCATE); } +TS {SQL_NEW_KEYWORD(SQL_TOKEN_TS); } +T {SQL_NEW_KEYWORD(SQL_TOKEN_T); } + +UCASE {SQL_NEW_KEYWORD(SQL_TOKEN_UCASE); } +UNION {SQL_NEW_KEYWORD(SQL_TOKEN_UNION); } +UNIQUE {SQL_NEW_KEYWORD(SQL_TOKEN_UNIQUE); } +UNKNOWN {SQL_NEW_KEYWORD(SQL_TOKEN_UNKNOWN); } +UPDATE {SQL_NEW_KEYWORD(SQL_TOKEN_UPDATE); } +UPPER {SQL_NEW_KEYWORD(SQL_TOKEN_UPPER); } +USAGE {SQL_NEW_KEYWORD(SQL_TOKEN_USAGE); } +USER {SQL_NEW_KEYWORD(SQL_TOKEN_USER); } +USING {SQL_NEW_KEYWORD(SQL_TOKEN_USING); } + +VARBINARY {SQL_NEW_KEYWORD(SQL_TOKEN_VARBINARY); } +VARCHAR {SQL_NEW_KEYWORD(SQL_TOKEN_VARCHAR); } +VARYING {SQL_NEW_KEYWORD(SQL_TOKEN_VARYING); } +VAR_POP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_POP); } +VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_SAMP); } +VALUE {SQL_NEW_KEYWORD(SQL_TOKEN_VALUE); } +VALUES {SQL_NEW_KEYWORD(SQL_TOKEN_VALUES); } +VIEW {SQL_NEW_KEYWORD(SQL_TOKEN_VIEW); } + +WEEK {SQL_NEW_KEYWORD(SQL_TOKEN_WEEK); } +WHEN {SQL_NEW_KEYWORD(SQL_TOKEN_WHEN); } +WHERE {SQL_NEW_KEYWORD(SQL_TOKEN_WHERE); } +WITH {SQL_NEW_KEYWORD(SQL_TOKEN_WITH); } +WITHIN {SQL_NEW_KEYWORD(SQL_TOKEN_WITHIN); } +WITHOUT {SQL_NEW_KEYWORD(SQL_TOKEN_WITHOUT); } +WORK {SQL_NEW_KEYWORD(SQL_TOKEN_WORK); } + +YEAR {SQL_NEW_KEYWORD(SQL_TOKEN_YEAR); } + +ZONE {SQL_NEW_KEYWORD(SQL_TOKEN_ZONE); } "<" { SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_LESS);return SQL_LESS;} ">" { SQL_NEW_NODE(::rtl::OUString(SQLyytext,strlen(SQLyytext),RTL_TEXTENCODING_UTF8), SQL_NODE_GREAT);return SQL_GREAT;} @@ -365,31 +410,31 @@ VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_S <SQL>([0-9]+) | <SQL>([0-9]+"."[0-9]*) | -<SQL>("."[0-9]*) {SQL_NEW_INTNUM; return SQL_TOKEN_INTNUM;} +<SQL>("."[0-9]*) {SQL_NEW_INTNUM; } <SQL>[0-9]+[eE][+-]?[0-9]+ | <SQL>[0-9]+"."[0-9]*[eE][+-]?[0-9]+ | -<SQL>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; } +<SQL>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; } <PREDICATE_GER,PREDICATE_ENG,DATE>[A-Za-z\200-\277\300-\337\340-\357\360-\367\370-\373\374-\375][A-Za-z0-9_%.,*?\200-\277\300-\337\340-\357\360-\367\370-\373\374-\375]* {return gatherNamePre(SQLyytext);} -<PREDICATE_GER,PREDICATE_ENG>([0-9]+) {SQL_NEW_INTNUM; return SQL_TOKEN_INTNUM;} -<PREDICATE_ENG>([0-9]{1,3}(","[0-9]{3})+) {SQL_NEW_INTNUM; return SQL_TOKEN_INTNUM;} -<PREDICATE_GER>([0-9]{1,3}("."[0-9]{3})+) {SQL_NEW_INTNUM; return SQL_TOKEN_INTNUM;} +<PREDICATE_GER,PREDICATE_ENG>([0-9]+) {SQL_NEW_INTNUM; } +<PREDICATE_ENG>([0-9]{1,3}(","[0-9]{3})+) {SQL_NEW_INTNUM; } +<PREDICATE_GER>([0-9]{1,3}("."[0-9]{3})+) {SQL_NEW_INTNUM; } <PREDICATE_ENG>([0-9]+"."[0-9]+) | <PREDICATE_ENG>([0-9]{1,3}(","[0-9]{3})+"."[0-9]+) | -<PREDICATE_ENG>("."[0-9]+) {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; } +<PREDICATE_ENG>("."[0-9]+) {SQL_NEW_APPROXNUM; } <PREDICATE_ENG>[0-9]+[eE][+-]?[0-9]+ | <PREDICATE_ENG>[0-9]+"."[0-9]*[eE][+-]?[0-9]+ | -<PREDICATE_ENG>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; } +<PREDICATE_ENG>"."[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; } <PREDICATE_GER>([0-9]+","[0-9]+) | <PREDICATE_GER>([0-9]{1,3}("."[0-9]{3})+","[0-9]+) | -<PREDICATE_GER>(","[0-9]+) {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; } +<PREDICATE_GER>(","[0-9]+) {SQL_NEW_APPROXNUM; } <PREDICATE_GER>[0-9]+[eE][+-]?[0-9]+ | <PREDICATE_GER>[0-9]+","[0-9]*[eE][+-]?[0-9]+ | -<PREDICATE_GER>","[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; return SQL_TOKEN_APPROXNUM; } +<PREDICATE_GER>","[0-9]*[eE][+-]?[0-9]+ {SQL_NEW_APPROXNUM; } <PREDICATE_GER,PREDICATE_ENG>[0-9.,][A-Za-z0-9_.,%]* {return gatherNamePre(SQLyytext);} @@ -403,7 +448,7 @@ VAR_SAMP {SQL_NEW_KEYWORD(SQL_TOKEN_VAR_S <PREDICATE_GER,PREDICATE_ENG,DATE># { return gatherString('#' ,2); } <DATE>[0-9]{1,4}[^ ]*[0-9] | -<DATE>[0-9]{1,4}[^ ]*[0-9][ ][0-9]{1,4}[^ ]*[0-9] { SQL_NEW_DATE; return SQL_TOKEN_ACCESS_DATE;} +<DATE>[0-9]{1,4}[^ ]*[0-9][ ][0-9]{1,4}[^ ]*[0-9] { SQL_NEW_DATE; } <STRING>["-""+""*""/"":""("")"",""."";""?""{""}"] { return SQLyytext[0]; } /* */ <STRING>"[" { return gatherString(']' ,0); } @@ -464,7 +509,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) { case 0: SQL_NEW_NODE(::rtl::OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQL_NODE_NAME); - return SQL_TOKEN_NAME; + return SQL_TOKEN_NAME; case 1: SQL_NEW_NODE(::rtl::OStringToOUString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8), SQL_NODE_STRING); return SQL_TOKEN_STRING; @@ -487,7 +532,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) } } YY_FATAL_ERROR("Unterminated name string"); - return SQL_TOKEN_INVALIDSYMBOL; + return SQL_TOKEN_INVALIDSYMBOL; } sal_Int32 mapEnumToToken(IParseContext::InternationalKeyCode _eKeyCode ) @@ -562,10 +607,10 @@ sal_Int32 gatherName(const sal_Char* text) case IParseContext::KEY_INTERSECTION: nToken = mapEnumToToken(eKeyCode); SQL_NEW_KEYWORD(nToken); - return nToken; + break; default: SQL_NEW_NODE(::rtl::OUString(text,strlen(text),RTL_TEXTENCODING_UTF8), SQL_NODE_NAME); - return SQL_TOKEN_NAME; + return SQL_TOKEN_NAME; } } /** diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index feecc26a4052..e1d805e9a1e5 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -50,6 +50,10 @@ #include "diagnose_ex.h" #include <rtl/logfile.hxx> +#define SQL_ISRULEOR2(pParseNode, e1,e2) ((pParseNode)->isRule() && (\ + (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e1) || \ + (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e2))) + using namespace ::comphelper; using namespace ::connectivity; using namespace ::connectivity::sdbcx; @@ -67,6 +71,7 @@ namespace connectivity { struct OSQLParseTreeIteratorImpl { + ::std::vector< TNodePair > m_aJoinConditions; Reference< XConnection > m_xConnection; Reference< XDatabaseMetaData > m_xDatabaseMetaData; Reference< XNameAccess > m_xTableContainer; @@ -476,7 +481,42 @@ void OSQLParseTreeIterator::traverseOneTableName( OSQLTables& _rTables,const OSQ if ( aTable.is() ) _rTables[ aTableRange ] = aTable; } - +//----------------------------------------------------------------------------- +void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoinCondition) +{ + if (i_pJoinCondition->count() == 3 && // Ausdruck is geklammert + SQL_ISPUNCTUATION(i_pJoinCondition->getChild(0),"(") && + SQL_ISPUNCTUATION(i_pJoinCondition->getChild(2),")")) + { + impl_fillJoinConditions(i_pJoinCondition->getChild(1)); + } + else if (SQL_ISRULEOR2(i_pJoinCondition,search_condition,boolean_term) && // AND/OR-Verknuepfung: + i_pJoinCondition->count() == 3) + { + // nur AND Verknpfung zulassen + if ( SQL_ISTOKEN(i_pJoinCondition->getChild(1),AND) ) + { + impl_fillJoinConditions(i_pJoinCondition->getChild(0)); + impl_fillJoinConditions(i_pJoinCondition->getChild(1)); + } + } + else if (SQL_ISRULE(i_pJoinCondition,comparison_predicate)) + { + // only the comparison of columns is allowed + OSL_ENSURE(i_pJoinCondition->count() == 3,"OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree"); + if (SQL_ISRULE(i_pJoinCondition->getChild(0),column_ref) && + SQL_ISRULE(i_pJoinCondition->getChild(2),column_ref) && + i_pJoinCondition->getChild(1)->getNodeType() == SQL_NODE_EQUAL) + { + m_pImpl->m_aJoinConditions.push_back( TNodePair(i_pJoinCondition->getChild(0),i_pJoinCondition->getChild(2)) ); + } + } +} +//----------------------------------------------------------------------------- +::std::vector< TNodePair >& OSQLParseTreeIterator::getJoinConditions() const +{ + return m_pImpl->m_aJoinConditions; +} //----------------------------------------------------------------------------- void OSQLParseTreeIterator::getQualified_join( OSQLTables& _rTables, const OSQLParseNode *pTableRef, ::rtl::OUString& aTableRange ) { @@ -491,8 +531,30 @@ void OSQLParseTreeIterator::getQualified_join( OSQLTables& _rTables, const OSQLP traverseOneTableName( _rTables, pNode, aTableRange ); sal_uInt32 nPos = 4; - if(SQL_ISRULE(pTableRef,cross_union) || pTableRef->getChild(1)->getTokenID() != SQL_TOKEN_NATURAL) + if( SQL_ISRULE(pTableRef,cross_union) || pTableRef->getChild(1)->getTokenID() != SQL_TOKEN_NATURAL) + { nPos = 3; + // join_condition,named_columns_join + if ( SQL_ISRULE( pTableRef, qualified_join ) ) + { + const OSQLParseNode* pJoin_spec = pTableRef->getChild(4); + if ( SQL_ISRULE( pJoin_spec, join_condition ) ) + { + impl_fillJoinConditions(pJoin_spec->getChild(1)); + } + else + { + const OSQLParseNode* pColumnCommalist = pJoin_spec->getChild(2); + // Alle Columns in der column_commalist ... + for (sal_uInt32 i = 0; i < pColumnCommalist->count(); i++) + { + const OSQLParseNode * pCol = pColumnCommalist->getChild(i); + // add twice because the column must exists in both tables + m_pImpl->m_aJoinConditions.push_back( TNodePair(pCol,pCol) ); + } + } + } + } pNode = getTableNode(_rTables,pTableRef->getChild(nPos),aTableRange); if ( isTableNode( pNode ) ) @@ -826,17 +888,17 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo aColumnName = pColumnRef->getChild(0)->getTokenValue(); OSQLParseNode *pDatatype = pColumnRef->getChild(1); - if (pDatatype && SQL_ISRULE(pDatatype,data_type)) + if (pDatatype && SQL_ISRULE(pDatatype,character_string_type)) { - //data type - // 0 | 1| 2 |3 - //char ( 20 ) - aTypeName = pDatatype->getChild(0)->getTokenValue(); - if (pDatatype->count() == 4 - && SQL_ISPUNCTUATION(pDatatype->getChild(1), "(") - && SQL_ISPUNCTUATION(pDatatype->getChild(3) , ")") ) + const OSQLParseNode *pType = pDatatype->getChild(0); + aTypeName = pType->getTokenValue(); + if (pDatatype->count() == 2 && (pType->getTokenID() == SQL_TOKEN_CHAR || pType->getTokenID() == SQL_TOKEN_CHARACTER )) + nType = DataType::CHAR; + + const OSQLParseNode *pParams = pDatatype->getChild(pDatatype->count()-1); + if ( pParams->count() ) { - nLen = pDatatype->getChild(2)->getTokenValue().toInt32(); + nLen = pParams->getChild(1)->getTokenValue().toInt32(); } } else if(pDatatype && pDatatype->getNodeType() == SQL_NODE_KEYWORD) @@ -846,8 +908,8 @@ void OSQLParseTreeIterator::traverseCreateColumns(const OSQLParseNode* pSelectNo if (aTypeName.getLength()) { - //TO DO:Create a new class for create statement to handle field length - OParseColumn* pColumn = new OParseColumn(aColumnName,aTypeName,::rtl::OUString(), + //TODO:Create a new class for create statement to handle field length + OParseColumn* pColumn = new OParseColumn(aColumnName,aTypeName,::rtl::OUString(),::rtl::OUString(), ColumnValue::NULLABLE_UNKNOWN,0,0,nType,sal_False,sal_False,isCaseSensitive()); pColumn->setFunction(sal_False); pColumn->setRealName(aColumnName); @@ -1115,17 +1177,17 @@ void OSQLParseTreeIterator::traverseParameters(const OSQLParseNode* _pNode) else pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False ); } // if ( SQL_ISRULE(pParent,comparison_predicate) ) // x = X - else if ( SQL_ISRULE(pParent,like_predicate) ) + else if ( SQL_ISRULE(pParent,other_like_predicate_part_2) ) { - const OSQLParseNode* pOther = pParent->getChild(0); + const OSQLParseNode* pOther = pParent->getParent()->getChild(0); if ( SQL_ISRULE( pOther, column_ref ) ) getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias); else pOther->parseNodeToStr( sColumnName, m_pImpl->m_xConnection, NULL, sal_False, sal_False ); } - else if ( SQL_ISRULE(pParent,between_predicate) ) + else if ( SQL_ISRULE(pParent,between_predicate_part_2) ) { - const OSQLParseNode* pOther = pParent->getChild(0); + const OSQLParseNode* pOther = pParent->getParent()->getChild(0); if ( SQL_ISRULE( pOther, column_ref ) ) getColumnRange( pOther, sColumnName, sTableRange, aColumnAlias); else @@ -1304,17 +1366,19 @@ void OSQLParseTreeIterator::traverseANDCriteria(OSQLParseNode * pSearchCondition ::rtl::OUString aValue; pSearchCondition->getChild(2)->parseNodeToStr( aValue, m_pImpl->m_xConnection, NULL, sal_False, sal_False ); traverseOnePredicate(pSearchCondition->getChild(0),aValue,pSearchCondition->getChild(2)); + impl_fillJoinConditions(pSearchCondition); // if (! aIteratorStatus.IsSuccessful()) // return; } else if (SQL_ISRULE(pSearchCondition,like_predicate) /*&& SQL_ISRULE(pSearchCondition->getChild(0),column_ref)*/) { - OSL_ENSURE(pSearchCondition->count() >= 4,"OSQLParseTreeIterator: error in parse tree!"); + OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!"); + const OSQLParseNode* pPart2 = pSearchCondition->getChild(1); - sal_Int32 nCurentPos = pSearchCondition->count()-2; + sal_Int32 nCurentPos = pPart2->count()-2; - OSQLParseNode * pNum_value_exp = pSearchCondition->getChild(nCurentPos); - OSQLParseNode * pOptEscape = pSearchCondition->getChild(nCurentPos+1); + OSQLParseNode * pNum_value_exp = pPart2->getChild(nCurentPos); + OSQLParseNode * pOptEscape = pPart2->getChild(nCurentPos+1); OSL_ENSURE(pNum_value_exp != NULL,"OSQLParseTreeIterator: error in parse tree!"); OSL_ENSURE(pOptEscape != NULL,"OSQLParseTreeIterator: error in parse tree!"); @@ -1344,12 +1408,13 @@ void OSQLParseTreeIterator::traverseANDCriteria(OSQLParseNode * pSearchCondition } else if (SQL_ISRULE(pSearchCondition,in_predicate)) { - OSL_ENSURE(pSearchCondition->count() == 4,"OSQLParseTreeIterator: error in parse tree!"); + OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!"); + const OSQLParseNode* pPart2 = pSearchCondition->getChild(1); traverseORCriteria(pSearchCondition->getChild(0)); // if (! aIteratorStatus.IsSuccessful()) return; - OSQLParseNode* pChild = pSearchCondition->getChild(3); + OSQLParseNode* pChild = pPart2->getChild(2); if ( SQL_ISRULE(pChild->getChild(0),subquery) ) { traverseTableNames( *m_pImpl->m_pSubTables ); @@ -1367,8 +1432,10 @@ void OSQLParseTreeIterator::traverseANDCriteria(OSQLParseNode * pSearchCondition } else if (SQL_ISRULE(pSearchCondition,test_for_null) /*&& SQL_ISRULE(pSearchCondition->getChild(0),column_ref)*/) { - OSL_ENSURE(pSearchCondition->count() >= 3,"OSQLParseTreeIterator: error in parse tree!"); - OSL_ENSURE(SQL_ISTOKEN(pSearchCondition->getChild(1),IS),"OSQLParseTreeIterator: error in parse tree!"); + OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: error in parse tree!"); + const OSQLParseNode* pPart2 = pSearchCondition->getChild(1); + (void)pPart2; + OSL_ENSURE(SQL_ISTOKEN(pPart2->getChild(0),IS),"OSQLParseTreeIterator: error in parse tree!"); ::rtl::OUString aString; traverseOnePredicate(pSearchCondition->getChild(0),aString,NULL); @@ -1427,11 +1494,19 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode {// found a function as column_ref ::rtl::OUString sFunctionName; _pColumnRef->getChild(0)->parseNodeToStr( sFunctionName, m_pImpl->m_xConnection, NULL, sal_False, sal_False ); - sal_Int32 nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() ); + const sal_uInt32 nCount = _pColumnRef->count(); + sal_uInt32 i = 0; + for(; i < nCount;++i) + { + if ( _pColumnRef->getChild(i) == _pParseNode ) + break; + } + sal_Int32 nType = ::connectivity::OSQLParser::getFunctionParameterType( _pColumnRef->getParent()->getChild(0)->getTokenID(), i+1); OParseColumn* pColumn = new OParseColumn( sParameterName, ::rtl::OUString(), ::rtl::OUString(), + ::rtl::OUString(), ColumnValue::NULLABLE_UNKNOWN, 0, 0, @@ -1495,6 +1570,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode OParseColumn* pColumn = new OParseColumn(aNewColName, ::rtl::OUString(), ::rtl::OUString(), + ::rtl::OUString(), ColumnValue::NULLABLE_UNKNOWN, 0, 0, @@ -1637,6 +1713,7 @@ void OSQLParseTreeIterator::appendColumns(::vos::ORef<OSQLColumns>& _rColumns,co OParseColumn* pColumn = new OParseColumn(aName , getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))) , getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE))) + , getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION))) , getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))) , getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))) , getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))) @@ -1714,6 +1791,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColu // TODO: does this match with _nType? // Or should be fill this from the getTypeInfo of the connection? ::rtl::OUString(), + ::rtl::OUString(), ColumnValue::NULLABLE_UNKNOWN, 0, 0, @@ -1733,7 +1811,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColu { ::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias)); - OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(), + OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(), ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive()); pColumn->setFunction(sal_True); pColumn->setAggregateFunction(bAggFkt); @@ -1754,7 +1832,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColu { ::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias)); - OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(), + OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(), ColumnValue::NULLABLE_UNKNOWN,0,0,_nType,sal_False,sal_False,isCaseSensitive()); pColumn->setFunction(sal_True); pColumn->setAggregateFunction(bAggFkt); @@ -1791,7 +1869,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::vos::ORef<OSQLColumns>& _rColu { ::rtl::OUString aNewColName(getUniqueColumnName(rColumnAlias)); - OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(), + OParseColumn* pColumn = new OParseColumn(aNewColName,::rtl::OUString(),::rtl::OUString(),::rtl::OUString(), ColumnValue::NULLABLE_UNKNOWN,0,0,DataType::VARCHAR,sal_False,sal_False,isCaseSensitive()); pColumn->setFunction(sal_True); pColumn->setAggregateFunction(bAggFkt); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 20b35b21a493..b8bcd5334787 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -677,7 +677,7 @@ void OSQLParseNode::impl_parseTableRangeNodeToString_throw(::rtl::OUStringBuffer void OSQLParseNode::impl_parseLikeNodeToString_throw( ::rtl::OUStringBuffer& rString, const SQLParseNodeParameter& rParam ) const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "parse", "Ocke.Janssen@sun.com", "OSQLParseNode::impl_parseLikeNodeToString_throw" ); - OSL_ENSURE(count() >= 4,"count != 5: Prepare for GPF"); + OSL_ENSURE(count() == 2,"count != 2: Prepare for GPF"); const OSQLParseNode* pEscNode = NULL; const OSQLParseNode* pParaNode = NULL; @@ -714,13 +714,11 @@ void OSQLParseNode::impl_parseLikeNodeToString_throw( ::rtl::OUStringBuffer& rSt if (bAddName) m_aChildren[0]->impl_parseNodeToString_throw( rString, aNewParam ); - m_aChildren[1]->impl_parseNodeToString_throw( rString, aNewParam ); - if(count() == 5) - m_aChildren[2]->impl_parseNodeToString_throw( rString, aNewParam ); - - sal_Int32 nCurentPos = m_aChildren.size()-2; - pParaNode = m_aChildren[nCurentPos]; - pEscNode = m_aChildren[nCurentPos+1]; + const OSQLParseNode* pPart2 = m_aChildren[1]; + pPart2->getChild(0)->impl_parseNodeToString_throw( rString, aNewParam ); + pPart2->getChild(1)->impl_parseNodeToString_throw( rString, aNewParam ); + pParaNode = pPart2->getChild(2); + pEscNode = pPart2->getChild(3); if (pParaNode->isToken()) { @@ -1422,7 +1420,12 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star: { OSQLParseNode::datetime_primary, "datetime_primary" }, { OSQLParseNode::concatenation, "concatenation" }, { OSQLParseNode::char_factor, "char_factor" }, - { OSQLParseNode::bit_value_fct, "bit_value_fct" } + { OSQLParseNode::bit_value_fct, "bit_value_fct" }, + { OSQLParseNode::comparison_predicate_part_2, "comparison_predicate_part_2" }, + { OSQLParseNode::parenthesized_boolean_value_expression, "parenthesized_boolean_value_expression" }, + { OSQLParseNode::character_string_type, "character_string_type" }, + { OSQLParseNode::other_like_predicate_part_2, "other_like_predicate_part_2" }, + { OSQLParseNode::between_predicate_part_2, "between_predicate_part_2" } }; size_t nRuleMapCount = sizeof( aRuleDescriptions ) / sizeof( aRuleDescriptions[0] ); OSL_ENSURE( nRuleMapCount == size_t( OSQLParseNode::rule_count ), "OSQLParser::OSQLParser: added a new rule? Adjust this map!" ); @@ -1984,39 +1987,34 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& pSearchCondition,sal_B else if(bNegate && (SQL_ISRULE(pSearchCondition,test_for_null) || SQL_ISRULE(pSearchCondition,in_predicate) || SQL_ISRULE(pSearchCondition,between_predicate) || SQL_ISRULE(pSearchCondition,boolean_test) )) { + OSQLParseNode* pPart2 = pSearchCondition; + if ( !SQL_ISRULE(pSearchCondition,boolean_test) ) + pPart2 = pSearchCondition->getChild(1); sal_uInt32 nNotPos = 0; - // row_value_constructor not SQL_TOKEN_IN in_predicate_value - // row_value_constructor not SQL_TOKEN_BETWEEN row_value_constructor SQL_TOKEN_AND row_value_constructor - if ( SQL_ISRULE( pSearchCondition, in_predicate ) - || SQL_ISRULE( pSearchCondition, between_predicate ) - ) + if ( SQL_ISRULE( pSearchCondition, test_for_null ) ) nNotPos = 1; - // row_value_constructor SQL_TOKEN_IS not SQL_TOKEN_NULL - // boolean_primary SQL_TOKEN_IS not truth_value - else if ( SQL_ISRULE( pSearchCondition, test_for_null ) - || SQL_ISRULE( pSearchCondition, boolean_test ) - ) + else if ( SQL_ISRULE( pSearchCondition, boolean_test ) ) nNotPos = 2; - OSQLParseNode* pNot = pSearchCondition->getChild(nNotPos); + OSQLParseNode* pNot = pPart2->getChild(nNotPos); OSQLParseNode* pNotNot = NULL; if(pNot->isRule()) pNotNot = new OSQLParseNode(::rtl::OUString::createFromAscii("NOT"),SQL_NODE_KEYWORD,SQL_TOKEN_NOT); else pNotNot = new OSQLParseNode(::rtl::OUString(),SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::sql_not)); - pSearchCondition->replace(pNot, pNotNot); + pPart2->replace(pNot, pNotNot); delete pNot; } else if(bNegate && (SQL_ISRULE(pSearchCondition,like_predicate))) { - OSQLParseNode* pCheckForNOT = pSearchCondition->getChild( 1 ); - if ( SQL_ISTOKEN(pCheckForNOT,NOT) ) - delete pSearchCondition->removeAt( 1 ); + OSQLParseNode* pNot = pSearchCondition->getChild( 1 )->getChild( 0 ); + OSQLParseNode* pNotNot = NULL; + if(pNot->isRule()) + pNotNot = new OSQLParseNode(::rtl::OUString::createFromAscii("NOT"),SQL_NODE_KEYWORD,SQL_TOKEN_NOT); else - { - OSQLParseNode* pNot = new OSQLParseNode( ::rtl::OUString::createFromAscii( "NOT" ), SQL_NODE_KEYWORD, SQL_TOKEN_NOT ); - pSearchCondition->insert( 1, pNot ); - } + pNotNot = new OSQLParseNode(::rtl::OUString(),SQL_NODE_RULE,OSQLParser::RuleID(OSQLParseNode::sql_not)); + pSearchCondition->getChild( 1 )->replace(pNot, pNotNot); + delete pNot; } } //----------------------------------------------------------------------------- @@ -2554,7 +2552,6 @@ sal_Int32 OSQLParser::getFunctionReturnType(const ::rtl::OUString& _sFunctionNam else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_BIT_LENGTH,pContext))) nType = DataType::INTEGER; else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_CHAR,pContext))) nType = DataType::VARCHAR; else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_CHAR_LENGTH,pContext))) nType = DataType::INTEGER; - else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_CHARACTER_LENGTH,pContext))) nType = DataType::INTEGER; else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_CONCAT,pContext))) nType = DataType::VARCHAR; else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_DIFFERENCE,pContext))) nType = DataType::VARCHAR; else if(sFunctionName.equalsIgnoreAsciiCase(TokenIDToStr(SQL_TOKEN_INSERT,pContext))) nType = DataType::VARCHAR; diff --git a/connectivity/source/sdbcx/VColumn.cxx b/connectivity/source/sdbcx/VColumn.cxx index e4535c713ec7..65bc1b368b1e 100644 --- a/connectivity/source/sdbcx/VColumn.cxx +++ b/connectivity/source/sdbcx/VColumn.cxx @@ -89,6 +89,7 @@ OColumn::OColumn(sal_Bool _bCase) OColumn::OColumn( const ::rtl::OUString& _Name, const ::rtl::OUString& _TypeName, const ::rtl::OUString& _DefaultValue, + const ::rtl::OUString& _Description, sal_Int32 _IsNullable, sal_Int32 _Precision, sal_Int32 _Scale, @@ -100,6 +101,7 @@ OColumn::OColumn( const ::rtl::OUString& _Name, :OColumnDescriptor_BASE(m_aMutex) ,ODescriptor(OColumnDescriptor_BASE::rBHelper,_bCase) ,m_TypeName(_TypeName) + ,m_Description(_Description) ,m_DefaultValue(_DefaultValue) ,m_IsNullable(_IsNullable) ,m_Precision(_Precision) @@ -195,6 +197,7 @@ Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor( ) throw(Runti OColumn* pNewColumn = new OColumn( m_Name, m_TypeName, m_DefaultValue, + m_Description, m_IsNullable, m_Precision, m_Scale, @@ -203,7 +206,6 @@ Reference< XPropertySet > SAL_CALL OColumn::createDataDescriptor( ) throw(Runti m_IsRowVersion, m_IsCurrency, isCaseSensitive()); - pNewColumn->m_Description = m_Description; pNewColumn->setNew(sal_True); return pNewColumn; } diff --git a/connectivity/source/sdbcx/VIndexColumn.cxx b/connectivity/source/sdbcx/VIndexColumn.cxx index 31aaaa3d17ab..ca1649b06384 100644 --- a/connectivity/source/sdbcx/VIndexColumn.cxx +++ b/connectivity/source/sdbcx/VIndexColumn.cxx @@ -85,6 +85,7 @@ OIndexColumn::OIndexColumn( sal_Bool _IsAscending, ) : OColumn(_Name, _TypeName, _DefaultValue, + ::rtl::OUString(), _IsNullable, _Precision, _Scale, diff --git a/connectivity/source/sdbcx/VKeyColumn.cxx b/connectivity/source/sdbcx/VKeyColumn.cxx index bbcec5cc0501..97e83f5c633a 100644 --- a/connectivity/source/sdbcx/VKeyColumn.cxx +++ b/connectivity/source/sdbcx/VKeyColumn.cxx @@ -85,6 +85,7 @@ OKeyColumn::OKeyColumn( const ::rtl::OUString& _ReferencedColumn, ) : OColumn(_Name, _TypeName, _DefaultValue, + ::rtl::OUString(), _IsNullable, _Precision, _Scale, diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index 9253b4e82bc7..6f611926a0df 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -1,4 +1,4 @@ -dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg configmgr NULL +dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh NULL dt desktop usr1 - all dt_mkout NULL dt desktop\inc nmake - all dt_inc NULL dt desktop\prj get - all dt_prj NULL diff --git a/desktop/source/app/makefile.mk b/desktop/source/app/makefile.mk index 83bec9011283..d9db7c163481 100644 --- a/desktop/source/app/makefile.mk +++ b/desktop/source/app/makefile.mk @@ -65,7 +65,6 @@ SHL1LIBS = $(SLB)$/mig.lib SHL1STDLIBS = \ $(COMPHELPERLIB) \ - $(CONFIGMGRLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(I18NISOLANGLIB) \ diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 2d0733dfbae3..21ec1ce46ff5 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -30,7 +30,7 @@ #include "dp_gui.hrc" #include "svtools/controldims.hrc" -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" #include "dp_gui.h" #include "dp_gui_dialog2.hxx" diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk index 6a9c7b6bbb38..52092a077a4b 100644 --- a/desktop/source/deployment/gui/makefile.mk +++ b/desktop/source/deployment/gui/makefile.mk @@ -77,6 +77,7 @@ SHL1STDLIBS = \ $(SVTOOLLIB) \ $(SVLLIB) \ $(SVXLIB) \ + $(SVXCORELIB) \ $(SFXLIB) \ $(DEPLOYMENTMISCLIB) \ $(OLE32LIB) diff --git a/desktop/source/deployment/makefile.mk b/desktop/source/deployment/makefile.mk index 7eda0f582e15..173ff35bec1d 100644 --- a/desktop/source/deployment/makefile.mk +++ b/desktop/source/deployment/makefile.mk @@ -80,8 +80,7 @@ SHL1STDLIBS = \ $(SVLLIB) \ $(UNOTOOLSLIB) \ $(DEPLOYMENTMISCLIB) \ - $(HELPLINKERLIB) \ - $(CONFIGMGRLIB) + $(HELPLINKERLIB) SHL1DEPN = SHL1IMPLIB = i$(TARGET) diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 63badbb0c211..9534f166f2f0 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -56,17 +56,13 @@ namespace css = ::com::sun::star; static char const xmlNamespace[] = "http://openoffice.org/extensions/description/2006"; -::dp_misc::Order compareWithVersion(::rtl::OUString const & version) { +bool satisfiesMinimalVersion(::rtl::OUString const & version) { ::rtl::OUString v( RTL_CONSTASCII_USTRINGPARAM( "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":Version:OOOPackageVersion}")); ::rtl::Bootstrap::expandMacros(v); - return ::dp_misc::compareVersions(v, version); -} - -bool satisfiesMinimalVersion(::rtl::OUString const & version) { - return compareWithVersion(version) != ::dp_misc::LESS; + return ::dp_misc::compareVersions(v, version) != ::dp_misc::LESS; } } @@ -102,8 +98,14 @@ check(::dp_misc::DescriptionInfoset const & infoset) { RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-maximal-version"))) { + ::rtl::OUString v( + RTL_CONSTASCII_USTRINGPARAM( + "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") + ":Version:OOOBaseVersion}")); + ::rtl::Bootstrap::expandMacros(v); sat = - compareWithVersion( + ::dp_misc::compareVersions( + v, e->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))) != ::dp_misc::GREATER; diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx index 4a144f3fdf20..ac28b6816708 100644 --- a/desktop/source/deployment/misc/dp_platform.cxx +++ b/desktop/source/deployment/misc/dp_platform.cxx @@ -39,6 +39,8 @@ #define PLATFORM_WIN_X86 "windows_x86" #define PLATFORM_LINUX_X86 "linux_x86" #define PLATFORM_LINUX_X86_64 "linux_x86_64" +#define PLATFORM_KFREEBSD_X86 "kfreebsd_x86" +#define PLATFORM_KFREEBSD_X86_64 "kfreebsd_x86_64" #define PLATFORM_LINUX_SPARC "linux_sparc" #define PLATFORM_LINUX_POWERPC "linux_powerpc" #define PLATFORM_LINUX_POWERPC64 "linux_powerpc64" @@ -129,6 +131,10 @@ namespace ret = checkOSandCPU(OUSTR("Linux"), OUSTR("x86")); else if (token.equals(OUSTR(PLATFORM_LINUX_X86_64))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("X86_64")); + else if (token.equals(OUSTR(PLATFORM_KFREEBSD_X86))) + ret = checkOSandCPU(OUSTR("kFreeBSD"), OUSTR("x86")); + else if (token.equals(OUSTR(PLATFORM_KFREEBSD_X86_64))) + ret = checkOSandCPU(OUSTR("kFreeBSD"), OUSTR("X86_64")); else if (token.equals(OUSTR(PLATFORM_LINUX_SPARC))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("SPARC")); else if (token.equals(OUSTR(PLATFORM_LINUX_POWERPC))) diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 460ba5e9fed0..6cf6d4ff7818 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -45,9 +45,9 @@ #include "ucbhelper/content.hxx" #include "comphelper/anytostring.hxx" #include "comphelper/servicedecl.hxx" -#include "configmgr/update.hxx" #include "xmlscript/xml_helper.hxx" #include "svl/inettype.hxx" +#include "com/sun/star/configuration/Update.hpp" #include "com/sun/star/ucb/NameClash.hpp" #include "com/sun/star/io/XActiveDataSink.hpp" #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" @@ -645,14 +645,16 @@ void BackendImpl::PackageImpl::processPackage_( { if (m_isSchema) { - configmgr::update::insertExtensionXcsFile( - that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); + com::sun::star::configuration::Update::get( + that->m_xComponentContext)->insertExtensionXcsFile( + that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); } else { url = replaceOrigin(url, xCmdEnv); - configmgr::update::insertExtensionXcuFile( - that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); + com::sun::star::configuration::Update::get( + that->m_xComponentContext)->insertExtensionXcuFile( + that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); } that->addToConfigmgrIni( m_isSchema, url, xCmdEnv ); diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index cefc3cebf0fd..314537836921 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -29,6 +29,7 @@ #include "precompiled_desktop.hxx" #include <map> +#include <new> #include <set> #include "migration.hxx" @@ -38,7 +39,6 @@ #include <unotools/textsearch.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> -#include <configmgr/update.hxx> #include <unotools/bootstrap.hxx> #include <rtl/bootstrap.hxx> #include <rtl/uri.hxx> @@ -51,6 +51,7 @@ #include <osl/security.hxx> #include <unotools/configmgr.hxx> +#include <com/sun/star/configuration/Update.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/task/XJob.hpp> #include <com/sun/star/beans/NamedValue.hpp> @@ -58,6 +59,11 @@ #include <com/sun/star/util/XRefreshable.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XStringSubstitution.hpp> +#include <com/sun/star/embed/ElementModes.hpp> +#include <com/sun/star/embed/XStorage.hpp> +#include <com/sun/star/ui/XUIConfiguration.hpp> +#include <com/sun/star/ui/XUIConfigurationStorage.hpp> +#include <com/sun/star/ui/XUIConfigurationPersistence.hpp> using namespace rtl; using namespace osl; @@ -72,6 +78,120 @@ using namespace com::sun::star; namespace desktop { +static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL = ::rtl::OUString::createFromAscii("CommandURL"); +static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER = ::rtl::OUString::createFromAscii("ItemDescriptorContainer"); +static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL = ::rtl::OUString::createFromAscii("Label"); + +static const ::rtl::OUString MENU_SEPERATOR = ::rtl::OUString::createFromAscii(" | "); +static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("..."); + +::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier) +{ + ::rtl::OUString sLabel; + + uno::Reference< container::XNameAccess > xUICommands; + uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY ); + if ( xNameAccess.is() ) + { + uno::Any a = xNameAccess->getByName( sModuleIdentifier ); + a >>= xUICommands; + } + if (xUICommands.is()) + { + if ( sCommand.getLength() > 0 ) + { + rtl::OUString aStr; + ::uno::Sequence< beans::PropertyValue > aPropSeq; + try + { + uno::Any a( xUICommands->getByName( sCommand )); + if ( a >>= aPropSeq ) + { + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if ( aPropSeq[i].Name.equalsAscii( "Label" )) + { + aPropSeq[i].Value >>= aStr; + break; + } + } + } + + sLabel = aStr; + } + + catch(container::NoSuchElementException&) + { + sLabel = sCommand; + sal_Int32 nIndex = sLabel.indexOf(':'); + if (nIndex>=0 && nIndex <= sLabel.getLength()-1) + sLabel = sLabel.copy(nIndex+1); + } + + } + } + + return sLabel; +} + +::rtl::OUString stripHotKey( const ::rtl::OUString& str ) +{ + sal_Int32 index = str.indexOf( '~' ); + if ( index == -1 ) + { + return str; + } + else + { + return str.replaceAt( index, 1, ::rtl::OUString() ); + } +} + +::rtl::OUString mapModuleShortNameToIdentifier(const ::rtl::OUString& sShortName) +{ + ::rtl::OUString sIdentifier; + + if (sShortName.equals(::rtl::OUString::createFromAscii("StartModule"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.StartModule"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("swriter"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("scalc"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sdraw"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.drawing.DrawingDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("simpress"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.presentation.PresentationDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("smath"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.formula.FormulaProperties"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("schart"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("BasicIDE"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("dbapp"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sdb.OfficeDatabaseDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sglobal"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.GlobalDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sweb"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("swxform"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.xforms.XMLFormDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sbibliography"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.Bibliography"); + + return sIdentifier; +} static MigrationImpl *pImpl = 0; static Mutex aMutex; @@ -159,9 +279,72 @@ sal_Bool MigrationImpl::doMigration() m_vrFileList = compileFileList(); sal_Bool result = sal_False; - try{ + try + { + NewVersionUIInfo aNewVersionUIInfo; + ::std::vector< MigrationModuleInfo > vModulesInfo = dectectUIChangesForAllModules(); + aNewVersionUIInfo.init(vModulesInfo); + copyFiles(); + const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar"); + const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/"); + for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i) + { + ::rtl::OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName); + if (sModuleIdentifier.getLength()==0) + continue; + + uno::Sequence< uno::Any > lArgs(2); + ::rtl::OUString aOldCfgDataPath = m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules/"); + lArgs[0] <<= aOldCfgDataPath + vModulesInfo[i].sModuleShortName; + lArgs[1] <<= embed::ElementModes::READ; + + uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY); + uno::Reference< embed::XStorage > xModules; + + xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); + uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager")), uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationStorage > xOldCfgStorage( xOldCfgManager, uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationPersistence > xOldCfgPersistence( xOldCfgManager, uno::UNO_QUERY ); + + if ( xOldCfgStorage.is() && xOldCfgPersistence.is() && xModules.is() ) + { + xOldCfgStorage->setStorage( xModules ); + xOldCfgPersistence->reload(); + } + + uno::Reference< ui::XUIConfigurationManager > xCfgManager = aNewVersionUIInfo.getConfigManager(vModulesInfo[i].sModuleShortName); + + if (vModulesInfo[i].bHasMenubar) + { + uno::Reference< container::XIndexContainer > xOldVersionMenuSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sMenubarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(vModulesInfo[i].sModuleShortName); + ::rtl::OUString sParent; + compareOldAndNewConfig(sParent, xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL); + mergeOldToNewVersion(xCfgManager, xNewVersionMenuSettings, sModuleIdentifier, sMenubarResourceURL); + } + + sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size(); + if (nToolbars >0) + { + for (sal_Int32 j=0; j<nToolbars; ++j) + { + ::rtl::OUString sToolbarName = vModulesInfo[i].m_vToolbars[j]; + ::rtl::OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName; + + uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(vModulesInfo[i].sModuleShortName, sToolbarName); + ::rtl::OUString sParent; + compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL); + mergeOldToNewVersion(xCfgManager, xNewVersionToolbarSettings, sModuleIdentifier, sToolbarResourceURL); + } + } + + m_aOldVersionItemsHashMap.clear(); + m_aNewVersionItemsHashMap.clear(); + } + // execute the migration items from Setup.xcu copyConfig(); @@ -290,10 +473,14 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio tmpStep.name = seqMigrations[i]; // read included files from current step description + ::rtl::OUString aSeqEntry; if (tmpAccess->getByName(OUString::createFromAscii("IncludedFiles")) >>= tmpSeq) { for (sal_Int32 j=0; j<tmpSeq.getLength(); j++) - tmpStep.includeFiles.push_back(tmpSeq[j]); + { + aSeqEntry = tmpSeq[j]; + tmpStep.includeFiles.push_back(aSeqEntry); + } } // exluded files... @@ -328,7 +515,10 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio if (tmpAccess->getByName(OUString::createFromAscii("ExcludedExtensions")) >>= tmpSeq) { for (sal_Int32 j=0; j<tmpSeq.getLength(); j++) - tmpStep.excludeExtensions.push_back(tmpSeq[j]); + { + aSeqEntry = tmpSeq[j]; + tmpStep.excludeExtensions.push_back(aSeqEntry); + } } // generic service @@ -540,6 +730,21 @@ bool getComponent(rtl::OUString const & path, rtl::OUString * component) { return true; } +uno::Sequence< rtl::OUString > setToSeq(std::set< rtl::OUString > const & set) { + std::set< rtl::OUString >::size_type n = set.size(); + if (n > SAL_MAX_INT32) { + throw std::bad_alloc(); + } + uno::Sequence< rtl::OUString > seq(static_cast< sal_Int32 >(n)); + sal_Int32 i = 0; + for (std::set< rtl::OUString >::const_iterator j(set.begin()); + j != set.end(); ++j) + { + seq[i++] = *j; + } + return seq; +} + } void MigrationImpl::copyConfig() { @@ -587,9 +792,11 @@ void MigrationImpl::copyConfig() { buf.append(enc); } while (n >= 0); buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(".xcu")); - configmgr::update::insertModificationXcuFile( - buf.makeStringAndClear(), i->second.includedPaths, - i->second.excludedPaths); + configuration::Update::get( + comphelper::getProcessComponentContext())-> + insertModificationXcuFile( + buf.makeStringAndClear(), setToSeq(i->second.includedPaths), + setToSeq(i->second.excludedPaths)); } else { OSL_TRACE( ("configuration migration component %s ignored (only excludes," @@ -763,4 +970,396 @@ void MigrationImpl::runServices() } } +::std::vector< MigrationModuleInfo > MigrationImpl::dectectUIChangesForAllModules() const +{ + ::std::vector< MigrationModuleInfo > vModulesInfo; + const ::rtl::OUString MENUBAR = ::rtl::OUString::createFromAscii("menubar"); + const ::rtl::OUString TOOLBAR = ::rtl::OUString::createFromAscii("toolbar"); + + uno::Sequence< uno::Any > lArgs(2); + lArgs[0] <<= m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules"); + lArgs[1] <<= embed::ElementModes::READ; + + uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY); + uno::Reference< embed::XStorage > xModules; + + xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); + if (!xModules.is()) + return vModulesInfo; + + uno::Reference< container::XNameAccess > xAccess = uno::Reference< container::XNameAccess >(xModules, uno::UNO_QUERY); + uno::Sequence< ::rtl::OUString > lNames = xAccess->getElementNames(); + sal_Int32 nLength = lNames.getLength(); + for (sal_Int32 i=0; i<nLength; ++i) + { + ::rtl::OUString sModuleShortName = lNames[i]; + uno::Reference< embed::XStorage > xModule = xModules->openStorageElement(sModuleShortName, embed::ElementModes::READ); + if (xModule.is()) + { + MigrationModuleInfo aModuleInfo; + + uno::Reference< embed::XStorage > xMenubar = xModule->openStorageElement(MENUBAR, embed::ElementModes::READ); + if (xMenubar.is()) + { + uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xMenubar, uno::UNO_QUERY); + if (xNameAccess->getElementNames().getLength() > 0) + { + aModuleInfo.sModuleShortName = sModuleShortName; + aModuleInfo.bHasMenubar = sal_True; + } + } + + uno::Reference< embed::XStorage > xToolbar = xModule->openStorageElement(TOOLBAR, embed::ElementModes::READ); + if (xToolbar.is()) + { + const ::rtl::OUString RESOURCEURL_CUSTOM_ELEMENT = ::rtl::OUString::createFromAscii("custom_"); + sal_Int32 nCustomLen = 7; + + uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xToolbar, uno::UNO_QUERY); + ::uno::Sequence< ::rtl::OUString > lToolbars = xNameAccess->getElementNames(); + for (sal_Int32 j=0; j<lToolbars.getLength(); ++j) + { + ::rtl::OUString sToolbarName = lToolbars[j]; + if (sToolbarName.getLength()>=nCustomLen && + sToolbarName.copy(0, nCustomLen).equals(RESOURCEURL_CUSTOM_ELEMENT)) + continue; + + aModuleInfo.sModuleShortName = sModuleShortName; + sal_Int32 nIndex = sToolbarName.lastIndexOf('.'); + if (nIndex > 0) + { + ::rtl::OUString sExtension(sToolbarName.copy(nIndex)); + ::rtl::OUString sToolbarResourceName(sToolbarName.copy(0, nIndex)); + if (sToolbarResourceName.getLength()>0 && sExtension.equalsAsciiL(".xml", 4)) + aModuleInfo.m_vToolbars.push_back(sToolbarResourceName); + } + } + } + + if (aModuleInfo.sModuleShortName.getLength()>0) + vModulesInfo.push_back(aModuleInfo); + } + } + + return vModulesInfo; +} + +void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent, + const uno::Reference< container::XIndexContainer >& xIndexOld, + const uno::Reference< container::XIndexContainer >& xIndexNew, + const ::rtl::OUString& sResourceURL) +{ + ::std::vector< MigrationItem > vOldItems; + ::std::vector< MigrationItem > vNewItems; + uno::Sequence< beans::PropertyValue > aProp; + sal_Int32 nOldCount = xIndexOld->getCount(); + sal_Int32 nNewCount = xIndexNew->getCount(); + + for (int n=0; n<nOldCount; ++n) + { + MigrationItem aMigrationItem; + if (xIndexOld->getByIndex(n) >>= aProp) + { + for(int i=0; i<aProp.getLength(); ++i) + { + if (aProp[i].Name.equals(ITEM_DESCRIPTOR_COMMANDURL)) + aProp[i].Value >>= aMigrationItem.m_sCommandURL; + else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER)) + aProp[i].Value >>= aMigrationItem.m_xPopupMenu; + } + + if (aMigrationItem.m_sCommandURL.getLength()) + vOldItems.push_back(aMigrationItem); + } + } + + for (int n=0; n<nNewCount; ++n) + { + MigrationItem aMigrationItem; + if (xIndexNew->getByIndex(n) >>= aProp) + { + for(int i=0; i<aProp.getLength(); ++i) + { + if (aProp[i].Name.equals(ITEM_DESCRIPTOR_COMMANDURL)) + aProp[i].Value >>= aMigrationItem.m_sCommandURL; + else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER)) + aProp[i].Value >>= aMigrationItem.m_xPopupMenu; + } + + if (aMigrationItem.m_sCommandURL.getLength()) + vNewItems.push_back(aMigrationItem); + } + } + + ::std::vector< MigrationItem >::iterator it; + + ::rtl::OUString sSibling; + for (it = vOldItems.begin(); it!=vOldItems.end(); ++it) + { + ::std::vector< MigrationItem >::iterator pFound = ::std::find(vNewItems.begin(), vNewItems.end(), *it); + if (pFound != vNewItems.end() && it->m_xPopupMenu.is()) + { + ::rtl::OUString sName; + if (sParent.getLength()>0) + sName = sParent + MENU_SEPERATOR + it->m_sCommandURL; + else + sName = it->m_sCommandURL; + compareOldAndNewConfig(sName, it->m_xPopupMenu, pFound->m_xPopupMenu, sResourceURL); + } + else if (pFound == vNewItems.end()) + { + MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu); + if (m_aOldVersionItemsHashMap.find(sResourceURL)==m_aOldVersionItemsHashMap.end()) + { + ::std::vector< MigrationItem > vMigrationItems; + m_aOldVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems)); + m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + else + { + if (::std::find(m_aOldVersionItemsHashMap[sResourceURL].begin(), m_aOldVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aOldVersionItemsHashMap[sResourceURL].end()) + m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + } + + sSibling = it->m_sCommandURL; + } + + ::rtl::OUString sNewSibling; + uno::Reference< container::XIndexContainer > xPopup; + for (it = vNewItems.begin(); it!=vNewItems.end(); ++it) + { + ::std::vector< MigrationItem >::iterator pFound = ::std::find(vOldItems.begin(), vOldItems.end(), *it); + if (pFound != vOldItems.end() && it->m_xPopupMenu.is()) + { + ::rtl::OUString sName; + if (sParent.getLength()>0) + sName = sParent + MENU_SEPERATOR + it->m_sCommandURL; + else + sName = it->m_sCommandURL; + compareOldAndNewConfig(sName, pFound->m_xPopupMenu, it->m_xPopupMenu, sResourceURL); + } + else if (::std::find(vOldItems.begin(), vOldItems.end(), *it) == vOldItems.end()) + { + MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu); + if (m_aNewVersionItemsHashMap.find(sResourceURL)==m_aNewVersionItemsHashMap.end()) + { + ::std::vector< MigrationItem > vMigrationItems; + m_aNewVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems)); + m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + else + { + if (::std::find(m_aNewVersionItemsHashMap[sResourceURL].begin(), m_aNewVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aNewVersionItemsHashMap[sResourceURL].end()) + m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + } + } +} + +void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurationManager >& xCfgManager, + const uno::Reference< container::XIndexContainer>& xIndexContainer, + const ::rtl::OUString& sModuleIdentifier, + const ::rtl::OUString& sResourceURL) +{ + MigrationHashMap::iterator pFound = m_aOldVersionItemsHashMap.find(sResourceURL); + if (pFound==m_aOldVersionItemsHashMap.end()) + return; + + ::std::vector< MigrationItem >::iterator it; + for (it=pFound->second.begin(); it!=pFound->second.end(); ++it) + { + uno::Reference< container::XIndexContainer > xTemp = xIndexContainer; + + ::rtl::OUString sParentNodeName = it->m_sParentNodeName; + sal_Int32 nIndex = 0; + do + { + ::rtl::OUString sToken = sParentNodeName.getToken(0, '|', nIndex).trim(); + if (sToken.getLength()<=0) + break; + + sal_Int32 nCount = xTemp->getCount(); + for (sal_Int32 i=0; i<nCount; ++i) + { + ::rtl::OUString sCommandURL; + ::rtl::OUString sLabel; + uno::Reference< container::XIndexContainer > xChild; + + uno::Sequence< beans::PropertyValue > aPropSeq; + xTemp->getByIndex(i) >>= aPropSeq; + for (sal_Int32 j=0; j<aPropSeq.getLength(); ++j) + { + ::rtl::OUString sPropName = aPropSeq[j].Name; + if (sPropName.equals(ITEM_DESCRIPTOR_COMMANDURL)) + aPropSeq[j].Value >>= sCommandURL; + else if (sPropName.equals(ITEM_DESCRIPTOR_LABEL)) + aPropSeq[j].Value >>= sLabel; + else if (sPropName.equals(ITEM_DESCRIPTOR_CONTAINER)) + aPropSeq[j].Value >>= xChild; + } + + if (sCommandURL == sToken) + { + xTemp = xChild; + break; + } + } + + } while (nIndex>=0); + + if (nIndex == -1) + { + uno::Sequence< beans::PropertyValue > aPropSeq(3); + + aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL; + aPropSeq[0].Value <<= it->m_sCommandURL; + aPropSeq[1].Name = ITEM_DESCRIPTOR_LABEL; + aPropSeq[1].Value <<= retrieveLabelFromCommand(it->m_sCommandURL, sModuleIdentifier); + aPropSeq[2].Name = ITEM_DESCRIPTOR_CONTAINER; + aPropSeq[2].Value <<= it->m_xPopupMenu; + + if (it->m_sPrevSibling.getLength() == 0) + xTemp->insertByIndex(0, uno::makeAny(aPropSeq)); + else if (it->m_sPrevSibling.getLength() > 0) + { + sal_Int32 nCount = xTemp->getCount(); + sal_Int32 i = 0; + for (; i<nCount; ++i) + { + ::rtl::OUString sCmd; + uno::Sequence< beans::PropertyValue > aTempPropSeq; + xTemp->getByIndex(i) >>= aTempPropSeq; + for (sal_Int32 j=0; j<aTempPropSeq.getLength(); ++j) + { + if (aTempPropSeq[j].Name.equals(ITEM_DESCRIPTOR_COMMANDURL)) + { + aTempPropSeq[j].Value >>= sCmd; + break; + } + } + + if (sCmd.equals(it->m_sPrevSibling)) + break; + } + + xTemp->insertByIndex(i+1, uno::makeAny(aPropSeq)); + } + } + } + + uno::Reference< container::XIndexAccess > xIndexAccess(xIndexContainer, uno::UNO_QUERY); + if (xIndexAccess.is()) + xCfgManager->replaceSettings(sResourceURL, xIndexAccess); + + uno::Reference< ui::XUIConfigurationPersistence > xUIConfigurationPersistence(xCfgManager, uno::UNO_QUERY); + if (xUIConfigurationPersistence.is()) + xUIConfigurationPersistence->store(); +} + +uno::Reference< ui::XUIConfigurationManager > NewVersionUIInfo::getConfigManager(const ::rtl::OUString& sModuleShortName) const +{ + uno::Reference< ui::XUIConfigurationManager > xCfgManager; + + for (sal_Int32 i=0; i<m_lCfgManagerSeq.getLength(); ++i) + { + if (m_lCfgManagerSeq[i].Name.equals(sModuleShortName)) + { + m_lCfgManagerSeq[i].Value >>= xCfgManager; + break; + } + } + + return xCfgManager; +} + +uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const +{ + uno::Reference< container::XIndexContainer > xNewMenuSettings; + + for (sal_Int32 i=0; i<m_lNewVersionMenubarSettingsSeq.getLength(); ++i) + { + if (m_lNewVersionMenubarSettingsSeq[i].Name.equals(sModuleShortName)) + { + m_lNewVersionMenubarSettingsSeq[i].Value >>= xNewMenuSettings; + break; + } + } + + return xNewMenuSettings; +} + +uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const +{ + uno::Reference< container::XIndexContainer > xNewToolbarSettings; + + for (sal_Int32 i=0; i<m_lNewVersionToolbarSettingsSeq.getLength(); ++i) + { + if (m_lNewVersionToolbarSettingsSeq[i].Name.equals(sModuleShortName)) + { + uno::Sequence< beans::PropertyValue > lToolbarSettingsSeq; + m_lNewVersionToolbarSettingsSeq[i].Value >>= lToolbarSettingsSeq; + for (sal_Int32 j=0; j<lToolbarSettingsSeq.getLength(); ++j) + { + if (lToolbarSettingsSeq[j].Name.equals(sToolbarName)) + { + lToolbarSettingsSeq[j].Value >>= xNewToolbarSettings; + break; + } + } + + break; + } + } + + return xNewToolbarSettings; +} + +void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModulesInfo) +{ + m_lCfgManagerSeq.realloc(vModulesInfo.size()); + m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size()); + m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size()); + + const ::rtl::OUString sModuleCfgSupplier = ::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"); + const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar"); + const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/"); + + uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = uno::Reference< ui::XModuleUIConfigurationManagerSupplier >(::comphelper::getProcessServiceFactory()->createInstance(sModuleCfgSupplier), uno::UNO_QUERY); + + for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i) + { + ::rtl::OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName); + if (sModuleIdentifier.getLength() > 0) + { + uno::Reference< ui::XUIConfigurationManager > xCfgManager = xModuleCfgSupplier->getUIConfigurationManager(sModuleIdentifier); + m_lCfgManagerSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lCfgManagerSeq[i].Value <<= xCfgManager; + + if (vModulesInfo[i].bHasMenubar) + { + m_lNewVersionMenubarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lNewVersionMenubarSettingsSeq[i].Value <<= xCfgManager->getSettings(sMenubarResourceURL, sal_True); + } + + sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size(); + if (nToolbars > 0) + { + uno::Sequence< beans::PropertyValue > lPropSeq(nToolbars); + for (sal_Int32 j=0; j<nToolbars; ++j) + { + ::rtl::OUString sToolbarName = vModulesInfo[i].m_vToolbars[j]; + ::rtl::OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName; + + lPropSeq[j].Name = sToolbarName; + lPropSeq[j].Value <<= xCfgManager->getSettings(sToolbarResourceURL, sal_True); + } + + m_lNewVersionToolbarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lNewVersionToolbarSettingsSeq[i].Value <<= lPropSeq; + } + } + } +} + } // namespace desktop diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index 8cad1cce4b16..f73e44fea523 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -30,6 +30,7 @@ #include <vector> #include <algorithm> #include <memory> +#include <hash_map> #include "migration.hxx" @@ -41,6 +42,13 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/lang/XSingleComponentFactory.hpp> +#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> +#include <com/sun/star/ui/XUIConfigurationManager.hpp> +#include <com/sun/star/ui/XUIConfigurationPersistence.hpp> #define NS_CSS com::sun::star #define NS_UNO com::sun::star::uno @@ -80,6 +88,107 @@ typedef std::vector< migration_step > migrations_v; typedef std::auto_ptr< migrations_v > migrations_vr; typedef std::vector< supported_migration > migrations_available; +//__________________________________________ +/** + define the item, e.g.:menuitem, toolbaritem, to be migrated. we keep the information + of the command URL, the previous sibling node and the parent node of a item +*/ +struct MigrationItem +{ + ::rtl::OUString m_sParentNodeName; + ::rtl::OUString m_sPrevSibling; + ::rtl::OUString m_sCommandURL; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > m_xPopupMenu; + + MigrationItem() + :m_xPopupMenu(0) + { + } + + MigrationItem(const ::rtl::OUString& sParentNodeName, + const ::rtl::OUString& sPrevSibling, + const ::rtl::OUString& sCommandURL, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer > xPopupMenu) + { + m_sParentNodeName = sParentNodeName; + m_sPrevSibling = sPrevSibling; + m_sCommandURL = sCommandURL; + m_xPopupMenu = xPopupMenu; + } + + MigrationItem& operator=(const MigrationItem& aMigrationItem) + { + m_sParentNodeName = aMigrationItem.m_sParentNodeName; + m_sPrevSibling = aMigrationItem.m_sPrevSibling; + m_sCommandURL = aMigrationItem.m_sCommandURL; + m_xPopupMenu = aMigrationItem.m_xPopupMenu; + + return *this; + } + + sal_Bool operator==(const MigrationItem& aMigrationItem) + { + return ( aMigrationItem.m_sParentNodeName == m_sParentNodeName && + aMigrationItem.m_sPrevSibling == m_sPrevSibling && + aMigrationItem.m_sCommandURL == m_sCommandURL && + aMigrationItem.m_xPopupMenu.is() == m_xPopupMenu.is() ); + } + + ::rtl::OUString GetPrevSibling() const { return m_sPrevSibling; } +}; + +typedef ::std::hash_map< ::rtl::OUString, + ::std::vector< MigrationItem >, + ::rtl::OUStringHash, + ::std::equal_to< ::rtl::OUString > > MigrationHashMap; + +struct MigrationItemInfo +{ + ::rtl::OUString m_sResourceURL; + MigrationItem m_aMigrationItem; + + MigrationItemInfo(){} + + MigrationItemInfo(const ::rtl::OUString& sResourceURL, const MigrationItem& aMigratiionItem) + { + m_sResourceURL = sResourceURL; + m_aMigrationItem = aMigratiionItem; + } +}; + +//__________________________________________ +/** + information for the UI elements to be migrated for one module +*/ +struct MigrationModuleInfo +{ + ::rtl::OUString sModuleShortName; + sal_Bool bHasMenubar; + ::std::vector< ::rtl::OUString > m_vToolbars; + + MigrationModuleInfo():bHasMenubar(sal_False){}; +}; + +//__________________________________________ +/** + get the information before copying the ui configuration files of old version to new version +*/ +class NewVersionUIInfo +{ +public: + + NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager > getConfigManager(const ::rtl::OUString& sModuleShortName) const; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const; + void init(const ::std::vector< MigrationModuleInfo >& vModulesInfo); + +private: + + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lCfgManagerSeq; + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionMenubarSettingsSeq; + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionToolbarSettingsSeq; +}; + class MigrationImpl { @@ -91,6 +200,9 @@ private: migrations_vr m_vrMigrations; // list of all migration specs from config install_info m_aInfo; // info about the version being migrated strings_vr m_vrFileList; // final list of files to be copied + MigrationHashMap m_aOldVersionItemsHashMap; + MigrationHashMap m_aNewVersionItemsHashMap; + ::rtl::OUString m_sModuleIdentifier; // functions to control the migration process bool readAvailableMigrations(migrations_available&); @@ -105,6 +217,16 @@ private: strings_vr applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const; NS_UNO::Reference< NS_CSS::container::XNameAccess > getConfigAccess(const sal_Char* path, sal_Bool rw=sal_False); + ::std::vector< MigrationModuleInfo > dectectUIChangesForAllModules() const; + void compareOldAndNewConfig(const ::rtl::OUString& sParentNodeName, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xOldIndexContainer, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xNewIndexContainer, + const ::rtl::OUString& sToolbarName); + void mergeOldToNewVersion(const NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager >& xCfgManager, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer>& xIndexContainer, + const ::rtl::OUString& sModuleIdentifier, + const ::rtl::OUString& sResourceURL); + // actual processing function that perform the migration steps void copyFiles(); void copyConfig(); diff --git a/desktop/source/splash/makefile.mk b/desktop/source/splash/makefile.mk index 2f163fe7b9d6..89609687438c 100644 --- a/desktop/source/splash/makefile.mk +++ b/desktop/source/splash/makefile.mk @@ -63,7 +63,6 @@ SHL1STDLIBS= \ $(SVLLIB) \ $(SVTOOLLIB) \ $(COMPHELPERLIB) \ - $(CONFIGMGRLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(UCBHELPERLIB) \ diff --git a/desktop/test/deployment/boxt/Addons.xcu b/desktop/test/deployment/boxt/Addons.xcu new file mode 100644 index 000000000000..3df7e2de274c --- /dev/null +++ b/desktop/test/deployment/boxt/Addons.xcu @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<o:component-data xmlns:o="http://openoffice.org/2001/registry" + o:package="org.openoffice.Office" o:name="Addons"> + <node o:name="AddonUI"> + <node o:name="OfficeMenuBar"> + <node o:name="org.openoffice.test.desktop.deployment.boxt" o:op="replace"> + <prop o:name="Title" xml:lang="en-US"> + <value>boxt</value> + </prop> + <node o:name="Submenu"> + <node o:name="1" o:op="replace"> + <prop o:name="URL"> + <value>vnd.org.openoffice.test.desktop.deployment.boxt:</value> + </prop> + <prop o:name="Title" xml:lang="en-US"> + <value>boxt</value> + </prop> + </node> + </node> + </node> + </node> + </node> +</o:component-data> diff --git a/configmgr/inc/configmgr/detail/configmgrdllapi.hxx b/desktop/test/deployment/boxt/ProtocolHandler.xcu index 6eb2ea7bc9d9..fe448aedbe17 100644 --- a/configmgr/inc/configmgr/detail/configmgrdllapi.hxx +++ b/desktop/test/deployment/boxt/ProtocolHandler.xcu @@ -1,4 +1,5 @@ -/************************************************************************* +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -23,19 +24,15 @@ * <http://www.openoffice.org/license.html> * for a copy of the LGPLv3 License. * -************************************************************************/ +**********************************************************************--> -#ifndef INCLUDED_CONFIGMGR_DETAIL_CONFIGMGRDLLAPI_HXX -#define INCLUDED_CONFIGMGR_DETAIL_CONFIGMGRDLLAPI_HXX - -#include "sal/config.h" - -#include "sal/types.h" - -#if defined OOO_DLLIMPLEMENTATION_CONFIGMGR -#define OOO_DLLPUBLIC_CONFIGMGR SAL_DLLPUBLIC_EXPORT -#else -#define OOO_DLLPUBLIC_CONFIGMGR SAL_DLLPUBLIC_IMPORT -#endif - -#endif +<o:component-data xmlns:o="http://openoffice.org/2001/registry" + o:package="org.openoffice.Office" o:name="ProtocolHandler"> + <node o:name="HandlerSet"> + <node o:name="com.sun.star.test.deployment.boxt" o:op="replace"> + <prop o:name="Protocols"> + <value>vnd.org.openoffice.test.desktop.deployment.boxt:*</value> + </prop> + </node> + </node> +</o:component-data> diff --git a/desktop/test/deployment/boxt/boxt.cxx b/desktop/test/deployment/boxt/boxt.cxx new file mode 100644 index 000000000000..dc82c0c004d6 --- /dev/null +++ b/desktop/test/deployment/boxt/boxt.cxx @@ -0,0 +1,235 @@ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#include "precompiled_desktop.hxx" +#include "sal/config.h" + +#include "boost/noncopyable.hpp" +#include "com/sun/star/beans/PropertyValue.hpp" +#include "com/sun/star/frame/DispatchDescriptor.hpp" +#include "com/sun/star/frame/XDispatch.hpp" +#include "com/sun/star/frame/XDispatchProvider.hpp" +#include "com/sun/star/frame/XStatusListener.hpp" +#include "com/sun/star/lang/XServiceInfo.hpp" +#include "com/sun/star/lang/XSingleComponentFactory.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/util/URL.hpp" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implbase1.hxx" +#include "cppuhelper/implbase3.hxx" +#include "cppuhelper/implementationentry.hxx" +#include "cppuhelper/weak.hxx" +#include "filter/msfilter/countryid.hxx" +#include "osl/diagnose.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "uno/lbnames.h" +#include "vcl/svapp.hxx" + +namespace { + +namespace css = com::sun::star; + +namespace service { + +rtl::OUString getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.test.deployment.boxt")); +} + +css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.deployment.boxt")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +} + +class Service: + public cppu::WeakImplHelper3< + css::lang::XServiceInfo, css::frame::XDispatchProvider, + css::frame::XDispatch >, + private boost::noncopyable +{ +public: + Service() {} + +private: + virtual ~Service() {} + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException) + { return service::getImplementationName(); } + + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) + throw (css::uno::RuntimeException) + { return ServiceName == getSupportedServiceNames()[0]; } //TODO + + virtual css::uno::Sequence< rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (css::uno::RuntimeException) + { return service::getSupportedServiceNames(); } + + virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( + css::util::URL const &, rtl::OUString const &, sal_Int32) + throw (css::uno::RuntimeException) + { return this; } + + virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > + SAL_CALL queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL dispatch( + css::util::URL const &, + css::uno::Sequence< css::beans::PropertyValue > const &) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL addStatusListener( + css::uno::Reference< css::frame::XStatusListener > const &, + css::util::URL const &) + throw (css::uno::RuntimeException) + {} + + virtual void SAL_CALL removeStatusListener( + css::uno::Reference< css::frame::XStatusListener > const &, + css::util::URL const &) + throw (css::uno::RuntimeException) + {} +}; + +css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > +Service::queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException) +{ + css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > s( + Requests.getLength()); + for (sal_Int32 i = 0; i < s.getLength(); ++i) { + s[i] = queryDispatch( + Requests[i].FeatureURL, Requests[i].FrameName, + Requests[i].SearchFlags); + } + return s; +} + +void Service::dispatch( + css::util::URL const &, + css::uno::Sequence< css::beans::PropertyValue > const &) + throw (css::uno::RuntimeException) +{ + msfilter::ConvertCountryToLanguage(msfilter::COUNTRY_DONTKNOW); + // link against some obscure library that is unlikely already loaded + Application::ShowNativeErrorBox( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("boxt")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test"))); +} + +class Factory: + public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, + private boost::noncopyable +{ +public: + Factory() {} + +private: + virtual ~Factory() {} + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithContext( + css::uno::Reference< css::uno::XComponentContext > const &) + throw (css::uno::Exception, css::uno::RuntimeException) + { return static_cast< cppu::OWeakObject * >(new Service); } + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any > const &, + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException) + { return createInstanceWithContext(Context); } +}; + +css::uno::Reference< css::uno::XInterface > SAL_CALL dummy( + css::uno::Reference< css::uno::XComponentContext > const &) + SAL_THROW((css::uno::Exception)) +{ + OSL_ASSERT(false); + return css::uno::Reference< css::uno::XInterface >(); +} + +rtl::OUString SAL_CALL getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.test.deployment.boxt")); +} + +css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.deployment.boxt")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL +createFactory( + cppu::ComponentFactoryFunc, rtl::OUString const &, + css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) + SAL_THROW(()) +{ + return new Factory; +} + +static cppu::ImplementationEntry const services[] = { + { &dummy, &service::getImplementationName, + &service::getSupportedServiceNames, &createFactory, 0, 0 }, + { 0, 0, 0, 0, 0, 0 } +}; + +} + +extern "C" void * SAL_CALL component_getFactory( + char const * pImplName, void * pServiceManager, void * pRegistryKey) +{ + return cppu::component_getFactoryHelper( + pImplName, pServiceManager, pRegistryKey, services); +} + +extern "C" void SAL_CALL component_getImplementationEnvironment( + char const ** ppEnvTypeName, uno_Environment **) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} + +extern "C" sal_Bool SAL_CALL component_writeInfo( + void * pServiceManager, void * pRegistryKey) +{ + return component_writeInfoHelper(pServiceManager, pRegistryKey, services); +} diff --git a/desktop/test/deployment/boxt/description.xml b/desktop/test/deployment/boxt/description.xml new file mode 100644 index 000000000000..5a67bf3e949f --- /dev/null +++ b/desktop/test/deployment/boxt/description.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<d:description xmlns:d="http://openoffice.org/extensions/description/2006"> + <d:identifier value="org.openoffice/framework/desktop/test/deployment/boxt"/> + <d:version value="@VERSION@"/> + <d:platform value="@PLATFORM@"/> + <d:dependencies> + <d:OpenOffice.org-minimal-version d:name="OpenOffice.org @VERSION@" + value="@VERSION@"/> + <d:OpenOffice.org-maximal-version d:name="OpenOffice.org @VERSION@ or older" + d:OpenOffice.org-minimal-version="2.3" value="@VERSION@"/> + </d:dependencies> +</d:description> diff --git a/desktop/test/deployment/boxt/makefile.mk b/desktop/test/deployment/boxt/makefile.mk new file mode 100644 index 000000000000..63f123fcc608 --- /dev/null +++ b/desktop/test/deployment/boxt/makefile.mk @@ -0,0 +1,70 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#***********************************************************************/ + +PRJ = ../../.. +PRJNAME = desktop +TARGET = test_deployment_boxt + +ENABLE_EXCEPTIONS = TRUE + +.INCLUDE: settings.mk +.INCLUDE: rtlbootstrap.mk + +#TODO: The underlying OOo base version needed here is currently only available +# as instsetoo_native/util/openoffice.lst OOOBASEVERSION, so hard-coding it here +# for now (see issue 110653): +my_version = 3.3 + +DLLPRE = + +SLOFILES = $(SHL1OBJS) + +SHL1TARGET = boxt.uno +SHL1OBJS = $(SLO)/boxt.obj +SHL1RPATH = BOXT +SHL1STDLIBS = \ + $(CPPUHELPERLIB) $(CPPULIB) $(MSFILTERLIB) $(SALLIB) $(TOOLSLIB) $(VCLLIB) +SHL1VERSIONMAP = $(SOLARENV)/src/component.map +DEF1NAME = $(SHL1TARGET) + +.INCLUDE: target.mk + +ALLTAR : $(MISC)/boxt.oxt + +$(MISC)/boxt.oxt .ERRREMOVE : manifest.xml description.xml Addons.xcu \ + ProtocolHandler.xcu $(SHL1TARGETN) + $(RM) -r $@ $(MISC)/$(TARGET).zip + $(MKDIR) $(MISC)/$(TARGET).zip + $(MKDIR) $(MISC)/$(TARGET).zip/META-INF + $(SED) -e 's|@PATH@|$(SHL1TARGETN:f)|g' < manifest.xml \ + > $(MISC)/$(TARGET).zip/META-INF/manifest.xml + $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' \ + -e 's|@VERSION@|$(my_version)|g' < description.xml \ + > $(MISC)/$(TARGET).zip/description.xml + $(COPY) Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN) $(MISC)/$(TARGET).zip + cd $(MISC)/$(TARGET).zip && zip ../boxt.oxt META-INF/manifest.xml \ + description.xml Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN:f) diff --git a/desktop/test/deployment/boxt/manifest.xml b/desktop/test/deployment/boxt/manifest.xml new file mode 100644 index 000000000000..73ebfc306e30 --- /dev/null +++ b/desktop/test/deployment/boxt/manifest.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<m:manifest xmlns:m="http://openoffice.org/2001/manifest"> + <m:file-entry m:media-type="application/vnd.sun.star.configuration-data" + m:full-path="Addons.xcu"/> + <m:file-entry m:media-type="application/vnd.sun.star.configuration-data" + m:full-path="ProtocolHandler.xcu"/> + <m:file-entry + m:media-type="application/vnd.sun.star.uno-component;type=native" + m:full-path="@PATH@"/> +</m:manifest> diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk index c669206bb3f3..47885dfd6b73 100644 --- a/desktop/util/makefile.mk +++ b/desktop/util/makefile.mk @@ -81,41 +81,7 @@ APP1TARGET=so$/$(TARGET) APP1NOSAL=TRUE APP1RPATH=BRAND APP1OBJS=$(OBJ)$/copyright_ascii_sun.obj $(OBJ)$/main.obj -APP1STDLIBS = \ - $(SALLIB) \ - $(SOFFICELIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(I18NISOLANGLIB) \ - $(SALLIB) \ - $(SFXLIB) \ - $(SVLLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(TOOLSLIB) \ - $(UCBHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(VCLLIB) \ - $(FWELIB) \ - $(BASICLIB) \ - $(XMLSCRIPTLIB) \ - $(SALHELPERLIB) \ - $(SOTLIB) \ - $(SAXLIB) \ - $(FWILIB) \ - $(ICUUCLIB) \ - $(I18NUTILLIB) \ - $(ICULIB) \ - $(JVMFWKLIB) \ - $(BASEGFXLIB) \ - $(ICUDATALIB) \ - $(ICULELIB) \ - $(JVMACCESSLIB) \ - $(SALHELPERLIB) \ - $(VOSLIB) - - +APP1STDLIBS = $(SALLIB) $(SOFFICELIB) APP1DEPN= $(APP1RES) verinfo.rc .IF "$(GUI)" == "WNT" @@ -140,40 +106,7 @@ APP5TARGET=soffice APP5NOSAL=TRUE APP5RPATH=BRAND APP5OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/main.obj -APP5STDLIBS = \ - $(SALLIB) \ - $(SOFFICELIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(I18NISOLANGLIB) \ - $(SALLIB) \ - $(SFXLIB) \ - $(SVLLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(TOOLSLIB) \ - $(UCBHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(VCLLIB) \ - $(FWELIB) \ - $(BASICLIB) \ - $(XMLSCRIPTLIB) \ - $(SALHELPERLIB) \ - $(SOTLIB) \ - $(SAXLIB) \ - $(FWILIB) \ - $(ICUUCLIB) \ - $(I18NUTILLIB) \ - $(ICULIB) \ - $(JVMFWKLIB) \ - $(BASEGFXLIB) \ - $(ICUDATALIB) \ - $(ICULELIB) \ - $(JVMACCESSLIB) \ - $(SALHELPERLIB) \ - $(VOSLIB) - +APP5STDLIBS = $(SALLIB) $(SOFFICELIB) .IF "$(OS)" == "LINUX" APP5STDLIBS+= -lXext #APP5STDLIBS+= -lXext -lSM -lICE diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst index 7ae13f8ebe33..e863e47a3b18 100644 --- a/drawinglayer/prj/d.lst +++ b/drawinglayer/prj/d.lst @@ -55,7 +55,6 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive3d ..\inc\drawinglayer\primitive3d\baseprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\baseprimitive3d.hxx ..\inc\drawinglayer\primitive3d\groupprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\groupprimitive3d.hxx ..\inc\drawinglayer\primitive3d\hatchtextureprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\hatchtextureprimitive3d.hxx -..\inc\drawinglayer\primitive2d\hiddengeometryprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\hiddengeometryprimitive3d.hxx ..\inc\drawinglayer\primitive3d\modifiedcolorprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\modifiedcolorprimitive3d.hxx ..\inc\drawinglayer\primitive3d\polygonprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\polygonprimitive3d.hxx ..\inc\drawinglayer\primitive3d\polygontubeprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\polygontubeprimitive3d.hxx @@ -95,7 +94,6 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor3d ..\inc\drawinglayer\processor3d\cutfindprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\cutfindprocessor3d.hxx ..\inc\drawinglayer\processor3d\defaultprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\defaultprocessor3d.hxx ..\inc\drawinglayer\processor3d\zbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\zbufferprocessor3d.hxx -..\inc\drawinglayer\processor3d\tbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\tbufferprocessor3d.hxx mkdir: %_DEST%\inc%_EXT%\drawinglayer\attribute ..\inc\drawinglayer\attribute\fillgradientattribute.hxx %_DEST%\inc%_EXT%\drawinglayer\attribute\fillgradientattribute.hxx diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx index ccea5d09321e..15052ecc3c0c 100644 --- a/editeng/inc/editeng/editview.hxx +++ b/editeng/inc/editeng/editview.hxx @@ -28,6 +28,8 @@ #ifndef _MyEDITVIEW_HXX #define _MyEDITVIEW_HXX +#include <com/sun/star/i18n/WordType.hpp> + #include <rsc/rscsfx.hxx> #include <i18npool/lang.h> #include <tools/color.hxx> @@ -111,7 +113,7 @@ public: BOOL HasSelection() const; ESelection GetSelection() const; void SetSelection( const ESelection& rNewSel ); - BOOL SelectCurrentWord(); + BOOL SelectCurrentWord( sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); void IndentBlock(); void UnindentBlock(); diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx index 2d7afdb8a68c..a4efc98674fc 100644 --- a/editeng/inc/editeng/outliner.hxx +++ b/editeng/inc/editeng/outliner.hxx @@ -389,6 +389,12 @@ public: Selection GetSurroundingTextSelection() const; }; + +// some thesaurus functionality to avoid code duplication in different projects... +bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView ); +void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ); + + //#if 0 // _SOLAR__PRIVATE DECLARE_LIST(ViewList,OutlinerView*) //#else diff --git a/editeng/inc/editeng/splwrap.hxx b/editeng/inc/editeng/splwrap.hxx index 89eb0b53320b..5e46a96adb9f 100644..100755 --- a/editeng/inc/editeng/splwrap.hxx +++ b/editeng/inc/editeng/splwrap.hxx @@ -56,6 +56,7 @@ class EDITENG_DLLPUBLIC SvxSpellWrapper { private: friend class SvxSpellCheckDialog; friend class SvxHyphenWordDialog; + friend class SvxHyphenWordDialog_Impl; Window* pWin; ::com::sun::star::uno::Reference< diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 766023a0038c..de4a2673829e 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1256,13 +1256,13 @@ void EditView::SpellIgnoreWord() pImpEditView->SpellIgnoreOrAddWord( sal_False ); } -sal_Bool EditView::SelectCurrentWord() +sal_Bool EditView::SelectCurrentWord( sal_Int16 nWordType ) { DBG_CHKTHIS( EditView, 0 ); DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 ); EditSelection aCurSel( pImpEditView->GetEditSelection() ); pImpEditView->DrawSelection(); - aCurSel = PIMPEE->SelectWord( aCurSel.Max() ); + aCurSel = PIMPEE->SelectWord( aCurSel.Max(), nWordType ); pImpEditView->SetEditSelection( aCurSel ); pImpEditView->DrawSelection(); ShowCursor( sal_True, sal_False ); diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index ddb82a06661d..569b80639b6b 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -60,6 +60,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu bWasInPara = FALSE; nInTable = 0; nInCell = 0; + bInTitle = FALSE; nDefListLevel = 0; nBulletLevel = 0; nNumberingLevel = 0; @@ -179,11 +180,14 @@ void EditHTMLParser::NextToken( int nToken ) break; case HTML_TEXTTOKEN: { - if ( !bInPara ) - StartPara( FALSE ); - -// if ( bInPara || pCurAnchor ) + // #i110937# for <title> content, call aImportHdl (no SkipGroup), but don't insert the text into the EditEngine + if (!bInTitle) { + if ( !bInPara ) + StartPara( FALSE ); + + // if ( bInPara || pCurAnchor ) + String aText = aToken; if ( aText.Len() && ( aText.GetChar( 0 ) == ' ' ) && ThrowAwayBlank() && !IsReadPRE() ) @@ -342,6 +346,13 @@ void EditHTMLParser::NextToken( int nToken ) // #58335# kein SkipGroup on/off auf inline markup etc. + case HTML_TITLE_ON: + bInTitle = TRUE; + break; + case HTML_TITLE_OFF: + bInTitle = FALSE; + break; + // globals case HTML_HTML_ON: case HTML_HTML_OFF: @@ -355,8 +366,6 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_THEAD_OFF: case HTML_TBODY_ON: case HTML_TBODY_OFF: - case HTML_TITLE_ON: - case HTML_TITLE_OFF: // inline elements, structural markup // HTML 3.0 case HTML_BANNER_ON: diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index a9b20bcd652f..8d11e743755a 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -57,6 +57,7 @@ private: BOOL bFieldsInserted; BYTE nInTable; BYTE nInCell; + BOOL bInTitle; BYTE nDefListLevel; BYTE nBulletLevel; diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index fa539da6f138..e2a1fabea0ba 100644..100755 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -26,7 +26,11 @@ ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove + #include "precompiled_editeng.hxx" + +#include <com/sun/star/i18n/WordType.hpp> + #include <svl/intitem.hxx> #include <editeng/editeng.hxx> #include <editeng/editview.hxx> @@ -34,7 +38,9 @@ #include <editeng/eerdll.hxx> #include <editeng/lrspitem.hxx> #include <editeng/fhgtitem.hxx> + #include <svl/style.hxx> +#include <i18npool/mslangid.hxx> #define _OUTLINER_CXX #include <editeng/outliner.hxx> @@ -59,6 +65,8 @@ #define OL_SCROLL_HOROFFSET 20 /* in % von VisibleSize.Width */ #define OL_SCROLL_VEROFFSET 20 /* in % von VisibleSize.Height */ +using namespace ::com::sun::star; + DBG_NAME(OutlinerView) @@ -972,7 +980,7 @@ void OutlinerView::InsertText( const OutlinerParaObject& rParaObj ) // Eigentlich nicht ganz richtig, das evtl. Einrueckungen // korrigiert werden muessen, aber das kommt spaeter durch ein // allgemeingueltiges Import. - // Dann wird im Inserted gleich ermittelt, was fr eine Einrueckebene + // Dann wird im Inserted gleich ermittelt, was f�r eine Einrueckebene // Moegliche Struktur: // pImportInfo mit DestPara, DestPos, nFormat, pParaObj... // Evtl. Problematisch: @@ -1295,7 +1303,7 @@ void OutlinerView::RemoveAttribs( BOOL bRemoveParaAttribs, USHORT nWhich, BOOL b -// ===================================================================== +// ===================================================================== // ====================== Einfache Durchreicher ======================= // ====================================================================== @@ -1670,3 +1678,57 @@ Selection OutlinerView::GetSurroundingTextSelection() const DBG_CHKTHIS(OutlinerView,0); return pEditView->GetSurroundingTextSelection(); } + + +// ====================================================================== +// ===== some code for thesaurus sub menu within context menu +// ====================================================================== + +// returns: true if a word for thesaurus look-up was found at the current cursor position. +// The status string will be word + iso language string (e.g. "light#en-US") +bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( + String &rStatusVal, + LanguageType &rLang, + const EditView &rEditView ) +{ + // get text and locale for thesaurus look up + String aText; + EditEngine *pEditEngine = rEditView.GetEditEngine(); + ESelection aTextSel( rEditView.GetSelection() ); + if (!aTextSel.HasRange()) + aTextSel = pEditEngine->GetWord( aTextSel, i18n::WordType::DICTIONARY_WORD ); + aText = pEditEngine->GetText( aTextSel ); + aTextSel.Adjust(); + LanguageType nLang = pEditEngine->GetLanguage( aTextSel.nStartPara, aTextSel.nStartPos ); + String aLangText( MsLangId::convertLanguageToIsoString( nLang ) ); + + // set word and locale to look up as status value + String aStatusVal( aText ); + aStatusVal.AppendAscii( "#" ); + aStatusVal += aLangText; + + rStatusVal = aStatusVal; + rLang = nLang; + + return aText.Len() > 0; +} + + +void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText ) +{ + // get selection to use + ESelection aCurSel( rEditView.GetSelection() ); + if (!rEditView.HasSelection()) + { + // select the same word that was used in GetStatusValueForThesaurusFromContext by calling GetWord. + // (In the end both functions will call ImpEditEngine::SelectWord) + rEditView.SelectCurrentWord( i18n::WordType::DICTIONARY_WORD ); + aCurSel = rEditView.GetSelection(); + } + + // replace word ... + rEditView.InsertText( rSynonmText ); + rEditView.ShowCursor( sal_True, sal_False ); +} + + diff --git a/formula/inc/formula/compiler.hrc b/formula/inc/formula/compiler.hrc index e8243482a776..e4dc05aca4e9 100644 --- a/formula/inc/formula/compiler.hrc +++ b/formula/inc/formula/compiler.hrc @@ -393,12 +393,8 @@ #define SC_OPCODE_LAST_OPCODE_ID 394 /* last OpCode */ /*** Interna ***/ -#define SC_OPCODE_INTERNAL_BEGIN 9995 -#define SC_OPCODE_GAME 9995 -#define SC_OPCODE_SPEW 9996 -#define SC_OPCODE_TTT 9997 -#define SC_OPCODE_TEAM 9998 -#define SC_OPCODE_ANSWER 9999 +#define SC_OPCODE_INTERNAL_BEGIN 9999 +#define SC_OPCODE_TTT 9999 #define SC_OPCODE_INTERNAL_END 9999 /*** from here on ExtraData contained ***/ diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx index 2ec322d29bf7..390ab21048d3 100644 --- a/formula/inc/formula/opcode.hxx +++ b/formula/inc/formula/opcode.hxx @@ -386,11 +386,7 @@ enum OpCodeEnum ocNumberValue = SC_OPCODE_NUMBERVALUE, // internal stuff ocInternalBegin = SC_OPCODE_INTERNAL_BEGIN, - ocGame = SC_OPCODE_GAME, - ocSpew = SC_OPCODE_SPEW, ocTTT = SC_OPCODE_TTT, - ocTeam = SC_OPCODE_TEAM, - ocAnswer = SC_OPCODE_ANSWER, ocInternalEnd = SC_OPCODE_INTERNAL_END, // from here on ExtraData ocDataToken1 = SC_OPCODE_DATA_TOKEN_1, diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index d4e43363676f..2010679907d2 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -46,7 +46,7 @@ namespace formula // ============================================================================= using namespace ::com::sun::star; - static const sal_Char* pInternal[ 5 ] = { "GAME", "SPEW", "TTT", "STARCALCTEAM", "ANTWORT" }; + static const sal_Char* pInternal[ 1 ] = { "TTT" }; // ============================================================================= namespace diff --git a/fpicker/source/aqua/resourceprovider.cxx b/fpicker/source/aqua/resourceprovider.cxx index 5d958d8e2888..51985208c7ed 100644 --- a/fpicker/source/aqua/resourceprovider.cxx +++ b/fpicker/source/aqua/resourceprovider.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #ifndef _SVTOOLS_SVTOOLS_HRC_ -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #endif #ifndef _SVTOOLS_FILEDLG2_HRC_ diff --git a/fpicker/source/office/OfficeFilePicker.src b/fpicker/source/office/OfficeFilePicker.src index 77de1dc3918b..8fbbc35a40e5 100644 --- a/fpicker/source/office/OfficeFilePicker.src +++ b/fpicker/source/office/OfficeFilePicker.src @@ -25,7 +25,7 @@ * ************************************************************************/ -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" String STR_SVT_FILEPICKER_AUTO_EXTENSION { diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index c7a18050c3ff..b9d7fac3aa3b 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -57,7 +57,7 @@ #include <unotools/localfilehelper.hxx> #ifndef _SVTOOLS_HRC -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" #endif #ifndef _SVT_HELPID_HRC #include "svtools/helpid.hrc" @@ -1587,6 +1587,9 @@ void SvtFileDialog::UpdateControls( const String& rURL ) sText = sURL; } + if ( !sText.Len() && rURL.Len() ) + // happens, for instance, for URLs which the INetURLObject does not know to belong to a hierarchical scheme + sText = rURL; _pImp->_pFtCurrentPath->SetText( sText ); } diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc index 9f5997a4089c..15f5121b0965 100644 --- a/fpicker/source/office/iodlg.hrc +++ b/fpicker/source/office/iodlg.hrc @@ -29,7 +29,7 @@ #define _SVTOOLS_IODLGIMPL_HRC #ifndef _SVTOOLS_HRC -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" #endif // ModalDialog DLG_SVT_EXPLORERFILE diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src index b1712e6b1820..0b3c27b68071 100644 --- a/fpicker/source/office/iodlg.src +++ b/fpicker/source/office/iodlg.src @@ -26,7 +26,7 @@ ************************************************************************/ // includes ****************************************************************** -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" #include "svtools/helpid.hrc" #include "iodlg.hrc" diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 4a7c615a35b3..5e57075a6bb7 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -46,15 +46,12 @@ #include "svtools/fileview.hxx" #include "svtools/inettbc.hxx" #include "iodlg.hxx" -#ifndef _SVTOOLS_IODLGIMPL_HRC #include "iodlg.hrc" -#endif #include "svtools/imagemgr.hxx" #include <unotools/localfilehelper.hxx> #include "unotools/useroptions.hxx" -#ifndef _RTL_INSTANCE_HXX_ #include "rtl/instance.hxx" -#endif +#include <svl/svl.hrc> #define _SVSTDARR_STRINGSSORTDTOR #define _SVSTDARR_STRINGSDTOR diff --git a/fpicker/source/unx/gnome/resourceprovider.cxx b/fpicker/source/unx/gnome/resourceprovider.cxx index dba51c5a606a..393ea7585d5a 100644 --- a/fpicker/source/unx/gnome/resourceprovider.cxx +++ b/fpicker/source/unx/gnome/resourceprovider.cxx @@ -40,7 +40,7 @@ #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #include <svtools/filedlg2.hrc> //------------------------------------------------------------ diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx index 046147ff4b77..a7fa01a5ece6 100644 --- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx +++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/ui/dialogs/ControlActions.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #include <vos/mutex.hxx> diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index f22e1c3abdaf..e93c3bec18ba 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -67,14 +67,14 @@ static Reference< XInterface > SAL_CALL createInstance( if (bVistaOrNewer) { - fprintf(stdout, "use special (vista) system file picker ...\n"); + OSL_TRACE("use special (vista) system file picker ..."); xDlg.set( static_cast< XFilePicker2* >( new ::fpicker::win32::vista::VistaFilePicker( rServiceManager ) ) ); } else { - fprintf(stdout, "use normal system file picker ...\n"); + OSL_TRACE("use normal system file picker ..."); xDlg.set( static_cast< XFilePicker2* >( new CFilePicker( rServiceManager ) ) ); diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx index c44e4bd65b35..2fadaa6bfdff 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx @@ -259,7 +259,9 @@ STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* /*pDial //----------------------------------------------------------------------------------------- STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* /*pDialog*/ , - IShellItem* /*pItem*/ , + + IShellItem* /*pItem*/ , + FDE_SHAREVIOLATION_RESPONSE* /*pResponse*/) { impl_sendEvent(E_CONTROL_STATE_CHANGED, css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER); @@ -308,9 +310,12 @@ STDMETHODIMP VistaFilePickerEventHandler::OnOverwrite(IFileDialog* /* //----------------------------------------------------------------------------------------- STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* /*pCustomize*/, - DWORD nIDCtl , + + DWORD nIDCtl , + DWORD /*nIDItem*/ ) { + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl )); return S_OK; } @@ -319,6 +324,7 @@ STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* / STDMETHODIMP VistaFilePickerEventHandler::OnButtonClicked(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl ) { + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl)); return S_OK; } @@ -353,7 +359,9 @@ STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustom if (nIDCtl == css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION) m_pInternalNotify->onAutoExtensionChanged(bChecked); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl)); + return S_OK; } diff --git a/fpicker/source/win32/misc/resourceprovider.cxx b/fpicker/source/win32/misc/resourceprovider.cxx index 805f24c315d7..b5448a93008c 100644 --- a/fpicker/source/win32/misc/resourceprovider.cxx +++ b/fpicker/source/win32/misc/resourceprovider.cxx @@ -43,7 +43,7 @@ #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> //------------------------------------------------------------ // namespace directives diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc index a2bf56376913..8c9bd2e854b0 100644 --- a/framework/inc/classes/resource.hrc +++ b/framework/inc/classes/resource.hrc @@ -55,6 +55,7 @@ #define STR_SET_LANGUAGE_FOR_PARAGRAPH (RID_STR_START+19) #define STR_SET_LANGUAGE_FOR_ALL_TEXT (RID_STR_START+20) #define STR_UNTITLED_DOCUMENT (RID_STR_START+21) +#define STR_RESET_TO_DEFAULT_LANGUAGE (RID_STR_START+22) #define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION (RID_MENU_START+0) diff --git a/framework/inc/classes/sfxhelperfunctions.hxx b/framework/inc/classes/sfxhelperfunctions.hxx index ab20e9f0f25f..ac3fa472f249 100644 --- a/framework/inc/classes/sfxhelperfunctions.hxx +++ b/framework/inc/classes/sfxhelperfunctions.hxx @@ -40,6 +40,7 @@ typedef svt::StatusbarController* ( *pfunc_setStatusBarControllerCreator)( const typedef void ( *pfunc_getRefreshToolbars)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); typedef void ( *pfunc_createDockingWindow)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); typedef bool ( *pfunc_isDockingWindowVisible)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); +typedef void ( *pfunc_activateToolPanel)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL ); namespace framework { @@ -63,6 +64,10 @@ void SAL_CALL CreateDockingWindow( const ::com::sun::star::uno::Reference< ::com pfunc_isDockingWindowVisible SAL_CALL SetIsDockingWindowVisible( pfunc_isDockingWindowVisible pIsDockingWindowVisible ); bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); + +pfunc_activateToolPanel SAL_CALL SetActivateToolPanel( pfunc_activateToolPanel i_pActivator ); + +void SAL_CALL ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL ); } #endif // __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_ diff --git a/framework/inc/helper/imageproducer.hxx b/framework/inc/helper/imageproducer.hxx index 6d8885a5fa96..dff0ccfd1049 100644 --- a/framework/inc/helper/imageproducer.hxx +++ b/framework/inc/helper/imageproducer.hxx @@ -39,11 +39,11 @@ namespace framework { -typedef Image ( *pfunc_getImage)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); +typedef Image ( *pfunc_getImage)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc ); -Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); +Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); } diff --git a/framework/inc/helper/mischelper.hxx b/framework/inc/helper/mischelper.hxx index 96329d4f98b9..6a1886244b54 100644..100755 --- a/framework/inc/helper/mischelper.hxx +++ b/framework/inc/helper/mischelper.hxx @@ -34,10 +34,56 @@ #include <i18npool/lang.h> #include <svl/languageoptions.hxx> +#include <rtl/ustring.hxx> + +#include <set> + +class SvtLanguageTable; + + +// flags for script types in use within selection +#define LS_SCRIPT_LATIN 0x0001 +#define LS_SCRIPT_ASIAN 0x0002 +#define LS_SCRIPT_COMPLEX 0x0004 + namespace framework { +// menu ids for language status bar control +enum LangMenuIDs +{ + MID_LANG_SEL_1 = 1, // need to start with 1 since xPopupMenu->execute will return 0 if the menu is cancelled + MID_LANG_SEL_2, + MID_LANG_SEL_3, + MID_LANG_SEL_4, + MID_LANG_SEL_5, + MID_LANG_SEL_6, + MID_LANG_SEL_7, + MID_LANG_SEL_8, + MID_LANG_SEL_9, + MID_LANG_SEL_NONE, + MID_LANG_SEL_RESET, + MID_LANG_SEL_MORE, + + MID_LANG_PARA_SEPERATOR, + MID_LANG_PARA_STRING, + + MID_LANG_PARA_1, + MID_LANG_PARA_2, + MID_LANG_PARA_3, + MID_LANG_PARA_4, + MID_LANG_PARA_5, + MID_LANG_PARA_6, + MID_LANG_PARA_7, + MID_LANG_PARA_8, + MID_LANG_PARA_9, + MID_LANG_PARA_NONE, + MID_LANG_PARA_RESET, + MID_LANG_PARA_MORE, +}; + + inline bool IsScriptTypeMatchingToLanguage( sal_Int16 nScriptType, LanguageType nLang ) { return 0 != (nScriptType & SvtLanguageOptions::GetScriptTypeOfLanguage( nLang )); @@ -63,6 +109,15 @@ public: ,sal_Bool& _rIni ,const sal_Char* _pName); +void FillLangItems( std::set< ::rtl::OUString > &rLangItems, + const SvtLanguageTable &rLanguageTable, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > &rxFrame, + const LanguageGuessingHelper & rLangGuessHelper, + sal_Int16 nScriptType, + const ::rtl::OUString & rCurLang, + const ::rtl::OUString & rKeyboardLang, + const ::rtl::OUString & rGuessedTextLang ); + } // namespace framework #endif // __MISC_HELPER_HXX_ diff --git a/framework/inc/helper/popupmenucontrollerbase.hxx b/framework/inc/helper/popupmenucontrollerbase.hxx deleted file mode 100644 index e723b36aec3b..000000000000 --- a/framework/inc/helper/popupmenucontrollerbase.hxx +++ /dev/null @@ -1,145 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_ -#define __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_ - -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ - -#include <threadhelp/threadhelpbase.hxx> -#include <macros/generic.hxx> -#include <macros/xinterface.hxx> -#include <macros/xtypeprovider.hxx> -#include <macros/xserviceinfo.hxx> -#include <stdtypes.h> - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XTypeProvider.hpp> -#include <com/sun/star/lang/XInitialization.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/frame/XDispatchProvider.hpp> -#include <com/sun/star/frame/XDispatch.hpp> -#include <com/sun/star/frame/XStatusListener.hpp> -#include <com/sun/star/frame/XPopupMenuController.hpp> -#include <com/sun/star/uri/XUriReferenceFactory.hpp> -#include <com/sun/star/uri/XUriReference.hpp> -#include <com/sun/star/util/XURLTransformer.hpp> -//_________________________________________________________________________________________________________________ -// includes of other projects -//_________________________________________________________________________________________________________________ -#include <toolkit/awt/vclxmenu.hxx> -#include <cppuhelper/weak.hxx> -#include <rtl/ustring.hxx> - -namespace framework -{ - class PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider , - public com::sun::star::lang::XServiceInfo , - public ::com::sun::star::frame::XPopupMenuController , - public com::sun::star::lang::XInitialization , - public com::sun::star::frame::XStatusListener , - public com::sun::star::awt::XMenuListener , - public com::sun::star::frame::XDispatchProvider , - public com::sun::star::frame::XDispatch , - public com::sun::star::lang::XComponent , - protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. - public ::cppu::OBroadcastHelper , - public ::cppu::OWeakObject - { - public: - PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); - virtual ~PopupMenuControllerBase(); - - // XInterface, XTypeProvider, XServiceInfo - FWK_DECLARE_XINTERFACE - FWK_DECLARE_XTYPEPROVIDER - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0; - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0; - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; - - // XPopupMenuController - virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException); - - // XInitialization - 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); - - // XStatusListener - virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0; - - // XMenuListener - virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException); - - // XDispatchProvider - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); - - // XDispatch - virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException ); - - // XEventListener - virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException ); - - // XComponent - virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - - protected: - virtual void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); - virtual void impl_setPopupMenu(); - virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); - ::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL ); - - - bool m_bInitialized; - bool m_bDisposed; - rtl::OUString m_aCommandURL; - rtl::OUString m_aBaseURL; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xDispatch; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; - ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > m_xPopupMenu; - ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener - }; -} - -#endif // __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_ diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx index c3ec5075cc07..05ab216d6f06 100644 --- a/framework/inc/helper/uiconfigelementwrapperbase.hxx +++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx @@ -101,6 +101,9 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException); // XUIElement + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; // XUpdatable diff --git a/framework/inc/helper/uielementwrapperbase.hxx b/framework/inc/helper/uielementwrapperbase.hxx index e5df1a142826..bc83765b09fe 100644 --- a/framework/inc/helper/uielementwrapperbase.hxx +++ b/framework/inc/helper/uielementwrapperbase.hxx @@ -92,6 +92,9 @@ class UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException); // XUIElement + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0; //------------------------------------------------------------------------------------------------------------- diff --git a/framework/inc/properties.h b/framework/inc/properties.h index f0358ef6f1a0..5a32a42a28cc 100644 --- a/framework/inc/properties.h +++ b/framework/inc/properties.h @@ -217,6 +217,14 @@ namespace framework{ #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDROTATEIMAGELIST "private:resource/image/commandrotateimagelist" #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST "private:resource/image/commandmirrorimagelist" +#define UICOMMANDDESCRIPTION_PROPNAME_PROPERTIES "Properties" +#define UICOMMANDDESCRIPTION_PROPNAME_POPUP "Popup" + +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE 1 +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_MIRRORED 2 +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_ROTATED 4 +#define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 + //_______________________________________________ /** properties for "AutoRecovery" class */ diff --git a/framework/inc/threadhelp/fairrwlock.hxx b/framework/inc/threadhelp/fairrwlock.hxx index af9617a9ba47..0f984c8d03f9 100644 --- a/framework/inc/threadhelp/fairrwlock.hxx +++ b/framework/inc/threadhelp/fairrwlock.hxx @@ -40,7 +40,6 @@ // interface includes //_________________________________________________________________________________________________________________ #include <com/sun/star/uno/XInterface.hpp> -#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // other includes diff --git a/framework/inc/uielement/controlmenucontroller.hxx b/framework/inc/uielement/controlmenucontroller.hxx index a1be2ee47b3b..6e0c9deb03c0 100644 --- a/framework/inc/uielement/controlmenucontroller.hxx +++ b/framework/inc/uielement/controlmenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -52,6 +52,7 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> @@ -59,8 +60,10 @@ class PopupMenu; namespace framework { - class ControlMenuController : public PopupMenuControllerBase + class ControlMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: ControlMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~ControlMenuController(); diff --git a/framework/inc/uielement/fontmenucontroller.hxx b/framework/inc/uielement/fontmenucontroller.hxx index f14680a49030..79905658839b 100644 --- a/framework/inc/uielement/fontmenucontroller.hxx +++ b/framework/inc/uielement/fontmenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -50,14 +50,17 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> namespace framework { - class FontMenuController : public PopupMenuControllerBase + class FontMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: FontMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~FontMenuController(); diff --git a/framework/inc/uielement/fontsizemenucontroller.hxx b/framework/inc/uielement/fontsizemenucontroller.hxx index d0afe40154fe..4e5623084908 100644 --- a/framework/inc/uielement/fontsizemenucontroller.hxx +++ b/framework/inc/uielement/fontsizemenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -51,14 +51,17 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> namespace framework { - class FontSizeMenuController : public PopupMenuControllerBase + class FontSizeMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: FontSizeMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~FontSizeMenuController(); diff --git a/framework/inc/uielement/headermenucontroller.hxx b/framework/inc/uielement/headermenucontroller.hxx index 8ec012e80319..0deeb878156d 100644 --- a/framework/inc/uielement/headermenucontroller.hxx +++ b/framework/inc/uielement/headermenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -52,14 +52,17 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> namespace framework { - class HeaderMenuController : public PopupMenuControllerBase + class HeaderMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool _bFooter = sal_False ); virtual ~HeaderMenuController(); diff --git a/framework/inc/uielement/langselectionmenucontroller.hxx b/framework/inc/uielement/langselectionmenucontroller.hxx index 36035040bcad..257638ecd77f 100644 --- a/framework/inc/uielement/langselectionmenucontroller.hxx +++ b/framework/inc/uielement/langselectionmenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -51,6 +51,7 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> @@ -59,8 +60,10 @@ namespace framework { - class LanguageSelectionMenuController : public PopupMenuControllerBase + class LanguageSelectionMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: LanguageSelectionMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~LanguageSelectionMenuController(); @@ -99,11 +102,10 @@ namespace framework ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xMenuDispatch_Font; ::rtl::OUString m_aMenuCommandURL_CharDlgForParagraph; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xMenuDispatch_CharDlgForParagraph; - ::rtl::OUString m_aCurrentLanguage; ::rtl::OUString m_aCurLang; sal_Int16 m_nScriptType; ::rtl::OUString m_aKeyboardLang; - ::rtl::OUString m_aGuessedText; + ::rtl::OUString m_aGuessedTextLang; LanguageGuessingHelper m_aLangGuessHelper; void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu, const Mode rMode ); diff --git a/framework/inc/uielement/langselectionstatusbarcontroller.hxx b/framework/inc/uielement/langselectionstatusbarcontroller.hxx index 09cd83901b1e..4d46538eb6d6 100644 --- a/framework/inc/uielement/langselectionstatusbarcontroller.hxx +++ b/framework/inc/uielement/langselectionstatusbarcontroller.hxx @@ -35,9 +35,15 @@ #include <stdtypes.h> #include <com/sun/star/linguistic2/XLanguageGuessing.hpp> #include <svtools/statusbarcontroller.hxx> +#include <rtl/ustring.hxx> #include "helper/mischelper.hxx" +#include <set> + +class SvtLanguageTable; + + // component helper namespace namespace framework { @@ -86,12 +92,11 @@ class LangSelectionStatusbarController : public svt::StatusbarController void operator =(LangSelectionStatusbarController &); // not defined - sal_Bool m_bShowMenu; - sal_Int16 m_nScriptType; - ::rtl::OUString m_aCurrentLanguage; - ::rtl::OUString m_aCurLang; - ::rtl::OUString m_aKeyboardLang; - ::rtl::OUString m_aGuessedText; + sal_Bool m_bShowMenu; // if the menu is to be displayed or not (depending on the selected object/text) + sal_Int16 m_nScriptType; // the flags for the different script types available in the selection, LATIN = 0x0001, ASIAN = 0x0002, COMPLEX = 0x0004 + ::rtl::OUString m_aCurLang; // the language of the current selection, "*" if there are more than one languages + ::rtl::OUString m_aKeyboardLang; // the keyboard language + ::rtl::OUString m_aGuessedTextLang; // the 'guessed' language for the selection, "" if none could be guessed LanguageGuessingHelper m_aLangGuessHelper; void LangMenu() throw (::com::sun::star::uno::RuntimeException); diff --git a/framework/inc/uielement/macrosmenucontroller.hxx b/framework/inc/uielement/macrosmenucontroller.hxx index 6070a44d3564..1e8b9024eaca 100644 --- a/framework/inc/uielement/macrosmenucontroller.hxx +++ b/framework/inc/uielement/macrosmenucontroller.hxx @@ -28,7 +28,7 @@ #ifndef __FRAMEWORK_UIELEMENT_MACROSMENUCONTROLLER_HXX_ #define __FRAMEWORK_UIELEMENT_MACROSMENUCONTROLLER_HXX_ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> @@ -40,6 +40,7 @@ #include <com/sun/star/frame/XStatusListener.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/frame/XPopupMenuController.hpp> +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <vcl/menu.hxx> @@ -47,8 +48,10 @@ namespace framework { - class MacrosMenuController : public PopupMenuControllerBase + class MacrosMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + struct ExecuteInfo { ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch; diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx index e937623b44b9..5e14b70f0044 100644 --- a/framework/inc/uielement/newmenucontroller.hxx +++ b/framework/inc/uielement/newmenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -53,6 +53,7 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> @@ -71,8 +72,10 @@ namespace framework ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch; }; - class NewMenuController : public PopupMenuControllerBase + class NewMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: NewMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~NewMenuController(); diff --git a/framework/inc/uielement/objectmenucontroller.hxx b/framework/inc/uielement/objectmenucontroller.hxx index 94c1d849e197..7a03dfd1458e 100644 --- a/framework/inc/uielement/objectmenucontroller.hxx +++ b/framework/inc/uielement/objectmenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -51,14 +51,17 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> namespace framework { - class ObjectMenuController : public PopupMenuControllerBase + class ObjectMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: ObjectMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~ObjectMenuController(); diff --git a/framework/inc/uielement/popupmenucontroller.hxx b/framework/inc/uielement/popupmenucontroller.hxx new file mode 100644 index 000000000000..ef44a4703ca2 --- /dev/null +++ b/framework/inc/uielement/popupmenucontroller.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __FRAMEWORK_POPUPMENUCONTROLLER_HXX_ +#define __FRAMEWORK_POPUPMENUCONTROLLER_HXX_ + +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/frame/XPopupMenuController.hpp> + +#include "svtools/toolboxcontroller.hxx" +#include "boost/scoped_ptr.hpp" + +#include <macros/xserviceinfo.hxx> + +class Window; + +namespace framework +{ +class PopupMenuControllerImpl; + +class PopupMenuController : public svt::ToolboxController, public ::com::sun::star::lang::XServiceInfo +{ +public: + PopupMenuController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + ~PopupMenuController(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + DECLARE_XSERVICEINFO + + // XComponent + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + + // XStatusListener + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException); + + bool CreatePopupMenuController() throw (::com::sun::star::uno::Exception); + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XPopupMenuController > mxPopupMenuController; + ::com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu > mxPopupMenu; +}; + +} // namespace framework + +#endif // __FRAMEWORK_POPUPMENUCONTROLLER_HXX_ diff --git a/framework/inc/uielement/recentfilesmenucontroller.hxx b/framework/inc/uielement/recentfilesmenucontroller.hxx index 40c3a55737c1..26a8e38dd49c 100644 --- a/framework/inc/uielement/recentfilesmenucontroller.hxx +++ b/framework/inc/uielement/recentfilesmenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -52,6 +52,7 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> @@ -65,8 +66,10 @@ namespace framework ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch; }; - class RecentFilesMenuController : public PopupMenuControllerBase + class RecentFilesMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: RecentFilesMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~RecentFilesMenuController(); diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 98894b623aea..e7d670e9559b 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -58,6 +58,7 @@ #include <com/sun/star/frame/XToolbarController.hpp> #include <com/sun/star/ui/ItemStyle.hpp> #include <com/sun/star/util/XURLTransformer.hpp> +#include <com/sun/star/ui/XAcceleratorConfiguration.hpp> //_________________________________________________________________________________________________________________ // other includes @@ -67,6 +68,7 @@ #include <cppuhelper/interfacecontainer.hxx> #include <vcl/toolbox.hxx> +#include <vcl/accel.hxx> namespace com { @@ -179,6 +181,8 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener void RemoveControllers(); rtl::OUString RetrieveLabelFromCommand( const rtl::OUString& aCmdURL ); + sal_Int32 RetrievePropertiesFromCommand( const rtl::OUString& aCmdURL ); + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetPropsForCommand( const ::rtl::OUString& rCmdURL ); void CreateControllers(); void UpdateControllers(); void AddFrameActionListener(); @@ -194,6 +198,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener void setToolBarImage(const Image& _aImage,const CommandToInfoMap::const_iterator& _pIter); void impl_elementChanged(bool _bRemove,const ::com::sun::star::ui::ConfigurationEvent& Event ); + static bool impl_RetrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg, const rtl::OUString& rCommand, rtl::OUString& rShortCut ); + bool RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OUString& rShortCut ); + protected: typedef ::std::hash_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerMap; typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XSubToolbarController > > SubToolBarControllerVector; @@ -233,6 +240,10 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener Timer m_aAsyncUpdateControllersTimer; sal_Int16 m_nSymbolsStyle; MenuDescriptionMap m_aMenuMap; + sal_Bool m_bAcceleratorCfg; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xDocAcceleratorManager; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager; }; } diff --git a/framework/inc/uielement/toolbarsmenucontroller.hxx b/framework/inc/uielement/toolbarsmenucontroller.hxx index dcb0b57182df..35f517d33e80 100644 --- a/framework/inc/uielement/toolbarsmenucontroller.hxx +++ b/framework/inc/uielement/toolbarsmenucontroller.hxx @@ -32,7 +32,7 @@ // my own includes //_________________________________________________________________________________________________________________ -#include <helper/popupmenucontrollerbase.hxx> +#include <macros/xserviceinfo.hxx> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -54,6 +54,7 @@ //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ +#include <svtools/popupmenucontrollerbase.hxx> #include <toolkit/awt/vclxmenu.hxx> #include <cppuhelper/weak.hxx> #include <rtl/ustring.hxx> @@ -63,8 +64,10 @@ namespace framework { - class ToolbarsMenuController : public PopupMenuControllerBase + class ToolbarsMenuController : public svt::PopupMenuControllerBase { + using svt::PopupMenuControllerBase::disposing; + public: ToolbarsMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); virtual ~ToolbarsMenuController(); diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx index d9f8e461c5b5..dd95981bba90 100644 --- a/framework/inc/uielement/uicommanddescription.hxx +++ b/framework/inc/uielement/uicommanddescription.hxx @@ -109,7 +109,7 @@ public: ModuleToCommandFileMap m_aModuleToCommandFileMap; UICommandsHashMap m_aUICommandsHashMap; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xGenericUICommands; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager; }; } // namespace framework diff --git a/framework/inc/uielement/uielementtypenames.hxx b/framework/inc/uielement/uielementtypenames.hxx index fcd14c2f8bff..ca7815f90af7 100644 --- a/framework/inc/uielement/uielementtypenames.hxx +++ b/framework/inc/uielement/uielementtypenames.hxx @@ -7,5 +7,6 @@ #define UIELEMENTTYPE_STATUSBAR_NAME "statusbar" #define UIELEMENTTYPE_FLOATINGWINDOW_NAME "floater" #define UIELEMENTTYPE_PROGRESSBAR_NAME "progressbar" +#define UIELEMENTTYPE_TOOLPANEL_NAME "toolpanel" #endif // __FRAMEWORK_UIELEMENT_UIELEMENTTYPENAMES_HXX_ diff --git a/framework/prj/d.lst b/framework/prj/d.lst index a8640138ba25..7f260f07cf65 100644 --- a/framework/prj/d.lst +++ b/framework/prj/d.lst @@ -5,8 +5,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator -mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator\en-US mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar ..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid @@ -47,7 +45,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar ..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml ..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml -..\uiconfig\startmodule\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator\en-US\*.xml ..\uiconfig\startmodule\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar\*.xml ..\source\unotypes\fw?.xml %_DEST%\xml%_EXT%\*.xml diff --git a/framework/qa/unoapi/knownissues.xcl b/framework/qa/unoapi/knownissues.xcl index f939efcca412..40f1965de639 100755 --- a/framework/qa/unoapi/knownissues.xcl +++ b/framework/qa/unoapi/knownissues.xcl @@ -54,3 +54,6 @@ fwk.Frame ### i90345 ### fwk.URLTransformer::com::sun::star::util::XURLTransformer + +### i111180 ### +fwk.Desktop::com::sun::star::frame::XComponentLoader diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src index d95e0d7213f0..2f8e1bdf2f16 100644 --- a/framework/source/classes/resource.src +++ b/framework/source/classes/resource.src @@ -327,6 +327,11 @@ String STR_LANGSTATUS_NONE Text [ en-US ] = "None (Do not check spelling)" ; Text [ x-comment ] = " "; }; +String STR_RESET_TO_DEFAULT_LANGUAGE +{ + Text [ en-US ] = "Reset to Default Language" ; + Text [ x-comment ] = " "; +}; String STR_LANGSTATUS_MORE { Text [ en-US ] = "More..." ; diff --git a/framework/source/classes/sfxhelperfunctions.cxx b/framework/source/classes/sfxhelperfunctions.cxx index 655d96cdb681..c6953b1ea2b9 100644 --- a/framework/source/classes/sfxhelperfunctions.cxx +++ b/framework/source/classes/sfxhelperfunctions.cxx @@ -32,11 +32,14 @@ #include <classes/sfxhelperfunctions.hxx> #endif +#include <tools/diagnose_ex.h> + static pfunc_setToolBoxControllerCreator pToolBoxControllerCreator = NULL; static pfunc_setStatusBarControllerCreator pStatusBarControllerCreator = NULL; static pfunc_getRefreshToolbars pRefreshToolbars = NULL; static pfunc_createDockingWindow pCreateDockingWindow = NULL; static pfunc_isDockingWindowVisible pIsDockingWindowVisible = NULL; +static pfunc_activateToolPanel pActivateToolPanel = NULL; @@ -155,4 +158,24 @@ bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< :: return false; } +pfunc_activateToolPanel SAL_CALL SetActivateToolPanel( pfunc_activateToolPanel i_pActivator ) +{ + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + pfunc_activateToolPanel pOldFunc = pActivateToolPanel; + pActivateToolPanel = i_pActivator; + return pOldFunc; +} + +void SAL_CALL ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL ) +{ + pfunc_activateToolPanel pActivator = NULL; + { + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + pActivator = pActivateToolPanel; + } + + ENSURE_OR_RETURN_VOID( pActivator, "framework::ActivateToolPanel: no activator function!" ); + (*pActivator)( i_rFrame, i_rPanelURL ); +} + } diff --git a/framework/source/helper/imageproducer.cxx b/framework/source/helper/imageproducer.cxx index 7870697f42a1..c4cf5921ee11 100644 --- a/framework/source/helper/imageproducer.cxx +++ b/framework/source/helper/imageproducer.cxx @@ -44,7 +44,7 @@ pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc ) } -Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ) +Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ) { if ( _pGetImageFunc ) return _pGetImageFunc( rFrame, aURL, bBig, bHiContrast ); diff --git a/framework/source/helper/makefile.mk b/framework/source/helper/makefile.mk index 556a9829d27c..ed54c381160c 100644 --- a/framework/source/helper/makefile.mk +++ b/framework/source/helper/makefile.mk @@ -53,7 +53,6 @@ SLOFILES= $(SLO)$/ocomponentaccess.obj \ $(SLO)$/networkdomain.obj \ $(SLO)$/acceleratorinfo.obj \ $(SLO)$/uielementwrapperbase.obj \ - $(SLO)$/popupmenucontrollerbase.obj \ $(SLO)$/dockingareadefaultacceptor.obj \ $(SLO)$/uiconfigelementwrapperbase.obj \ $(SLO)$/shareablemutex.obj \ diff --git a/framework/source/helper/mischelper.cxx b/framework/source/helper/mischelper.cxx index 801714bafcc1..deb5aa023c1b 100644 --- a/framework/source/helper/mischelper.cxx +++ b/framework/source/helper/mischelper.cxx @@ -29,10 +29,15 @@ #include "precompiled_framework.hxx" #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/document/XDocumentLanguages.hpp> #include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <tools/debug.hxx> +#include <vcl/settings.hxx> +#include <vcl/svapp.hxx> +#include <i18npool/mslangid.hxx> +#include <svtools/langtab.hxx> #include <comphelper/processfactory.hxx> #include <helper/mischelper.hxx> #include <services.h> @@ -45,6 +50,9 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; +using ::rtl::OUString; + + namespace framework { @@ -68,20 +76,23 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues return m_xLanguageGuesser; } -::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL - ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xServiceFactory - ,::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xUICommandLabels - ,const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame - ,::rtl::OUString& _rModuleIdentifier - ,sal_Bool& _rIni - ,const sal_Char* _pName) +//////////////////////////////////////////////////////////// + +::rtl::OUString RetrieveLabelFromCommand( + const ::rtl::OUString& aCmdURL, + const uno::Reference< lang::XMultiServiceFactory >& _xServiceFactory, + uno::Reference< container::XNameAccess >& _xUICommandLabels, + const uno::Reference< frame::XFrame >& _xFrame, + ::rtl::OUString& _rModuleIdentifier, + sal_Bool& _rIni, + const sal_Char* _pName) { ::rtl::OUString aLabel; // Retrieve popup menu labels if ( !_xUICommandLabels.is() ) { - try + try { if ( !_rIni ) { @@ -138,5 +149,91 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues return aLabel; } +//////////////////////////////////////////////////////////// + +void FillLangItems( std::set< OUString > &rLangItems, + const SvtLanguageTable & rLanguageTable, + const uno::Reference< frame::XFrame > & rxFrame, + const LanguageGuessingHelper & rLangGuessHelper, + sal_Int16 nScriptType, + const OUString & rCurLang, + const OUString & rKeyboardLang, + const OUString & rGuessedTextLang ) +{ + rLangItems.clear(); + + //1--add current language + if( rCurLang != OUString() && + LANGUAGE_DONTKNOW != rLanguageTable.GetType( rCurLang )) + rLangItems.insert( rCurLang ); + + //2--System + const AllSettings& rAllSettings = Application::GetSettings(); + LanguageType rSystemLanguage = rAllSettings.GetLanguage(); + if( rSystemLanguage != LANGUAGE_DONTKNOW ) + { + if ( IsScriptTypeMatchingToLanguage( nScriptType, rSystemLanguage )) + rLangItems.insert( OUString( rLanguageTable.GetString( rSystemLanguage )) ); + } + + //3--UI + LanguageType rUILanguage = rAllSettings.GetUILanguage(); + if( rUILanguage != LANGUAGE_DONTKNOW ) + { + if ( IsScriptTypeMatchingToLanguage( nScriptType, rUILanguage )) + rLangItems.insert( OUString( rLanguageTable.GetString( rUILanguage )) ); + } + + //4--guessed language + uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( rLangGuessHelper.GetGuesser() ); + if ( xLangGuesser.is() && rGuessedTextLang.getLength() > 0) + { + ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( rGuessedTextLang, 0, rGuessedTextLang.getLength()) ); + LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); + if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM + && IsScriptTypeMatchingToLanguage( nScriptType, nLang )) + rLangItems.insert( rLanguageTable.GetString( nLang )); + } + + //5--keyboard language + if( rKeyboardLang != OUString()) + { + if ( IsScriptTypeMatchingToLanguage( nScriptType, rLanguageTable.GetType( rKeyboardLang ))) + rLangItems.insert( rKeyboardLang ); + } + + //6--all languages used in current document + Reference< com::sun::star::frame::XModel > xModel; + if ( rxFrame.is() ) + { + Reference< com::sun::star::frame::XController > xController( rxFrame->getController(), UNO_QUERY ); + if ( xController.is() ) + xModel = xController->getModel(); + } + Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY ); + /*the description of nScriptType + LATIN : 0x001 + ASIAN : 0x002 + COMPLEX: 0x004 + */ + const sal_Int16 nMaxCount = 7; + if ( xDocumentLanguages.is() ) + { + Sequence< Locale > rLocales( xDocumentLanguages->getDocumentLanguages( nScriptType, nMaxCount )); + if ( rLocales.getLength() > 0 ) + { + for ( USHORT i = 0; i < rLocales.getLength(); ++i ) + { + if ( rLangItems.size() == static_cast< size_t >(nMaxCount) ) + break; + const Locale& rLocale=rLocales[i]; + if( IsScriptTypeMatchingToLanguage( nScriptType, rLanguageTable.GetType( rLocale.Language ))) + rLangItems.insert( OUString( rLocale.Language ) ); + } + } + } +} + } // namespace framework + diff --git a/framework/source/helper/popupmenucontrollerbase.cxx b/framework/source/helper/popupmenucontrollerbase.cxx deleted file mode 100644 index cc5d388de9a8..000000000000 --- a/framework/source/helper/popupmenucontrollerbase.cxx +++ /dev/null @@ -1,429 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_framework.hxx" -#include <helper/popupmenucontrollerbase.hxx> - -//_________________________________________________________________________________________________________________ -// my own includes -//_________________________________________________________________________________________________________________ -#include <threadhelp/resetableguard.hxx> -#include "services.h" - -//_________________________________________________________________________________________________________________ -// interface includes -//_________________________________________________________________________________________________________________ -#include <com/sun/star/awt/XDevice.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/awt/MenuItemStyle.hpp> -#include <com/sun/star/frame/XDispatchProvider.hpp> -#include <com/sun/star/lang/DisposedException.hpp> - -//_________________________________________________________________________________________________________________ -// includes of other projects -//_________________________________________________________________________________________________________________ - -#ifndef _VCL_MENU_HXX_ -#include <vcl/menu.hxx> -#endif -#include <vcl/svapp.hxx> -#include <rtl/ustrbuf.hxx> -#include <rtl/logfile.hxx> -//_________________________________________________________________________________________________________________ -// Defines -//_________________________________________________________________________________________________________________ -// - -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; -using namespace com::sun::star::frame; -using namespace com::sun::star::beans; -using namespace com::sun::star::util; - -namespace framework -{ - -//***************************************************************************************************************** -// XInterface, XTypeProvider, XServiceInfo -//***************************************************************************************************************** -DEFINE_XINTERFACE_11 ( PopupMenuControllerBase , - OWeakObject , - DIRECT_INTERFACE( css::lang::XTypeProvider ), - DIRECT_INTERFACE( css::lang::XServiceInfo ), - DIRECT_INTERFACE( ::com::sun::star::frame::XPopupMenuController ), - DIRECT_INTERFACE( css::lang::XInitialization ), - DIRECT_INTERFACE( css::frame::XStatusListener ), - DIRECT_INTERFACE( css::awt::XMenuListener ), - DIRECT_INTERFACE( css::frame::XDispatchProvider ), - DIRECT_INTERFACE( css::frame::XDispatch ), - DIRECT_INTERFACE( css::lang::XComponent ), - DERIVED_INTERFACE( css::lang::XEventListener, css::frame::XStatusListener ), - DERIVED_INTERFACE( css::lang::XEventListener, css::awt::XMenuListener ) - ) - -DEFINE_XTYPEPROVIDER_10 ( PopupMenuControllerBase , - css::lang::XTypeProvider , - css::lang::XServiceInfo , - ::com::sun::star::frame::XPopupMenuController , - css::lang::XInitialization , - css::frame::XStatusListener , - css::awt::XMenuListener , - css::lang::XEventListener , - css::frame::XDispatchProvider , - css::frame::XDispatch , - css::lang::XComponent - ) - -PopupMenuControllerBase::PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - ThreadHelpBase(), - ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ), - m_bInitialized( false ), - m_bDisposed( false ), - m_xServiceManager( xServiceManager ), - m_aListenerContainer( m_aLock.getShareableOslMutex() ) -{ - if ( m_xServiceManager.is() ) - m_xURLTransformer.set( m_xServiceManager->createInstance( - SERVICENAME_URLTRANSFORMER), - UNO_QUERY ); -} - -PopupMenuControllerBase::~PopupMenuControllerBase() -{ -} - -// protected function -void PopupMenuControllerBase::resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ) -{ - VCLXPopupMenu* pPopupMenu = 0; - if ( rPopupMenu.is() && rPopupMenu->getItemCount() > 0 ) - { - pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu ); - if ( pPopupMenu ) - { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - - PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); - pVCLPopupMenu->Clear(); - } - } -} - -void SAL_CALL PopupMenuControllerBase::dispose() -throw (::com::sun::star::uno::RuntimeException) -{ - css::uno::Reference< css::lang::XComponent > xThis( static_cast< ::cppu::OWeakObject* >(this), UNO_QUERY ); - - // Send message to all listener and forget their references. - css::lang::EventObject aEvent( xThis ); - m_aListenerContainer.disposeAndClear( aEvent ); - - // Reset our members and set disposed flag - ResetableGuard aLock( m_aLock ); - m_xFrame.clear(); - m_xDispatch.clear(); - m_xPopupMenu.clear(); - m_xServiceManager.clear(); - m_bDisposed = true; -} - -void SAL_CALL PopupMenuControllerBase::addEventListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) -throw (::com::sun::star::uno::RuntimeException) -{ - m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::lang::XEventListener >*)NULL ), xListener ); -} - -void SAL_CALL PopupMenuControllerBase::removeEventListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) -throw (::com::sun::star::uno::RuntimeException) -{ - m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::lang::XEventListener >*)NULL ), xListener ); -} - -// XEventListener -void SAL_CALL PopupMenuControllerBase::disposing( const EventObject& ) throw ( RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - m_xFrame.clear(); - m_xDispatch.clear(); - m_xPopupMenu.clear(); -} - -// XMenuListener -void SAL_CALL PopupMenuControllerBase::highlight( const css::awt::MenuEvent& ) throw (RuntimeException) -{ -} - -void PopupMenuControllerBase::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL) -{ - Sequence<PropertyValue> aArgs; - OSL_ENSURE(_xDispatch.is(),"PopupMenuControllerBase::impl_select: No dispatch"); - if ( _xDispatch.is() ) - _xDispatch->dispatch( aURL, aArgs ); -} - -void SAL_CALL PopupMenuControllerBase::select( const css::awt::MenuEvent& rEvent ) throw (RuntimeException) -{ - Reference< css::awt::XPopupMenu > xPopupMenu; - Reference< XDispatch > xDispatch; - Reference< XMultiServiceFactory > xServiceManager; - - if ( m_bDisposed ) - throw DisposedException(); - - ResetableGuard aLock( m_aLock ); - xPopupMenu = m_xPopupMenu; - xDispatch = m_xDispatch; - xServiceManager = m_xServiceManager; - aLock.unlock(); - - if ( xPopupMenu.is() ) - { - VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( xPopupMenu ); - if ( pPopupMenu ) - { - css::util::URL aTargetURL; - { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); - aTargetURL.Complete = pVCLPopupMenu->GetItemCommand( rEvent.MenuId ); - } - - m_xURLTransformer->parseStrict( aTargetURL ); - impl_select(xDispatch,aTargetURL); - } - } -} - -void SAL_CALL PopupMenuControllerBase::activate( const css::awt::MenuEvent& ) throw (RuntimeException) -{ -} - -void SAL_CALL PopupMenuControllerBase::deactivate( const css::awt::MenuEvent& ) throw (RuntimeException) -{ -} - -void SAL_CALL PopupMenuControllerBase::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - - if ( m_bDisposed ) - throw DisposedException(); - - Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY ); - Reference< XDispatch > xDispatch( m_xDispatch ); - com::sun::star::util::URL aTargetURL; - aTargetURL.Complete = m_aCommandURL; - m_xURLTransformer->parseStrict( aTargetURL ); - aLock.unlock(); - - // Add/remove status listener to get a status update once - if ( xDispatch.is() ) - { - xDispatch->addStatusListener( xStatusListener, aTargetURL ); - xDispatch->removeStatusListener( xStatusListener, aTargetURL ); - } -} - -// XDispatchProvider -Reference< XDispatch > SAL_CALL -PopupMenuControllerBase::queryDispatch( - const URL& /*aURL*/, - const rtl::OUString& /*sTarget*/, - sal_Int32 /*nFlags*/ ) -throw( RuntimeException ) -{ - // must be implemented by subclass - ResetableGuard aLock( m_aLock ); - if ( m_bDisposed ) - throw DisposedException(); - - return Reference< XDispatch >(); -} - -Sequence< Reference< XDispatch > > SAL_CALL PopupMenuControllerBase::queryDispatches( const Sequence< DispatchDescriptor >& lDescriptor ) throw( RuntimeException ) -{ - // Create return list - which must have same size then the given descriptor - // It's not allowed to pack it! - ResetableGuard aLock( m_aLock ); - if ( m_bDisposed ) - throw DisposedException(); - aLock.unlock(); - - sal_Int32 nCount = lDescriptor.getLength(); - css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > lDispatcher( nCount ); - - // Step over all descriptors and try to get any dispatcher for it. - for( sal_Int32 i=0; i<nCount; ++i ) - { - lDispatcher[i] = queryDispatch( lDescriptor[i].FeatureURL , - lDescriptor[i].FrameName , - lDescriptor[i].SearchFlags ); - } - - return lDispatcher; -} - -// XDispatch -void SAL_CALL -PopupMenuControllerBase::dispatch( - const URL& /*aURL*/, - const Sequence< PropertyValue >& /*seqProperties*/ ) -throw( ::com::sun::star::uno::RuntimeException ) -{ - // must be implemented by subclass - ResetableGuard aLock( m_aLock ); - if ( m_bDisposed ) - throw DisposedException(); -} - -void SAL_CALL -PopupMenuControllerBase::addStatusListener( - const Reference< XStatusListener >& xControl, - const URL& aURL ) -throw( ::com::sun::star::uno::RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - if ( m_bDisposed ) - throw DisposedException(); - aLock.unlock(); - - bool bStatusUpdate( false ); - m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XStatusListener >*)NULL ), xControl ); - - aLock.lock(); - if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 ) - bStatusUpdate = true; - aLock.unlock(); - - if ( bStatusUpdate ) - { - // Dummy update for popup menu controllers - FeatureStateEvent aEvent; - aEvent.FeatureURL = aURL; - aEvent.IsEnabled = sal_True; - aEvent.Requery = sal_False; - aEvent.State = Any(); - xControl->statusChanged( aEvent ); - } -} - -void SAL_CALL PopupMenuControllerBase::removeStatusListener( - const Reference< XStatusListener >& xControl, - const URL& /*aURL*/ ) -throw( ::com::sun::star::uno::RuntimeException ) -{ - m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XStatusListener >*)NULL ), xControl ); -} - -::rtl::OUString PopupMenuControllerBase::determineBaseURL( const ::rtl::OUString& aURL ) -{ - // Just use the main part of the URL for popup menu controllers - sal_Int32 nQueryPart( 0 ); - sal_Int32 nSchemePart( 0 ); - rtl::OUString aMainURL( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.popup:" )); - - nSchemePart = aURL.indexOf( ':' ); - if (( nSchemePart > 0 ) && - ( aURL.getLength() > ( nSchemePart+1 ))) - { - nQueryPart = aURL.indexOf( '?', nSchemePart ); - if ( nQueryPart > 0 ) - aMainURL += aURL.copy( nSchemePart, nQueryPart-nSchemePart ); - else if ( nQueryPart == -1 ) - aMainURL += aURL.copy( nSchemePart+1 ); - } - - return aMainURL; -} - -// XInitialization -void SAL_CALL PopupMenuControllerBase::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - - sal_Bool bInitalized( m_bInitialized ); - if ( !bInitalized ) - { - PropertyValue aPropValue; - rtl::OUString aCommandURL; - Reference< XFrame > xFrame; - - for ( int i = 0; i < aArguments.getLength(); i++ ) - { - if ( aArguments[i] >>= aPropValue ) - { - if ( aPropValue.Name.equalsAscii( "Frame" )) - aPropValue.Value >>= xFrame; - else if ( aPropValue.Name.equalsAscii( "CommandURL" )) - aPropValue.Value >>= aCommandURL; - } - } - - if ( xFrame.is() && aCommandURL.getLength() ) - { - m_xFrame = xFrame; - m_aCommandURL = aCommandURL; - m_aBaseURL = determineBaseURL( aCommandURL ); - m_bInitialized = true; - } - } -} -// XPopupMenuController -void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException ) -{ - ResetableGuard aLock( m_aLock ); - - if ( m_bDisposed ) - throw DisposedException(); - - if ( m_xFrame.is() && !m_xPopupMenu.is() ) - { - // Create popup menu on demand - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - - m_xPopupMenu = xPopupMenu; - m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >( (OWeakObject*)this, UNO_QUERY )); - - Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); - - com::sun::star::util::URL aTargetURL; - aTargetURL.Complete = m_aCommandURL; - m_xURLTransformer->parseStrict( aTargetURL ); - m_xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); - - impl_setPopupMenu(); - - updatePopupMenu(); - } -} -void PopupMenuControllerBase::impl_setPopupMenu() -{ -} -} diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index 1ddda0eb0f4d..030ec5bf8cf6 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -45,7 +45,6 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/ui/XUIConfiguration.hpp> -#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // includes of other projects @@ -550,4 +549,23 @@ Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_ return m_xConfigData; } +Reference< XFrame > SAL_CALL UIConfigElementWrapperBase::getFrame() throw (RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + Reference< XFrame > xFrame( m_xWeakFrame ); + return xFrame; +} + +::rtl::OUString SAL_CALL UIConfigElementWrapperBase::getResourceURL() throw (RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + return m_aResourceURL; +} + +::sal_Int16 SAL_CALL UIConfigElementWrapperBase::getType() throw (RuntimeException) +{ + ResetableGuard aLock( m_aLock ); + return m_nType; +} + } diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index 85bb1cdb1e60..6329f94b3063 100644 --- a/framework/source/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -151,6 +151,23 @@ throw ( Exception, RuntimeException ) } } +// XUIElement +::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL UIElementWrapperBase::getFrame() throw (::com::sun::star::uno::RuntimeException) +{ + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( m_xWeakFrame ); + return xFrame; +} + +::rtl::OUString SAL_CALL UIElementWrapperBase::getResourceURL() throw (::com::sun::star::uno::RuntimeException) +{ + return m_aResourceURL; +} + +::sal_Int16 SAL_CALL UIElementWrapperBase::getType() throw (::com::sun::star::uno::RuntimeException) +{ + return m_nType; +} + // XUpdatable void SAL_CALL UIElementWrapperBase::update() throw (::com::sun::star::uno::RuntimeException) { diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 458368bd6581..f72759891acb 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -4707,6 +4707,14 @@ throw (RuntimeException) impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true ); } + else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolpanel" )) + { + ReadGuard aReadGuard( m_aLock ); + css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame ); + aReadGuard.unlock(); + + ActivateToolPanel( m_xFrame, aName ); + } } if ( bNotify ) diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx index dc5682c7d398..7382380ef525 100644 --- a/framework/source/register/registertemp.cxx +++ b/framework/source/register/registertemp.cxx @@ -78,6 +78,7 @@ #include <uielement/macrosmenucontroller.hxx> #include <uielement/newmenucontroller.hxx> #include <uielement/toolbarsmenucontroller.hxx> +#include <uielement/popupmenucontroller.hxx> COMPONENTGETIMPLEMENTATIONENVIRONMENT @@ -103,6 +104,7 @@ COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::MediaTypeDetectionHelper COMPONENTINFO( ::framework::DispatchRecorderSupplier ) COMPONENTINFO( ::framework::Oxt_Handler ) COMPONENTINFO( ::framework::License ) + COMPONENTINFO( ::framework::PopupMenuController ) ) COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper ) @@ -126,5 +128,6 @@ COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper IFFACTORY( ::framework::FooterMenuController ) else IFFACTORY( ::framework::HeaderMenuController ) else IFFACTORY( ::framework::LanguageSelectionMenuController ) else - IFFACTORY( ::framework::Oxt_Handler ) + IFFACTORY( ::framework::Oxt_Handler ) else + IFFACTORY( ::framework::PopupMenuController ) ) diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index e4d37d1fe059..fb3d6a18eb79 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -42,7 +42,7 @@ #include "unotools/dynamicmenuoptions.hxx" #include "svtools/imagemgr.hxx" -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" #include "comphelper/processfactory.hxx" #include "comphelper/sequenceashashmap.hxx" diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 8840aee6a634..193bd63b5ad5 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -120,7 +120,8 @@ static const char* UIELEMENTTYPENAMES[] = UIELEMENTTYPE_TOOLBAR_NAME, UIELEMENTTYPE_STATUSBAR_NAME, UIELEMENTTYPE_FLOATINGWINDOW_NAME, - UIELEMENTTYPE_PROGRESSBAR_NAME + UIELEMENTTYPE_PROGRESSBAR_NAME, + UIELEMENTTYPE_TOOLPANEL_NAME }; static const char RESOURCEURL_PREFIX[] = "private:resource/"; @@ -292,11 +293,12 @@ void ModuleUIConfigurationManager::impl_preloadUIElementTypeList( Layer eLayer, rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData )); } } + rElementTypeData.bLoaded = true; } } } - rElementTypeData.bLoaded = true; + //rElementTypeData.bLoaded = true; } void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData ) diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 4adebdd36c47..e704fe680ae9 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -118,7 +118,8 @@ static const char* UIELEMENTTYPENAMES[] = UIELEMENTTYPE_TOOLBAR_NAME, UIELEMENTTYPE_STATUSBAR_NAME, UIELEMENTTYPE_FLOATINGWINDOW_NAME, - UIELEMENTTYPE_PROGRESSBAR_NAME + UIELEMENTTYPE_PROGRESSBAR_NAME, + UIELEMENTTYPE_TOOLPANEL_NAME }; static const char RESOURCEURL_PREFIX[] = "private:resource/"; diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 3921625cc76f..058005ffdc40 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -46,7 +46,6 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/frame/status/ItemStatus.hpp> #include <com/sun/star/frame/status/ItemState.hpp> #include <com/sun/star/frame/status/Visibility.hpp> diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 0672ac69d351..49501194a014 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -61,6 +61,7 @@ #include <vcl/image.hxx> #include <svtools/menuoptions.hxx> #include <dispatch/uieventloghelper.hxx> +#include <vos/mutex.hxx> // Copied from svx // Function-Id's @@ -213,7 +214,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ControlMenuController DEFINE_INIT_SERVICE ( ControlMenuController, {} ) ControlMenuController::ControlMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ), + svt::PopupMenuControllerBase( xServiceManager ), m_pResPopupMenu( 0 ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); @@ -272,7 +273,7 @@ void SAL_CALL ControlMenuController::disposing( const EventObject& ) throw ( Run { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::ResettableMutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xServiceManager.clear(); @@ -286,7 +287,7 @@ void SAL_CALL ControlMenuController::disposing( const EventObject& ) throw ( Run // XStatusListener void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::ResettableMutexGuard aLock( m_aMutex ); USHORT nMenuId = 0; for (sal_uInt32 i=0; i < sizeof(aCommands)/sizeof(aCommands[0]); ++i) @@ -351,7 +352,7 @@ void ControlMenuController::impl_select(const Reference< XDispatch >& /*_xDispat void SAL_CALL ControlMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException) { - ResetableGuard aLock( m_aLock ); + osl::ResettableMutexGuard aLock( m_aMutex ); if ( m_xPopupMenu.is() ) { @@ -404,10 +405,9 @@ void ControlMenuController::impl_setPopupMenu() void SAL_CALL ControlMenuController::updatePopupMenu() throw (::com::sun::star::uno::RuntimeException) { - ResetableGuard aLock( m_aLock ); + osl::ResettableMutexGuard aLock( m_aMutex ); - if ( m_bDisposed ) - throw DisposedException(); + throwIfDisposed(); if ( m_xFrame.is() && m_xPopupMenu.is() ) { @@ -435,8 +435,8 @@ void SAL_CALL ControlMenuController::updatePopupMenu() throw (::com::sun::star:: // XInitialization void SAL_CALL ControlMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) { - ResetableGuard aLock( m_aLock ); - PopupMenuControllerBase::initialize(aArguments); + osl::ResettableMutexGuard aLock( m_aMutex ); + svt::PopupMenuControllerBase::initialize(aArguments); m_aBaseURL = ::rtl::OUString(); } diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index 43b50eb2a49a..0800103c743e 100644 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -46,7 +46,6 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/frame/status/ItemStatus.hpp> #include <com/sun/star/frame/status/ItemState.hpp> #include <com/sun/star/frame/status/Visibility.hpp> diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index 3ad4b11fd1e9..387213d7c3eb 100644 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -46,7 +46,6 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/frame/status/ItemStatus.hpp> #include <com/sun/star/frame/status/ItemState.hpp> #include <com/sun/star/frame/status/Visibility.hpp> diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index 7110ea5aa519..c2625a951efb 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -59,6 +59,7 @@ #include <vcl/mnemonic.hxx> #endif #include <dispatch/uieventloghelper.hxx> +#include <vos/mutex.hxx> //_________________________________________________________________________________________________________________ // Defines @@ -91,7 +92,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( FontMenuController DEFINE_INIT_SERVICE ( FontMenuController, {} ) FontMenuController::FontMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ) + svt::PopupMenuControllerBase( xServiceManager ) { } @@ -145,7 +146,7 @@ void SAL_CALL FontMenuController::disposing( const EventObject& ) throw ( Runtim { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xFontListDispatch.clear(); @@ -164,12 +165,12 @@ void SAL_CALL FontMenuController::statusChanged( const FeatureStateEvent& Event if ( Event.State >>= aFontDescriptor ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_aFontFamilyName = aFontDescriptor.Name; } else if ( Event.State >>= aFontNameSeq ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); if ( m_xPopupMenu.is() ) fillPopupMenu( aFontNameSeq, m_xPopupMenu ); } @@ -192,7 +193,7 @@ void FontMenuController::impl_select(const Reference< XDispatch >& _xDispatch,co void SAL_CALL FontMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); if ( m_xPopupMenu.is() ) { @@ -241,14 +242,14 @@ void FontMenuController::impl_setPopupMenu() void SAL_CALL FontMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException ) { - PopupMenuControllerBase::updatePopupMenu(); + svt::PopupMenuControllerBase::updatePopupMenu(); - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); Reference< XDispatch > xDispatch( m_xFontListDispatch ); com::sun::star::util::URL aTargetURL; aTargetURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontNameList" )); m_xURLTransformer->parseStrict( aTargetURL ); - aLock.unlock(); + aLock.clear(); if ( xDispatch.is() ) { diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 8dbd608a28e0..58cf3a3b02be 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -64,6 +64,7 @@ #include <svtools/ctrltool.hxx> #endif #include <dispatch/uieventloghelper.hxx> +#include <vos/mutex.hxx> //_________________________________________________________________________________________________________________ // Defines @@ -90,7 +91,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( FontSizeMenuController DEFINE_INIT_SERVICE ( FontSizeMenuController, {} ) FontSizeMenuController::FontSizeMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ), + svt::PopupMenuControllerBase( xServiceManager ), m_pHeightArray( 0 ), m_bRebuildMenu( sal_True ) { @@ -280,7 +281,7 @@ void SAL_CALL FontSizeMenuController::disposing( const EventObject& ) throw ( Ru { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xCurrentFontDispatch.clear(); @@ -297,7 +298,7 @@ void SAL_CALL FontSizeMenuController::statusChanged( const FeatureStateEvent& Ev if ( Event.State >>= aFontDescriptor ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_aFontDescriptor = aFontDescriptor; if ( m_xPopupMenu.is() ) @@ -306,7 +307,7 @@ void SAL_CALL FontSizeMenuController::statusChanged( const FeatureStateEvent& Ev } else if ( Event.State >>= aFontHeight ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_aFontHeight = aFontHeight; if ( m_xPopupMenu.is() ) @@ -341,16 +342,15 @@ void FontSizeMenuController::impl_setPopupMenu() void SAL_CALL FontSizeMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); - if ( m_bDisposed ) - throw DisposedException(); + throwIfDisposed(); Reference< XDispatch > xDispatch( m_xCurrentFontDispatch ); com::sun::star::util::URL aTargetURL; aTargetURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharFontName" )); m_xURLTransformer->parseStrict( aTargetURL ); - aLock.unlock(); + aLock.clear(); if ( xDispatch.is() ) { @@ -358,6 +358,6 @@ void SAL_CALL FontSizeMenuController::updatePopupMenu() throw ( ::com::sun::star xDispatch->removeStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL ); } - PopupMenuControllerBase::updatePopupMenu(); + svt::PopupMenuControllerBase::updatePopupMenu(); } } diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index 50b2ed65e2d2..c0d7b48a401b 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -50,7 +50,6 @@ #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // includes of other projects @@ -65,6 +64,7 @@ #include <rtl/ustrbuf.hxx> //#include <tools/solar.hrc> #include <dispatch/uieventloghelper.hxx> +#include <vos/mutex.hxx> //_________________________________________________________________________________________________________________ // Defines @@ -97,7 +97,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( HeaderMenuController DEFINE_INIT_SERVICE ( HeaderMenuController, {} ) HeaderMenuController::HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool _bFooter ) : - PopupMenuControllerBase( xServiceManager ) + svt::PopupMenuControllerBase( xServiceManager ) ,m_bFooter(_bFooter) { } @@ -221,7 +221,7 @@ void SAL_CALL HeaderMenuController::disposing( const EventObject& ) throw ( Runt { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xServiceManager.clear(); @@ -238,7 +238,7 @@ void SAL_CALL HeaderMenuController::statusChanged( const FeatureStateEvent& Even if ( Event.State >>= xModel ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xModel = xModel; if ( m_xPopupMenu.is() ) fillPopupMenu( xModel, m_xPopupMenu ); @@ -258,18 +258,17 @@ void HeaderMenuController::impl_select(const Reference< XDispatch >& _xDispatch, void SAL_CALL HeaderMenuController::updatePopupMenu() throw (::com::sun::star::uno::RuntimeException) { - ResetableGuard aLock( m_aLock ); + osl::ResettableMutexGuard aLock( m_aMutex ); - if ( m_bDisposed ) - throw DisposedException(); + throwIfDisposed(); Reference< com::sun::star::frame::XModel > xModel( m_xModel ); - aLock.unlock(); + aLock.clear(); if ( !xModel.is() ) - PopupMenuControllerBase::updatePopupMenu(); + svt::PopupMenuControllerBase::updatePopupMenu(); - aLock.lock(); + aLock.reset(); if ( m_xPopupMenu.is() && m_xModel.is() ) fillPopupMenu( m_xModel, m_xPopupMenu ); } diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index d9af2fb4f9f9..5126ffdd253a 100644 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -46,7 +46,6 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/frame/XControlNotificationListener.hpp> #include "com/sun/star/util/XMacroExpander.hpp" #include "com/sun/star/uno/XComponentContext.hpp" diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index f2c905f237e8..651c9bbfdc86 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" + #include <uielement/langselectionmenucontroller.hxx> //_________________________________________________________________________________________________________________ @@ -63,7 +64,7 @@ #include <com/sun/star/document/XDocumentLanguages.hpp> #include <com/sun/star/frame/XPopupMenuController.hpp> #include <com/sun/star/linguistic2/XLanguageGuessing.hpp> -#include <map> + #include <i18npool/mslangid.hxx> #include <svl/languageoptions.hxx> #include <com/sun/star/awt/MenuItemStyle.hpp> @@ -76,6 +77,10 @@ #include <dispatch/uieventloghelper.hxx> #include "helper/mischelper.hxx" +#include <vos/mutex.hxx> + +#include <map> +#include <set> //_________________________________________________________________________________________________________________ // Defines @@ -88,6 +93,7 @@ using namespace com::sun::star::frame; using namespace com::sun::star::beans; using namespace com::sun::star::util; +using ::rtl::OUString; namespace framework { @@ -101,9 +107,9 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( LanguageSelectionMenuController DEFINE_INIT_SERVICE ( LanguageSelectionMenuController, {} ) LanguageSelectionMenuController::LanguageSelectionMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ), - m_bShowMenu( sal_True ) - ,m_aLangGuessHelper(xServiceManager) + svt::PopupMenuControllerBase( xServiceManager ), + m_bShowMenu( sal_True ), + m_aLangGuessHelper( xServiceManager ) { } @@ -116,7 +122,7 @@ void SAL_CALL LanguageSelectionMenuController::disposing( const EventObject& ) t { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xLanguageDispatch.clear(); @@ -132,29 +138,25 @@ void SAL_CALL LanguageSelectionMenuController::statusChanged( const FeatureState { vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - if ( m_bDisposed ) + if (rBHelper.bDisposed || rBHelper.bInDispose) return; m_bShowMenu = sal_True; - m_nScriptType=7;//set the default value + m_nScriptType = LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX; //set the default value - rtl::OUString aStrValue; - Sequence< ::rtl::OUString > aSeq; + OUString aStrValue; + Sequence< OUString > aSeq; - if ( Event.State >>= aStrValue ) - { - m_aCurrentLanguage=aStrValue; - } - else if ( Event.State >>= aSeq ) + if ( Event.State >>= aSeq ) { if ( aSeq.getLength() == 4 ) { // Retrieve all other values from the sequence and // store it members! - m_aCurLang=aSeq[0]; - m_nScriptType= static_cast< sal_Int16 >(aSeq[1].toInt32()); - m_aKeyboardLang=aSeq[2]; - m_aGuessedText=aSeq[3]; + m_aCurLang = aSeq[0]; + m_nScriptType = static_cast< sal_Int16 >(aSeq[1].toInt32()); + m_aKeyboardLang = aSeq[2]; + m_aGuessedTextLang = aSeq[3]; } } else if ( !Event.State.hasValue() ) @@ -185,14 +187,14 @@ void LanguageSelectionMenuController::impl_select(const Reference< XDispatch >& { Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); if ( xDispatchProvider.is() ) - xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); } if ( xDispatch.is() ) { Sequence<PropertyValue> aArgs; if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# - UiEventLogHelper(::rtl::OUString::createFromAscii("LanguageSelectionMenuController")).log(m_xServiceManager, m_xFrame, aTargetURL, aArgs); + UiEventLogHelper( OUString::createFromAscii("LanguageSelectionMenuController")).log( m_xServiceManager, m_xFrame, aTargetURL, aArgs ); xDispatch->dispatch( aTargetURL, aArgs ); } } @@ -207,22 +209,22 @@ void LanguageSelectionMenuController::impl_setPopupMenu() // Register for language updates aTargetURL.Complete = m_aLangStatusCommandURL; m_xURLTransformer->parseStrict( aTargetURL ); - m_xLanguageDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + m_xLanguageDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); // Register for setting languages and opening language dialog aTargetURL.Complete = m_aMenuCommandURL_Lang; m_xURLTransformer->parseStrict( aTargetURL ); - m_xMenuDispatch_Lang = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + m_xMenuDispatch_Lang = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); // Register for opening character dialog aTargetURL.Complete = m_aMenuCommandURL_Font; m_xURLTransformer->parseStrict( aTargetURL ); - m_xMenuDispatch_Font = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + m_xMenuDispatch_Font = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); // Register for opening character dialog with preselected paragraph aTargetURL.Complete = m_aMenuCommandURL_CharDlgForParagraph; m_xURLTransformer->parseStrict( aTargetURL ); - m_xMenuDispatch_CharDlgForParagraph = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 ); + m_xMenuDispatch_CharDlgForParagraph = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 ); } void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopupMenu , const Mode eMode ) @@ -244,157 +246,91 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup String aCmd_Language; if( eMode == MODE_SetLanguageSelectionMenu ) { - aCmd_Dialog+=String::CreateFromAscii(".uno:FontDialog?Language:string=*"); - aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_"); + aCmd_Dialog.AppendAscii(".uno:FontDialog?Language:string=*"); + aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Current_"); } else if ( eMode == MODE_SetLanguageParagraphMenu ) { - aCmd_Dialog+=String::CreateFromAscii(".uno:FontDialogForParagraph"); - aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_"); + aCmd_Dialog.AppendAscii(".uno:FontDialogForParagraph"); + aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Paragraph_"); } else if ( eMode == MODE_SetLanguageAllTextMenu ) { - aCmd_Dialog+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=*"); - aCmd_Language+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Default_"); + aCmd_Dialog.AppendAscii(".uno:LanguageStatus?Language:string=*"); + aCmd_Language.AppendAscii(".uno:LanguageStatus?Language:string=Default_"); } - //Reference< awt::XMenuExtended > m_xMenuExtended( m_xPopupMenu, UNO_QUERY ); - std::map< ::rtl::OUString, ::rtl::OUString > LangItems; - - SvtLanguageTable aLanguageTable; - USHORT nItemId = 1; - - //1--add current language - if(m_aCurLang.getLength()) + SvtLanguageTable aLanguageTable; + + // get languages to be displayed in the menu + std::set< OUString > aLangItems; + FillLangItems( aLangItems, aLanguageTable, m_xFrame, m_aLangGuessHelper, + m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedTextLang ); + + // + // now add menu entries + // the different menues purpose will be handled by the different string + // for aCmd_Dialog and aCmd_Language + // + + sal_Int16 nItemId = 1; // in this control the item id is not important for executing the command + const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection + const OUString sEmpty; // 'no language found' from language guessing + std::map< sal_Int16, OUString > aLangMap; + std::set< OUString >::const_iterator it; + for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { - LangItems[m_aCurLang]=m_aCurLang; - } - - SvtLanguageTable aLangTable; - //2--System - const AllSettings& rAllSettings=Application::GetSettings(); - LanguageType rSystemLanguage = rAllSettings.GetLanguage(); - if(rSystemLanguage!=LANGUAGE_DONTKNOW) - { - if (IsScriptTypeMatchingToLanguage(m_nScriptType,rSystemLanguage )) - LangItems[::rtl::OUString(aLangTable.GetString(rSystemLanguage))]=::rtl::OUString(aLangTable.GetString(rSystemLanguage)); - } - - //3--UI - LanguageType rUILanguage = rAllSettings.GetUILanguage(); - if(rUILanguage!=LANGUAGE_DONTKNOW) - { - if (IsScriptTypeMatchingToLanguage(m_nScriptType, rUILanguage )) - LangItems[::rtl::OUString(aLangTable.GetString(rUILanguage))]=::rtl::OUString(aLangTable.GetString(rUILanguage)); - } - - //4--guessed language - uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( m_aLangGuessHelper.GetGuesser() ); - if (xLangGuesser.is() && m_aGuessedText.getLength() > 0) - { - ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( m_aGuessedText, 0, m_aGuessedText.getLength()) ); - LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); - if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM - && IsScriptTypeMatchingToLanguage( m_nScriptType, nLang )) - LangItems[aLangTable.GetString(nLang)]=aLangTable.GetString(nLang); - } - - //5--keyboard language - if(m_aKeyboardLang!=::rtl::OUString::createFromAscii("")) - { - if (IsScriptTypeMatchingToLanguage(m_nScriptType, aLanguageTable.GetType(m_aKeyboardLang))) - LangItems[m_aKeyboardLang] = m_aKeyboardLang; - } - - //6--all languages used in current document - Reference< com::sun::star::frame::XModel > xModel; - if ( m_xFrame.is() ) - { - Reference< com::sun::star::frame::XController > xController( m_xFrame->getController(), UNO_QUERY ); - if ( xController.is() ) - xModel = xController->getModel(); - } - Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY ); - /*the description of m_nScriptType - LATIN : 1 - ASIAN : 2 - COMPLEX:4 - LATIN + ASIAN : 3 - LATIN + COMPLEX : 5 - ASIAN + COMPLEX : 6 - LATIN + ASIAN + COMPLEX : 7 - */ - - sal_Int16 nCount=7; - if(xDocumentLanguages.is()) - { - Sequence< Locale > rLocales(xDocumentLanguages->getDocumentLanguages(m_nScriptType,nCount)); - if(rLocales.getLength()>0) - { - for(USHORT i = 0; i<rLocales.getLength();++i) - { - if (LangItems.size()==7) - break; - const Locale& rLocale=rLocales[i]; - if(IsScriptTypeMatchingToLanguage(m_nScriptType, aLanguageTable.GetType(rLocale.Language))) - LangItems[rLocale.Language] = rLocale.Language; - } - } - } - std::map< sal_Int16, ::rtl::OUString > LangTable; - - const ::rtl::OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); - bool bMultipleLanguages = (eMode != MODE_SetLanguageSelectionMenu) || m_aCurLang.compareToAscii( "*" ) == 0; - bool bNothingSelected = true; - MenuItemBits nItemBits = !bMultipleLanguages ? MIB_RADIOCHECK : 0; - for(std::map< ::rtl::OUString, ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it) - { - if(it->first != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& - it->first != sAsterix && - it->first.getLength()) + const OUString & rStr( *it ); + if (rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&& + rStr != sAsterix && + rStr != sEmpty) { - ++nItemId; - pPopupMenu->InsertItem( nItemId,it->first,nItemBits ); - LangTable[nItemId] = it->first; - if(it->first == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) + pPopupMenu->InsertItem( nItemId, rStr ); + aCmd = aCmd_Language; + aCmd += String( rStr ); + pPopupMenu->SetItemCommand( nItemId, aCmd ); + if (rStr == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) { //make a sign for the current language - pPopupMenu->CheckItem(nItemId,TRUE); - bNothingSelected = false; + pPopupMenu->CheckItem( nItemId, TRUE ); } - aCmd=aCmd_Language; - aCmd+=(String)it->first; - pPopupMenu->SetItemCommand(nItemId,aCmd); + aLangMap[ nItemId ] = rStr; + ++nItemId; } } - //7--none - nItemId++; - pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )), nItemBits ); - if (bNothingSelected && !bMultipleLanguages) - pPopupMenu->CheckItem(nItemId,TRUE); + // entry for LANGUAGE_NONE + ++nItemId; + pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )) ); + aCmd=aCmd_Language; + aCmd.AppendAscii("LANGUAGE_NONE"); + pPopupMenu->SetItemCommand( nItemId, aCmd ); + + // entry for 'Reset to default language' + ++nItemId; + pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_RESET_TO_DEFAULT_LANGUAGE )) ); aCmd=aCmd_Language; - aCmd+=String::CreateFromAscii("LANGUAGE_NONE"); - pPopupMenu->SetItemCommand(nItemId,aCmd); + aCmd.AppendAscii("RESET_LANGUAGES"); + pPopupMenu->SetItemCommand( nItemId, aCmd ); - //More... - nItemId++; + // entry for opening the Format/Character dialog + ++nItemId; pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_MORE ))); - pPopupMenu->SetItemCommand(nItemId,aCmd_Dialog); + pPopupMenu->SetItemCommand( nItemId, aCmd_Dialog ); } void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException ) { - PopupMenuControllerBase::updatePopupMenu(); + svt::PopupMenuControllerBase::updatePopupMenu(); // Force status update to get information about the current languages - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); Reference< XDispatch > xDispatch( m_xLanguageDispatch ); com::sun::star::util::URL aTargetURL; aTargetURL.Complete = m_aLangStatusCommandURL; m_xURLTransformer->parseStrict( aTargetURL ); - aLock.unlock(); + aLock.clear(); if ( xDispatch.is() ) { @@ -421,19 +357,19 @@ void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com:: // XInitialization void SAL_CALL LanguageSelectionMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); sal_Bool bInitalized( m_bInitialized ); if ( !bInitalized ) { - PopupMenuControllerBase::initialize(aArguments); + svt::PopupMenuControllerBase::initialize(aArguments); if ( m_bInitialized ) { - m_aLangStatusCommandURL = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LanguageStatus" )); + m_aLangStatusCommandURL = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LanguageStatus" )); m_aMenuCommandURL_Lang = m_aLangStatusCommandURL; - m_aMenuCommandURL_Font = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialog" )); - m_aMenuCommandURL_CharDlgForParagraph = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialogForParagraph" )); + m_aMenuCommandURL_Font = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialog" )); + m_aMenuCommandURL_CharDlgForParagraph = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontDialogForParagraph" )); } } } diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 544597261852..021ee4e8f8df 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" + #include <uielement/langselectionstatusbarcontroller.hxx> #include <classes/fwkresid.hxx> #include <services.h> @@ -53,8 +54,6 @@ #include <com/sun/star/frame/XModule.hpp> #include <com/sun/star/frame/XModel.hpp> -#include <map> -#include <set> #include <classes/fwkresid.hxx> #ifndef __FRAMEWORK_CLASSES_RESOURCE_HRC_ #include <classes/resource.hrc> @@ -74,6 +73,9 @@ #include "helper/mischelper.hxx" +#include <map> +#include <set> + using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -82,9 +84,14 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::document; +using ::rtl::OUString; + + namespace framework { +//////////////////////////////////////////////////////////// + DEFINE_XSERVICEINFO_MULTISERVICE ( LangSelectionStatusbarController , OWeakObject , SERVICENAME_STATUSBARCONTROLLER , @@ -94,10 +101,10 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( LangSelectionStatusbarController DEFINE_INIT_SERVICE ( LangSelectionStatusbarController, {} ) LangSelectionStatusbarController::LangSelectionStatusbarController( const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) : - svt::StatusbarController( xServiceManager, uno::Reference< frame::XFrame >(), rtl::OUString(), 0 ), + svt::StatusbarController( xServiceManager, uno::Reference< frame::XFrame >(), OUString(), 0 ), m_bShowMenu( sal_True ), - m_nScriptType( 7 ) - ,m_aLangGuessHelper(xServiceManager) + m_nScriptType( LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX ), + m_aLangGuessHelper( xServiceManager ) { } @@ -178,223 +185,158 @@ throw (::com::sun::star::uno::RuntimeException) return sal_False; } -void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::RuntimeException) +void LangSelectionStatusbarController::LangMenu() +throw (::com::sun::star::uno::RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "LangSelectionStatusbarController::LangMenu" ); if (!m_bShowMenu) return; //add context menu - const static ::rtl::OUString s_sPopupMenu(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.PopupMenu")); + const static OUString s_sPopupMenu(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.PopupMenu")); Reference< awt::XPopupMenu > xPopupMenu( m_xServiceManager->createInstance( s_sPopupMenu ), UNO_QUERY ); //sub menu that contains all items except the last two items: Separator + Set Language for Paragraph Reference< awt::XPopupMenu > subPopupMenu(m_xServiceManager->createInstance( s_sPopupMenu ), UNO_QUERY ); - std::set< ::rtl::OUString > LangItems; - - SvtLanguageTable aLanguageTable; - USHORT nItemId=1; - - //1--add current language - if( m_aCurLang != ::rtl::OUString( ) && - LANGUAGE_DONTKNOW != aLanguageTable.GetType( m_aCurLang )) - LangItems.insert( m_aCurLang ); - - //2--System - SvtLanguageTable aLangTable; - const AllSettings& rAllSettings = Application::GetSettings(); - LanguageType rSystemLanguage = rAllSettings.GetLanguage(); - if( rSystemLanguage != LANGUAGE_DONTKNOW ) - { - if ( IsScriptTypeMatchingToLanguage( m_nScriptType, rSystemLanguage )) - LangItems.insert( ::rtl::OUString( aLangTable.GetString( rSystemLanguage )) ); - } - - //3--UI - LanguageType rUILanguage = rAllSettings.GetUILanguage(); - if( rUILanguage != LANGUAGE_DONTKNOW ) - { - if ( IsScriptTypeMatchingToLanguage( m_nScriptType, rUILanguage )) - LangItems.insert( ::rtl::OUString( aLangTable.GetString( rUILanguage )) ); - } - - //4--guessed language - uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( m_aLangGuessHelper.GetGuesser() ); - if ( xLangGuesser.is() && m_aGuessedText.getLength() > 0) - { - ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( m_aGuessedText, 0, m_aGuessedText.getLength()) ); - LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); - if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM - && IsScriptTypeMatchingToLanguage( m_nScriptType, nLang )) - LangItems.insert( aLangTable.GetString( nLang )); - } - - //5--keyboard language - if( m_aKeyboardLang != ::rtl::OUString::createFromAscii( "" )) + SvtLanguageTable aLanguageTable; + + // get languages to be displayed in the menu + std::set< OUString > aLangItems; + FillLangItems( aLangItems, aLanguageTable, m_xFrame, m_aLangGuessHelper, + m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedTextLang ); + + // + // add first few entries to main menu + // + sal_Int16 nItemId = static_cast< sal_Int16 >(MID_LANG_SEL_1); + const OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); // multiple languages in current selection + const OUString sEmpty; // 'no language found' from language guessing + std::map< sal_Int16, OUString > aLangMap; + std::set< OUString >::const_iterator it; + for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { - if ( IsScriptTypeMatchingToLanguage( m_nScriptType, aLanguageTable.GetType( m_aKeyboardLang ))) - LangItems.insert( m_aKeyboardLang ); - } - - //6--all languages used in current document - Reference< com::sun::star::frame::XModel > xModel; - if ( m_xFrame.is() ) - { - Reference< com::sun::star::frame::XController > xController( m_xFrame->getController(), UNO_QUERY ); - if ( xController.is() ) - xModel = xController->getModel(); - } - Reference< document::XDocumentLanguages > xDocumentLanguages( xModel, UNO_QUERY ); - /*the description of m_nScriptType - LATIN : 1 - ASIAN : 2 - COMPLEX:4 - LATIN + ASIAN : 3 - LATIN + COMPLEX : 5 - ASIAN + COMPLEX : 6 - LATIN + ASIAN + COMPLEX : 7 - */ - - sal_Int16 nCount=7; - if ( xDocumentLanguages.is() ) - { - Sequence< Locale > rLocales( xDocumentLanguages->getDocumentLanguages( m_nScriptType, nCount )); - if ( rLocales.getLength() > 0 ) - { - for ( USHORT i = 0; i<rLocales.getLength();++i ) - { - if ( LangItems.size() == 7 ) - break; - const Locale& rLocale=rLocales[i]; - if( IsScriptTypeMatchingToLanguage( m_nScriptType, aLangTable.GetType( rLocale.Language ))) - LangItems.insert( ::rtl::OUString( rLocale.Language ) ); - } - } - } - std::map< sal_Int16, ::rtl::OUString > LangTable; - bool bMultipleLanguages = m_aCurLang.compareToAscii( "*" ) == 0; - bool bNothingSelected = true; - sal_Int16 nMenuItemStyle = !bMultipleLanguages ? css::awt::MenuItemStyle::RADIOCHECK : 0; - - for( std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it ) - { - if ( *it != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& - *it != ::rtl::OUString::createFromAscii( "*" ) && - *it != ::rtl::OUString::createFromAscii( "" )) + const OUString & rStr( *it ); + if ( rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) ) && + rStr != sAsterix && + rStr != sEmpty) { - //nItemId = xPopupMenu->getItemCount()+1; - nItemId++; - xPopupMenu->insertItem( nItemId, *it, nMenuItemStyle, nItemId ); - LangTable[nItemId]=*it; - if( *it == m_aCurLang ) + DBG_ASSERT( MID_LANG_SEL_1 <= nItemId && nItemId <= MID_LANG_SEL_9, + "nItemId outside of expected range!" ); + xPopupMenu->insertItem( nItemId, rStr, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + if ( rStr == m_aCurLang ) { //make a sign for the current language xPopupMenu->checkItem( nItemId, TRUE ); - bNothingSelected = false; } + aLangMap[ nItemId ] = rStr; + ++nItemId; } } - - //7--none - nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), nMenuItemStyle, nItemId ); - if (bNothingSelected && !bMultipleLanguages) - xPopupMenu->checkItem( nItemId, TRUE ); - - //More... - nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId ); - - for( ::std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it ) + xPopupMenu->insertItem( MID_LANG_SEL_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_NONE ); + xPopupMenu->insertItem( MID_LANG_SEL_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_RESET ); + xPopupMenu->insertItem( MID_LANG_SEL_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_SEL_MORE ); + + // + // add entries to submenu ('set language for paragraph') + // + nItemId = static_cast< sal_Int16 >(MID_LANG_PARA_1); + for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { - if( *it != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& - *it != ::rtl::OUString::createFromAscii( "*" ) && - *it != ::rtl::OUString::createFromAscii( "" )) + const OUString & rStr( *it ); + if( rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&& + rStr != sAsterix && + rStr != sEmpty) { - nItemId++; - subPopupMenu->insertItem( nItemId, *it, 0, nItemId ); - LangTable[nItemId]=*it; + DBG_ASSERT( MID_LANG_PARA_1 <= nItemId && nItemId <= MID_LANG_PARA_9, + "nItemId outside of expected range!" ); + subPopupMenu->insertItem( nItemId, rStr, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + aLangMap[nItemId] = rStr; + ++nItemId; } } - //7--none - nItemId++; - subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), 0, nItemId ); - //More - nItemId++; - subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId ); + subPopupMenu->insertItem( MID_LANG_PARA_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_NONE ); + subPopupMenu->insertItem( MID_LANG_PARA_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_RESET ); + subPopupMenu->insertItem( MID_LANG_PARA_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_MORE ); - nItemId++; - xPopupMenu->insertSeparator(nItemId); + // + // add last two entries to main menu + // + xPopupMenu->insertSeparator( MID_LANG_PARA_SEPERATOR ); + xPopupMenu->insertItem( MID_LANG_PARA_STRING, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, MID_LANG_PARA_STRING ); + xPopupMenu->setPopupMenu( MID_LANG_PARA_STRING, subPopupMenu ); - nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), 0, nItemId ); - xPopupMenu->setPopupMenu( nItemId, subPopupMenu ); - //display the popup menu and execute every command + // + // now display the popup menu and execute every command ... + // Reference< awt::XWindowPeer > xParent( m_xParentWindow, UNO_QUERY ); - com::sun::star::awt::Rectangle mRectangle; + com::sun::star::awt::Rectangle aRectangle; Window* pWindow = VCLUnoHelper::GetWindow( m_xParentWindow ); const Point mMousePos = pWindow->GetPointerPosPixel(); - mRectangle.X = mMousePos.X(); - mRectangle.Y = mMousePos.Y(); - sal_Int16 nId = xPopupMenu->execute( xParent, mRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 ); + aRectangle.X = mMousePos.X(); + aRectangle.Y = mMousePos.Y(); + sal_Int16 nId = xPopupMenu->execute( xParent, aRectangle, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16 ); //click "More..." if ( nId && m_xFrame.is() ) { uno::Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); util::URL aURL; - if ( nId < nItemId-3-subPopupMenu->getItemCount() ) + if (MID_LANG_SEL_1 <= nId && nId <= MID_LANG_SEL_9) { - //1..7 //set selected language as current language for selection - String SelectedLang = LangTable[nId]; - aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_"); - aURL.Complete+=SelectedLang; + String aSelectedLang = aLangMap[nId]; + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_"); + aURL.Complete += aSelectedLang; } - else if ( nId == nItemId-3-subPopupMenu->getItemCount() ) + else if (nId == MID_LANG_SEL_NONE) { - //8 //set None as current language for selection - aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE"); + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE"); + } + else if (nId == MID_LANG_SEL_RESET) + { + // reset language attributes for selection + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES"); } - else if ( nId == nItemId-2-subPopupMenu->getItemCount() ) + else if (nId == MID_LANG_SEL_MORE) { - //9 (more)... //open the dialog "format/character" for current selection - aURL.Complete+=String::CreateFromAscii(".uno:FontDialog?Language:string=*"); + aURL.Complete += OUString::createFromAscii(".uno:FontDialog?Language:string=*"); } - else if ( nId < nItemId-3 && nId>nItemId-2-subPopupMenu->getItemCount() ) + else if (MID_LANG_PARA_1 <= nId && nId <= MID_LANG_PARA_9) { - //1..7 para //set selected language for current paragraph - String SelectedLang = LangTable[nId]; - aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_"); - aURL.Complete+=SelectedLang; + String aSelectedLang = aLangMap[nId]; + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_"); + aURL.Complete += aSelectedLang; } - else if ( nId==nItemId-3 ) + else if (nId == MID_LANG_PARA_NONE) { - //8 para //set None as language for current paragraph - aURL.Complete+=String::CreateFromAscii(".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE"); + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE"); } - else if ( nId==nItemId-2 ) + else if (nId == MID_LANG_PARA_RESET) + { + // reset language attributes for paragraph + aURL.Complete += OUString::createFromAscii(".uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES"); + } + else if (nId == MID_LANG_PARA_MORE) { - //9 (more) para... //open the dialog "format/character" for current paragraph - aURL.Complete+=String::CreateFromAscii(".uno:FontDialogForParagraph"); + aURL.Complete += OUString::createFromAscii(".uno:FontDialogForParagraph"); } - uno::Reference< util::XURLTransformer > xURLTransformer( m_xServiceManager->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY ); + uno::Reference< util::XURLTransformer > xURLTransformer( m_xServiceManager->createInstance( OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY ); xURLTransformer->parseStrict( aURL ); - uno::Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL,::rtl::OUString(),0); + uno::Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, OUString(), 0); if( xDispatch.is() ) { uno::Sequence< beans::PropertyValue > aPV; if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# - UiEventLogHelper(::rtl::OUString::createFromAscii("ButtonToolbarController")).log(m_xServiceManager, m_xFrame, aURL, aPV); + UiEventLogHelper( OUString::createFromAscii("ButtonToolbarController")).log(m_xServiceManager, m_xFrame, aURL, aPV); xDispatch->dispatch( aURL, aPV); } } @@ -443,6 +385,13 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL LangSelectionStatusbarController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException ) { + // This function will be called when observed data changes, + // for example the selection or keyboard language. + // - It displays the language in use in the status bar + // - and it stores the relevant data for creating the menu + // at some later point in the member variables + // m_nScriptType, m_aCurLang, m_aKeyboardLang, m_aGuessedText + RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "LangSelectionStatusbarController::statusChanged" ); vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); @@ -451,25 +400,22 @@ throw ( RuntimeException ) m_bShowMenu = sal_True; - m_nScriptType=7;//set the default value + m_nScriptType = LS_SCRIPT_LATIN | LS_SCRIPT_ASIAN | LS_SCRIPT_COMPLEX; //set the default value Window* pWindow = VCLUnoHelper::GetWindow( m_xParentWindow ); if ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR && m_nID != 0 ) { - rtl::OUString aStrValue; - Sequence< ::rtl::OUString > aSeq; + OUString aStrValue; + Sequence< OUString > aSeq; StatusBar* pStatusBar = (StatusBar *)pWindow; if ( Event.State >>= aStrValue ) - { pStatusBar->SetItemText( m_nID, aStrValue ); - m_aCurrentLanguage = aStrValue; - } else if ( Event.State >>= aSeq ) { if ( aSeq.getLength() == 4 ) { const String aMultipleLangText( FwkResId( STR_LANGSTATUS_MULTIPLE_LANGUAGES ) ); - ::rtl::OUString aStatusText = aSeq[0]; + OUString aStatusText = aSeq[0]; if ( 0 == aStatusText.compareToAscii( "*" )) aStatusText = aMultipleLangText; pStatusBar->SetItemText( m_nID, aStatusText ); @@ -479,7 +425,7 @@ throw ( RuntimeException ) m_aCurLang = aSeq[0]; m_nScriptType = static_cast< sal_Int16 >( aSeq[1].toInt32() ); m_aKeyboardLang = aSeq[2]; - m_aGuessedText = aSeq[3]; + m_aGuessedTextLang = aSeq[3]; } } else if ( !Event.State.hasValue() ) diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index f0f5d52a47d6..2905d0c0bd05 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -48,6 +48,7 @@ #include <rtl/ustrbuf.hxx> #include <dispatch/uieventloghelper.hxx> #include "helper/mischelper.hxx" +#include <vos/mutex.hxx> using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -70,7 +71,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( MacrosMenuController DEFINE_INIT_SERVICE ( MacrosMenuController, {} ) MacrosMenuController::MacrosMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ), + svt::PopupMenuControllerBase( xServiceManager ), m_xServiceManager( xServiceManager) { } @@ -109,7 +110,7 @@ void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( Runt { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); OSL_TRACE("disposing"); m_xFrame.clear(); m_xDispatch.clear(); @@ -126,7 +127,7 @@ void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( Runt // XStatusListener void SAL_CALL MacrosMenuController::statusChanged( const FeatureStateEvent& ) throw ( RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); if ( m_xPopupMenu.is() ) { fillPopupMenu( m_xPopupMenu ); diff --git a/framework/source/uielement/makefile.mk b/framework/source/uielement/makefile.mk index da4ab3d34c74..b74adb1e176f 100644 --- a/framework/source/uielement/makefile.mk +++ b/framework/source/uielement/makefile.mk @@ -79,6 +79,7 @@ SLOFILES= \ $(SLO)$/toolbarmerger.obj \ $(SLO)$/toolbarsmenucontroller.obj \ $(SLO)$/toolbarwrapper.obj \ + $(SLO)$/popupmenucontroller.obj \ $(SLO)$/uicommanddescription.obj \ # --- Targets ------------------------------------------------------ diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 3ac78726d799..786795ff1d14 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -67,6 +67,7 @@ #include <svtools/acceleratorexecute.hxx> #include <unotools/moduleoptions.hxx> #include <dispatch/uieventloghelper.hxx> +#include <vos/mutex.hxx> //_________________________________________________________________________________________________________________ // Defines @@ -326,7 +327,7 @@ void NewMenuController::retrieveShortcutsFromConfiguration( } NewMenuController::NewMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ), + svt::PopupMenuControllerBase( xServiceManager ), m_bShowImages( sal_True ), m_bHiContrast( sal_False ), m_bNewMenu( sal_False ), @@ -399,7 +400,7 @@ void SAL_CALL NewMenuController::disposing( const EventObject& ) throw ( Runtime { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xServiceManager.clear(); @@ -423,12 +424,12 @@ void SAL_CALL NewMenuController::select( const css::awt::MenuEvent& rEvent ) thr Reference< XMultiServiceFactory > xServiceManager; Reference< XURLTransformer > xURLTransformer; - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); xPopupMenu = m_xPopupMenu; xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY ); xServiceManager = m_xServiceManager; xURLTransformer = m_xURLTransformer; - aLock.unlock(); + aLock.clear(); css::util::URL aTargetURL; Sequence< PropertyValue > aArgsList( 1 ); @@ -548,12 +549,12 @@ void NewMenuController::impl_setPopupMenu() // XInitialization void SAL_CALL NewMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); sal_Bool bInitalized( m_bInitialized ); if ( !bInitalized ) { - PopupMenuControllerBase::initialize( aArguments ); + svt::PopupMenuControllerBase::initialize( aArguments ); if ( m_bInitialized ) { diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index f4d6aea0d82b..80dccb76db05 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -59,6 +59,7 @@ #include <tools/urlobj.hxx> #include <rtl/ustrbuf.hxx> #include <dispatch/uieventloghelper.hxx> +#include <vos/mutex.hxx> //_________________________________________________________________________________________________________________ // Defines @@ -83,7 +84,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ObjectMenuController DEFINE_INIT_SERVICE ( ObjectMenuController, {} ) ObjectMenuController::ObjectMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ) + svt::PopupMenuControllerBase( xServiceManager ) { } @@ -128,7 +129,7 @@ void SAL_CALL ObjectMenuController::disposing( const EventObject& ) throw ( Runt { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xObjectUpdateDispatch.clear(); @@ -145,7 +146,7 @@ void SAL_CALL ObjectMenuController::statusChanged( const FeatureStateEvent& Even Sequence < com::sun::star::embed::VerbDescriptor > aVerbCommandSeq; if ( Event.State >>= aVerbCommandSeq ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); if ( m_xPopupMenu.is() ) fillPopupMenu( aVerbCommandSeq, m_xPopupMenu ); } diff --git a/framework/source/uielement/popupmenucontroller.cxx b/framework/source/uielement/popupmenucontroller.cxx new file mode 100644 index 000000000000..328777db2b79 --- /dev/null +++ b/framework/source/uielement/popupmenucontroller.cxx @@ -0,0 +1,248 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_framework.hxx" + +#include <com/sun/star/awt/XPopupMenu.hpp> +#include <com/sun/star/frame/XPopupMenuController.hpp> + +#include <toolkit/helper/vclunohelper.hxx> +//#include <toolkit/unohlp.hxx> + +#include <rtl/ref.hxx> + +#include <vcl/toolbox.hxx> +#include <vcl/menu.hxx> +#include <vcl/svapp.hxx> +#include <vos/mutex.hxx> + +#include "uielement/popupmenucontroller.hxx" +#include "services.h" + +using rtl::OUString; +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::beans; + +// -------------------------------------------------------------------- + + +namespace framework +{ + +DEFINE_XSERVICEINFO_MULTISERVICE ( PopupMenuController , + OWeakObject , + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) ) , + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.framework.PopupMenuController" ) ) + ) + +DEFINE_INIT_SERVICE ( PopupMenuController, {} ) + +class PopupMenuControllerImpl +{ +}; + +//======================================================================== +// class PopupMenuController +//======================================================================== + +PopupMenuController::PopupMenuController( const Reference< lang::XMultiServiceFactory >& rServiceManager ) +: svt::ToolboxController( rServiceManager, Reference< frame::XFrame >(), OUString() ) +{ +} + +// -------------------------------------------------------------------- + +PopupMenuController::~PopupMenuController() +{ +} + +// -------------------------------------------------------------------- +// XInterface +// -------------------------------------------------------------------- + +Any SAL_CALL PopupMenuController::queryInterface( const Type& aType ) throw (RuntimeException) +{ + Any a( ToolboxController::queryInterface( aType ) ); + if ( a.hasValue() ) + return a; + + return ::cppu::queryInterface( aType, static_cast< lang::XServiceInfo* >( this )); +} + +// -------------------------------------------------------------------- + +void SAL_CALL PopupMenuController::acquire() throw () +{ + ToolboxController::acquire(); +} + +// -------------------------------------------------------------------- + +void SAL_CALL PopupMenuController::release() throw () +{ + ToolboxController::release(); +} + +// -------------------------------------------------------------------- +// XComponent +// -------------------------------------------------------------------- + +void SAL_CALL PopupMenuController::dispose() throw (RuntimeException) +{ + if( mxPopupMenuController.is() ) + { + Reference< XComponent > xComponent( mxPopupMenuController, UNO_QUERY ); + if( xComponent.is() ) + xComponent->dispose(); + mxPopupMenuController.clear(); + } + + mxPopupMenu.clear(); + + svt::ToolboxController::dispose(); +} + +// -------------------------------------------------------------------- +// XStatusListener +// -------------------------------------------------------------------- + +void SAL_CALL PopupMenuController::statusChanged( const frame::FeatureStateEvent& rEvent ) throw ( RuntimeException ) +{ + svt::ToolboxController::statusChanged(rEvent); + enable( rEvent.IsEnabled ); +} + +// -------------------------------------------------------------------- +// XToolbarController +// -------------------------------------------------------------------- + +void SAL_CALL PopupMenuController::execute( sal_Int16 KeyModifier ) throw (RuntimeException) +{ + svt::ToolboxController::execute( KeyModifier ); +} + +// -------------------------------------------------------------------- + +void SAL_CALL PopupMenuController::click() throw (RuntimeException) +{ + svt::ToolboxController::click(); +} + +// -------------------------------------------------------------------- + +void SAL_CALL PopupMenuController::doubleClick() throw (RuntimeException) +{ + svt::ToolboxController::doubleClick(); +} + +// -------------------------------------------------------------------- + +bool PopupMenuController::CreatePopupMenuController() throw (Exception) +{ + Reference< XMultiComponentFactory > xPopupMenuControllerRegistration( getServiceManager()->createInstance( SERVICENAME_POPUPMENUCONTROLLERFACTORY ), UNO_QUERY_THROW ); + + Sequence< Any > aSeq( 2 ); + PropertyValue aPropValue; + + aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" )); + aPropValue.Value <<= getModuleName(); + aSeq[0] <<= aPropValue; + aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); + aPropValue.Value <<= m_xFrame; + aSeq[1] <<= aPropValue; + + Reference< XPropertySet > xProps( getServiceManager(), UNO_QUERY_THROW ); + Reference< XComponentContext > xComponentContext( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW ); + + Reference< XPopupMenuController > xPopupMenuController( xPopupMenuControllerRegistration->createInstanceWithArgumentsAndContext( getCommandURL(), aSeq, xComponentContext ), UNO_QUERY ); + if ( xPopupMenuController.is() ) + { + mxPopupMenuController = xPopupMenuController; + return true; + } + return false; +} + +Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() throw (RuntimeException) +{ + ::vos::OGuard aSolarLock(Application::GetSolarMutex()); + + Reference< awt::XWindow > xRet; + + try + { + ToolBox* pToolBox = dynamic_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) ); + if( !pToolBox ) + return xRet; + + // get selected button + USHORT nItemId = pToolBox->GetDownItemId(); + if( !nItemId ) + return xRet; + + ::Rectangle aRect( pToolBox->GetItemRect( nItemId ) ); + + if( !mxPopupMenuController.is() && !CreatePopupMenuController() ) + return xRet; + + if( !mxPopupMenu.is() ) + { + mxPopupMenu = Reference< awt::XPopupMenu >( getServiceManager()->createInstance( DECLARE_ASCII( "stardiv.Toolkit.VCLXPopupMenu" ) ), UNO_QUERY_THROW ); + mxPopupMenuController->setPopupMenu( mxPopupMenu ); + } + else + { + mxPopupMenuController->updatePopupMenu(); + + } + pToolBox->SetItemDown( nItemId, TRUE ); + Reference< awt::XWindowPeer > xPeer( getParent(), UNO_QUERY_THROW ); + mxPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 ); + pToolBox->SetItemDown( nItemId, FALSE ); + } + catch( Exception& ) + { + } + + return xRet; +} + +// -------------------------------------------------------------------- + +Reference< awt::XWindow > SAL_CALL PopupMenuController::createItemWindow( const Reference< awt::XWindow >& /*Parent*/ ) throw (RuntimeException) +{ + return Reference< awt::XWindow >(); +} + +// -------------------------------------------------------------------- + +} + diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx index 2cd0ed891db6..a20f107ea22e 100644 --- a/framework/source/uielement/progressbarwrapper.cxx +++ b/framework/source/uielement/progressbarwrapper.cxx @@ -43,6 +43,7 @@ // interface includes //_________________________________________________________________________________________________________________ #include <com/sun/star/ui/UIElementType.hpp> +#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // includes of other projects diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index cec95485dacd..64f05ed642cb 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -47,7 +47,6 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/awt/MenuItemStyle.hpp> #include <com/sun/star/util/XStringWidth.hpp> -#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // includes of other projects //_________________________________________________________________________________________________________________ @@ -64,6 +63,7 @@ #include <osl/file.hxx> //#include <tools/solar.hrc> #include <dispatch/uieventloghelper.hxx> +#include <vos/mutex.hxx> //_________________________________________________________________________________________________________________ // Defines @@ -105,7 +105,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( RecentFilesMenuController DEFINE_INIT_SERVICE ( RecentFilesMenuController, {} ) RecentFilesMenuController::RecentFilesMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ), + svt::PopupMenuControllerBase( xServiceManager ), m_bDisabled( sal_False ) { } @@ -245,11 +245,11 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex ) Reference< XDispatchProvider > xDispatchProvider; Reference< XMultiServiceFactory > xServiceManager; - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); xPopupMenu = m_xPopupMenu; xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY ); xServiceManager = m_xServiceManager; - aLock.unlock(); + aLock.clear(); css::util::URL aTargetURL; Sequence< PropertyValue > aArgsList; @@ -312,7 +312,7 @@ void SAL_CALL RecentFilesMenuController::disposing( const EventObject& ) throw ( { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xServiceManager.clear(); @@ -325,7 +325,7 @@ void SAL_CALL RecentFilesMenuController::disposing( const EventObject& ) throw ( // XStatusListener void SAL_CALL RecentFilesMenuController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_bDisabled = !Event.IsEnabled; } @@ -336,11 +336,11 @@ void SAL_CALL RecentFilesMenuController::select( const css::awt::MenuEvent& rEve Reference< XDispatchProvider > xDispatchProvider; Reference< XMultiServiceFactory > xServiceManager; - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); xPopupMenu = m_xPopupMenu; xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY ); xServiceManager = m_xServiceManager; - aLock.unlock(); + aLock.clear(); css::util::URL aTargetURL; Sequence< PropertyValue > aArgsList; @@ -355,7 +355,7 @@ void SAL_CALL RecentFilesMenuController::select( const css::awt::MenuEvent& rEve void SAL_CALL RecentFilesMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); impl_setPopupMenu(); } @@ -368,17 +368,16 @@ void RecentFilesMenuController::impl_setPopupMenu() void SAL_CALL RecentFilesMenuController::updatePopupMenu() throw (RuntimeException) { - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); - if ( m_bDisposed ) - throw DisposedException(); + throwIfDisposed(); Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY ); Reference< XDispatch > xDispatch( m_xDispatch ); com::sun::star::util::URL aTargetURL; aTargetURL.Complete = m_aCommandURL; m_xURLTransformer->parseStrict( aTargetURL ); - aLock.unlock(); + aLock.clear(); // Add/remove status listener to get a status update once if ( xDispatch.is() ) @@ -395,10 +394,9 @@ Reference< XDispatch > SAL_CALL RecentFilesMenuController::queryDispatch( sal_Int32 /*nFlags*/ ) throw( RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); - if ( m_bDisposed ) - throw DisposedException(); + throwIfDisposed(); if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 ) return Reference< XDispatch >( static_cast< OWeakObject* >( this ), UNO_QUERY ); @@ -412,10 +410,9 @@ void SAL_CALL RecentFilesMenuController::dispatch( const Sequence< PropertyValue >& /*seqProperties*/ ) throw( RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); - if ( m_bDisposed ) - throw DisposedException(); + throwIfDisposed(); if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 ) { @@ -448,12 +445,11 @@ void SAL_CALL RecentFilesMenuController::addStatusListener( const URL& aURL ) throw( RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); - if ( m_bDisposed ) - throw DisposedException(); + throwIfDisposed(); - PopupMenuControllerBase::addStatusListener( xControl, aURL ); + svt::PopupMenuControllerBase::addStatusListener( xControl, aURL ); } void SAL_CALL RecentFilesMenuController::removeStatusListener( @@ -461,7 +457,7 @@ void SAL_CALL RecentFilesMenuController::removeStatusListener( const URL& aURL ) throw( RuntimeException ) { - PopupMenuControllerBase::removeStatusListener( xControl, aURL ); + svt::PopupMenuControllerBase::removeStatusListener( xControl, aURL ); } IMPL_STATIC_LINK_NOINSTANCE( RecentFilesMenuController, ExecuteHdl_Impl, LoadRecentFile*, pLoadRecentFile ) diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 43ad09ffc1ee..dad2775dc453 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -49,7 +49,6 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/frame/status/ItemStatus.hpp> #include <com/sun/star/frame/status/ItemState.hpp> #include <com/sun/star/frame/status/Visibility.hpp> diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index cb9cbb2896f7..0bbdbc339a34 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -56,6 +56,7 @@ #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/awt/Command.hpp> +#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // other includes diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index a5e4263385fa..cf39edec2a7c 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -46,7 +46,6 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/frame/XControlNotificationListener.hpp> #include "com/sun/star/util/XMacroExpander.hpp" #include "com/sun/star/uno/XComponentContext.hpp" diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index d89b81c0f9b6..abb263497854 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -52,6 +52,7 @@ #endif #include <classes/addonsoptions.hxx> #include <uielement/toolbarmerger.hxx> +#include <helper/acceleratorinfo.hxx> //_________________________________________________________________________________________________________________ // interface includes @@ -75,6 +76,7 @@ #include <com/sun/star/ui/UIElementType.hpp> #include <comphelper/sequence.hxx> #include <com/sun/star/frame/status/Visibility.hpp> +#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // other includes @@ -97,11 +99,14 @@ #include <svtools/menuoptions.hxx> #include <unotools/cmdoptions.hxx> #include <boost/bind.hpp> +#include <svtools/acceleratorexecute.hxx> //_________________________________________________________________________________________________________________ // namespaces //_________________________________________________________________________________________________________________ +using rtl::OUString; + using namespace ::com::sun::star::awt; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; @@ -112,6 +117,7 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::container; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::ui; +using namespace ::com::sun::star; namespace framework { @@ -257,7 +263,8 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic m_xFrame( rFrame ), m_aListenerContainer( m_aLock.getShareableOslMutex() ), m_xServiceManager( rServiceManager ), - m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ) + m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ), + m_bAcceleratorCfg( sal_False ) { Window* pWindow = m_pToolBar; while ( pWindow && !pWindow->IsSystemWindow() ) @@ -663,6 +670,9 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException ) m_xFrame.clear(); m_xServiceManager.clear(); + m_xGlobalAcceleratorManager.clear(); + m_xModuleAcceleratorManager.clear(); + m_xDocAcceleratorManager.clear(); m_bDisposed = sal_True; } @@ -803,17 +813,18 @@ void ToolBarManager::RemoveControllers() m_aControllerMap.clear(); } -::rtl::OUString ToolBarManager::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) +uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const ::rtl::OUString& rCmdURL ) { - ::rtl::OUString aLabel; + Sequence< PropertyValue > aPropSeq; - // Retrieve popup menu labels - if ( !m_bModuleIdentified ) + // Retrieve properties for command + try { - Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW ); - Reference< XInterface > xIfac( m_xFrame, UNO_QUERY ); - try + if ( !m_bModuleIdentified ) { + Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW ); + Reference< XInterface > xIfac( m_xFrame, UNO_QUERY ); + m_bModuleIdentified = sal_True; m_aModuleIdentifier = xModuleManager->identify( xIfac ); @@ -821,44 +832,57 @@ void ToolBarManager::RemoveControllers() { Reference< XNameAccess > xNameAccess( m_xServiceManager->createInstance( SERVICENAME_UICOMMANDDESCRIPTION ), UNO_QUERY ); if ( xNameAccess.is() ) - { xNameAccess->getByName( m_aModuleIdentifier ) >>= m_xUICommandLabels; - } } } - catch ( Exception& ) + + if ( m_xUICommandLabels.is() ) { + if ( rCmdURL.getLength() > 0 ) + m_xUICommandLabels->getByName( rCmdURL ) >>= aPropSeq; } } + catch ( Exception& ) + { + } - if ( m_xUICommandLabels.is() ) + return aPropSeq; +} + +::rtl::OUString ToolBarManager::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) +{ + ::rtl::OUString aLabel; + Sequence< PropertyValue > aPropSeq; + + // Retrieve popup menu labels + aPropSeq = GetPropsForCommand( aCmdURL ); + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - try + if ( aPropSeq[i].Name.equalsAscii( "Name" )) { - if ( aCmdURL.getLength() > 0 ) - { - rtl::OUString aStr; - Sequence< PropertyValue > aPropSeq; - if ( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) - { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) - { - if ( aPropSeq[i].Name.equalsAscii( "Name" )) - { - aPropSeq[i].Value >>= aStr; - break; - } - } - } - aLabel = aStr; - } + aPropSeq[i].Value >>= aLabel; + break; } - catch ( com::sun::star::uno::Exception& ) + } + return aLabel; +} + +sal_Int32 ToolBarManager::RetrievePropertiesFromCommand( const ::rtl::OUString& aCmdURL ) +{ + sal_Int32 nProperties(0); + Sequence< PropertyValue > aPropSeq; + + // Retrieve popup menu labels + aPropSeq = GetPropsForCommand( aCmdURL ); + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if ( aPropSeq[i].Name.equalsAscii( "Properties" )) { + aPropSeq[i].Value >>= nProperties; + break; } } - - return aLabel; + return nProperties; } void ToolBarManager::CreateControllers() @@ -969,8 +993,15 @@ void ToolBarManager::CreateControllers() { MenuDescriptionMap::iterator it = m_aMenuMap.find( nId ); if ( it == m_aMenuMap.end() ) - xController = Reference< XStatusListener >( - new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL )); + { + xController = Reference< XStatusListener >( + new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL )); + + // Accessibility support: Set toggle button role for specific commands + sal_Int32 nProps = RetrievePropertiesFromCommand( aCommandURL ); + if ( nProps & UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON ) + m_pToolBar->SetItemBits( nId, m_pToolBar->GetItemBits( nId ) | TIB_CHECKABLE ); + } else xController = Reference< XStatusListener >( new MenuToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL, m_aModuleIdentifier, m_aMenuMap[ nId ] )); @@ -1028,6 +1059,10 @@ void ToolBarManager::CreateControllers() aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" )); aPropValue.Value <<= xToolbarWindow; aPropertyVector.push_back( makeAny( aPropValue )); + aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" )); + aPropValue.Value <<= m_aModuleIdentifier; + aPropertyVector.push_back( makeAny( aPropValue )); + if ( nWidth > 0 ) { aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" )); @@ -1257,13 +1292,31 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine m_pToolBar->InsertItem( nId, aString, nItemBits ); m_pToolBar->SetItemCommand( nId, aCommandURL ); if ( aTooltip.getLength() ) + { m_pToolBar->SetQuickHelpText( nId, aTooltip ); + } else - m_pToolBar->SetQuickHelpText( nId, aString ); + { + ::rtl::OUString sQuickHelp( aString ); + ::rtl::OUString sShortCut; + if( RetrieveShortcut( aCommandURL, sShortCut ) ) + { + sQuickHelp += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " (" ) ); + sQuickHelp += sShortCut; + sQuickHelp += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" ) ); + } + + m_pToolBar->SetQuickHelpText( nId, sQuickHelp ); + } + if ( aLabel.getLength() > 0 ) + { m_pToolBar->SetItemText( nId, aLabel ); + } else + { m_pToolBar->SetItemText( nId, aString ); + } m_pToolBar->EnableItem( nId, sal_True ); m_pToolBar->SetItemState( nId, STATE_NOCHECK ); @@ -1530,7 +1583,11 @@ IMPL_LINK( ToolBarManager, DropdownClick, ToolBox*, EMPTYARG ) Reference< XToolbarController > xController( pIter->second, UNO_QUERY ); if ( xController.is() ) - xController->createPopupWindow(); + { + Reference< XWindow > xWin = xController->createPopupWindow(); + if ( xWin.is() ) + xWin->setFocus(); + } } return 1; } @@ -2102,6 +2159,121 @@ Image ToolBarManager::QueryAddonsImage( const ::rtl::OUString& aCommandURL, bool return aImage; } +bool ToolBarManager::impl_RetrieveShortcutsFromConfiguration( + const Reference< XAcceleratorConfiguration >& rAccelCfg, + const rtl::OUString& rCommand, + rtl::OUString& rShortCut ) +{ + RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ToolBarManager::impl_RetrieveShortcutsFromConfiguration" ); + if ( rAccelCfg.is() ) + { + try + { + com::sun::star::awt::KeyEvent aKeyEvent; + Sequence< OUString > aCommands(1); + aCommands[0] = rCommand; + + Sequence< Any > aSeqKeyCode( rAccelCfg->getPreferredKeyEventsForCommandList( aCommands ) ); + if( aSeqKeyCode.getLength() == 1 ) + { + if ( aSeqKeyCode[0] >>= aKeyEvent ) + { + rShortCut = svt::AcceleratorExecute::st_AWTKey2VCLKey( aKeyEvent ).GetName(); + return true; + } + } + } + catch ( IllegalArgumentException& ) + { + } + } + + return false; +} + +bool ToolBarManager::RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OUString& rShortCut ) +{ + RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ToolBarManager::RetrieveShortcuts" ); + if ( m_bModuleIdentified ) + { + Reference< XAcceleratorConfiguration > xDocAccelCfg( m_xDocAcceleratorManager ); + Reference< XAcceleratorConfiguration > xModuleAccelCfg( m_xModuleAcceleratorManager ); + Reference< XAcceleratorConfiguration > xGlobalAccelCfg( m_xGlobalAcceleratorManager ); + + if ( !m_bAcceleratorCfg ) + { + // Retrieve references on demand + m_bAcceleratorCfg = sal_True; + if ( !xDocAccelCfg.is() ) + { + Reference< XController > xController = m_xFrame->getController(); + Reference< XModel > xModel; + if ( xController.is() ) + { + xModel = xController->getModel(); + if ( xModel.is() ) + { + Reference< XUIConfigurationManagerSupplier > xSupplier( xModel, UNO_QUERY ); + if ( xSupplier.is() ) + { + Reference< XUIConfigurationManager > xDocUICfgMgr( xSupplier->getUIConfigurationManager(), UNO_QUERY ); + if ( xDocUICfgMgr.is() ) + { + xDocAccelCfg = Reference< XAcceleratorConfiguration >( xDocUICfgMgr->getShortCutManager(), UNO_QUERY ); + m_xDocAcceleratorManager = xDocAccelCfg; + } + } + } + } + } + + if ( !xModuleAccelCfg.is() ) + { + Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( m_xServiceManager->createInstance( + SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ), + UNO_QUERY ); + try + { + Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier ); + if ( xUICfgMgr.is() ) + { + xModuleAccelCfg = Reference< XAcceleratorConfiguration >( xUICfgMgr->getShortCutManager(), UNO_QUERY ); + m_xModuleAcceleratorManager = xModuleAccelCfg; + } + } + catch ( RuntimeException& ) + { + throw; + } + catch ( Exception& ) + { + } + } + + if ( !xGlobalAccelCfg.is() ) + { + xGlobalAccelCfg = Reference< XAcceleratorConfiguration >( m_xServiceManager->createInstance( + SERVICENAME_GLOBALACCELERATORCONFIGURATION ), + UNO_QUERY ); + m_xGlobalAcceleratorManager = xGlobalAccelCfg; + } + } + + bool bFound = false; + + if ( m_xGlobalAcceleratorManager.is() ) + bFound = impl_RetrieveShortcutsFromConfiguration( xGlobalAccelCfg, rCommandURL, rShortCut ); + if ( !bFound && m_xModuleAcceleratorManager.is() ) + bFound = impl_RetrieveShortcutsFromConfiguration( xModuleAccelCfg, rCommandURL, rShortCut ); + if ( !bFound && m_xDocAcceleratorManager.is() ) + impl_RetrieveShortcutsFromConfiguration( xGlobalAccelCfg, rCommandURL, rShortCut ); + + if( bFound ) + return true; + } + return false; +} + } diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 02402205bd1c..d0ddeccfab20 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -58,7 +58,6 @@ #include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/UIElementType.hpp> -#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // includes of other projects @@ -167,7 +166,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ToolbarsMenuController DEFINE_INIT_SERVICE ( ToolbarsMenuController, {} ) ToolbarsMenuController::ToolbarsMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) : - PopupMenuControllerBase( xServiceManager ), + svt::PopupMenuControllerBase( xServiceManager ), m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( "UIName" )), m_aPropResourceURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )), m_bModuleIdentified( sal_False ), @@ -563,7 +562,7 @@ void SAL_CALL ToolbarsMenuController::disposing( const EventObject& ) throw ( Ru { Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY ); - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); m_xFrame.clear(); m_xDispatch.clear(); m_xDocCfgMgr.clear(); @@ -584,9 +583,9 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev sal_Bool bSetCheckmark = sal_False; sal_Bool bCheckmark = sal_False; - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); Reference< css::awt::XPopupMenu > xPopupMenu( m_xPopupMenu ); - aLock.unlock(); + aLock.clear(); if ( xPopupMenu.is() ) { @@ -633,13 +632,13 @@ void SAL_CALL ToolbarsMenuController::select( const css::awt::MenuEvent& rEvent Reference< XFrame > xFrame; Reference< XNameAccess > xPersistentWindowState; - ResetableGuard aLock( m_aLock ); + osl::ClearableMutexGuard aLock( m_aMutex ); xPopupMenu = m_xPopupMenu; xServiceManager = m_xServiceManager; xURLTransformer = m_xURLTransformer; xFrame = m_xFrame; xPersistentWindowState = m_xPersistentWindowState; - aLock.unlock(); + aLock.clear(); if ( xPopupMenu.is() ) { @@ -792,7 +791,7 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY ); Reference< XURLTransformer > xURLTransformer( m_xURLTransformer ); { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); fillPopupMenu( m_xPopupMenu ); aCmdVector = m_aCommandVector; } @@ -829,10 +828,9 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr // XPopupMenuController void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); - if ( m_bDisposed ) - throw DisposedException(); + throwIfDisposed(); if ( m_xFrame.is() && !m_xPopupMenu.is() ) { @@ -848,11 +846,11 @@ void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::X // XInitialization void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) { - ResetableGuard aLock( m_aLock ); + osl::MutexGuard aLock( m_aMutex ); sal_Bool bInitalized( m_bInitialized ); if ( !bInitalized ) { - PopupMenuControllerBase::initialize(aArguments); + svt::PopupMenuControllerBase::initialize(aArguments); if ( m_bInitialized ) { diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index 0e73b5616aa7..5a4fb7cddde4 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -53,6 +53,7 @@ #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/ui/UIElementType.hpp> +#include <com/sun/star/lang/DisposedException.hpp> //_________________________________________________________________________________________________________________ // other includes diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index fdcd08f221fd..0d50aa4c36d4 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -340,7 +340,7 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString& if ( !pIter->second.bCommandNameCreated ) fillInfoFromResult( pIter->second, pIter->second.aLabel ); - Sequence< PropertyValue > aPropSeq( 3 ); + Sequence< PropertyValue > aPropSeq( 4 ); aPropSeq[0].Name = m_aPropLabel; aPropSeq[0].Value = pIter->second.aContextLabel.getLength() ? makeAny( pIter->second.aContextLabel ): makeAny( pIter->second.aLabel ); @@ -348,6 +348,8 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString& aPropSeq[1].Value <<= pIter->second.aCommandName; aPropSeq[2].Name = m_aPropPopup; aPropSeq[2].Value <<= pIter->second.bPopup; + aPropSeq[3].Name = m_aPropProperties; + aPropSeq[3].Value <<= pIter->second.nProperties; return makeAny( aPropSeq ); } diff --git a/framework/uiconfig/startmodule/accelerator/en-GB/default.xml b/framework/uiconfig/startmodule/accelerator/en-GB/default.xml deleted file mode 100644 index eefe2b0dde23..000000000000 --- a/framework/uiconfig/startmodule/accelerator/en-GB/default.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink"> - <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/> - <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/> - <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/> - <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/> - <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/> - <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/> - <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/> - <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/> - <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/> - <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/> - <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/> - <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/> - <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/> - <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/> - <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/> - <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/> -</accel:acceleratorlist> diff --git a/framework/uiconfig/startmodule/accelerator/en-US/default.xml b/framework/uiconfig/startmodule/accelerator/en-US/default.xml deleted file mode 100644 index eefe2b0dde23..000000000000 --- a/framework/uiconfig/startmodule/accelerator/en-US/default.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink"> - <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/> - <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/> - <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/> - <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/> - <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/> - <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/> - <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/> - <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/> - <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/> - <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/> - <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/> - <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/> - <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/> - <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/> - <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/> - <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/> -</accel:acceleratorlist> diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index b1b7c691d29f..6a65b9986f1e 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -56,7 +56,6 @@ LIB1OBJFILES= \ $(SLO)$/rootitemcontainer.obj \ $(SLO)$/constitemcontainer.obj \ $(SLO)$/jobconst.obj \ - $(SLO)$/popupmenucontrollerbase.obj \ $(SLO)$/mischelper.obj \ $(SLO)$/propertysethelper.obj @@ -114,6 +113,9 @@ SHL1STDLIBS= \ $(UNOTOOLSLIB) \ $(CPPUHELPERLIB) \ $(TOOLSLIB) \ + $(SVTOOLLIB) \ + $(SVLLIB) \ + $(I18NISOLANGLIB) \ $(VOSLIB) \ $(VCLLIB) \ $(TKLIB) \ @@ -195,7 +197,8 @@ SHL3OBJS= $(SLO)$/mediatypedetectionhelper.obj\ $(SLO)$/dispatchrecorder.obj \ $(SLO)$/dispatchrecordersupplier.obj\ $(SLO)$/dispatchhelper.obj \ - $(SLO)$/popupmenudispatcher.obj \ + $(SLO)$/popupmenudispatcher.obj \ + $(SLO)$/popupmenucontroller.obj SHL3STDLIBS= \ $(FWILIB) \ @@ -205,7 +208,6 @@ SHL3STDLIBS= \ $(SVTOOLLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(COMPHELPERLIB) \ diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 49ab2b485c13..2916b2ee6eec 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_linguistic.hxx" + #include <tools/fsys.hxx> #include <tools/stream.hxx> #include <tools/urlobj.hxx> diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx index be127e0999af..817dbeb311ca 100644 --- a/linguistic/source/dlistimp.cxx +++ b/linguistic/source/dlistimp.cxx @@ -28,6 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_linguistic.hxx" +#include <cppuhelper/factory.hxx> +#include <i18npool/mslangid.hxx> #include <osl/file.hxx> #include <tools/fsys.hxx> #include <tools/stream.hxx> @@ -52,6 +54,11 @@ #include "dicimp.hxx" #include "lngopt.hxx" +#include "defs.hxx" +#include "dlistimp.hxx" +#include "dicimp.hxx" +#include "lngopt.hxx" + //using namespace utl; using namespace osl; using namespace rtl; diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index 243079c3abf1..5c735744104b 100755 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -67,7 +67,7 @@ </node> <node oor:name="F5_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> - <value xml:lang="en-US">.uno:GrabControlFocus</value> + <value xml:lang="en-US">.uno:ToggleControlFocus</value> </prop> </node> <node oor:name="F7_SHIFT_MOD1" oor:op="replace"> @@ -212,7 +212,7 @@ </node> <node oor:name="F5_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> - <value xml:lang="en-US">.uno:GrabControlFocus</value> + <value xml:lang="en-US">.uno:ToggleControlFocus</value> </prop> </node> <node oor:name="F7_SHIFT_MOD1" oor:op="replace"> @@ -535,7 +535,7 @@ </node> <node oor:name="F7_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> - <value xml:lang="en-US">.uno:Thesaurus</value> + <value xml:lang="en-US">.uno:ThesaurusDialog</value> </prop> </node> <node oor:name="F7_SHIFT" oor:op="replace"> @@ -568,6 +568,11 @@ <value xml:lang="en-US">.uno:CalculateHard</value> </prop> </node> + <node oor:name="F_MOD1_MOD2" oor:op="replace"> + <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> + <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value> + </prop> + </node> <node oor:name="F_SHIFT_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="de">.uno:Bold</value> @@ -1077,7 +1082,7 @@ </node> <node oor:name="F7_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> - <value xml:lang="en-US">.uno:Thesaurus</value> + <value xml:lang="en-US">.uno:ThesaurusDialog</value> </prop> </node> <node oor:name="F8" oor:op="replace"> @@ -1090,6 +1095,11 @@ <value xml:lang="en-US">.uno:TextFitToSize</value> </prop> </node> + <node oor:name="F_MOD1_MOD2" oor:op="replace"> + <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> + <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value> + </prop> + </node> <node oor:name="F_SHIFT_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="de">.uno:Bold</value> @@ -1566,6 +1576,11 @@ <value xml:lang="en-US">.uno:UpdateInputFields</value> </prop> </node> + <node oor:name="F_MOD1_MOD2" oor:op="replace"> + <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> + <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value> + </prop> + </node> <node oor:name="F_SHIFT_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="de">.uno:Bold</value> @@ -2041,7 +2056,7 @@ </node> <node oor:name="F7_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> - <value xml:lang="en-US">.uno:Thesaurus</value> + <value xml:lang="en-US">.uno:ThesaurusDialog</value> </prop> </node> <node oor:name="F8" oor:op="replace"> @@ -2054,6 +2069,11 @@ <value xml:lang="en-US">.uno:TextFitToSize</value> </prop> </node> + <node oor:name="F_MOD1_MOD2" oor:op="replace"> + <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> + <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value> + </prop> + </node> <node oor:name="F_SHIFT_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="de">.uno:Bold</value> @@ -2597,6 +2617,11 @@ <value xml:lang="en-US">.uno:UpdateInputFields</value> </prop> </node> + <node oor:name="F_MOD1_MOD2" oor:op="replace"> + <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> + <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value> + </prop> + </node> <node oor:name="F_SHIFT_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="de">.uno:Bold</value> @@ -4442,6 +4467,11 @@ <value xml:lang="en-US">.uno:UpdateInputFields</value> </prop> </node> + <node oor:name="F_MOD1_MOD2" oor:op="replace"> + <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> + <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value> + </prop> + </node> <node oor:name="F_SHIFT_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="de">.uno:Bold</value> @@ -5052,6 +5082,11 @@ <value xml:lang="en-US">.uno:UpdateInputFields</value> </prop> </node> + <node oor:name="F_MOD1_MOD2" oor:op="replace"> + <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> + <value xml:lang="en-US">vnd.sun.star.findbar:FocusToFindbar</value> + </prop> + </node> <node oor:name="F_SHIFT_MOD1" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="de">.uno:Bold</value> diff --git a/officecfg/registry/data/org/openoffice/Office/Impress.xcu b/officecfg/registry/data/org/openoffice/Office/Impress.xcu index 8db415e7c57b..353cecfd51c2 100644 --- a/officecfg/registry/data/org/openoffice/Office/Impress.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Impress.xcu @@ -123,27 +123,27 @@ <node oor:name="ResourceList"> <node oor:name="R0" oor:op="replace"> <prop oor:name="URL"> - <value>private:resource/taskpanel/MasterPages</value> + <value>private:resource/toolpanel/DrawingFramework/MasterPages</value> </prop> </node> <node oor:name="R1" oor:op="replace"> <prop oor:name="URL"> - <value>private:resource/taskpanel/Layouts</value> + <value>private:resource/toolpanel/DrawingFramework/Layouts</value> </prop> </node> <node oor:name="R2" oor:op="replace"> <prop oor:name="URL"> - <value>private:resource/taskpanel/TableDesign</value> + <value>private:resource/toolpanel/DrawingFramework/TableDesign</value> </prop> </node> <node oor:name="R3" oor:op="replace"> <prop oor:name="URL"> - <value>private:resource/taskpanel/CustomAnimations</value> + <value>private:resource/toolpanel/DrawingFramework/CustomAnimations</value> </prop> </node> <node oor:name="R4" oor:op="replace"> <prop oor:name="URL"> - <value>private:resource/taskpanel/SlideTransitions</value> + <value>private:resource/toolpanel/DrawingFramework/SlideTransitions</value> </prop> </node> </node> diff --git a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu index 8ef8fcd259e0..0d5dd5e3b499 100644 --- a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu +++ b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu @@ -63,5 +63,10 @@ <value>vnd.sun.star.popup:*</value> </prop> </node> + <node oor:name="com.sun.star.comp.svx.FindbarDispatcher" oor:op="replace"> + <prop oor:name="Protocols"> + <value>vnd.sun.star.findbar:*</value> + </prop> + </node> </node> </oor:component-data> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index 8c76a2dadd9f..d3db05206a6a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -134,7 +134,7 @@ <value xml:lang="en-US">~Hyphenation...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ObjectTitleDescription" oor:op="replace"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu index c5d32679b108..a427a0caf052 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu @@ -293,6 +293,26 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/findbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Find</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace"> <prop oor:name="DockPos" oor:type="xs:string"> <value>0,1</value> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu index 76e6a29003d0..0054c7af24f1 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -218,6 +218,94 @@ <value>com.sun.star.svx.FontHeightToolBoxController</value> </prop> </node> + <node oor:name="AssignLayout" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:AssignLayout</value> + </prop> + <prop oor:name="Module"> + <value>com.sun.star.presentation.PresentationDocument</value> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.sd.SlideLayoutController</value> + </prop> + </node> + <node oor:name="InsertPage" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:InsertPage</value> + </prop> + <prop oor:name="Module"> + <value>com.sun.star.presentation.PresentationDocument</value> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.sd.InsertSlideController</value> + </prop> + </node> + <node oor:name="ExtrusionDirectionFloater" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:ExtrusionDirectionFloater</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.svx.ExtrusionDirectionController</value> + </prop> + </node> + <node oor:name="ExtrusionDepthController" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:ExtrusionDepthFloater</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.svx.ExtrusionDepthController</value> + </prop> + </node> + <node oor:name="ExtrusionLightingFloater" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:ExtrusionLightingFloater</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.svx.ExtrusionLightingController</value> + </prop> + </node> + <node oor:name="ExtrusionSurfaceFloater" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:ExtrusionSurfaceFloater</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.svx.ExtrusionSurfaceController</value> + </prop> + </node> + <node oor:name="FontworkAlignmentFloater" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:FontworkAlignmentFloater</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.svx.FontworkAlignmentController</value> + </prop> + </node> + <node oor:name="FontworkCharacterSpacingFloater" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:FontworkCharacterSpacingFloater</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.svx.FontworkCharacterSpacingController</value> + </prop> + </node> <node oor:name="c3" oor:op="replace"> <prop oor:name="Command"> <value>.uno:ChartElementSelector</value> @@ -295,6 +383,39 @@ <value>com.sun.star.comp.chart2.ShapeToolbarController</value> </prop> </node> + <node oor:name="com.sun.star.svx.FindTextToolboxController" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:FindText</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.svx.FindTextToolboxController</value> + </prop> + </node> + <node oor:name="com.sun.star.svx.DownSearchToolboxController" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:DownSearch</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.svx.DownSearchToolboxController</value> + </prop> + </node> + <node oor:name="com.sun.star.svx.UpSearchToolboxController" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:UpSearch</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.svx.UpSearchToolboxController</value> + </prop> + </node> </node> <node oor:name="StatusBar"> <node oor:name="c1" oor:op="replace"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu index 2925c2a97802..7138636549d6 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu @@ -1,533 +1,533 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE oor:component-data SYSTEM "../../../../../component-update.dtd"> <oor:component-data oor:name="DrawImpressCommands" 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="UserInterface"> - <node oor:name="Commands"> - <node oor:name=".uno:Polygon" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Polygon, filled</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ColorView" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Black & White View</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:RenamePage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Rename Slide</value> - </prop> - </node> - <node oor:name=".uno:RenameLayer" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Rename</value> - </prop> - </node> - <node oor:name=".uno:Presentation" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Slide Show</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:RehearseTimings" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Rehearse Timings</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Dia" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">SlideTransition</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ShowSlide" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Sho~w Slide</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:HideSlide" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Hide Slide</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:TextAttributes" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Te~xt...</value> - </prop> - </node> - <node oor:name=".uno:PagesPerRow" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Slides Per Row</value> - </prop> - </node> - <node oor:name=".uno:TextFitToSizeTool" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Fit Text to Frame</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:VerticalTextFitToSizeTool" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Fit Vertical Text to Frame</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Objects3DToolbox" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">3D Objects</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Cube" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Cube</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Sphere" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Sphere</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Cylinder" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Cylinder</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Cone" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Cone</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Cyramid" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Pyramid</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueEditMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Glue Points</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueInsertPoint" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Insert Glue Point</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GluePercent" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Glue Point Relative</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueEscapeDirection" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Exit Direction</value> - </prop> - </node> - <node oor:name=".uno:GlueHorzAlignCenter" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Glue Point Horizontal Center</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueHorzAlignLeft" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Glue Point Horizontal Left</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueHorzAlignRight" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Glue Point Horizontal Right</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueVertAlignCenter" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Glue Point Vertical Center</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueVertAlignTop" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Glue Point Vertical Top</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueVertAlignBottom" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Glue Point Vertical Bottom</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Shell3D" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Shell</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Torus" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Torus</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:HalfSphere" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Half-Sphere</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueEscapeDirectionLeft" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Exit Direction Left</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueEscapeDirectionRight" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Exit Direction Right</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueEscapeDirectionTop" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Exit Direction Top</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GlueEscapeDirectionBottom" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Exit Direction Bottom</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:InsertToolbox" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Insert</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Morphing" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Cross-fading...</value> - </prop> - </node> - <node oor:name=".uno:MeasureAttributes" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Dimen~sions...</value> - </prop> - </node> - <node oor:name=".uno:GridFront" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Grid to ~Front</value> - </prop> - </node> - <node oor:name=".uno:HelplinesVisible" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Display Guides</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:HelplinesFront" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Guides to ~Front</value> - </prop> - </node> - <node oor:name=".uno:BeforeObject" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">In Front of ~Object</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:PreviewWindow" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Pre~view</value> - </prop> - </node> - <node oor:name=".uno:CustomAnimation" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Custom Animation...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CustomAnimationSchemes" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Animation Schemes...</value> - </prop> - </node> - <node oor:name=".uno:SlideChangeWindow" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Slide Transition...</value> - </prop> - </node> - <node oor:name=".uno:ConnectorAttributes" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Connector...</value> - </prop> - </node> - <node oor:name=".uno:PresentationDialog" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">S~lide Show Settings...</value> - </prop> - </node> - <node oor:name=".uno:Hyphenation" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Hyphenation</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:NewRouting" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Reset Routing</value> - </prop> - </node> - <node oor:name=".uno:DuplicatePage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">D~uplicate Slide</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ExpandPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">E~xpand Slide</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:SummaryPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Su~mmary Slide</value> - </prop> - </node> - <node oor:name=".uno:LeaveAllGroups" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Exit All Groups</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ParaspaceIncrease" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Increase Spacing</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ParaspaceDecrease" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Decrease Spacing</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:SlideMasterPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Slide Master</value> - </prop> - </node> - <node oor:name=".uno:HandoutMasterPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Handout Master</value> - </prop> - </node> - <node oor:name=".uno:NotesMasterPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Notes Master</value> - </prop> - </node> - <node oor:name=".uno:TitleMasterPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Title Slide Master</value> - </prop> - </node> - <node oor:name=".uno:InsertPageQuick" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Insert Slide Direct</value> - </prop> - </node> - <node oor:name=".uno:InsertDateFieldVar" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Dat~e (variable)</value> - </prop> - </node> - <node oor:name=".uno:InsertDateFieldFix" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Date (fixed)</value> - </prop> - </node> - <node oor:name=".uno:InsertTimeFieldVar" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">T~ime (variable)</value> - </prop> - </node> - <node oor:name=".uno:InsertTimeFieldFix" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Time (fixed)</value> - </prop> - </node> - <node oor:name=".uno:InsertPageField" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Page Number</value> - </prop> - </node> + <node oor:name="UserInterface"> + <node oor:name="Commands"> + <node oor:name=".uno:Polygon" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Polygon, filled</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ColorView" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Black & White View</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:RenamePage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Rename Slide</value> + </prop> + </node> + <node oor:name=".uno:RenameLayer" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Rename</value> + </prop> + </node> + <node oor:name=".uno:Presentation" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Slide Show</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:RehearseTimings" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Rehearse Timings</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Dia" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">SlideTransition</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ShowSlide" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Sho~w Slide</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:HideSlide" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Hide Slide</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:TextAttributes" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Te~xt...</value> + </prop> + </node> + <node oor:name=".uno:PagesPerRow" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Slides Per Row</value> + </prop> + </node> + <node oor:name=".uno:TextFitToSizeTool" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Fit Text to Frame</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:VerticalTextFitToSizeTool" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Fit Vertical Text to Frame</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Objects3DToolbox" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">3D Objects</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Cube" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Cube</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Sphere" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Sphere</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Cylinder" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Cylinder</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Cone" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Cone</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Cyramid" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Pyramid</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueEditMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Glue Points</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueInsertPoint" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Insert Glue Point</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GluePercent" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Glue Point Relative</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueEscapeDirection" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Exit Direction</value> + </prop> + </node> + <node oor:name=".uno:GlueHorzAlignCenter" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Glue Point Horizontal Center</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueHorzAlignLeft" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Glue Point Horizontal Left</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueHorzAlignRight" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Glue Point Horizontal Right</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueVertAlignCenter" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Glue Point Vertical Center</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueVertAlignTop" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Glue Point Vertical Top</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueVertAlignBottom" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Glue Point Vertical Bottom</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Shell3D" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Shell</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Torus" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Torus</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:HalfSphere" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Half-Sphere</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueEscapeDirectionLeft" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Exit Direction Left</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueEscapeDirectionRight" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Exit Direction Right</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueEscapeDirectionTop" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Exit Direction Top</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GlueEscapeDirectionBottom" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Exit Direction Bottom</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:InsertToolbox" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Insert</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Morphing" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Cross-fading...</value> + </prop> + </node> + <node oor:name=".uno:MeasureAttributes" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Dimen~sions...</value> + </prop> + </node> + <node oor:name=".uno:GridFront" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Grid to ~Front</value> + </prop> + </node> + <node oor:name=".uno:HelplinesVisible" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Display Guides</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:HelplinesFront" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Guides to ~Front</value> + </prop> + </node> + <node oor:name=".uno:BeforeObject" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">In Front of ~Object</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:PreviewWindow" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Pre~view</value> + </prop> + </node> + <node oor:name=".uno:CustomAnimation" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Custom Animation...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CustomAnimationSchemes" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Animation Schemes...</value> + </prop> + </node> + <node oor:name=".uno:SlideChangeWindow" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Slide Transition...</value> + </prop> + </node> + <node oor:name=".uno:ConnectorAttributes" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Connector...</value> + </prop> + </node> + <node oor:name=".uno:PresentationDialog" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">S~lide Show Settings...</value> + </prop> + </node> + <node oor:name=".uno:Hyphenation" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Hyphenation</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:NewRouting" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Reset Routing</value> + </prop> + </node> + <node oor:name=".uno:DuplicatePage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">D~uplicate Slide</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ExpandPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">E~xpand Slide</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:SummaryPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Su~mmary Slide</value> + </prop> + </node> + <node oor:name=".uno:LeaveAllGroups" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Exit All Groups</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ParaspaceIncrease" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Increase Spacing</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ParaspaceDecrease" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Decrease Spacing</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:SlideMasterPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Slide Master</value> + </prop> + </node> + <node oor:name=".uno:HandoutMasterPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Handout Master</value> + </prop> + </node> + <node oor:name=".uno:NotesMasterPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Notes Master</value> + </prop> + </node> + <node oor:name=".uno:TitleMasterPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Title Slide Master</value> + </prop> + </node> + <node oor:name=".uno:InsertPageQuick" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Insert Slide Direct</value> + </prop> + </node> + <node oor:name=".uno:InsertDateFieldVar" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Dat~e (variable)</value> + </prop> + </node> + <node oor:name=".uno:InsertDateFieldFix" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Date (fixed)</value> + </prop> + </node> + <node oor:name=".uno:InsertTimeFieldVar" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">T~ime (variable)</value> + </prop> + </node> + <node oor:name=".uno:InsertTimeFieldFix" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Time (fixed)</value> + </prop> + </node> + <node oor:name=".uno:InsertPageField" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Page Number</value> + </prop> + </node> <node oor:name=".uno:InsertPagesField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> @@ -535,1521 +535,1527 @@ </prop> </node> <node oor:name=".uno:ModifyField" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">F~ields...</value> - </prop> - </node> - <node oor:name=".uno:InsertFileField" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~File Name</value> - </prop> - </node> - <node oor:name=".uno:InsertAuthorField" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Author</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CustomShowDialog" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Custom Slide Show...</value> - </prop> - </node> - <node oor:name=".uno:OutputQualityColor" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Color</value> - </prop> - </node> - <node oor:name=".uno:OutputQualityGrayscale" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Grayscale</value> - </prop> - </node> - <node oor:name=".uno:OutputQualityBlackWhite" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Black and White</value> - </prop> - </node> - <node oor:name=".uno:PreviewQualityColor" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Color</value> - </prop> - </node> - <node oor:name=".uno:PreviewQualityGrayscale" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Grayscale</value> - </prop> - </node> - <node oor:name=".uno:PreviewQualityBlackWhite" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Black and White</value> - </prop> - </node> - <node oor:name=".uno:ConvertInto3D" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">To 3~D</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConvertInto3DLatheFast" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">To 3D ~Rotation Object</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConvertIntoBitmap" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">To ~Bitmap</value> - </prop> - </node> - <node oor:name=".uno:ConvertIntoMetaFile" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">To ~Metafile</value> - </prop> - </node> - <node oor:name=".uno:PackAndGo" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Pack</value> - </prop> - </node> - <node oor:name=".uno:convert_to_contour" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">To C~ontour</value> - </prop> - </node> - <node oor:name=".uno:EditHyperlink" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">H~yperlink...</value> - </prop> - </node> - <node oor:name=".uno:PageSetup" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Page...</value> - </prop> - </node> - <node oor:name=".uno:PasteSpecial" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Paste ~Special...</value> - </prop> - </node> - <node oor:name=".uno:CopyObjects" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Duplicat~e...</value> - </prop> - </node> - <node oor:name=".uno:ManageLinks" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Lin~ks...</value> - </prop> - </node> - <node oor:name=".uno:ConvertInto3DLathe" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">In 3D Rotation Object</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DrawingMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Drawing View</value> - </prop> - </node> - <node oor:name=".uno:OutlineMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Outline</value> - </prop> - </node> - <node oor:name=".uno:OutputQualityContrast" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~High Contrast</value> - </prop> - </node> - <node oor:name=".uno:DiaMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Sli~de Sorter</value> - </prop> - </node> - <node oor:name=".uno:PreviewQualityContrast" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~High Contrast</value> - </prop> - </node> - <node oor:name=".uno:InsertPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Slid~e</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ImportFromFile" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~File...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ZoomPanning" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Shift</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:PixelMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Pixel Mode</value> - </prop> - </node> - <node oor:name=".uno:ObjectPosition" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Arrange</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Combine" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Comb~ine</value> - </prop> - </node> - <node oor:name=".uno:ObjectTitleDescription" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Description...</value> - </prop> - </node> - <node oor:name=".uno:NameGroup" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Name...</value> - </prop> - </node> - <node oor:name=".uno:ConnectorToolbox" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Connector</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Forward" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Bring ~Forward</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Backward" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Send Back~ward</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:MirrorVert" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Vertically</value> - </prop> - </node> - <node oor:name=".uno:MirrorHorz" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Horizontally</value> - </prop> - </node> - <node oor:name=".uno:ChangeBezier" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">To ~Curve</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ChangePolygon" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">To ~Polygon</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CapturePoint" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Insert Snap Point/Line...</value> - </prop> - </node> - <node oor:name=".uno:ShowRuler" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Ruler</value> - </prop> - </node> - <node oor:name=".uno:InsertLayer" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Layer...</value> - </prop> - </node> - <node oor:name=".uno:ModifyPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Slide ~Layout...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ModifyLayer" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Layer...</value> - </prop> - </node> - <node oor:name=".uno:PageMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Normal</value> - </prop> - </node> - <node oor:name=".uno:LayerMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Layer</value> - </prop> - </node> - <node oor:name=".uno:MeasureLine" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Dimension Line</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:MasterPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Master</value> - </prop> - </node> - <node oor:name=".uno:DiaEffect" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Slide Effects</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DiaSpeed" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Transition Speed</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DiaAuto" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">AutoTransition</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DiaTime" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Time</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Connector" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Connector</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ActionMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Allow Interaction</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:AnimationObjects" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Animated Image...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:AnimationEffects" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Interaction...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:PresentationLayout" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Slide D~esign...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:NotesMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Notes ~Page</value> - </prop> - </node> - <node oor:name=".uno:HandoutMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">H~andout Page</value> - </prop> - </node> - <node oor:name=".uno:DeletePage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">D~elete Slide</value> - </prop> - </node> - <node oor:name=".uno:DeleteLayer" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Delete</value> - </prop> - </node> - <node oor:name=".uno:Dismantle" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Split</value> - </prop> - </node> - <node oor:name=".uno:PageStatus" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Slide/Layer</value> - </prop> - </node> - <node oor:name=".uno:LayoutStatus" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Layout</value> - </prop> - </node> - <node oor:name=".uno:CrookRotate" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Set in Circle (perspective)</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CrookSlant" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Set to circle (slant)</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CrookStretch" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Set in Circle (distort)</value> - </prop> - </node> - <node oor:name=".uno:Connect" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">C~onnect</value> - </prop> - </node> - <node oor:name=".uno:Break" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Break</value> - </prop> - </node> - <node oor:name=".uno:AdvancedMode" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Effects</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:InteractiveTransparence" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Transparency</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:InteractiveGradient" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Gradient</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Shear" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Distort</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:BehindObject" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Be~hind Object</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ReverseOrder" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Reverse</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorArrowStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Connector Starts with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorArrowEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Connector Ends with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorArrows" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Connector with Arrows</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCircleStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Connector Starts with Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCircleEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Connector Ends with Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCircles" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Connector with Circles</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:TextToolbox" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Text</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLine" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Straight Connector</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:RectangleToolbox" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Rectangle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLineArrowStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Straight Connector starts with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:EllipseToolbox" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Ellipse</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLineArrowEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Straight Connector ends with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineToolbox" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Curve</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLineArrows" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Straight Connector with Arrows</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLineCircleStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Straight Connector starts with Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLineCircleEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Straight Connector ends with Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLineCircles" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Straight Connector with Circles</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCurve" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Curved Connector</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCurveArrowStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Curved Connector Starts with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCurveArrowEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Curved Connector Ends with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCurveArrows" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Curved Connector with Arrows</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCurveCircleStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Curved Connector Starts with Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCurveCircleEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Curved Connector Ends with Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorCurveCircles" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Curved Connector with Circles</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLines" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Connector</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLinesArrowStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Connector Starts with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLinesArrowEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Connector Ends with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLinesArrows" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Connector with Arrows</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLinesCircleStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Connector Starts with Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLinesCircleEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Connector Ends with Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConnectorLinesCircles" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Connector with Circles</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:GraphicDraft" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Picture Placeholders</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:FillDraft" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Contour Mode</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:TextDraft" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Text Placeholders</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineDraft" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Contour Only</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:HandlesDraft" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Simple Handles</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:SolidCreate" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Modify Object with Attributes</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:HelplinesUse" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Snap to Guides</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:SnapBorder" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Snap to Page Margins</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:SnapFrame" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Snap to Object Border</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:SnapPoints" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Snap to Object Points</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:QuickEdit" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Allow Quick Editing</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:PickThrough" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Select Text Area Only</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ConvertTo1BitThreshold" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">1 Bit Threshold</value> - </prop> - </node> - <node oor:name=".uno:ConvertTo1BitMatrix" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">1 Bit Dithered</value> - </prop> - </node> - <node oor:name=".uno:ConvertTo4BitGrays" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">4 Bit grayscales</value> - </prop> - </node> - <node oor:name=".uno:ConvertTo4BitColors" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">4 Bit color palette</value> - </prop> - </node> - <node oor:name=".uno:ConvertTo8BitGrays" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">8 Bit Grayscales</value> - </prop> - </node> - <node oor:name=".uno:ConvertTo8BitColors" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">8 Bit color palette</value> - </prop> - </node> - <node oor:name=".uno:ConvertToTrueColor" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">24 Bit True Color</value> - </prop> - </node> - <node oor:name=".uno:BigHandles" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Large Handles</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DoubleClickTextEdit" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Double-click to edit Text</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ClickChangeRotation" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Rotation Mode after Clicking Object</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:ArrowsToolbox" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Lines and Arrows</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineArrowStart" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Starts with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineArrowEnd" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line Ends with Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineArrows" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line with Arrows</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineArrowCircle" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line with Arrow/Circle</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineCircleArrow" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line with Circle/Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineArrowSquare" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line with Arrow/Square</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:LineSquareArrow" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Line with Square/Arrow</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:Mirror" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Flip</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - - <node oor:name=".uno:InsertMasterPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">New Master</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DeleteMasterPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Delete Master</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:RenameMasterPage" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Rename Master</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CloseMasterView" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Close Master View</value> - </prop> - </node> - <node oor:name=".uno:SendMailDocAsMS" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">E-mail as ~Microsoft PowerPoint Presentation...</value> - </prop> - </node> - <node oor:name=".uno:SendMailDocAsOOo" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">E-mail as ~OpenDocument Presentation...</value> - </prop> - </node> - </node> - <node oor:name="Popups"> - <node oor:name=".uno:ModifyMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Modify</value> - </prop> - </node> - <node oor:name=".uno:WorkspaceMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Wor~kspace</value> - </prop> - </node> - <node oor:name=".uno:MirrorMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Flip</value> - </prop> - </node> - <node oor:name=".uno:PreviewDisplayQualityMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Pre~view Mode</value> - </prop> - </node> - <node oor:name=".uno:LayerMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">La~yer</value> - </prop> - </node> - <node oor:name=".uno:GridMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Gr~id</value> - </prop> - </node> - <node oor:name=".uno:ConvertMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Convert</value> - </prop> - </node> - <node oor:name=".uno:ArrangeMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Arrange</value> - </prop> - </node> - <node oor:name=".uno:DisplayQualityMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Color/Grayscale</value> - </prop> - </node> - <node oor:name=".uno:SlideShowMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Slide Show</value> - </prop> - </node> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">F~ields...</value> + </prop> + </node> + <node oor:name=".uno:InsertFileField" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~File Name</value> + </prop> + </node> + <node oor:name=".uno:InsertAuthorField" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Author</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CustomShowDialog" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Custom Slide Show...</value> + </prop> + </node> + <node oor:name=".uno:OutputQualityColor" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Color</value> + </prop> + </node> + <node oor:name=".uno:OutputQualityGrayscale" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Grayscale</value> + </prop> + </node> + <node oor:name=".uno:OutputQualityBlackWhite" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Black and White</value> + </prop> + </node> + <node oor:name=".uno:PreviewQualityColor" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Color</value> + </prop> + </node> + <node oor:name=".uno:PreviewQualityGrayscale" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Grayscale</value> + </prop> + </node> + <node oor:name=".uno:PreviewQualityBlackWhite" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Black and White</value> + </prop> + </node> + <node oor:name=".uno:ConvertInto3D" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">To 3~D</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConvertInto3DLatheFast" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">To 3D ~Rotation Object</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConvertIntoBitmap" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">To ~Bitmap</value> + </prop> + </node> + <node oor:name=".uno:ConvertIntoMetaFile" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">To ~Metafile</value> + </prop> + </node> + <node oor:name=".uno:PackAndGo" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Pack</value> + </prop> + </node> + <node oor:name=".uno:convert_to_contour" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">To C~ontour</value> + </prop> + </node> + <node oor:name=".uno:EditHyperlink" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">H~yperlink...</value> + </prop> + </node> + <node oor:name=".uno:PageSetup" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Page...</value> + </prop> + </node> + <node oor:name=".uno:PasteSpecial" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Paste ~Special...</value> + </prop> + </node> + <node oor:name=".uno:CopyObjects" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Duplicat~e...</value> + </prop> + </node> + <node oor:name=".uno:ManageLinks" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Lin~ks...</value> + </prop> + </node> + <node oor:name=".uno:ConvertInto3DLathe" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">In 3D Rotation Object</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DrawingMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Drawing View</value> + </prop> + </node> + <node oor:name=".uno:OutlineMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Outline</value> + </prop> + </node> + <node oor:name=".uno:OutputQualityContrast" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~High Contrast</value> + </prop> + </node> + <node oor:name=".uno:DiaMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Sli~de Sorter</value> + </prop> + </node> + <node oor:name=".uno:PreviewQualityContrast" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~High Contrast</value> + </prop> + </node> + <node oor:name=".uno:InsertPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Slid~e</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ImportFromFile" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~File...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ZoomPanning" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Shift</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:PixelMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Pixel Mode</value> + </prop> + </node> + <node oor:name=".uno:ObjectPosition" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Arrange</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Combine" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Comb~ine</value> + </prop> + </node> + <node oor:name=".uno:ObjectTitleDescription" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Description...</value> + </prop> + </node> + <node oor:name=".uno:NameGroup" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Name...</value> + </prop> + </node> + <node oor:name=".uno:ConnectorToolbox" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Connector</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Forward" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Bring ~Forward</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Backward" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Send Back~ward</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:MirrorVert" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Vertically</value> + </prop> + </node> + <node oor:name=".uno:MirrorHorz" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Horizontally</value> + </prop> + </node> + <node oor:name=".uno:ChangeBezier" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">To ~Curve</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ChangePolygon" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">To ~Polygon</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CapturePoint" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Insert Snap Point/Line...</value> + </prop> + </node> + <node oor:name=".uno:ShowRuler" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Ruler</value> + </prop> + </node> + <node oor:name=".uno:InsertLayer" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Layer...</value> + </prop> + </node> + <node oor:name=".uno:ModifyPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Slide ~Layout...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ModifyLayer" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Layer...</value> + </prop> + </node> + <node oor:name=".uno:PageMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Normal</value> + </prop> + </node> + <node oor:name=".uno:LayerMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Layer</value> + </prop> + </node> + <node oor:name=".uno:MeasureLine" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Dimension Line</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:MasterPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Master</value> + </prop> + </node> + <node oor:name=".uno:DiaEffect" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Slide Effects</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DiaSpeed" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Transition Speed</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DiaAuto" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">AutoTransition</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DiaTime" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Time</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Connector" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Connector</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ActionMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Allow Interaction</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:AnimationObjects" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Animated Image...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:AnimationEffects" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Interaction...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:PresentationLayout" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Slide D~esign...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:AssignLayout" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Slide Layout</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:NotesMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Notes ~Page</value> + </prop> + </node> + <node oor:name=".uno:HandoutMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">H~andout Page</value> + </prop> + </node> + <node oor:name=".uno:DeletePage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">D~elete Slide</value> + </prop> + </node> + <node oor:name=".uno:DeleteLayer" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Delete</value> + </prop> + </node> + <node oor:name=".uno:Dismantle" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Split</value> + </prop> + </node> + <node oor:name=".uno:PageStatus" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Slide/Layer</value> + </prop> + </node> + <node oor:name=".uno:LayoutStatus" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Layout</value> + </prop> + </node> + <node oor:name=".uno:CrookRotate" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Set in Circle (perspective)</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CrookSlant" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Set to circle (slant)</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CrookStretch" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Set in Circle (distort)</value> + </prop> + </node> + <node oor:name=".uno:Connect" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">C~onnect</value> + </prop> + </node> + <node oor:name=".uno:Break" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Break</value> + </prop> + </node> + <node oor:name=".uno:AdvancedMode" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Effects</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:InteractiveTransparence" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Transparency</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:InteractiveGradient" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Gradient</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Shear" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Distort</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:BehindObject" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Be~hind Object</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ReverseOrder" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Reverse</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorArrowStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Connector Starts with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorArrowEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Connector Ends with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorArrows" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Connector with Arrows</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCircleStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Connector Starts with Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCircleEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Connector Ends with Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCircles" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Connector with Circles</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:TextToolbox" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Text</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLine" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Straight Connector</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:RectangleToolbox" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Rectangle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLineArrowStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Straight Connector starts with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:EllipseToolbox" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Ellipse</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLineArrowEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Straight Connector ends with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineToolbox" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Curve</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLineArrows" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Straight Connector with Arrows</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLineCircleStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Straight Connector starts with Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLineCircleEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Straight Connector ends with Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLineCircles" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Straight Connector with Circles</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCurve" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Curved Connector</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCurveArrowStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Curved Connector Starts with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCurveArrowEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Curved Connector Ends with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCurveArrows" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Curved Connector with Arrows</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCurveCircleStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Curved Connector Starts with Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCurveCircleEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Curved Connector Ends with Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorCurveCircles" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Curved Connector with Circles</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLines" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Connector</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLinesArrowStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Connector Starts with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLinesArrowEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Connector Ends with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLinesArrows" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Connector with Arrows</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLinesCircleStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Connector Starts with Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLinesCircleEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Connector Ends with Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConnectorLinesCircles" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Connector with Circles</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:GraphicDraft" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Picture Placeholders</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:FillDraft" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Contour Mode</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:TextDraft" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Text Placeholders</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineDraft" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Contour Only</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:HandlesDraft" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Simple Handles</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:SolidCreate" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Modify Object with Attributes</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:HelplinesUse" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Snap to Guides</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:SnapBorder" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Snap to Page Margins</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:SnapFrame" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Snap to Object Border</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:SnapPoints" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Snap to Object Points</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:QuickEdit" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Allow Quick Editing</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:PickThrough" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Select Text Area Only</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ConvertTo1BitThreshold" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">1 Bit Threshold</value> + </prop> + </node> + <node oor:name=".uno:ConvertTo1BitMatrix" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">1 Bit Dithered</value> + </prop> + </node> + <node oor:name=".uno:ConvertTo4BitGrays" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">4 Bit grayscales</value> + </prop> + </node> + <node oor:name=".uno:ConvertTo4BitColors" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">4 Bit color palette</value> + </prop> + </node> + <node oor:name=".uno:ConvertTo8BitGrays" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">8 Bit Grayscales</value> + </prop> + </node> + <node oor:name=".uno:ConvertTo8BitColors" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">8 Bit color palette</value> + </prop> + </node> + <node oor:name=".uno:ConvertToTrueColor" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">24 Bit True Color</value> + </prop> + </node> + <node oor:name=".uno:BigHandles" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Large Handles</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DoubleClickTextEdit" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Double-click to edit Text</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ClickChangeRotation" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Rotation Mode after Clicking Object</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ArrowsToolbox" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Lines and Arrows</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineArrowStart" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Starts with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineArrowEnd" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line Ends with Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineArrows" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line with Arrows</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineArrowCircle" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line with Arrow/Circle</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineCircleArrow" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line with Circle/Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineArrowSquare" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line with Arrow/Square</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:LineSquareArrow" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Line with Square/Arrow</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:Mirror" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Flip</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + + <node oor:name=".uno:InsertMasterPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">New Master</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DeleteMasterPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Delete Master</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:RenameMasterPage" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Rename Master</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CloseMasterView" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Close Master View</value> + </prop> + </node> + <node oor:name=".uno:SendMailDocAsMS" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">E-mail as ~Microsoft PowerPoint Presentation...</value> + </prop> + </node> + <node oor:name=".uno:SendMailDocAsOOo" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">E-mail as ~OpenDocument Presentation...</value> + </prop> + </node> + </node> + <node oor:name="Popups"> + <node oor:name=".uno:ModifyMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Modify</value> + </prop> + </node> + <node oor:name=".uno:WorkspaceMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Wor~kspace</value> + </prop> + </node> + <node oor:name=".uno:MirrorMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Flip</value> + </prop> + </node> + <node oor:name=".uno:PreviewDisplayQualityMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Pre~view Mode</value> + </prop> + </node> + <node oor:name=".uno:LayerMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">La~yer</value> + </prop> + </node> + <node oor:name=".uno:GridMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Gr~id</value> + </prop> + </node> + <node oor:name=".uno:ConvertMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Convert</value> + </prop> + </node> + <node oor:name=".uno:ArrangeMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Arrange</value> + </prop> + </node> + <node oor:name=".uno:DisplayQualityMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Color/Grayscale</value> + </prop> + </node> + <node oor:name=".uno:SlideShowMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Slide Show</value> + </prop> + </node> <!--node oor:name=".uno:ReviewMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Review</value> </prop> </node--> <node oor:name=".uno:GroupMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Group</value> - </prop> - </node> - <node oor:name=".uno:SendMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Sen~d</value> - </prop> - </node> - <node oor:name=".uno:TemplatesMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Styl~es</value> - </prop> - </node> - <node oor:name=".uno:SnapLinesMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Guides</value> - </prop> - </node> - <node oor:name=".uno:MasterPageMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Master</value> - </prop> - </node> - <node oor:name=".uno:MasterLayoutsMenu" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Master Lay~outs</value> - </prop> - </node> - <node oor:name=".uno:MasterLayouts" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Master ~Elements...</value> - </prop> - </node> - <node oor:name=".uno:MasterLayoutsNotes" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Notes Master Layout...</value> - </prop> - </node> - <node oor:name=".uno:MasterLayoutsHandouts" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Handout Master Layout...</value> - </prop> - </node> - <node oor:name=".uno:HeaderAndFooter" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Header and Footer...</value> - </prop> - </node> - <node oor:name=".uno:InsertPageNumber" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">P~age Number...</value> - </prop> - </node> - <node oor:name=".uno:InsertDateAndTime" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Date and ~Time...</value> - </prop> - </node> - <node oor:name=".uno:NormalMultiPaneGUI" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Normal</value> - </prop> - </node> - <node oor:name=".uno:SlideSorterMultiPaneGUI" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Sli~de Sorter</value> - </prop> - </node> - <node oor:name=".uno:LeftPaneImpress" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">S~lide Pane</value> - </prop> - </node> - <node oor:name=".uno:LeftPaneDraw" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">~Page Pane</value> - </prop> - </node> - <node oor:name=".uno:RightPane" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - - <value xml:lang="en-US">Tas~k Pane</value> - </prop> - </node> - - <node oor:name=".uno:MergeCells" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Zellen verbinden</value> - <value xml:lang="en-US">Merge Cells</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:SplitCell" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Zelle teilen</value> - <value xml:lang="en-US">Split Cells</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:OptimizeTable" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Optimieren</value> - <value xml:lang="en-US">Optimize</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DistributeColumns" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Distribute Columns Evenly</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DistributeRows" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Distribute Rows Equally </value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CellVertBottom" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Unten</value> - <value xml:lang="en-US">Bottom</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CellVertCenter" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Mittig (vertikal)</value> - <value xml:lang="en-US">Center ( vertical )</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:CellVertTop" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Oben</value> - <value xml:lang="en-US">Top</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:InsertRows" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Zeile einfügen</value> - <value xml:lang="en-US">Insert Row</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Group</value> + </prop> + </node> + <node oor:name=".uno:SendMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Sen~d</value> + </prop> + </node> + <node oor:name=".uno:TemplatesMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Styl~es</value> + </prop> + </node> + <node oor:name=".uno:SnapLinesMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Guides</value> + </prop> + </node> + <node oor:name=".uno:MasterPageMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Master</value> + </prop> + </node> + <node oor:name=".uno:MasterLayoutsMenu" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Master Lay~outs</value> + </prop> + </node> + <node oor:name=".uno:MasterLayouts" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Master ~Elements...</value> + </prop> + </node> + <node oor:name=".uno:MasterLayoutsNotes" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Notes Master Layout...</value> + </prop> + </node> + <node oor:name=".uno:MasterLayoutsHandouts" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Handout Master Layout...</value> + </prop> + </node> + <node oor:name=".uno:HeaderAndFooter" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Header and Footer...</value> + </prop> + </node> + <node oor:name=".uno:InsertPageNumber" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">P~age Number...</value> + </prop> + </node> + <node oor:name=".uno:InsertDateAndTime" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Date and ~Time...</value> + </prop> + </node> + <node oor:name=".uno:NormalMultiPaneGUI" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">~Normal</value> + </prop> + </node> + <node oor:name=".uno:SlideSorterMultiPaneGUI" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">Sli~de Sorter</value> + </prop> + </node> + <node oor:name=".uno:LeftPaneImpress" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + + <value xml:lang="en-US">S~lide Pane</value> + </prop> + </node> + <node oor:name=".uno:LeftPaneDraw" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">~Page Pane</value> + </prop> + </node> + + <node oor:name=".uno:RightPane" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Tas~k Pane</value> + </prop> + </node> + + <node oor:name=".uno:MergeCells" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Zellen verbinden</value> + <value xml:lang="en-US">Merge Cells</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:SplitCell" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Zelle teilen</value> + <value xml:lang="en-US">Split Cells</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:OptimizeTable" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Optimieren</value> + <value xml:lang="en-US">Optimize</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DistributeColumns" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Distribute Columns Evenly</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DistributeRows" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Distribute Rows Equally </value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CellVertBottom" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Unten</value> + <value xml:lang="en-US">Bottom</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CellVertCenter" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Mittig (vertikal)</value> + <value xml:lang="en-US">Center ( vertical )</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:CellVertTop" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Oben</value> + <value xml:lang="en-US">Top</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:InsertRows" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Zeile einfügen</value> + <value xml:lang="en-US">Insert Row</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:InsertRowDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Rows...</value> </prop> </node> <node oor:name=".uno:InsertColumns" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Spalte einfügen</value> - <value xml:lang="en-US">Insert Column</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Spalte einfügen</value> + <value xml:lang="en-US">Insert Column</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:InsertColumnDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Columns...</value> </prop> </node> <node oor:name=".uno:DeleteRows" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Zeile löschen</value> - <value xml:lang="en-US">Delete Row</value> - </prop> - <prop oor:name="ContextLabel" oor:type="xs:string"> - <value xml:lang="de">Zeilen</value> - <value xml:lang="en-US">~Rows</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:DeleteColumns" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Spalte löschen</value> - <value xml:lang="en-US">Delete Column</value> - </prop> - <prop oor:name="ContextLabel" oor:type="xs:string"> - <value xml:lang="de">Spalten</value> - <value xml:lang="en-US">~Columns</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:SelectTable" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Tabelle selektieren</value> - <value xml:lang="en-US">Select Table</value> - </prop> - <prop oor:name="ContextLabel" oor:type="xs:string"> - <value xml:lang="de">Tabelle</value> - <value xml:lang="en-US">~Table</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:EntireColumn" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Spalte selektieren</value> - <value xml:lang="en-US">Select Column</value> - </prop> - <prop oor:name="ContextLabel" oor:type="xs:string"> - <value xml:lang="de">Spalten</value> - <value xml:lang="en-US">~Columns</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:EntireRow" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Zeile selektieren</value> - <value xml:lang="en-US">Select Rows</value> - </prop> - <prop oor:name="ContextLabel" oor:type="xs:string"> - <value xml:lang="de">Zeilen</value> - <value xml:lang="en-US">~Rows</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:TableDialog" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Tabelleneigenschaften...</value> - <value xml:lang="en-US">Ta~ble Properties...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:AutoSum" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Summe</value> - <value xml:lang="en-US">Sum</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:TableSort" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">Sorti~eren...</value> - <value xml:lang="en-US">So~rt...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> - <node oor:name=".uno:InsertTable" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="de">~Tabelle...</value> - <value xml:lang="en-US">~Table...</value> - </prop> - <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> - </prop> - </node> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Zeile löschen</value> + <value xml:lang="en-US">Delete Row</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> + <value xml:lang="de">Zeilen</value> + <value xml:lang="en-US">~Rows</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DeleteColumns" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Spalte löschen</value> + <value xml:lang="en-US">Delete Column</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> + <value xml:lang="de">Spalten</value> + <value xml:lang="en-US">~Columns</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:SelectTable" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Tabelle selektieren</value> + <value xml:lang="en-US">Select Table</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> + <value xml:lang="de">Tabelle</value> + <value xml:lang="en-US">~Table</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:EntireColumn" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Spalte selektieren</value> + <value xml:lang="en-US">Select Column</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> + <value xml:lang="de">Spalten</value> + <value xml:lang="en-US">~Columns</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:EntireRow" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Zeile selektieren</value> + <value xml:lang="en-US">Select Rows</value> + </prop> + <prop oor:name="ContextLabel" oor:type="xs:string"> + <value xml:lang="de">Zeilen</value> + <value xml:lang="en-US">~Rows</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:TableDialog" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Tabelleneigenschaften...</value> + <value xml:lang="en-US">Ta~ble Properties...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:AutoSum" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Summe</value> + <value xml:lang="en-US">Sum</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:TableSort" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Sorti~eren...</value> + <value xml:lang="en-US">So~rt...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:InsertTable" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">~Tabelle...</value> + <value xml:lang="en-US">~Table...</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:Grow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Increase Font</value> @@ -2115,5 +2121,5 @@ </prop> </node> </node> - </node> + </node> </oor:component-data> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu index 53d2ca72cbf4..c0feaba64dc6 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu @@ -106,6 +106,26 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/findbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Find</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> <node oor:name="private:resource/toolbar/drawingobjectbar" oor:op="replace"> <prop oor:name="DockPos" oor:type="xs:string"> <value>0,1</value> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu index 83554a37d09e..479c193280bb 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu @@ -45,44 +45,58 @@ </node> <node oor:name="generic_toolbar_factory" oor:op="replace"> <prop oor:name="Type"> - <value>toolbar</value> + <value>toolbar</value> </prop> <prop oor:name="Name"> - <value/> + <value/> </prop> <prop oor:name="Module"> - <value/> + <value/> </prop> <prop oor:name="FactoryImplementation"> - <value>com.sun.star.comp.framework.ToolBarFactory</value> + <value>com.sun.star.comp.framework.ToolBarFactory</value> </prop> </node> <node oor:name="addons_toolbar_factory" oor:op="replace"> <prop oor:name="Type"> - <value>toolbar</value> + <value>toolbar</value> </prop> <prop oor:name="Name"> - <value>addon_</value> + <value>addon_</value> </prop> <prop oor:name="Module"> - <value/> + <value/> </prop> <prop oor:name="FactoryImplementation"> - <value>com.sun.star.comp.framework.AddonsToolBarFactory</value> + <value>com.sun.star.comp.framework.AddonsToolBarFactory</value> </prop> </node> <node oor:name="statusbar_factory" oor:op="replace"> <prop oor:name="Type"> - <value>statusbar</value> + <value>statusbar</value> + </prop> + <prop oor:name="Name"> + <value/> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="FactoryImplementation"> + <value>com.sun.star.comp.framework.StatusBarFactory</value> + </prop> + </node> + <node oor:name="org.openoffice.Office.Impress.ImpressToolPanelFactory" oor:op="replace"> + <prop oor:name="Type"> + <value>toolpanel</value> </prop> <prop oor:name="Name"> - <value/> + <value>DrawingFramework</value> </prop> <prop oor:name="Module"> - <value/> + <value>com.sun.star.presentation.PresentationDocument</value> </prop> <prop oor:name="FactoryImplementation"> - <value>com.sun.star.comp.framework.StatusBarFactory</value> + <value>com.sun.star.drawing.DefaultToolPanelFactory</value> </prop> </node> </node> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 4f38244540c2..ebed194fcffc 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -45,7 +45,7 @@ <value xml:lang="en-US">Fontwork Gallery</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FontworkShapeType" oor:op="replace"> @@ -1277,7 +1277,7 @@ <value xml:lang="en-US">Can't Undo</value> </prop> </node> - <node oor:name=".uno:GrabControlFocus" oor:op="replace"> + <node oor:name=".uno:ToggleControlFocus" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Control Focus</value> </prop> @@ -1287,7 +1287,7 @@ <value xml:lang="en-US">Scrollbar</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Zoom" oor:op="replace"> @@ -1303,7 +1303,7 @@ <value xml:lang="en-US">Spin Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ConvertToScrollBar" oor:op="replace"> @@ -1371,7 +1371,7 @@ <value xml:lang="en-US">Italic</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Bold" oor:op="replace"> @@ -1379,7 +1379,7 @@ <value xml:lang="en-US">Bold</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ModuleDialog" oor:op="replace"> @@ -1395,7 +1395,7 @@ <value xml:lang="en-US">Shadow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ObjectCatalog" oor:op="replace"> @@ -1411,7 +1411,7 @@ <value xml:lang="en-US">Outline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Strikeout" oor:op="replace"> @@ -1419,7 +1419,7 @@ <value xml:lang="en-US">Strikethrough</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelpOnHelp" oor:op="replace"> @@ -1432,7 +1432,7 @@ <value xml:lang="en-US">Underline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Overline" oor:op="replace"> @@ -1440,7 +1440,7 @@ <value xml:lang="en-US">Overline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelpIndex" oor:op="replace"> @@ -1459,6 +1459,38 @@ <value>1</value> </prop> </node> + <node oor:name=".uno:FindText" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Find Text</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:DownSearch" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Find Next</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:UpSearch" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Find Previous</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name="vnd.sun.star.findbar:FocusToFindbar" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Focus to Findbar</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:ExtendedHelp" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">What's ~This?</value> @@ -1505,7 +1537,7 @@ <value xml:lang="en-US">Align Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:RightPara" oor:op="replace"> @@ -1513,7 +1545,7 @@ <value xml:lang="en-US">Align Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:CenterPara" oor:op="replace"> @@ -1521,7 +1553,7 @@ <value xml:lang="en-US">Centered</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:SendFax" oor:op="replace"> @@ -1537,7 +1569,7 @@ <value xml:lang="en-US">Justified</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:HelpChooseFile" oor:op="replace"> @@ -1550,7 +1582,7 @@ <value xml:lang="en-US">Line Spacing: 1</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:SpacePara15" oor:op="replace"> @@ -1558,7 +1590,7 @@ <value xml:lang="en-US">Line Spacing : 1.5</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:SpacePara2" oor:op="replace"> @@ -1566,7 +1598,7 @@ <value xml:lang="en-US">Line Spacing : 2</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:StatusGetPosition" oor:op="replace"> @@ -1717,7 +1749,7 @@ <value xml:lang="en-US">Invert</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Line" oor:op="replace"> @@ -2071,7 +2103,7 @@ <value xml:lang="en-US">Bullets On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:FormatArea" oor:op="replace"> @@ -2090,22 +2122,22 @@ <value>1</value> </prop> </node> - <node oor:name=".uno:ChangeCaseToUpper" oor:op="replace"> + <node oor:name=".uno:LanguageStatus" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Language Status</value> + </prop> + </node> + <node oor:name=".uno:ChooseControls" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Uppercase</value> + <value xml:lang="en-US">Insert Controls</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> </prop> </node> - <node oor:name=".uno:LanguageStatus" oor:op="replace"> - <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Language Status</value> - </prop> - </node> - <node oor:name=".uno:ChooseControls" oor:op="replace"> + <node oor:name=".uno:ChangeCaseToSentenceCase" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Insert Controls</value> + <value xml:lang="en-US">~Sentence case</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> @@ -2113,7 +2145,31 @@ </node> <node oor:name=".uno:ChangeCaseToLower" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Lowercase</value> + <value xml:lang="en-US">~lowercase</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ChangeCaseToUpper" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">~UPPERCASE</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ChangeCaseToTitleCase" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">~Capitalize Every Word</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:ChangeCaseToToggleCase" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">~tOGGLE cASE</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> @@ -2150,7 +2206,7 @@ <value xml:lang="en-US">Numbering On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:BezierConvert" oor:op="replace"> @@ -2195,7 +2251,7 @@ <value xml:lang="en-US">Check Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ChangeCaseToKatakana" oor:op="replace"> @@ -2309,7 +2365,7 @@ <value xml:lang="en-US">Edit File</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertImageControl" oor:op="replace"> @@ -2423,7 +2479,7 @@ <value xml:lang="en-US">Time Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:StyleNewByExample" oor:op="replace"> @@ -2590,7 +2646,7 @@ <value xml:lang="en-US">Left-To-Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:Group" oor:op="replace"> @@ -2606,7 +2662,7 @@ <value xml:lang="en-US">Right-To-Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:Ungroup" oor:op="replace"> @@ -2726,7 +2782,7 @@ <value xml:lang="en-US">Combo Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Spinbutton" oor:op="replace"> @@ -2891,7 +2947,7 @@ <value xml:lang="en-US">Guides When Moving</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CloseWin" oor:op="replace"> @@ -2907,7 +2963,7 @@ <value xml:lang="en-US">Snap to Grid</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertTextFrame" oor:op="replace"> @@ -2989,7 +3045,7 @@ <value xml:lang="en-US">New FrameSet</value> </prop> </node> - <node oor:name=".uno:Thesaurus" oor:op="replace"> + <node oor:name=".uno:ThesaurusDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Thesaurus...</value> </prop> @@ -3144,7 +3200,7 @@ <value xml:lang="en-US">HT~ML Source</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertSound" oor:op="replace"> @@ -3168,7 +3224,7 @@ <value xml:lang="en-US">~Hyperlink</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Merge" oor:op="replace"> @@ -3186,7 +3242,7 @@ <value xml:lang="en-US">Superscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Intersect" oor:op="replace"> @@ -3199,7 +3255,7 @@ <value xml:lang="en-US">Subscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FontDialog" oor:op="replace"> @@ -3228,7 +3284,7 @@ <value xml:lang="en-US">Shadow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:LineEndStyle" oor:op="replace"> @@ -3260,7 +3316,7 @@ <value xml:lang="en-US">Format Paintbrush</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Repeat" oor:op="replace"> @@ -3328,7 +3384,7 @@ <value xml:lang="en-US">~Edit Contour...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SelectAll" oor:op="replace"> @@ -3417,10 +3473,15 @@ <value xml:lang="en-US">Na~vigator</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> - <node oor:name=".uno:RestoreEditingView" oor:op="replace"> + <node oor:name=".uno:TaskPane" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Task Pane</value> + </prop> + </node> + <node oor:name=".uno:RestoreEditingView" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Restore Editing View</value> </prop> @@ -3434,13 +3495,16 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Fit to Frame</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ImageMapDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">ImageMap</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:GoDownSel" oor:op="replace"> @@ -3684,14 +3748,17 @@ <value xml:lang="en-US">~Display Grid</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Flash" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Flash</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ToolsMacroEdit" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Edit Macros</value> @@ -3980,7 +4047,7 @@ <value xml:lang="en-US">~AutoSpellcheck</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HideSpellMark" oor:op="replace"> @@ -3995,9 +4062,12 @@ </node> <node oor:name=".uno:RubyDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">As~ian phonetic guide...</value> + <value xml:lang="en-US">As~ian phonetic guide...</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:InsertSymbol" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">S~pecial Character...</value> @@ -4011,7 +4081,7 @@ <value xml:lang="en-US">~Data Sources</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:MenuBarVisible" oor:op="replace"> @@ -4094,7 +4164,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Status ~Bar</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:MacroBarVisible" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Macro Toolbar On/Off</value> @@ -4220,7 +4293,7 @@ <value xml:lang="en-US">~Gallery</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SearchDialog" oor:op="replace"> @@ -4228,7 +4301,7 @@ <value xml:lang="en-US">~Find & Replace...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelperDialog" oor:op="replace"> @@ -4260,7 +4333,7 @@ <value xml:lang="en-US">More Controls</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormDesignTools" oor:op="replace"> @@ -4268,7 +4341,7 @@ <value xml:lang="en-US">Form Design</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Pushbutton" oor:op="replace"> @@ -4276,7 +4349,7 @@ <value xml:lang="en-US">Push Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RadioButton" oor:op="replace"> @@ -4284,7 +4357,7 @@ <value xml:lang="en-US">Option Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CheckBox" oor:op="replace"> @@ -4300,7 +4373,7 @@ <value xml:lang="en-US">Label Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:GroupBox" oor:op="replace"> @@ -4308,7 +4381,7 @@ <value xml:lang="en-US">Group Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Edit" oor:op="replace"> @@ -4316,7 +4389,7 @@ <value xml:lang="en-US">Text Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ListBox" oor:op="replace"> @@ -4324,7 +4397,7 @@ <value xml:lang="en-US">List Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ComboBox" oor:op="replace"> @@ -4340,7 +4413,7 @@ <value xml:lang="en-US">Table Control</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Imagebutton" oor:op="replace"> @@ -4348,7 +4421,7 @@ <value xml:lang="en-US">Image Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FileControl" oor:op="replace"> @@ -4356,7 +4429,7 @@ <value xml:lang="en-US">File Selection</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ControlProperties" oor:op="replace"> @@ -4364,7 +4437,7 @@ <value xml:lang="en-US">Con~trol...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormProperties" oor:op="replace"> @@ -4372,7 +4445,7 @@ <value xml:lang="en-US">For~m...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:TabDialog" oor:op="replace"> @@ -4475,7 +4548,7 @@ <value xml:lang="en-US">Design Mode On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SwitchXFormsDesignMode" oor:op="replace"> @@ -4508,7 +4581,7 @@ <value xml:lang="pt">Modo Esboço</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RecUndo" oor:op="replace"> @@ -4529,7 +4602,7 @@ <value xml:lang="en-US">Form Navigator...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ShowDataNavigator" oor:op="replace"> @@ -4537,7 +4610,7 @@ <value xml:lang="en-US">Data Navigator...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Window3D" oor:op="replace"> @@ -4604,7 +4677,7 @@ <value xml:lang="en-US">Date Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:TimeField" oor:op="replace"> @@ -4612,7 +4685,7 @@ <value xml:lang="en-US">Time Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:NumericField" oor:op="replace"> @@ -4620,7 +4693,7 @@ <value xml:lang="en-US">Numerical Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CurrencyField" oor:op="replace"> @@ -4628,7 +4701,7 @@ <value xml:lang="en-US">Currency Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:PrintPreview" oor:op="replace"> @@ -4636,7 +4709,7 @@ <value xml:lang="en-US">Pa~ge Preview</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:PatternField" oor:op="replace"> @@ -4644,7 +4717,7 @@ <value xml:lang="en-US">Pattern Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:OpenReadOnly" oor:op="replace"> @@ -4652,7 +4725,7 @@ <value xml:lang="en-US">Open in Design Mode</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ImageControl" oor:op="replace"> @@ -4660,7 +4733,7 @@ <value xml:lang="en-US">Image Control</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RemoveFilterSort" oor:op="replace"> @@ -4732,7 +4805,7 @@ <value xml:lang="en-US">Run SQL command directly</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SbaExecuteSql" oor:op="replace"> @@ -4756,7 +4829,7 @@ <value xml:lang="en-US">Apply Filter</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Refresh" oor:op="replace"> @@ -4788,7 +4861,7 @@ <value xml:lang="en-US">Wizards On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormattedField" oor:op="replace"> @@ -4796,7 +4869,7 @@ <value xml:lang="en-US">Formatted Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormFilter" oor:op="replace"> @@ -4934,7 +5007,7 @@ <value xml:lang="en-US">Automatic Control Focus</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:DSBrowserExplorer" oor:op="replace"> @@ -4942,7 +5015,7 @@ <value xml:lang="en-US">Explorer On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ExtrusionToggle" oor:op="replace"> @@ -5292,7 +5365,7 @@ <value xml:lang="en-US">Media Pla~yer</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertAVMedia" oor:op="replace"> @@ -5316,7 +5389,7 @@ <value xml:lang="en-US">~Color</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertHardHyphen" oor:op="replace"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu index 422230b9e0a1..e582c0b9dc27 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu @@ -1,4 +1,4 @@ -<?xml version='1.0' encoding='UTF-8'?> +<?xml version='1.0' encoding='utf-8'?> <!--*********************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,734 +27,734 @@ ************************************************************************ --> <!DOCTYPE oor:component-data SYSTEM "../../../../../component-update.dtd"> <oor:component-data oor:name="ImpressWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" 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="UIElements"> - <node oor:name="States"> - <node oor:name="private:resource/toolbar/extrusionobjectbar" oor:op="replace"> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">3D-Settings</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/drawingobjectbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>0,1</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Line and Filling</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/3dobjectsbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">3D-Objects</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/alignmentbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Align</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/arrowsbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Arrows</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/choosemodebar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Mode</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/commontaskbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>1,0</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Presentation</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/connectorsbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Connectors</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/fullscreenbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Style" oor:type="xs:int"> - <value>2</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Full Screen</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="NoClose" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/ellipsesbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Circles and Ovals</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> + <node oor:name="UIElements"> + <node oor:name="States"> + <node oor:name="private:resource/toolbar/extrusionobjectbar" oor:op="replace"> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">3D-Settings</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/drawingobjectbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,1</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Line and Filling</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/3dobjectsbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">3D-Objects</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/alignmentbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Align</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/arrowsbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Arrows</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/choosemodebar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Mode</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/commontaskbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Presentation</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/connectorsbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Connectors</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/fullscreenbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Style" oor:type="xs:int"> + <value>2</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Full Screen</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="NoClose" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/ellipsesbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Circles and Ovals</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> <node oor:name="private:resource/toolbar/formtextobjectbar" oor:op="replace"> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Text Box Formatting</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/formsfilterbar" oor:op="replace"> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Form Filter</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="NoClose" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/formsnavigationbar" oor:op="replace"> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Form Navigation</value> - </prop> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>0,1</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>1</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/formcontrols" oor:op="replace"> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Form Controls</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/moreformcontrols" oor:op="replace"> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">More Controls</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/formdesign" oor:op="replace"> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Form Design</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/fontworkobjectbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Fontwork</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/fontworkshapetype" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Fontwork Shape</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/graphicobjectbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>0,1</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Picture</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/graffilterbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Graphic Filter</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/outlinetoolbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>1,0</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Outline</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/insertbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Insert</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/linesbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Lines</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/basicshapes" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Basic Shapes</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/symbolshapes" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Symbol Shapes</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/arrowshapes" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Block Arrows</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/flowchartshapes" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Flowchart</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/calloutshapes" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Callouts</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/starshapes" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Stars and Banners</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/optionsbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Options</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/rectanglesbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Rectangles</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/positionbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Position</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/slideviewtoolbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>0,1</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Slide Sorter</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/slideviewobjectbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>0,1</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Slide View</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/standardbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>0,0</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Standard</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/textbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Text</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>0,1</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Text Formatting</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/toolbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>1</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Drawing</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/tableobjectbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Table</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/zoombar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Zoom</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/gluepointsobjectbar" oor:op="replace"> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Gluepoints</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/bezierobjectbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Edit Points</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/viewerbar" oor:op="replace"> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Standard (Viewing Mode)</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="NoClose" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/mediaobjectbar" oor:op="replace"> - <prop oor:name="DockPos" oor:type="xs:string"> - <value>0,1</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>1</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Media Playback</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> - <node oor:name="private:resource/toolbar/colorbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Color</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>true</value> - </prop> - </node> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Text Box Formatting</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/formsfilterbar" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Form Filter</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="NoClose" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/formsnavigationbar" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Form Navigation</value> + </prop> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,1</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>1</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/formcontrols" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Form Controls</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/moreformcontrols" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">More Controls</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/formdesign" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Form Design</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/fontworkobjectbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Fontwork</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/fontworkshapetype" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Fontwork Shape</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/graphicobjectbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,1</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Picture</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/graffilterbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Graphic Filter</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/outlinetoolbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Outline</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/insertbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Insert</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/linesbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Lines</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/basicshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Basic Shapes</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/symbolshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Symbol Shapes</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/arrowshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Block Arrows</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/flowchartshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Flowchart</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/calloutshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Callouts</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/starshapes" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Stars and Banners</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/optionsbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Options</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/rectanglesbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Rectangles</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/positionbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Position</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/slideviewtoolbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,1</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Slide Sorter</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/slideviewobjectbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,1</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Slide View</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/standardbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Standard</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/textbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Text</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,1</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Text Formatting</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/toolbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>1</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Drawing</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/tableobjectbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Table</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/zoombar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Zoom</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/gluepointsobjectbar" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Gluepoints</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/bezierobjectbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Edit Points</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/viewerbar" oor:op="replace"> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Standard (Viewing Mode)</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="NoClose" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/mediaobjectbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,1</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>1</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Media Playback</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolbar/colorbar" oor:op="replace"> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Color</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> <node oor:name="private:resource/toolbar/commentsbar" oor:op="replace"> <prop oor:name="Docked" oor:type="xs:boolean"> <value>false</value> @@ -770,36 +770,91 @@ </prop> </node> <node oor:name="private:resource/toolbar/masterviewtoolbar" oor:op="replace"> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="DockingArea" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="Locked" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="Style" oor:type="xs:int"> - <value>0</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="Pos" oor:type="xs:string"> - <value>500,100</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Master View</value> - </prop> - <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="NoClose" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>true</value> - </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="Locked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="Style" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="Pos" oor:type="xs:string"> + <value>500,100</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Master View</value> + </prop> + <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="NoClose" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> + <node oor:name="private:resource/toolpanel/DrawingFramework/MasterPages" oor:op="replace"> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Master Pages</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>private:commandimage/PresentationLayout</value> + </prop> + </node> + <node oor:name="private:resource/toolpanel/DrawingFramework/Layouts" oor:op="replace"> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Layouts</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>private:commandimage/ModifyPage</value> + </prop> + </node> + <node oor:name="private:resource/toolpanel/DrawingFramework/TableDesign" oor:op="replace"> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Table Design</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>private:commandimage/InsertTable</value> + </prop> + </node> + <node oor:name="private:resource/toolpanel/DrawingFramework/CustomAnimations" oor:op="replace"> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Custom Animation</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>private:commandimage/CustomAnimation</value> + </prop> + </node> + <node oor:name="private:resource/toolpanel/DrawingFramework/SlideTransitions" oor:op="replace"> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Slide Transition</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>private:commandimage/RehearseTimings</value> + </prop> </node> <node oor:name="private:resource/toolbar/optimizetablebar" oor:op="replace"> <prop oor:name="Docked" oor:type="xs:boolean"> @@ -815,6 +870,26 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/findbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Find</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> </node> - </node> + </node> </oor:component-data> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu index e69558fc4ef5..1a3db34f6e6d 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu @@ -164,7 +164,7 @@ <value xml:lang="en-US">Formula Cursor</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> </node> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index fa0611e07041..4fa236666b6b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -38,12 +38,18 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Hidden Paragraphs</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShowAnnotations" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Comments</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:InsertScript" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">S~cript...</value> @@ -115,13 +121,16 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Bibliography Entry...</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShadowCursor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Direct Cursor On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:StartAutoCorrect" oor:op="replace"> @@ -166,12 +175,18 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Record</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShowTrackedChanges" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Show</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:GotoPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">To Page</value> @@ -460,7 +475,7 @@ <value xml:lang="en-US">Insert Fields</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertDateField" oor:op="replace"> @@ -539,9 +554,12 @@ </node> <node oor:name=".uno:OnlineAutoFormat" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~While Typing</value> + <value xml:lang="en-US">~While Typing</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:StatePageNumber" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Page Number</value> @@ -573,7 +591,7 @@ <value xml:lang="en-US">Double Underline </value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:AutoFormatRedlineApply" oor:op="replace"> @@ -596,7 +614,7 @@ <value xml:lang="en-US">Superscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SubScript" oor:op="replace"> @@ -604,7 +622,7 @@ <value xml:lang="en-US">Subscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CharLeftSel" oor:op="replace"> @@ -866,7 +884,7 @@ <value xml:lang="en-US">Wrap Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:WrapOn" oor:op="replace"> @@ -1723,7 +1741,7 @@ <value xml:lang="en-US">Link Frames</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:AlignCharBottom" oor:op="replace"> @@ -1754,7 +1772,7 @@ <value xml:lang="en-US">Restart Numbering</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:JumpToHeader" oor:op="replace"> @@ -1875,7 +1893,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Allow Row to Break Across Pages and Columns</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:SelectText" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Select Paragraph</value> @@ -2024,7 +2045,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Font Color Fill</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ViewBounds" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Te~xt Boundaries</value> @@ -2058,7 +2082,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Highlight Fill</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:VRuler" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Vertical Ruler</value> @@ -2069,7 +2096,7 @@ <value xml:lang="en-US">~Hyphenation...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:VScroll" oor:op="replace"> @@ -2097,7 +2124,7 @@ <value xml:lang="en-US">~Nonprinting Characters</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SortDialog" oor:op="replace"> @@ -2136,7 +2163,7 @@ <value xml:lang="en-US">Book Preview</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RemoveDirectCharFormats" oor:op="replace"> @@ -2158,11 +2185,17 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Standard</value> </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> </node> <node oor:name=".uno:SelectionModeBlock" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Block Area</value> </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> </node> </node> <node oor:name="Popups"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu index 870e3c5c528b..8bcc180c264b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterGlobalWindowState.xcu @@ -52,6 +52,26 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/findbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Find</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace"> <prop oor:name="DockPos" oor:type="xs:string"> <value>0,1</value> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu index 8c0eccc927e9..35844d1bd516 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWebWindowState.xcu @@ -52,6 +52,26 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/findbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Find</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace"> <prop oor:name="DockPos" oor:type="xs:string"> <value>0,1</value> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu index 60417cae30fa..d3790df3ef92 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu @@ -52,6 +52,26 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/findbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Find</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace"> <prop oor:name="DockPos" oor:type="xs:string"> <value>0,1</value> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu index f78926234b35..76cdc52f5e3a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/XFormsWindowState.xcu @@ -53,6 +53,26 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/findbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>1,0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Find</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="ContextSensitive" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace"> <prop oor:name="DockPos" oor:type="xs:string"> <value>0,1</value> diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu index 120f212112d6..63b22726378b 100755 --- a/officecfg/registry/data/org/openoffice/Setup.xcu +++ b/officecfg/registry/data/org/openoffice/Setup.xcu @@ -594,7 +594,7 @@ <value>GenericCategories</value> </prop> <prop oor:name="ooSetupFactoryUIName"> - <value xml:lang="en-US">Base: Table Data View</value> + <value>Base: Table Data View</value> </prop> </node> <node oor:name="com.sun.star.frame.Bibliography" oor:op="replace"> @@ -616,7 +616,7 @@ <value >GenericCategories</value> </prop> <prop oor:name="ooSetupFactoryUIName"> - <value xml:lang="en-US">Bibliography</value> + <value>Bibliography</value> </prop> </node> <node oor:name="com.sun.star.script.BasicIDE" oor:op="replace"> @@ -801,13 +801,13 @@ <node oor:name="Common" oor:op="replace"> <prop oor:name="IncludedFiles"> <value> - .*/autotext/.* - .*/autocorr/.* - .*/config/.*\.so[bcdegh] - .*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml - .*/config/soffice.cfg/modules/.*/images/.* - .*/gallery/.* - .*/template/.* + <it>.*/autotext/.*</it> + <it>.*/autocorr/.*</it> + <it>.*/config/.*\.so[bcdegh]</it> + <it>.*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml</it> + <it>.*/config/soffice.cfg/modules/.*/images/.*</it> + <it>.*/gallery/.*</it> + <it>.*/template/.*</it> </value> </prop> <prop oor:name="IncludedNodes"> diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index 36fd48ebf753..33e5c9f26f2f 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -1434,7 +1434,7 @@ </node> <node oor:name="arialnarrow" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>arialnarrowmt;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value> + <value>arialnarrowmt;liberationsansnarrow;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value> </prop> <prop oor:name="SubstFontsMS"> <value></value> @@ -1838,6 +1838,9 @@ </prop> <prop oor:name="FontType"><value>Normal,SansSerif</value></prop> </node> + <node oor:name="candara" oor:op="replace"> + <prop oor:name="FontType"><value>Normal,SansSerif</value></prop> + </node> <node oor:name="cambria" oor:op="replace"> <prop oor:name="SubstFonts"> @@ -1846,6 +1849,20 @@ <prop oor:name="FontType"><value>Normal,Serif</value></prop> </node> + <node oor:name="consolas" oor:op="replace"> + <prop oor:name="FontType"><value>Normal,SansSerif,Fixed</value></prop> + <prop oor:name="SubstFontsHTML"><value>monospace</value></prop> + </node> + <node oor:name="constantia" oor:op="replace"> + <prop oor:name="FontType"><value>Normal,Serif</value></prop> + </node> + <node oor:name="corbel" oor:op="replace"> + <prop oor:name="FontType"><value>Normal,SansSerif</value></prop> + </node> + <node oor:name="cordia" oor:op="replace"> + <prop oor:name="FontType"><value>Normal,SansSerif</value></prop> + </node> + <node oor:name="calisto" oor:op="replace"> <prop oor:name="SubstFonts"> <value>thorndaleamt;thorndale;timesnewroman;nimbusromanno9l;times;timesroman;newyork;timmons;serif;lucidaserif;lucidabright;roman;nimbusromanno9;bookman;itcbookman;garamond;garamondmt;palatino</value> @@ -2522,7 +2539,7 @@ </node> <node oor:name="dejavusanscondensed" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>arialnarrow</value> + <value>arialnarrow;liberationsansnarrow</value> </prop> <prop oor:name="FontWeight"><value>Normal</value></prop> <prop oor:name="FontWidth"><value>Condensed</value></prop> @@ -3578,7 +3595,7 @@ </node> <node oor:name="helveticanarrow" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>arialnarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value> + <value>arialnarrow;liberationsansnarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value> </prop> <prop oor:name="SubstFontsMS"> <value></value> @@ -6521,7 +6538,7 @@ </node> <node oor:name="sanscondensed" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>arialnarrow;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value> + <value>arialnarrow;liberationsansnarrow;helveticanarrow;helmetcondensed;dejavusanscondensed;nimbussanslcondensed;nimbussanscondensed</value> </prop> <prop oor:name="SubstFontsMS"> <value></value> @@ -6567,7 +6584,7 @@ </node> <node oor:name="sanslcondensed" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>arialnarrow;helveticanarrow;helmetcondensed;nimbussanslcondensed;nimbussanscondensed;dejavusanscondensed</value> + <value>arialnarrow;liberationsansnarrow;helveticanarrow;helmetcondensed;nimbussanslcondensed;nimbussanscondensed;dejavusanscondensed</value> </prop> <prop oor:name="SubstFontsMS"> <value></value> @@ -7142,7 +7159,7 @@ </node> <node oor:name="swissnarrow" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>dejavuserifcondensed;arialnarrow;helveticanarrow;helmetcondensed;nimbussanslcondensed;nimbussanscondensed</value> + <value>dejavuserifcondensed;arialnarrow;liberationsansnarrow;helveticanarrow;helmetcondensed;nimbussanslcondensed;nimbussanscondensed</value> </prop> <prop oor:name="SubstFontsMS"> <value></value> diff --git a/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu b/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu index df824b593a8d..88d2abef62f3 100644 --- a/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu +++ b/officecfg/registry/data/org/openoffice/ucb/Configuration.xcu @@ -175,6 +175,17 @@ <value/> </prop> </node> + <node oor:name="Provider14" oor:op="replace"> + <prop oor:name="ServiceName"> + <value>com.sun.star.ucb.ExtensionContentProvider</value> + </prop> + <prop oor:name="URLTemplate"> + <value>vnd.sun.star.extension</value> + </prop> + <prop oor:name="Arguments"> + <value/> + </prop> + </node> <!-- We want the Provider to be the final fallback provider --> <node oor:name="Provider999" oor:op="replace" install:module="gio"> <prop oor:name="ServiceName"> diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index ffe5388caf76..913902731f29 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1206,7 +1206,7 @@ <desc>Specifies the number of decimals to be displayed for the Standard number format.</desc> <label>Decimal places</label> </info> - <value>2</value> + <value>-1</value> </prop> <prop oor:name="RegularExpressions" oor:type="xs:boolean"> <!-- UIHints: Tools - Options Spreadsheet Calculate [Check box] Enable regular expressions in formulas --> diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs index a5a703c0480c..8317e3e0082d 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs @@ -26,375 +26,380 @@ * ************************************************************************ --> <!DOCTYPE oor:component-schema SYSTEM "../../../../component-schema.dtd"> -<oor:component-schema xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="Impress" oor:package="org.openoffice.Office" xml:lang="en-US"> <info> - <author>AF</author> - <desc >Contains configuration items related to the Impress application.</desc> - </info> - <import oor:component="org.openoffice.Office.Common"/> - <templates> - <group oor:name="MasterPageDescriptor"> +<oor:component-schema xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="Impress" oor:package="org.openoffice.Office" xml:lang="en-US"> + <info> + <author>AF</author> + <desc >Contains configuration items related to the Impress application.</desc> + </info> + <import oor:component="org.openoffice.Office.Common"/> + <templates> + <group oor:name="MasterPageDescriptor"> + <info> + <desc>Describes master pages that belong to the list of recently used master pages.</desc> + </info> + <prop oor:name="URL" oor:type="xs:string"> + <info> + <desc>The URL of the template document that contains the master page.</desc> + </info> + </prop> + <prop oor:name="Name" oor:type="xs:string"> + <info> + <desc>The internal name of the master page.</desc> + </info> + </prop> + </group> + <group oor:name="Resource"> + <info> + <desc>A factory that can create one more resources for the multi pane framework.</desc> + </info> + <prop oor:name="URL" oor:type="xs:string"> + <info> + <desc>URL of a multi pane framework resource.</desc> + </info> + </prop> + </group> + <group oor:name="ResourceFactory"> + <info> + <desc>A factory that can create one more resources for the multi pane framework.</desc> + </info> + <prop oor:name="ServiceName" oor:type="xs:string"> + <info> + <desc> + The service name of the factory. This service is not the factory itself. + It is expected to create and register a set of factories when an instance of + the service is created. + </desc> + </info> + </prop> + <set oor:name="ResourceList" oor:node-type="Resource"> + <info> + <desc>List of URLs of the resources that are created by the factory.</desc> + </info> + </set> + </group> + <group oor:name="StartupService"> + <info> + <desc> + A service that is instantiated when a framework is initializd for a + Draw or Impress document. + </desc> + </info> + <prop oor:name="ServiceName" oor:type="xs:string"> + <info> + <desc>The name of the startup service.</desc> + </info> + </prop> + </group> + </templates> + <component> + <group oor:name="Layout"> + <info> + <desc>Contains general properties of the graphical object representation.</desc> + </info> + <group oor:name="Display"> + <info> + <desc>Contains general properties of the graphical object representation of screen displays.</desc> + </info> + <prop oor:name="Ruler" oor:type="xs:boolean"> + <!-- OldPath: Impress/Layout/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> + <info> + <desc>Indicates whether to show the rulers at the left and at the top of the working area.</desc> + <label>Rulers visible</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Helpline" oor:type="xs:boolean"> + <!-- OldPath: Impress/Layout/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> + <info> + <desc>Indicates whether to show help-lines that can be created by dragging them from the rulers.</desc> + <label>Helplines visible</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Guide" oor:type="xs:boolean"> + <!-- OldPath: Impress/Layout/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> + <info> + <desc>Indicates whether to show help-lines when moving an object.</desc> + <label>Guides when moving</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Bezier" oor:type="xs:boolean"> + <!-- OldPath: Impress/Layout/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> + <info> + <desc>Indicates whether to show all control points in the Bezier curve editor.</desc> + <label>All control points in Bezier editor</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Contour" oor:type="xs:boolean"> + <!-- OldPath: Impress/Layout/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> + <info> + <desc>Indicates whether to show the outline of all moved objects when moving more then one object at the same time.</desc> + <label>Contour of each individual object</label> + </info> + <value>true</value> + </prop> + </group> + <group oor:name="Other"> + <info> + <desc>Specifies other layout options that do not fit into any other group.</desc> + <label>Other Layout Options</label> + </info> + <group oor:name="TabStop"> + <!-- OldPath: Impress/Layout --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Tab stops --> + <!-- Notice: Default-Nonmetric Value: 1270 1/100 mm--> + <info> + <desc>Specifies the distance between adjacent tab stops with regard to whether the metric or the non-metric system is currently selected.</desc> + <label>Tab stops</label> + </info> + <prop oor:name="Metric" oor:type="xs:int"> <info> - <desc>Describes master pages that belong to the list of recently used master pages.</desc> + <desc>Specifies the distance between adjacent tab stops in 1/100 mm when the metric system is selected.</desc> + <label/> </info> - <prop oor:name="URL" oor:type="xs:string"> + <value>1250</value> + </prop> + <prop oor:name="NonMetric" oor:type="xs:int"> + <info> + <desc>Specifies the distance between adjacent tab stops in 1/100 mm when the non-metric system is selected.</desc> + <label/> + </info> + <value>1270</value> + </prop> + </group> + <group oor:name="MeasureUnit"> + <!-- OldPath: Impress/Layout --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation- Layout - [Section] Meas. units --> + <info> + <desc>Specifies the measurement unit to be used with respect to whether the metric or the non-metric system is selected.</desc> + <label>Measurement unit</label> + </info> + <prop oor:name="Metric" oor:type="xs:int"> + <info> + <desc>Specifies the measurement unit to be used when the metric system is selected.</desc> + <label>Measurement unit</label> + </info> + <constraints> + <enumeration oor:value="1"> <info> - <desc>The URL of the template document that contains the master page.</desc> + <desc>Millimeter</desc> </info> - </prop> - <prop oor:name="Name" oor:type="xs:string"> + </enumeration> + <enumeration oor:value="2"> <info> - <desc>The internal name of the master page.</desc> + <desc>Centimeter</desc> </info> - </prop> - </group> - <group oor:name="Resource"> - <info> - <desc>A factory that can create one more resources for the multi pane framework.</desc> - </info> - <prop oor:name="URL" oor:type="xs:string"> + </enumeration> + <enumeration oor:value="6"> + <info> + <desc>Point</desc> + </info> + </enumeration> + <enumeration oor:value="7"> <info> - <desc>URL of a multi pane framework resource.</desc> + <desc>Pica</desc> </info> - </prop> - </group> - <group oor:name="ResourceFactory"> + </enumeration> + <enumeration oor:value="8"> + <info> + <desc>Inch</desc> + </info> + </enumeration> + </constraints> + <value>2</value> + </prop> + <prop oor:name="NonMetric" oor:type="xs:int"> <info> - <desc>A factory that can create one more resources for the multi pane framework.</desc> + <desc>Specifies the measurement unit to be used when the non-metric system is selected.</desc> + <label>Measurement unit</label> </info> - <prop oor:name="ServiceName" oor:type="xs:string"> + <constraints> + <enumeration oor:value="1"> + <info> + <desc>Millimeter</desc> + </info> + </enumeration> + <enumeration oor:value="2"> <info> - <desc>The service name of the factory. This service is not the factory itself. - It is expected to create and register a set of factories when an instance of - the service is created.</desc> + <desc>Centimeter</desc> </info> - </prop> - <set oor:name="ResourceList" oor:node-type="Resource"> + </enumeration> + <enumeration oor:value="6"> <info> - <desc>List of URLs of the resources that are created by the factory.</desc> + <desc>Point</desc> </info> - </set> - </group> - <group oor:name="StartupService"> - <info> - <desc>A service that is instantiated when a framework is initializd for a - Draw or Impress document.</desc> - </info> - <prop oor:name="ServiceName" oor:type="xs:string"> - <info> - <desc>The name of the startup service.</desc> - </info> - </prop> - </group> - </templates> - <component> - <group oor:name="Layout"> - <info> - <desc>Contains general properties of the graphical object representation.</desc> - </info> - <group oor:name="Display"> - <info> - <desc>Contains general properties of the graphical object representation of screen displays.</desc> - </info> - <prop oor:name="Ruler" oor:type="xs:boolean"> - <!-- OldPath: Impress/Layout/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> - <info> - <desc>Indicates whether to show the rulers at the left and at the top of the working area.</desc> - <label>Rulers visible</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Helpline" oor:type="xs:boolean"> - <!-- OldPath: Impress/Layout/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> - <info> - <desc>Indicates whether to show help-lines that can be created by dragging them from the rulers.</desc> - <label>Helplines visible</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Guide" oor:type="xs:boolean"> - <!-- OldPath: Impress/Layout/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> - <info> - <desc>Indicates whether to show help-lines when moving an object.</desc> - <label>Guides when moving</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Bezier" oor:type="xs:boolean"> - <!-- OldPath: Impress/Layout/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> - <info> - <desc>Indicates whether to show all control points in the Bezier curve editor.</desc> - <label>All control points in Bezier editor</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Contour" oor:type="xs:boolean"> - <!-- OldPath: Impress/Layout/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Display --> - <info> - <desc>Indicates whether to show the outline of all moved objects when moving more then one object at the same time.</desc> - <label>Contour of each individual object</label> - </info> - <value>true</value> - </prop> - </group> - <group oor:name="Other"> - <info> - <desc>Specifies other layout options that do not fit into any other group.</desc> - <label>Other Layout Options</label> - </info> - <group oor:name="TabStop"> - <!-- OldPath: Impress/Layout --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Layout - [Section] Tab stops --> - <!-- Notice: Default-Nonmetric Value: 1270 1/100 mm--> - <info> - <desc>Specifies the distance between adjacent tab stops with regard to whether the metric or the non-metric system is currently selected.</desc> - <label>Tab stops</label> - </info> - <prop oor:name="Metric" oor:type="xs:int"> - <info> - <desc>Specifies the distance between adjacent tab stops in 1/100 mm when the metric system is selected.</desc> - <label/> - </info> - <value>1250</value> - </prop> - <prop oor:name="NonMetric" oor:type="xs:int"> - <info> - <desc>Specifies the distance between adjacent tab stops in 1/100 mm when the non-metric system is selected.</desc> - <label/> - </info> - <value>1270</value> - </prop> - </group> - <group oor:name="MeasureUnit"> - <!-- OldPath: Impress/Layout --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation- Layout - [Section] Meas. units --> - <info> - <desc>Specifies the measurement unit to be used with respect to whether the metric or the non-metric system is selected.</desc> - <label>Measurement unit</label> - </info> - <prop oor:name="Metric" oor:type="xs:int"> - <info> - <desc>Specifies the measurement unit to be used when the metric system is selected.</desc> - <label>Measurement unit</label> - </info> - <constraints> - <enumeration oor:value="1"> - <info> - <desc>Millimeter</desc> - </info> - </enumeration> - <enumeration oor:value="2"> - <info> - <desc>Centimeter</desc> - </info> - </enumeration> - <enumeration oor:value="6"> - <info> - <desc>Point</desc> - </info> - </enumeration> - <enumeration oor:value="7"> - <info> - <desc>Pica</desc> - </info> - </enumeration> - <enumeration oor:value="8"> - <info> - <desc>Inch</desc> - </info> - </enumeration> - </constraints> - <value>2</value> - </prop> - <prop oor:name="NonMetric" oor:type="xs:int"> - <info> - <desc>Specifies the measurement unit to be used when the non-metric system is selected.</desc> - <label>Measurement unit</label> - </info> - <constraints> - <enumeration oor:value="1"> - <info> - <desc>Millimeter</desc> - </info> - </enumeration> - <enumeration oor:value="2"> - <info> - <desc>Centimeter</desc> - </info> - </enumeration> - <enumeration oor:value="6"> - <info> - <desc>Point</desc> - </info> - </enumeration> - <enumeration oor:value="7"> - <info> - <desc>Pica</desc> - </info> - </enumeration> - <enumeration oor:value="8"> - <info> - <desc>Inch</desc> - </info> - </enumeration> - </constraints> - <value>8</value> - </prop> - </group> - </group> - </group> - <group oor:name="Content"> - <info> - <desc>Contains content related configuration items.</desc> - </info> - <group oor:name="Display"> - <info> - <desc>Contains configuration items related to the display of Impress documents.</desc> - </info> - <prop oor:name="PicturePlaceholder" oor:type="xs:boolean"> - <!-- OldPath: Impress/Contents/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display --> - <info> - <desc>Indicates whether to show only the bounding box of graphic-objects like bitmaps and drawings.</desc> - <label>Picture placeholders</label> - </info> - <value>false</value> - </prop> - <prop oor:name="ContourMode" oor:type="xs:boolean"> - <!-- OldPath: Impress/Contents/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display --> - <info> - <desc>Indicates whether to show only outlines of objects such as filled rectangles and filled ellipses.</desc> - <label>Contour mode</label> - </info> - <value>false</value> - </prop> - <prop oor:name="TextPlaceholder" oor:type="xs:boolean"> - <!-- OldPath: Impress/Contents/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display --> - <info> - <desc>Indicates whether to show only a placeholder for text in graphical objects.</desc> - <label>Text placeholders</label> - </info> - <value>false</value> - </prop> - <prop oor:name="LineContour" oor:type="xs:boolean"> - <!-- OldPath: Impress/Contents/Display --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display --> - <info> - <desc>Indicates whether to show only hairlines instead of the true line styles.</desc> - <label>Line contour only</label> - </info> - <value>false</value> - </prop> - </group> - </group> - <group oor:name="Misc"> - <info> - <desc>Contains a collection of configuration items for the Impress application that do not fit into another category.</desc> - </info> - <prop oor:name="BackgroundCache" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] Other --> - <info> - <desc>Indicates whether to store master pages in a cache to speed up drawing.</desc> - <label>Use background cache</label> - </info> - <value>true</value> - </prop> - <prop oor:name="CopyWhileMoving" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] Other --> - <info> - <desc>Indicates whether moving while holding the Control key makes a copy of the moved object.</desc> - <label>Copy while moving</label> - </info> - <value>false</value> - </prop> - <prop oor:name="ObjectMoveable" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] Other --> - <info> - <desc>Indicates whether objects can still be moved while in rotating mode.</desc> - <label>Objects always moveable</label> - </info> - <value>true</value> - </prop> - <prop oor:name="NoDistort" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] Other --> - <info> - <desc>Indicates whether objects that are placed on a circle keep their original form, i.e. may be moved and rotated but not resized or otherwise distorted.</desc> - <label>Don't distort objects in curve</label> - </info> - <value>false</value> - </prop> - <prop oor:name="DclickTextedit" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: soffice.cfg --> - <!-- UIHints: Option Bar --> - <info> - <desc>Indicates whether a double-click on a text object activates the edit mode.</desc> - <label>Double-Click Text to Edit</label> - </info> - <value>true</value> - </prop> - <prop oor:name="RotateClick" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: soffice.cfg --> - <!-- UIHints: Option Bar --> - <info> - <desc>Indicates whether a double-click on an object activates the rotation mode.</desc> - <label>Rotation Mode after clicking object</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Preview" oor:type="xs:double"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: soffice.cfg --> - <!-- UIHints: Menu: view - preview mode --> - <info> - <desc>Specifies the color quality of the preview: 0 - Color, 868 - Grayscale, 5381 - Black/White.</desc> - <label>Preview-Mode</label> - </info> - <constraints> - <enumeration oor:value="0"> - <info> - <desc>Color</desc> - </info> - </enumeration> - <enumeration oor:value="868"> - <info> - <desc>Grayscale</desc> - </info> - </enumeration> - <enumeration oor:value="5381"> - <info> - <desc>Black/White</desc> - </info> - </enumeration> - </constraints> - <value>0</value> - </prop> + </enumeration> + <enumeration oor:value="7"> + <info> + <desc>Pica</desc> + </info> + </enumeration> + <enumeration oor:value="8"> + <info> + <desc>Inch</desc> + </info> + </enumeration> + </constraints> + <value>8</value> + </prop> + </group> + </group> + </group> + <group oor:name="Content"> + <info> + <desc>Contains content related configuration items.</desc> + </info> + <group oor:name="Display"> + <info> + <desc>Contains configuration items related to the display of Impress documents.</desc> + </info> + <prop oor:name="PicturePlaceholder" oor:type="xs:boolean"> + <!-- OldPath: Impress/Contents/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display --> + <info> + <desc>Indicates whether to show only the bounding box of graphic-objects like bitmaps and drawings.</desc> + <label>Picture placeholders</label> + </info> + <value>false</value> + </prop> + <prop oor:name="ContourMode" oor:type="xs:boolean"> + <!-- OldPath: Impress/Contents/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display --> + <info> + <desc>Indicates whether to show only outlines of objects such as filled rectangles and filled ellipses.</desc> + <label>Contour mode</label> + </info> + <value>false</value> + </prop> + <prop oor:name="TextPlaceholder" oor:type="xs:boolean"> + <!-- OldPath: Impress/Contents/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display --> + <info> + <desc>Indicates whether to show only a placeholder for text in graphical objects.</desc> + <label>Text placeholders</label> + </info> + <value>false</value> + </prop> + <prop oor:name="LineContour" oor:type="xs:boolean"> + <!-- OldPath: Impress/Contents/Display --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation - Contents - [Section] Alternative display --> + <info> + <desc>Indicates whether to show only hairlines instead of the true line styles.</desc> + <label>Line contour only</label> + </info> + <value>false</value> + </prop> + </group> + </group> + <group oor:name="Misc"> + <info> + <desc>Contains a collection of configuration items for the Impress application that do not fit into another category.</desc> + </info> + <prop oor:name="BackgroundCache" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] Other --> + <info> + <desc>Indicates whether to store master pages in a cache to speed up drawing.</desc> + <label>Use background cache</label> + </info> + <value>true</value> + </prop> + <prop oor:name="CopyWhileMoving" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] Other --> + <info> + <desc>Indicates whether moving while holding the Control key makes a copy of the moved object.</desc> + <label>Copy while moving</label> + </info> + <value>false</value> + </prop> + <prop oor:name="ObjectMoveable" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] Other --> + <info> + <desc>Indicates whether objects can still be moved while in rotating mode.</desc> + <label>Objects always moveable</label> + </info> + <value>true</value> + </prop> + <prop oor:name="NoDistort" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] Other --> + <info> + <desc>Indicates whether objects that are placed on a circle keep their original form, i.e. may be moved and rotated but not resized or otherwise distorted.</desc> + <label>Don't distort objects in curve</label> + </info> + <value>false</value> + </prop> + <prop oor:name="DclickTextedit" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: soffice.cfg --> + <!-- UIHints: Option Bar --> + <info> + <desc>Indicates whether a double-click on a text object activates the edit mode.</desc> + <label>Double-Click Text to Edit</label> + </info> + <value>true</value> + </prop> + <prop oor:name="RotateClick" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: soffice.cfg --> + <!-- UIHints: Option Bar --> + <info> + <desc>Indicates whether a double-click on an object activates the rotation mode.</desc> + <label>Rotation Mode after clicking object</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Preview" oor:type="xs:double"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: soffice.cfg --> + <!-- UIHints: Menu: view - preview mode --> + <info> + <desc>Specifies the color quality of the preview: 0 - Color, 868 - Grayscale, 5381 - Black/White.</desc> + <label>Preview-Mode</label> + </info> + <constraints> + <enumeration oor:value="0"> + <info> + <desc>Color</desc> + </info> + </enumeration> + <enumeration oor:value="868"> + <info> + <desc>Grayscale</desc> + </info> + </enumeration> + <enumeration oor:value="5381"> + <info> + <desc>Black/White</desc> + </info> + </enumeration> + </constraints> + <value>0</value> + </prop> <prop oor:name="ShowComments" oor:type="xs:boolean"> <info> <author>CL</author> @@ -404,774 +409,778 @@ <value>true</value> </prop> <prop oor:name="SimpleHandles" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: soffice.cfg --> - <!-- UIHints: Optionbar --> - <info> - <desc>Indicates whether to show simple (true) or 3D-handles (false).</desc> - <label>Simple Handles</label> - </info> - <value>false</value> - </prop> - <prop oor:name="BigHandles" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: soffice.cfg --> - <!-- UIHints: Optionbar --> - <info> - <desc>Indicates whether to show big (true) or small (false) handles.</desc> - <label>Big Handles</label> - </info> - <value>false</value> - </prop> - <prop oor:name="ModifyWithAttributes" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other --> - <!-- OldLocation: soffice.cfg --> - <!-- UIHints: Optionbar --> - <info> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: soffice.cfg --> + <!-- UIHints: Optionbar --> + <info> + <desc>Indicates whether to show simple (true) or 3D-handles (false).</desc> + <label>Simple Handles</label> + </info> + <value>false</value> + </prop> + <prop oor:name="BigHandles" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: soffice.cfg --> + <!-- UIHints: Optionbar --> + <info> + <desc>Indicates whether to show big (true) or small (false) handles.</desc> + <label>Big Handles</label> + </info> + <value>false</value> + </prop> + <prop oor:name="ModifyWithAttributes" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other --> + <!-- OldLocation: soffice.cfg --> + <!-- UIHints: Optionbar --> + <info> <author>AF</author> <desc>Indicates whether the object creation and modification will be visualized using the full object attribute set or wireframe.</desc> <label>Modify with attributes</label> - </info> - <value>true</value> - </prop> - <prop oor:name="ShowUndoDeleteWarning" oor:type="xs:boolean"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: UNDO stack delete warnng dialog --> - <info> - <author>AW</author> - <desc>Indicates whether the warning dialog appears when setting a new standard page layout.</desc> - <label>Show Undo-Stack Delete Warning</label> - </info> - <value>true</value> - </prop> - <prop oor:name="SlideshowRespectZOrder" oor:type="xs:boolean"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: Slideshow Z order for animations --> - <info> - <author>THB</author> - <desc>Indicates whether the slideshow should respect shape z-order while animating shapes. Disabling this can improve slideshow performance</desc> - <label>Enable shape z-order during slideshow animations</label> - </info> - <value>true</value> - </prop> - <prop oor:name="TransitionFiles" oor:type="oor:string-list"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: List of files containing transition effects --> - <info> - <author>THB</author> - <desc>Contains a list of odf files, that define - slideshow transitions. Values are put through - macro expansion, so, vnd.sun.star.expand prefix - is allowed. </desc> - <label>List of files containing transition effects</label> - </info> - <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/transitions.xml</value> - </prop> - <prop oor:name="EffectFiles" oor:type="oor:string-list"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: List of files containing object effects --> - <info> - <author>THB</author> - <desc>Contains a list of odf files, that define - slideshow shape effects. Values are put through - macro expansion, so, vnd.sun.star.expand prefix - is allowed.</desc> - <label>List of files containing object effects</label> - </info> - <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/effects.xml</value> - </prop> - <prop oor:name="PreviewNewEffects" oor:type="xs:boolean"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: automatic preview checkbox in create new effect dialog --> - <info> - <author>CL</author> - <desc>Indicates whether a selected effect in the custom animation create dialog should be previewed.</desc> - <label>Automatic preview for new custom animation</label> - </info> - <value>true</value> - </prop> - <prop oor:name="PreviewChangedEffects" oor:type="xs:boolean"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: automatic preview in custom animation panel --> - <info> - <author>CL</author> - <desc>Indicates whether changes in the custom animation panel should be previewed.</desc> - <label>Automatic preview for custom animation panel</label> - </info> - <value>true</value> - </prop> - <prop oor:name="PreviewTransitions" oor:type="xs:boolean"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: automatic preview in slide transtion panel --> - <info> - <author>CL</author> - <desc>Indicates whether changes in the slide transition panel should be previewed.</desc> - <label>Automatic preview for slide transition panel</label> - </info> - <value>true</value> - </prop> - <prop oor:name="Display" oor:type="xs:int"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: slide show settings display listbox --> - <info> - <author>CL</author> - <desc>Number of the display used for full screen slide show mode.</desc> - <label>Display for full screen slide show mode</label> - </info> - <value>0</value> - </prop> - <group oor:name="TextObject"> - <info> - <desc>Contains text editing related configuration items.</desc> - </info> - <prop oor:name="QuickEditing" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other/Text_Objects --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] Text objects --> - <info> - <desc>Indicates whether a simple click on a text object changes it to edit mode.</desc> - <label>Allow quick editing</label> - </info> - <value>true</value> - </prop> - <prop oor:name="Selectable" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other/Text_Objects --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] Text objects --> - <info> - <desc>Indicates whether a text frame can only be selected by clicking on the text or by clicking somewhere in the frame.</desc> - <label>Only text area selectable</label> - </info> - <value>true</value> - </prop> - </group> - <group oor:name="NewDoc"> - <info> - <desc>Specifies configuration items governing the behavior when creating a new document or a new page.</desc> - <label>Start with AutoPilots</label> - </info> - <prop oor:name="AutoPilot" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other/New_Doc --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] New document --> - <info> - <desc>Indicates whether to show the autopilot when creating a new presentation.</desc> - <label>Start with AutoPilots</label> - </info> - <value>true</value> - </prop> - <prop oor:name="Layout" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other/New_Doc --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] New document --> - <info> - <desc>Indicates whether to show the layout dialog when creating a new page.</desc> - <label>Start with AutoPilots</label> - </info> - <value>true</value> - </prop> - </group> - <group oor:name="Start"> - <info> - <desc>Specifies configuration items governing behavior when starting a presentation.</desc> - </info> - <prop oor:name="CurrentPage" oor:type="xs:boolean"> - <!-- OldPath: Impress/Other/Start --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Other [Section] Start presentation --> - <info> - <desc>Indicates whether to start the presentation with the current (true) or the first (false) page.</desc> - <label>Always with current page</label> - </info> - <value>true</value> - </prop> - </group> - <group oor:name="Compatibility"> - <info> - <desc>Contains the group of options that control the compatibility to other applications.</desc> - <label>Compatibility options.</label> - </info> - <prop oor:name="AddBetween" oor:type="xs:boolean"> - <!-- OldPath: Writer/Other/Compatibility --> - <!-- UIHints: Tools - Options - Presentation - Other - [Section] Compatibility --> - <info> - <author>SJ</author> - <desc>Specifies if spacing between paragraphs should be added to ensure compatibility to MS Word documents</desc> - <label>Add spacing between paragraphs</label> - </info> - <value>false</value> - </prop> - <prop oor:name="PrinterIndependentLayout" oor:type="xs:short"> - <!-- UIHints: Tools - Options - Presentation - Other - [Section] Compatibility --> - <info> - <author>AF</author> - <desc>Indicates whether to use printer independent metrics for document formatting (2) or to use metrics derived from the current printer (1). Refer to com::sun::star::document::PrinterIndependentLayout for valid values.</desc> - <label>Use printer independent metrics for document formatting</label> - </info> - <value>2</value> - </prop> - </group> - <group oor:name="DefaultObjectSize"> - <!-- OldPath: --> - <!-- OldLocation: --> - <!-- UIHints: Default size for newly created objects when using CTRL-Return or CTRL-Klick --> - <info> - <author>AW</author> - <desc>Defines the default size of newly created objects using CTRL-Return or CTRL-Click at a object creating Button.</desc> - <label>Default Object Size</label> - </info> - <prop oor:name="Width" oor:type="xs:int"> - <info> - <desc>[UNIT=1/100 mm]</desc> - <label/> - </info> - <value>8000</value> - </prop> - <prop oor:name="Height" oor:type="xs:int"> - <info> - <desc>[UNIT=1/100 mm]</desc> - <label/> - </info> - <value>5000</value> - </prop> - </group> - </group> - <group oor:name="Snap"> - <info> - <desc>Specifies how to force object positions and sizes to the snap grid or to align with other objects.</desc> - </info> - <group oor:name="Object"> - <info> - <desc>Specifies how to force object positions and sizes to predefined locations in relation to other objects.</desc> - </info> - <prop oor:name="Grid" oor:type="xs:boolean"> - <!-- OldPath: Impress/Snap/Objects --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> - <info> - <desc>Indicates whether to snap an object when moved to the next grid point.</desc> - <label>Grid lines</label> - </info> - <value>true</value> - </prop> - <prop oor:name="SnapLine" oor:type="xs:boolean"> - <!-- OldPath: Impress/Snap/Objects --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> - <info> - <desc>Indicates whether to snap at snap lines.</desc> - <label>Snap lines</label> - </info> - <value>false</value> - </prop> - <prop oor:name="PageMargin" oor:type="xs:boolean"> - <!-- OldPath: Impress/Snap/Objects --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> - <info> - <desc>Indicates whether the outline of an object is justified with adjacent page margins.</desc> - <label>Page margins</label> - </info> - <value>true</value> - </prop> - <prop oor:name="ObjectFrame" oor:type="xs:boolean"> - <!-- OldPath: Impress/Snap/Objects --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> - <info> - <desc>Indicates whether to justify the outline of an object to that of an adjacent object.</desc> - <label>Object frame</label> - </info> - <value>false</value> - </prop> - <prop oor:name="ObjectPoint" oor:type="xs:boolean"> - <!-- OldPath: Impress/Snap/Objects --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> - <info> - <desc>Indicates whether to snap corner points of adjacent objects.</desc> - <label>Object points</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Range" oor:type="xs:int"> - <!-- OldPath: Impress/Snap/Objects --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> - <info> - <desc>Specifies the maximal range in pixels along the coordinate axes at which snapping becomes active.</desc> - <label>Snap range</label> - </info> - <constraints> - <minInclusive oor:value="1"> - <info> - <desc>Specifies that the minimum snap range is 1.</desc> - </info> - </minInclusive> - <maxInclusive oor:value="50"> - <info> - <desc>Specifies that the maximal snap range is 50.</desc> - </info> - </maxInclusive> - </constraints> - <value>5</value> - </prop> - </group> - <group oor:name="Position"> - <info> - <desc>Specifies constraints regarding the creation and modification of graphical objects.</desc> - </info> - <prop oor:name="CreatingMoving" oor:type="xs:boolean"> - <!-- OldPath: Impress/Snap/Position --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> - <info> - <desc>Indicates whether to restrict the creation of objects to squares, circles, etc. and to retain the x/y ratio when resizing.</desc> - <label>When creating or moving objects</label> - </info> - <value>false</value> - </prop> - <prop oor:name="ExtendEdges" oor:type="xs:boolean"> - <!-- OldPath: Impress/Snap/Position --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> - <info> - <desc>Indicates whether to use the longer (true) or the shorter (false) of the two distances along the coordinates axes from the initial to the current position to determine a new square's edge length or a new circle's diameter.</desc> - <label>Extend edges</label> - </info> - <value>true</value> - </prop> - <prop oor:name="Rotating" oor:type="xs:boolean"> - <!-- OldPath: Impress/Snap/Position --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> - <info> - <desc>Indicates whether to use snapping while rotating an object.</desc> - <label>When rotating</label> - </info> - <value>false</value> - </prop> - <prop oor:name="RotatingValue" oor:type="xs:int"> - <!-- OldPath: Impress/Snap/Position --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> - <info> - <desc>Specifies the rotation angle when snapping for rotation is enabled. [UNIT=Degree/100]</desc> - <label>When rotating</label> - </info> - <constraints> - <minInclusive oor:value="0"> - <info> - <desc>Specifies that the minimum rotation angle is 0/100 degrees.</desc> - </info> - </minInclusive> - <maxInclusive oor:value="18000"> - <info> - <desc>Specifies that the maximum rotation angle is 18000/100 degrees.</desc> - </info> - </maxInclusive> - </constraints> - <value>1500</value> - </prop> - <prop oor:name="PointReduction" oor:type="xs:int"> - <!-- OldPath: Impress/Snap/Position --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> - <info> - <desc>Specifies the maximum angle that you can move a line before it snaps into place in the point editor that connects two points [UNIT=Degree/100].</desc> - <label>Point reduction</label> - </info> - <constraints> - <minInclusive oor:value="100"> - <info> - <desc>Specifies that the minimum angle is 100/100 degrees.</desc> - </info> - </minInclusive> - <maxInclusive oor:value="9000"> - <info> - <desc>Specifies that the maximum angle is 9000/100 degrees.</desc> - </info> - </maxInclusive> - </constraints> - <value>1500</value> - </prop> - </group> - </group> - <group oor:name="Grid"> - <info> - <desc>Defines the handling and display of the snap grid.</desc> - </info> - <group oor:name="Option"> - <info> - <desc>Specifies switches regarding use and display of the snap grid.</desc> - </info> - <prop oor:name="SnapToGrid" oor:type="xs:boolean"> - <!-- OldPath: Impress/Grid/Options --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options --> - <info> - <desc>Indicates whether to force frames and drawing elements on grid points.</desc> - <label>Snap to grid</label> - </info> - <value>true</value> - </prop> - <prop oor:name="VisibleGrid" oor:type="xs:boolean"> - <!-- OldPath: Impress/Grid/Options --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options --> - <info> - <desc>Indicates whether to show the grid.</desc> - <label>Visible grid</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Synchronize" oor:type="xs:boolean"> - <!-- OldPath: Impress/Grid/Options --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options --> - <info> - <desc>Indicates whether to synchronize the resolutions of x- and y-grids.</desc> - <label>Synchronize axes</label> - </info> - <value>false</value> - </prop> - </group> - <group oor:name="Resolution"> - <info> - <desc>Specifies grid resolution.</desc> - </info> - <group oor:name="XAxis"> - <!-- OldPath: Impress/Grid/Resolution --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid --> - <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. --> - <info> - <desc>Defines the horizontal distance between adjacent grid points.</desc> - <label>X Axis Resolution</label> - </info> - <prop oor:name="Metric" oor:type="xs:int"> - <info> - <desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc> - <label/> - </info> - <value>1000</value> - </prop> - <prop oor:name="NonMetric" oor:type="xs:int"> - <info> - <desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc> - <label/> - </info> - <value>1270</value> - </prop> - </group> - <group oor:name="YAxis"> - <!-- OldPath: Impress/Grid/Resolution --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid --> - <!-- Notice: Default- nonmerical value: 1270 1/100 mm. --> - <info> - <desc>Defines the vertical distance between adjacent grid points.</desc> - <label>Y Axis Resolution</label> - </info> - <prop oor:name="Metric" oor:type="xs:int"> - <info> - <desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc> - <label/> - </info> - <value>1000</value> - </prop> - <prop oor:name="NonMetric" oor:type="xs:int"> - <info> - <desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc> - <label/> - </info> - <value>1270</value> - </prop> - </group> - </group> - <group oor:name="Subdivision"> - <info> - <desc>Specifies the subdivision of the grid.</desc> - </info> - <prop oor:name="XAxis" oor:type="xs:double"> - <!-- OldPath: Impress/Grid/Subdivision --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid --> - <!-- Notice: Default value for English Version only: 254 Points) --> - <info> - <desc>Specifies the number of points between two adjacent grid points on the X axis.</desc> - <label>X Axis Subdivision</label> - </info> - <value>1</value> - </prop> - <prop oor:name="YAxis" oor:type="xs:double"> - <!-- OldPath: Impress/Grid/Subdivision --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid --> - <!-- Notice: Default value for English Version only: 254 Points) --> - <info> - <desc>Specifies the number of intervals between two adjacent grid points on the Y axis</desc> - <label>Y Axis Subdivision</label> - </info> - <value>1</value> - </prop> - </group> - <group oor:name="SnapGrid"> - <info> - <desc>Contains the specifications of the snap grid.</desc> - </info> - <prop oor:name="Size" oor:type="xs:boolean"> - <!-- OldPath: Impress/Grid/Snap_Grid --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid --> - <info> - <desc>Indicates whether to synchronize grid and snap-grid.</desc> - <label>Size to grid</label> - </info> - <value>true</value> - </prop> - <group oor:name="XAxis"> - <!-- OldPath: Impress/Grid/Snap_Grid --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid --> - <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. --> - <info> - <desc>Defines the horizontal distance between adjacent points of the snap grid.</desc> - <label>X axis</label> - </info> - <prop oor:name="Metric" oor:type="xs:int"> - <info> - <desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc> - <label/> - </info> - <value>1000</value> - </prop> - <prop oor:name="NonMetric" oor:type="xs:int"> - <info> - <desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the non-metric system is selected.</desc> - <label/> - </info> - <value>1270</value> - </prop> - </group> - <group oor:name="YAxis"> - <!-- OldPath: Impress/Grid/Snap_Grid --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid --> - <!-- Notice: Default-Default-nonmetrical value: 1270 1/100 mm. --> - <info> - <desc>Defines the vertical distance between adjacent points of the snap grid.</desc> - <label>Y axis</label> - </info> - <prop oor:name="Metric" oor:type="xs:int"> - <info> - <desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc> - <label/> - </info> - <value>1000</value> - </prop> - <prop oor:name="NonMetric" oor:type="xs:int"> - <info> - <desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the non-metric system is selected.</desc> - <label/> - </info> - <value>1270</value> - </prop> - </group> - </group> - </group> - <group oor:name="Print"> - <info> - <desc>Defines options regarding the printing of Impress documents.</desc> - </info> - <group oor:name="Content"> - <info> - <desc>Defines options regarding the printing of document content.</desc> - </info> - <prop oor:name="Presentation" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Contents --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents --> - <info> - <desc>Indicates whether the presentation will be printed.</desc> - <label>Presentation</label> - </info> - <value>true</value> - </prop> - <prop oor:name="Note" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Contents --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents --> - <info> - <desc>Indicates whether the notes will be printed.</desc> - <label>Notes</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Handout" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Contents --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents --> - <info> - <desc>Indicates whether the handouts will be printed.</desc> - <label>Handouts</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Outline" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Contents --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents --> - <info> - <desc>Indicates whether the outlines will be printed.</desc> - <label>Outline</label> - </info> - <value>false</value> - </prop> - </group> - <group oor:name="Page"> - <info> - <desc>Specifies how and which pages will be printed.</desc> - </info> - <prop oor:name="PageSize" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Page --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> - <info> - <desc>Indicates whether to enlarge or shrink a document's page size while printing to fit the physical paper size.</desc> - <label>Fit to page</label> - </info> - <value>false</value> - </prop> - <prop oor:name="PageTile" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Page --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> - <info> - <desc>Indicates whether to print the pages' titles at the top of every page.</desc> - <label>Tile pages</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Booklet" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Page --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> - <info> - <desc>Indicates whether to print a document in the form of a brochure.</desc> - <label>Brochure</label> - </info> - <value>false</value> - </prop> - <prop oor:name="BookletFront" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Page --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> - <info> - <desc>Indicates whether to print the front side pages of a brochure.</desc> - <label>Front side</label> - </info> - <value>true</value> - </prop> - <prop oor:name="BookletBack" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print/Page --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> - <info> - <desc>Indicates whether to print the back side pages of a brochure.</desc> - <label>Back side</label> - </info> - <value>true</value> - </prop> - </group> - <group oor:name="Other"> - <info> - <desc>Specifies general printing related issues.</desc> - </info> - <prop oor:name="PageName" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Print --> - <info> - <desc>Indicates whether to print page names.</desc> - <label>Page name</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Date" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Print --> - <info> - <desc>Indicates whether to print the current date at the top of every page.</desc> - <label>Date</label> - </info> - <value>false</value> - </prop> - <prop oor:name="Time" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Print --> - <info> - <desc>Indicates whether to print the current time at the top of every page.</desc> - <label>Time</label> - </info> - <value>false</value> - </prop> - <prop oor:name="HiddenPage" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Print --> - <info> - <desc>Indicates whether to print hidden pages.</desc> - <label>Hidden pages</label> - </info> - <value>true</value> - </prop> - <prop oor:name="Quality" oor:type="xs:int"> - <!-- OldPath: Impress/Print --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print - [Section] Quality --> - <info> - <desc>Specifies the quality of the printed colors.</desc> - </info> - <constraints> - <enumeration oor:value="0"> - <info> - <desc>Color</desc> - </info> - </enumeration> - <enumeration oor:value="1"> - <info> - <desc>Grayscale</desc> - </info> - </enumeration> - <enumeration oor:value="2"> - <info> - <desc>Black/White</desc> - </info> - </enumeration> - </constraints> - <value>0</value> - </prop> - <prop oor:name="FromPrinterSetup" oor:type="xs:boolean"> - <!-- OldPath: Impress/Print --> - <!-- OldLocation: Soffice.cfg --> - <!-- UIHints: Tools - Options - Presentation Print [Check box] From printer setup --> - <info> - <desc>Indicates whether to use the system settings of the printer to choose the paper tray.</desc> - <label>From printer setup</label> - </info> - <value>false</value> - </prop> + </info> + <value>true</value> + </prop> + <prop oor:name="ShowUndoDeleteWarning" oor:type="xs:boolean"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: UNDO stack delete warnng dialog --> + <info> + <author>AW</author> + <desc>Indicates whether the warning dialog appears when setting a new standard page layout.</desc> + <label>Show Undo-Stack Delete Warning</label> + </info> + <value>true</value> + </prop> + <prop oor:name="SlideshowRespectZOrder" oor:type="xs:boolean"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: Slideshow Z order for animations --> + <info> + <author>THB</author> + <desc>Indicates whether the slideshow should respect shape z-order while animating shapes. Disabling this can improve slideshow performance</desc> + <label>Enable shape z-order during slideshow animations</label> + </info> + <value>true</value> + </prop> + <prop oor:name="TransitionFiles" oor:type="oor:string-list"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: List of files containing transition effects --> + <info> + <author>THB</author> + <desc> + Contains a list of odf files, that define + slideshow transitions. Values are put through + macro expansion, so, vnd.sun.star.expand prefix + is allowed. + </desc> + <label>List of files containing transition effects</label> + </info> + <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/transitions.xml</value> + </prop> + <prop oor:name="EffectFiles" oor:type="oor:string-list"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: List of files containing object effects --> + <info> + <author>THB</author> + <desc> + Contains a list of odf files, that define + slideshow shape effects. Values are put through + macro expansion, so, vnd.sun.star.expand prefix + is allowed. + </desc> + <label>List of files containing object effects</label> + </info> + <value oor:separator=";">vnd.sun.star.expand:$OOO_BASE_DIR/share/config/soffice.cfg/simpress/effects.xml</value> + </prop> + <prop oor:name="PreviewNewEffects" oor:type="xs:boolean"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: automatic preview checkbox in create new effect dialog --> + <info> + <author>CL</author> + <desc>Indicates whether a selected effect in the custom animation create dialog should be previewed.</desc> + <label>Automatic preview for new custom animation</label> + </info> + <value>true</value> + </prop> + <prop oor:name="PreviewChangedEffects" oor:type="xs:boolean"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: automatic preview in custom animation panel --> + <info> + <author>CL</author> + <desc>Indicates whether changes in the custom animation panel should be previewed.</desc> + <label>Automatic preview for custom animation panel</label> + </info> + <value>true</value> + </prop> + <prop oor:name="PreviewTransitions" oor:type="xs:boolean"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: automatic preview in slide transtion panel --> + <info> + <author>CL</author> + <desc>Indicates whether changes in the slide transition panel should be previewed.</desc> + <label>Automatic preview for slide transition panel</label> + </info> + <value>true</value> + </prop> + <prop oor:name="Display" oor:type="xs:int"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: slide show settings display listbox --> + <info> + <author>CL</author> + <desc>Number of the display used for full screen slide show mode.</desc> + <label>Display for full screen slide show mode</label> + </info> + <value>0</value> + </prop> + <group oor:name="TextObject"> + <info> + <desc>Contains text editing related configuration items.</desc> + </info> + <prop oor:name="QuickEditing" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other/Text_Objects --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] Text objects --> + <info> + <desc>Indicates whether a simple click on a text object changes it to edit mode.</desc> + <label>Allow quick editing</label> + </info> + <value>true</value> + </prop> + <prop oor:name="Selectable" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other/Text_Objects --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] Text objects --> + <info> + <desc>Indicates whether a text frame can only be selected by clicking on the text or by clicking somewhere in the frame.</desc> + <label>Only text area selectable</label> + </info> + <value>true</value> + </prop> + </group> + <group oor:name="NewDoc"> + <info> + <desc>Specifies configuration items governing the behavior when creating a new document or a new page.</desc> + <label>Start with AutoPilots</label> + </info> + <prop oor:name="AutoPilot" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other/New_Doc --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] New document --> + <info> + <desc>Indicates whether to show the autopilot when creating a new presentation.</desc> + <label>Start with AutoPilots</label> + </info> + <value>true</value> + </prop> + <prop oor:name="Layout" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other/New_Doc --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] New document --> + <info> + <desc>Indicates whether to show the layout dialog when creating a new page.</desc> + <label>Start with AutoPilots</label> + </info> + <value>true</value> + </prop> + </group> + <group oor:name="Start"> + <info> + <desc>Specifies configuration items governing behavior when starting a presentation.</desc> + </info> + <prop oor:name="CurrentPage" oor:type="xs:boolean"> + <!-- OldPath: Impress/Other/Start --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Other [Section] Start presentation --> + <info> + <desc>Indicates whether to start the presentation with the current (true) or the first (false) page.</desc> + <label>Always with current page</label> + </info> + <value>true</value> + </prop> + </group> + <group oor:name="Compatibility"> + <info> + <desc>Contains the group of options that control the compatibility to other applications.</desc> + <label>Compatibility options.</label> + </info> + <prop oor:name="AddBetween" oor:type="xs:boolean"> + <!-- OldPath: Writer/Other/Compatibility --> + <!-- UIHints: Tools - Options - Presentation - Other - [Section] Compatibility --> + <info> + <author>SJ</author> + <desc>Specifies if spacing between paragraphs should be added to ensure compatibility to MS Word documents</desc> + <label>Add spacing between paragraphs</label> + </info> + <value>false</value> + </prop> + <prop oor:name="PrinterIndependentLayout" oor:type="xs:short"> + <!-- UIHints: Tools - Options - Presentation - Other - [Section] Compatibility --> + <info> + <author>AF</author> + <desc>Indicates whether to use printer independent metrics for document formatting (2) or to use metrics derived from the current printer (1). Refer to com::sun::star::document::PrinterIndependentLayout for valid values.</desc> + <label>Use printer independent metrics for document formatting</label> + </info> + <value>2</value> + </prop> + </group> + <group oor:name="DefaultObjectSize"> + <!-- OldPath: --> + <!-- OldLocation: --> + <!-- UIHints: Default size for newly created objects when using CTRL-Return or CTRL-Klick --> + <info> + <author>AW</author> + <desc>Defines the default size of newly created objects using CTRL-Return or CTRL-Click at a object creating Button.</desc> + <label>Default Object Size</label> + </info> + <prop oor:name="Width" oor:type="xs:int"> + <info> + <desc>[UNIT=1/100 mm]</desc> + <label/> + </info> + <value>8000</value> + </prop> + <prop oor:name="Height" oor:type="xs:int"> + <info> + <desc>[UNIT=1/100 mm]</desc> + <label/> + </info> + <value>5000</value> + </prop> + </group> + </group> + <group oor:name="Snap"> + <info> + <desc>Specifies how to force object positions and sizes to the snap grid or to align with other objects.</desc> + </info> + <group oor:name="Object"> + <info> + <desc>Specifies how to force object positions and sizes to predefined locations in relation to other objects.</desc> + </info> + <prop oor:name="Grid" oor:type="xs:boolean"> + <!-- OldPath: Impress/Snap/Objects --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> + <info> + <desc>Indicates whether to snap an object when moved to the next grid point.</desc> + <label>Grid lines</label> + </info> + <value>true</value> + </prop> + <prop oor:name="SnapLine" oor:type="xs:boolean"> + <!-- OldPath: Impress/Snap/Objects --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> + <info> + <desc>Indicates whether to snap at snap lines.</desc> + <label>Snap lines</label> + </info> + <value>false</value> + </prop> + <prop oor:name="PageMargin" oor:type="xs:boolean"> + <!-- OldPath: Impress/Snap/Objects --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> + <info> + <desc>Indicates whether the outline of an object is justified with adjacent page margins.</desc> + <label>Page margins</label> + </info> + <value>true</value> + </prop> + <prop oor:name="ObjectFrame" oor:type="xs:boolean"> + <!-- OldPath: Impress/Snap/Objects --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> + <info> + <desc>Indicates whether to justify the outline of an object to that of an adjacent object.</desc> + <label>Object frame</label> + </info> + <value>false</value> + </prop> + <prop oor:name="ObjectPoint" oor:type="xs:boolean"> + <!-- OldPath: Impress/Snap/Objects --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> + <info> + <desc>Indicates whether to snap corner points of adjacent objects.</desc> + <label>Object points</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Range" oor:type="xs:int"> + <!-- OldPath: Impress/Snap/Objects --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap to --> + <info> + <desc>Specifies the maximal range in pixels along the coordinate axes at which snapping becomes active.</desc> + <label>Snap range</label> + </info> + <constraints> + <minInclusive oor:value="1"> + <info> + <desc>Specifies that the minimum snap range is 1.</desc> + </info> + </minInclusive> + <maxInclusive oor:value="50"> + <info> + <desc>Specifies that the maximal snap range is 50.</desc> + </info> + </maxInclusive> + </constraints> + <value>5</value> + </prop> + </group> + <group oor:name="Position"> + <info> + <desc>Specifies constraints regarding the creation and modification of graphical objects.</desc> + </info> + <prop oor:name="CreatingMoving" oor:type="xs:boolean"> + <!-- OldPath: Impress/Snap/Position --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> + <info> + <desc>Indicates whether to restrict the creation of objects to squares, circles, etc. and to retain the x/y ratio when resizing.</desc> + <label>When creating or moving objects</label> + </info> + <value>false</value> + </prop> + <prop oor:name="ExtendEdges" oor:type="xs:boolean"> + <!-- OldPath: Impress/Snap/Position --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> + <info> + <desc>Indicates whether to use the longer (true) or the shorter (false) of the two distances along the coordinates axes from the initial to the current position to determine a new square's edge length or a new circle's diameter.</desc> + <label>Extend edges</label> + </info> + <value>true</value> + </prop> + <prop oor:name="Rotating" oor:type="xs:boolean"> + <!-- OldPath: Impress/Snap/Position --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> + <info> + <desc>Indicates whether to use snapping while rotating an object.</desc> + <label>When rotating</label> + </info> + <value>false</value> + </prop> + <prop oor:name="RotatingValue" oor:type="xs:int"> + <!-- OldPath: Impress/Snap/Position --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> + <info> + <desc>Specifies the rotation angle when snapping for rotation is enabled. [UNIT=Degree/100]</desc> + <label>When rotating</label> + </info> + <constraints> + <minInclusive oor:value="0"> + <info> + <desc>Specifies that the minimum rotation angle is 0/100 degrees.</desc> + </info> + </minInclusive> + <maxInclusive oor:value="18000"> + <info> + <desc>Specifies that the maximum rotation angle is 18000/100 degrees.</desc> + </info> + </maxInclusive> + </constraints> + <value>1500</value> + </prop> + <prop oor:name="PointReduction" oor:type="xs:int"> + <!-- OldPath: Impress/Snap/Position --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Snap to Grid - [Section] Snap position --> + <info> + <desc>Specifies the maximum angle that you can move a line before it snaps into place in the point editor that connects two points [UNIT=Degree/100].</desc> + <label>Point reduction</label> + </info> + <constraints> + <minInclusive oor:value="100"> + <info> + <desc>Specifies that the minimum angle is 100/100 degrees.</desc> + </info> + </minInclusive> + <maxInclusive oor:value="9000"> + <info> + <desc>Specifies that the maximum angle is 9000/100 degrees.</desc> + </info> + </maxInclusive> + </constraints> + <value>1500</value> + </prop> + </group> + </group> + <group oor:name="Grid"> + <info> + <desc>Defines the handling and display of the snap grid.</desc> + </info> + <group oor:name="Option"> + <info> + <desc>Specifies switches regarding use and display of the snap grid.</desc> + </info> + <prop oor:name="SnapToGrid" oor:type="xs:boolean"> + <!-- OldPath: Impress/Grid/Options --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options --> + <info> + <desc>Indicates whether to force frames and drawing elements on grid points.</desc> + <label>Snap to grid</label> + </info> + <value>true</value> + </prop> + <prop oor:name="VisibleGrid" oor:type="xs:boolean"> + <!-- OldPath: Impress/Grid/Options --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options --> + <info> + <desc>Indicates whether to show the grid.</desc> + <label>Visible grid</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Synchronize" oor:type="xs:boolean"> + <!-- OldPath: Impress/Grid/Options --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Options --> + <info> + <desc>Indicates whether to synchronize the resolutions of x- and y-grids.</desc> + <label>Synchronize axes</label> + </info> + <value>false</value> + </prop> + </group> + <group oor:name="Resolution"> + <info> + <desc>Specifies grid resolution.</desc> + </info> + <group oor:name="XAxis"> + <!-- OldPath: Impress/Grid/Resolution --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid --> + <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. --> + <info> + <desc>Defines the horizontal distance between adjacent grid points.</desc> + <label>X Axis Resolution</label> + </info> + <prop oor:name="Metric" oor:type="xs:int"> + <info> + <desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc> + <label/> + </info> + <value>1000</value> + </prop> + <prop oor:name="NonMetric" oor:type="xs:int"> + <info> + <desc>Defines the horizontal distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc> + <label/> + </info> + <value>1270</value> + </prop> + </group> + <group oor:name="YAxis"> + <!-- OldPath: Impress/Grid/Resolution --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid --> + <!-- Notice: Default- nonmerical value: 1270 1/100 mm. --> + <info> + <desc>Defines the vertical distance between adjacent grid points.</desc> + <label>Y Axis Resolution</label> + </info> + <prop oor:name="Metric" oor:type="xs:int"> + <info> + <desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the metric system is active.</desc> + <label/> + </info> + <value>1000</value> + </prop> + <prop oor:name="NonMetric" oor:type="xs:int"> + <info> + <desc>Defines the vertical distance between adjacent grid points in 1/100 mm, used when the non-metric system is active.</desc> + <label/> + </info> + <value>1270</value> + </prop> + </group> + </group> + <group oor:name="Subdivision"> + <info> + <desc>Specifies the subdivision of the grid.</desc> + </info> + <prop oor:name="XAxis" oor:type="xs:double"> + <!-- OldPath: Impress/Grid/Subdivision --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid --> + <!-- Notice: Default value for English Version only: 254 Points) --> + <info> + <desc>Specifies the number of points between two adjacent grid points on the X axis.</desc> + <label>X Axis Subdivision</label> + </info> + <value>1</value> + </prop> + <prop oor:name="YAxis" oor:type="xs:double"> + <!-- OldPath: Impress/Grid/Subdivision --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Grid --> + <!-- Notice: Default value for English Version only: 254 Points) --> + <info> + <desc>Specifies the number of intervals between two adjacent grid points on the Y axis</desc> + <label>Y Axis Subdivision</label> + </info> + <value>1</value> + </prop> + </group> + <group oor:name="SnapGrid"> + <info> + <desc>Contains the specifications of the snap grid.</desc> + </info> + <prop oor:name="Size" oor:type="xs:boolean"> + <!-- OldPath: Impress/Grid/Snap_Grid --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid --> + <info> + <desc>Indicates whether to synchronize grid and snap-grid.</desc> + <label>Size to grid</label> + </info> + <value>true</value> + </prop> + <group oor:name="XAxis"> + <!-- OldPath: Impress/Grid/Snap_Grid --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid --> + <!-- Notice: Default-nonmetrical value: 1270 1/100 mm. --> + <info> + <desc>Defines the horizontal distance between adjacent points of the snap grid.</desc> + <label>X axis</label> + </info> + <prop oor:name="Metric" oor:type="xs:int"> + <info> + <desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc> + <label/> + </info> + <value>1000</value> + </prop> + <prop oor:name="NonMetric" oor:type="xs:int"> + <info> + <desc>Defines the horizontal distance between adjacent points of the snap grid in 1/100 mm, used when the non-metric system is selected.</desc> + <label/> + </info> + <value>1270</value> + </prop> + </group> + <group oor:name="YAxis"> + <!-- OldPath: Impress/Grid/Snap_Grid --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Grid - [Section] Snap grid --> + <!-- Notice: Default-Default-nonmetrical value: 1270 1/100 mm. --> + <info> + <desc>Defines the vertical distance between adjacent points of the snap grid.</desc> + <label>Y axis</label> + </info> + <prop oor:name="Metric" oor:type="xs:int"> + <info> + <desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the metric system is selected.</desc> + <label/> + </info> + <value>1000</value> + </prop> + <prop oor:name="NonMetric" oor:type="xs:int"> + <info> + <desc>Defines the vertical distance between adjacent points of the snap grid in 1/100 mm, used when the non-metric system is selected.</desc> + <label/> + </info> + <value>1270</value> + </prop> + </group> + </group> + </group> + <group oor:name="Print"> + <info> + <desc>Defines options regarding the printing of Impress documents.</desc> + </info> + <group oor:name="Content"> + <info> + <desc>Defines options regarding the printing of document content.</desc> + </info> + <prop oor:name="Presentation" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Contents --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents --> + <info> + <desc>Indicates whether the presentation will be printed.</desc> + <label>Presentation</label> + </info> + <value>true</value> + </prop> + <prop oor:name="Note" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Contents --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents --> + <info> + <desc>Indicates whether the notes will be printed.</desc> + <label>Notes</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Handout" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Contents --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents --> + <info> + <desc>Indicates whether the handouts will be printed.</desc> + <label>Handouts</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Outline" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Contents --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Contents --> + <info> + <desc>Indicates whether the outlines will be printed.</desc> + <label>Outline</label> + </info> + <value>false</value> + </prop> + </group> + <group oor:name="Page"> + <info> + <desc>Specifies how and which pages will be printed.</desc> + </info> + <prop oor:name="PageSize" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Page --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> + <info> + <desc>Indicates whether to enlarge or shrink a document's page size while printing to fit the physical paper size.</desc> + <label>Fit to page</label> + </info> + <value>false</value> + </prop> + <prop oor:name="PageTile" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Page --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> + <info> + <desc>Indicates whether to print the pages' titles at the top of every page.</desc> + <label>Tile pages</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Booklet" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Page --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> + <info> + <desc>Indicates whether to print a document in the form of a brochure.</desc> + <label>Brochure</label> + </info> + <value>false</value> + </prop> + <prop oor:name="BookletFront" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Page --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> + <info> + <desc>Indicates whether to print the front side pages of a brochure.</desc> + <label>Front side</label> + </info> + <value>true</value> + </prop> + <prop oor:name="BookletBack" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print/Page --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Page options --> + <info> + <desc>Indicates whether to print the back side pages of a brochure.</desc> + <label>Back side</label> + </info> + <value>true</value> + </prop> + </group> + <group oor:name="Other"> + <info> + <desc>Specifies general printing related issues.</desc> + </info> + <prop oor:name="PageName" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Print --> + <info> + <desc>Indicates whether to print page names.</desc> + <label>Page name</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Date" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Print --> + <info> + <desc>Indicates whether to print the current date at the top of every page.</desc> + <label>Date</label> + </info> + <value>false</value> + </prop> + <prop oor:name="Time" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Print --> + <info> + <desc>Indicates whether to print the current time at the top of every page.</desc> + <label>Time</label> + </info> + <value>false</value> + </prop> + <prop oor:name="HiddenPage" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Print --> + <info> + <desc>Indicates whether to print hidden pages.</desc> + <label>Hidden pages</label> + </info> + <value>true</value> + </prop> + <prop oor:name="Quality" oor:type="xs:int"> + <!-- OldPath: Impress/Print --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print - [Section] Quality --> + <info> + <desc>Specifies the quality of the printed colors.</desc> + </info> + <constraints> + <enumeration oor:value="0"> + <info> + <desc>Color</desc> + </info> + </enumeration> + <enumeration oor:value="1"> + <info> + <desc>Grayscale</desc> + </info> + </enumeration> + <enumeration oor:value="2"> + <info> + <desc>Black/White</desc> + </info> + </enumeration> + </constraints> + <value>0</value> + </prop> + <prop oor:name="FromPrinterSetup" oor:type="xs:boolean"> + <!-- OldPath: Impress/Print --> + <!-- OldLocation: Soffice.cfg --> + <!-- UIHints: Tools - Options - Presentation Print [Check box] From printer setup --> + <info> + <desc>Indicates whether to use the system settings of the printer to choose the paper tray.</desc> + <label>From printer setup</label> + </info> + <value>false</value> + </prop> <prop oor:name="HandoutHorizontal" oor:type="xs:boolean"> <!-- UIHints: File - Print - [Section] Print content - [Radio buttons] Horizontal(TRUE)/Vertical(FALSE) --> <info> @@ -1179,7 +1188,8 @@ <label>Handout orientation</label> </info> <value>false</value> - </prop> <prop oor:name="PagesPerHandout" oor:type="xs:int"> + </prop> + <prop oor:name="PagesPerHandout" oor:type="xs:int"> <!-- UIHints: File - Print - [Section] Print content - [ListBox] Slides per page --> <info> <desc>Specifies the number of slide thumbnails printed on each handout page.</desc> @@ -1219,274 +1229,292 @@ </constraints> <value>0</value> </prop> - </group> - </group> - <group oor:name="Filter"> - <info> - <desc>Contains the group of options that control the behavior of filters.</desc> - <label>Filter Options</label> - </info> - <group oor:name="Import"> - <info> - <desc>Contains the group of options that control the behavior of the import filters.</desc> - <label>Import Filter</label> - </info> - <group oor:name="VBA"> - <info> - <desc>Contains the group of options that control the behavior of the VBA filter.</desc> - <label>VBA Filter</label> - </info> - <prop oor:name="Load" oor:type="xs:boolean"> - <!-- OldPath: Filter/MS_Office/Basic/PowerPoint --> - <!-- OldLocation: soffice.cfg --> - <!-- UIHints: Tools Options - Filter Settings Microsoft Office [Section] Microsoft PowerPoint 97/2000 --> - <info> - <author>OS</author> - <desc>Converts VBA Basic into Office Basic as commands (True).</desc> - <label>Load Basic Code to edit</label> - </info> - <value>true</value> - </prop> - <prop oor:name="Save" oor:type="xs:boolean"> - <!-- OldPath: Filter/MS_Office/Basic/PowerPoint --> - <!-- OldLocation: soffice.cfg --> - <!-- UIHints: Tools Options - Filter Settings Microsoft Office [Section] Microsoft PowerPoint 97/2000 --> - <info> - <author>OS</author> - <desc>Holds original VBA storage for saving in the memory (True).</desc> - <label>Save Original Basic Code again</label> - </info> - <value>true</value> - </prop> - </group> - </group> - <group oor:name="Export"> - <info> - <desc>Exports related configuration items.</desc> - </info> - <prop oor:name="LastUsed" oor:type="xs:string"> - <!-- OldPath: STARIMPRESS --> - <!-- OldLocation: soffice.ini --> - <!-- UIHints: Set after export --> - <info> - <desc>Specifies the filter last used to export an Impress document.</desc> - </info> - <constraints> - <enumeration oor:value="HTML"> - <info> - <desc>HTML</desc> - </info> - </enumeration> - <enumeration oor:value="BMP - MS Windows"> - <info> - <desc>MS Windows bitmap</desc> - </info> - </enumeration> - <enumeration oor:value="PNG - Portable Network Graphic"> - <info> - <desc>Portable Network Graphic</desc> - </info> - </enumeration> - <enumeration oor:value="EPS - Encapsulated PostScript"> - <info> - <desc>Encapsulated PostScript</desc> - </info> - </enumeration> - <enumeration oor:value="GIF - Graphic Interchange"> - <info> - <desc>Graphic Interchange Format</desc> - </info> - </enumeration> - <enumeration oor:value="JPG - JPEG"> - <info> - <desc>JPEG</desc> - </info> - </enumeration> - <enumeration oor:value="MET - OS/2 Metafile"> - <info> - <desc>OS/2 Metafile</desc> - </info> - </enumeration> - <enumeration oor:value="PCT - Mac Pict"> - <info> - <desc>Mac Pict</desc> - </info> - </enumeration> - <enumeration oor:value="PBM - Portable Bitmap"> - <info> - <desc>Portable Bitmap</desc> - </info> - </enumeration> - <enumeration oor:value="PGM - Portable Graymap"> - <info> - <desc>Portable Graymap</desc> - </info> - </enumeration> - <enumeration oor:value="PPM - Portable Pixelmap"> - <info> - <desc>Portable Pixelmap</desc> - </info> - </enumeration> - <enumeration oor:value="RAS - Sun Rasterfile"> - <info> - <desc>Sun Rasterfile</desc> - </info> - </enumeration> - <enumeration oor:value="SVM - StarView Metafile"> - <info> - <desc>StarView Metafile</desc> - </info> - </enumeration> - <enumeration oor:value="WMF - MS Windows Metafile"> - <info> - <desc>MS Windows Metafile</desc> - </info> - </enumeration> - <enumeration oor:value="XPM"> - <info> - <desc>XPM</desc> - </info> - </enumeration> - </constraints> - </prop> - </group> - </group> - <group oor:name="MultiPaneGUI"> + </group> + </group> + <group oor:name="Filter"> + <info> + <desc>Contains the group of options that control the behavior of filters.</desc> + <label>Filter Options</label> + </info> + <group oor:name="Import"> + <info> + <desc>Contains the group of options that control the behavior of the import filters.</desc> + <label>Import Filter</label> + </info> + <group oor:name="VBA"> + <info> + <desc>Contains the group of options that control the behavior of the VBA filter.</desc> + <label>VBA Filter</label> + </info> + <prop oor:name="Load" oor:type="xs:boolean"> + <!-- OldPath: Filter/MS_Office/Basic/PowerPoint --> + <!-- OldLocation: soffice.cfg --> + <!-- UIHints: Tools Options - Filter Settings Microsoft Office [Section] Microsoft PowerPoint 97/2000 --> + <info> + <author>OS</author> + <desc>Converts VBA Basic into Office Basic as commands (True).</desc> + <label>Load Basic Code to edit</label> + </info> + <value>true</value> + </prop> + <prop oor:name="Save" oor:type="xs:boolean"> + <!-- OldPath: Filter/MS_Office/Basic/PowerPoint --> + <!-- OldLocation: soffice.cfg --> + <!-- UIHints: Tools Options - Filter Settings Microsoft Office [Section] Microsoft PowerPoint 97/2000 --> + <info> + <author>OS</author> + <desc>Holds original VBA storage for saving in the memory (True).</desc> + <label>Save Original Basic Code again</label> + </info> + <value>true</value> + </prop> + </group> + </group> + <group oor:name="Export"> + <info> + <desc>Exports related configuration items.</desc> + </info> + <prop oor:name="LastUsed" oor:type="xs:string"> + <!-- OldPath: STARIMPRESS --> + <!-- OldLocation: soffice.ini --> + <!-- UIHints: Set after export --> + <info> + <desc>Specifies the filter last used to export an Impress document.</desc> + </info> + <constraints> + <enumeration oor:value="HTML"> + <info> + <desc>HTML</desc> + </info> + </enumeration> + <enumeration oor:value="BMP - MS Windows"> + <info> + <desc>MS Windows bitmap</desc> + </info> + </enumeration> + <enumeration oor:value="PNG - Portable Network Graphic"> + <info> + <desc>Portable Network Graphic</desc> + </info> + </enumeration> + <enumeration oor:value="EPS - Encapsulated PostScript"> + <info> + <desc>Encapsulated PostScript</desc> + </info> + </enumeration> + <enumeration oor:value="GIF - Graphic Interchange"> + <info> + <desc>Graphic Interchange Format</desc> + </info> + </enumeration> + <enumeration oor:value="JPG - JPEG"> + <info> + <desc>JPEG</desc> + </info> + </enumeration> + <enumeration oor:value="MET - OS/2 Metafile"> + <info> + <desc>OS/2 Metafile</desc> + </info> + </enumeration> + <enumeration oor:value="PCT - Mac Pict"> + <info> + <desc>Mac Pict</desc> + </info> + </enumeration> + <enumeration oor:value="PBM - Portable Bitmap"> + <info> + <desc>Portable Bitmap</desc> + </info> + </enumeration> + <enumeration oor:value="PGM - Portable Graymap"> + <info> + <desc>Portable Graymap</desc> + </info> + </enumeration> + <enumeration oor:value="PPM - Portable Pixelmap"> + <info> + <desc>Portable Pixelmap</desc> + </info> + </enumeration> + <enumeration oor:value="RAS - Sun Rasterfile"> + <info> + <desc>Sun Rasterfile</desc> + </info> + </enumeration> + <enumeration oor:value="SVM - StarView Metafile"> + <info> + <desc>StarView Metafile</desc> + </info> + </enumeration> + <enumeration oor:value="WMF - MS Windows Metafile"> + <info> + <desc>MS Windows Metafile</desc> + </info> + </enumeration> + <enumeration oor:value="XPM"> + <info> + <desc>XPM</desc> + </info> + </enumeration> + </constraints> + </prop> + </group> + </group> + <group oor:name="MultiPaneGUI"> + <info> + <desc>Options that control the content and appearance of the multi pane GUI.</desc> + <label>Multi Pane GUI Options</label> + </info> + <group oor:name="ToolPanel"> + <info> + <desc>Options that control the tool panel.</desc> + <label>Tool Panel Options</label> + </info> + <set oor:name="RecentlyUsedMasterPages" oor:node-type="MasterPageDescriptor"> + <info> + <desc>List of the URLs of the most recently used master pages.</desc> + <label>Recently Used Master Pages</label> + </info> + </set> + </group> + <group oor:name="Framework"> + <info> + <desc>Options that control the multi pane framework.</desc> + <label>Multi Pane Framework Options</label> + </info> + <set oor:name="ResourceFactories" oor:node-type="ResourceFactory"> + <info> + <desc>Set of factories and the resources created by them.</desc> + <label>Multi Pane Framework Resource Factories</label> + </info> + </set> + <set oor:name="StartupServices" oor:node-type="StartupService"> + <info> + <desc> + Set of services that are instantiated every time the + framework of a Draw or Impress document is initialized. + </desc> + <label>Multi Pane Framework Startup Services</label> + </info> + </set> + </group> + <group oor:name="SlideSorter"> + <info> + <desc>Values related to the slide sorter.</desc> + <label>Slide Sorter Options</label> + </info> + <group oor:name="PreviewCache"> + <info> + <desc>Values for tuning the preview cache of the slide sorter.</desc> + <label>Preview Cache Options</label> + </info> + <prop oor:name="CacheSize" oor:type="xs:int"> + <info> + <desc> + Maximal size of the cache that stores slide + preview bitmaps. This size does only cover + previews of slides that are not currently + visible. Depending on the compression policy + this upper bound may be violated. + </desc> + <label>Preview Cache Size</label> + </info> + <value>4194304</value> + </prop> + <prop oor:name="CompactionPolicy" oor:type="xs:string"> <info> - <desc>Options that control the content and appearance of the multi pane GUI.</desc> - <label>Multi Pane GUI Options</label> + <desc>Technique of how to reduce the memory used by the cache.</desc> + <label>Compaction Policy</label> </info> - <group oor:name="ToolPanel"> + <constraints> + <enumeration oor:value="None"> <info> - <desc>Options that control the tool panel.</desc> - <label>Tool Panel Options</label> + <desc>Ignore the maximal cache size.</desc> </info> - <set oor:name="RecentlyUsedMasterPages" oor:node-type="MasterPageDescriptor"> - <info> - <desc>List of the URLs of the most recently used master pages.</desc> - <label>Recently Used Master Pages</label> - </info> - </set> - </group> - <group oor:name="Framework"> + </enumeration> + <enumeration oor:value="Compress"> <info> - <desc>Options that control the multi pane framework.</desc> - <label>Multi Pane Framework Options</label> + <desc> + Use the compression policy to compress preview bitmaps + that are not visible. + </desc> </info> - <set oor:name="ResourceFactories" oor:node-type="ResourceFactory"> - <info> - <desc>Set of factories and the resources created by them.</desc> - <label>Multi Pane Framework Resource Factories</label> - </info> - </set> - <set oor:name="StartupServices" oor:node-type="StartupService"> - <info> - <desc>Set of services that are instantiated every time the - framework of a Draw or Impress document is initialized.</desc> - <label>Multi Pane Framework Startup Services</label> - </info> - </set> - </group> - <group oor:name="SlideSorter"> + </enumeration> + </constraints> + <value>Compress</value> + </prop> + <prop oor:name="CompressionPolicy" oor:type="xs:string"> + <info> + <desc> + Technique of how to compress preview bitmaps for + slides that are moved out of the visible area in + order to save cache space. + </desc> + <label>Compression Policy</label> + </info> + <constraints> + <enumeration oor:value="None"> + <info> + <desc> + Keep bitmaps unmodified in cache. This effectively + ignores the maximal cache size. + </desc> + </info> + </enumeration> + <enumeration oor:value="Erase"> + <info> + <desc>Remove preview from cache</desc> + </info> + </enumeration> + <enumeration oor:value="ResolutionReduction"> + <info> + <desc> + Reduce the resolution to a width + of 100 Pixels + </desc> + </info> + </enumeration> + <enumeration oor:value="PNGCompression"> <info> - <desc>Values related to the slide sorter.</desc> - <label>Slide Sorter Options</label> + <desc>Store preview as compressed PNG bitmap</desc> </info> - <group oor:name="PreviewCache"> - <info> - <desc>Values for tuning the preview cache of the slide sorter.</desc> - <label>Preview Cache Options</label> - </info> - <prop oor:name="CacheSize" oor:type="xs:int"> - <info> - <desc>Maximal size of the cache that stores slide - preview bitmaps. This size does only cover - previews of slides that are not currently - visible. Depending on the compression policy - this upper bound may be violated.</desc> - <label>Preview Cache Size</label> - </info> - <value>4194304</value> - </prop> - <prop oor:name="CompactionPolicy" oor:type="xs:string"> - <info> - <desc>Technique of how to reduce the memory used by the cache.</desc> - <label>Compaction Policy</label> - </info> - <constraints> - <enumeration oor:value="None"> - <info> - <desc>Ignore the maximal cache size.</desc> - </info> - </enumeration> - <enumeration oor:value="Compress"> - <info> - <desc>Use the compression policy to compress preview bitmaps - that are not visible.</desc> - </info> - </enumeration> - </constraints> - <value>Compress</value> - </prop> - <prop oor:name="CompressionPolicy" oor:type="xs:string"> - <info> - <desc>Technique of how to compress preview bitmaps for - slides that are moved out of the visible area in - order to save cache space.</desc> - <label>Compression Policy</label> - </info> - <constraints> - <enumeration oor:value="None"> - <info> - <desc>Keep bitmaps unmodified in cache. This effectively - ignores the maximal cache size.</desc> - </info> - </enumeration> - <enumeration oor:value="Erase"> - <info> - <desc>Remove preview from cache</desc> - </info> - </enumeration> - <enumeration oor:value="ResolutionReduction"> - <info> - <desc>Reduce the resolution to a width - of 100 Pixels</desc> - </info> - </enumeration> - <enumeration oor:value="PNGCompression"> - <info> - <desc>Store preview as compressed PNG bitmap</desc> - </info> - </enumeration> - </constraints> - <value>ResolutionReduction</value> - </prop> - <prop oor:name="TimeBetweenHighPriorityRequests" oor:type="xs:int"> - <info> - <desc>Time in milli seconds to wait between processing - preview creation requests with high priority.</desc> - <label>Time Between High Priority Requests</label> - </info> - <value>10</value> - </prop> - <prop oor:name="TimeBetweenLowPriorityRequests" oor:type="xs:int"> - <info> - <desc>Time in milli seconds to wait between processing - preview creation requests with low priority.</desc> - <label>Time Between Low Priority Requests</label> - </info> - <value>100</value> - </prop> - <prop oor:name="TimeBetweenRequestsDuringShow" oor:type="xs:int"> - <info> - <desc>Time in milli seconds to wait between processing - preview creation requestsest when show is running.</desc> - <label>Time Between Requests During Show</label> - </info> - <value>1000</value> - </prop> - </group> - </group> - </group> - </component> + </enumeration> + </constraints> + <value>ResolutionReduction</value> + </prop> + <prop oor:name="TimeBetweenHighPriorityRequests" oor:type="xs:int"> + <info> + <desc> + Time in milli seconds to wait between processing + preview creation requests with high priority. + </desc> + <label>Time Between High Priority Requests</label> + </info> + <value>10</value> + </prop> + <prop oor:name="TimeBetweenLowPriorityRequests" oor:type="xs:int"> + <info> + <desc> + Time in milli seconds to wait between processing + preview creation requests with low priority. + </desc> + <label>Time Between Low Priority Requests</label> + </info> + <value>100</value> + </prop> + <prop oor:name="TimeBetweenRequestsDuringShow" oor:type="xs:int"> + <info> + <desc> + Time in milli seconds to wait between processing + preview creation requestsest when show is running. + </desc> + <label>Time Between Requests During Show</label> + </info> + <value>1000</value> + </prop> + </group> + </group> + </group> + </component> </oor:component-schema> diff --git a/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs b/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs index 220d94c89da6..7cb13b70700c 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs @@ -121,6 +121,31 @@ <label>Spell and grammar context menu dictionary image</label> </info> </prop> + <prop oor:name="ThesaurusDialogImage" oor:type="xs:string"> + <info> + <desc>The path to the image for the thesaurus dialog.</desc> + <label>Thesaurus dialog image</label> + </info> + </prop> + <prop oor:name="ThesaurusDialogImage_HC" oor:type="xs:string"> + <info> + <desc>The path to the image for the thesaurus dialog in high contrast mode.</desc> + <label>Thesaurus dialog image</label> + </info> + </prop> + <prop oor:name="SynonymsContextMenuImage" oor:type="xs:string"> + <info> + <desc>The path to the image for the synonyms context menu.</desc> + <label>Synonyms context menu image</label> + </info> + </prop> + <prop oor:name="SynonymsContextMenuImage_HC" oor:type="xs:string"> + <info> + <desc>The path to the image for the synonyms context menu in high contrast mode.</desc> + <label>Synonyms context menu image</label> + </info> + </prop> + </group> <group oor:name="GrammarCheckerEntry"> diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs index 38ee3a2e4c4f..71efdab1b636 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs @@ -52,6 +52,7 @@ Bit 0 = Command has an image. Bit 1 = Image must be mirrored (CTL/vertical text). Bit 2 = Image must be rotated (CTL/vertical text). + Bit 3 = Command supports a toggle state (Accessibility). </desc> </info> <value>0</value> diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs index 39545cab2391..b56629aca2eb 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/WindowState.xcs @@ -95,6 +95,21 @@ <desc>Specifies the user interface element name. It is used for floating user interface elements to set the title and for the bubble help.</desc> </info> </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <info> + <desc>Specifies the URL of an image to associate with the user interface element. Any URL scheme supported by the com.sun.star.graphic.GraphicProvider service + is suitable here.</desc> + </info> + <value></value> + </prop> + <prop oor:name="HelpURL" oor:type="xs:string"> + <info> + <desc> + Specifies the help URL of the tool panel. + </desc> + </info> + <value></value> + </prop> <prop oor:name="InternalState" oor:type="xs:int"> <info> <desc>Specifies an internal state for the user interface element. Please don't change this value it describes an internal value.</desc> diff --git a/sfx2/inc/imagemgr.hxx b/sfx2/inc/imagemgr.hxx index ead9b6988cea..79dc724210c4 100644 --- a/sfx2/inc/imagemgr.hxx +++ b/sfx2/inc/imagemgr.hxx @@ -33,4 +33,4 @@ #include <rtl/ustring.hxx> #include <vcl/image.hxx> -SFX2_DLLPUBLIC Image SAL_CALL GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); +SFX2_DLLPUBLIC Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ); diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx index 8cd8f9d8561f..b43dba7d6673 100644 --- a/sfx2/inc/pch/precompiled_sfx2.hxx +++ b/sfx2/inc/pch/precompiled_sfx2.hxx @@ -566,7 +566,7 @@ #include "svl/svdde.hxx" #include "svl/svstdarr.hxx" #include "svtools/svtdata.hxx" -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" #include "unotools/syslocale.hxx" #include "unotools/syslocaleoptions.hxx" #include "svl/szitem.hxx" diff --git a/sfx2/inc/sfx2/childwin.hxx b/sfx2/inc/sfx2/childwin.hxx index cac0b72f13cf..fd1eb65d54df 100644 --- a/sfx2/inc/sfx2/childwin.hxx +++ b/sfx2/inc/sfx2/childwin.hxx @@ -87,13 +87,13 @@ struct SfxChildWinInfo }; // Factory-Methode eines ChildWindows -typedef SfxChildWindow* (*SfxChildWinCtor)( Window *pParentWindow, +typedef SfxChildWindow* (*SfxChildWinCtor)( ::Window *pParentWindow, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo); // Factory-Methode eines ChildWindowsContexts -typedef SfxChildWindowContext* (*SfxChildWinContextCtor)( Window *pParentWindow, +typedef SfxChildWindowContext* (*SfxChildWinContextCtor)( ::Window *pParentWindow, SfxBindings *pBindings, SfxChildWinInfo *pInfo); struct SfxChildWinContextFactory @@ -143,8 +143,8 @@ struct SfxChildWindow_Impl; class SFX2_DLLPUBLIC SfxChildWindowContext { friend class SfxChildWindow; - Window* pWindow; - sal_uInt16 nContextId; + ::Window* pWindow; + sal_uInt16 nContextId; protected: SfxChildWindowContext( sal_uInt16 nId ); @@ -152,9 +152,9 @@ protected: public: virtual ~SfxChildWindowContext(); - void SetWindow( Window* pWin ) + void SetWindow( ::Window* pWin ) { pWindow=pWin; } - Window* GetWindow() const + ::Window* GetWindow() const { return pWindow; } sal_uInt16 GetContextId() const { return nContextId; } @@ -169,12 +169,12 @@ public: class SFX2_DLLPUBLIC SfxChildWindow { - Window* pParent; // parent window ( Topwindow ) - sal_uInt16 nType; // ChildWindow-Id + ::Window* pParent; // parent window ( Topwindow ) + sal_uInt16 nType; // ChildWindow-Id protected: SfxChildAlignment eChildAlignment;// aktuelles ::com::sun::star::drawing::Alignment - Window* pWindow; // eigentlicher Inhalt + ::Window* pWindow; // eigentlicher Inhalt SfxChildWindow_Impl* pImp; // Imp-Daten private: @@ -185,14 +185,14 @@ private: { return pContext; } protected: - SfxChildWindow(Window *pParentWindow, sal_uInt16 nId); + SfxChildWindow(::Window *pParentWindow, sal_uInt16 nId); public: virtual ~SfxChildWindow(); void Destroy(); - Window* GetWindow() const + ::Window* GetWindow() const { return pWindow; } - Window* GetParent() const + ::Window* GetParent() const { return pParent; } SfxChildAlignment GetAlignment() const { return eChildAlignment; } @@ -217,17 +217,17 @@ public: sal_uInt16 GetContextId() const { return pContext ? pContext->GetContextId(): 0; } - Window* GetContextWindow() const + ::Window* GetContextWindow() const { return pContext ? pContext->GetWindow(): 0; } - Window* GetContextWindow( SfxModule *pModule ) const; + ::Window* GetContextWindow( SfxModule *pModule ) const; virtual SfxChildWinInfo GetInfo() const; void SaveStatus(const SfxChildWinInfo& rInfo); static void RegisterChildWindow(SfxModule*, SfxChildWinFactory*); - static SfxChildWindow* CreateChildWindow( sal_uInt16, Window*, SfxBindings*, SfxChildWinInfo&); + static SfxChildWindow* CreateChildWindow( sal_uInt16, ::Window*, SfxBindings*, SfxChildWinInfo&); void SetHideNotDelete( sal_Bool bOn ); sal_Bool IsHideNotDelete() const; void SetHideAtToggle( sal_Bool bOn ); @@ -258,19 +258,19 @@ public: //------------------------------------------------------------------ //! demn"achst hinf"allig ! #define SFX_DECL_CHILDWINDOW_CONTEXT(Class) \ - static SfxChildWindowContext* CreateImpl(Window *pParent, \ + static SfxChildWindowContext* CreateImpl(::Window *pParent, \ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \ static void RegisterChildWindowContext(SfxModule *pMod=0); \ //! Das Macro der Zukunft ... #define SFX_DECL_CHILDWINDOWCONTEXT(Class) \ - static SfxChildWindowContext* CreateImpl(Window *pParent, \ + static SfxChildWindowContext* CreateImpl(::Window *pParent, \ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \ static void RegisterChildWindowContext(sal_uInt16, SfxModule *pMod=0); \ //! demn"achst hinf"allig ! #define SFX_IMPL_CHILDWINDOW_CONTEXT(Class, MyID, ShellClass) \ - SfxChildWindowContext* __EXPORT Class::CreateImpl( Window *pParent, \ + SfxChildWindowContext* __EXPORT Class::CreateImpl( ::Window *pParent, \ SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ { \ SfxChildWindowContext *pContext = new Class(pParent, \ @@ -290,7 +290,7 @@ public: // CreateImpl mu\s noch als Parameter die Factory mitbekommen wg. ContextId // Solange wird diese Id auf 0 gesetzt und in SfxChildWindow::CreateContext gepatched #define SFX_IMPL_CHILDWINDOWCONTEXT(Class, MyID) \ - SfxChildWindowContext* __EXPORT Class::CreateImpl( Window *pParent, \ + SfxChildWindowContext* __EXPORT Class::CreateImpl( ::Window *pParent, \ SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ { \ SfxChildWindowContext *pContext = new Class(pParent,0,pBindings,pInfo);\ @@ -305,7 +305,7 @@ public: #define SFX_DECL_CHILDWINDOW(Class) \ public : \ - static SfxChildWindow* CreateImpl(Window *pParent, sal_uInt16 nId, \ + static SfxChildWindow* CreateImpl(::Window *pParent, sal_uInt16 nId, \ SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \ static void RegisterChildWindow (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0); \ static sal_uInt16 GetChildWindowId ();\ @@ -315,7 +315,7 @@ public: SFX_IMPL_POS_CHILDWINDOW(Class, MyID, CHILDWIN_NOPOS) #define SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \ - SfxChildWindow* __EXPORT Class::CreateImpl( Window *pParent, \ + SfxChildWindow* __EXPORT Class::CreateImpl( ::Window *pParent, \ sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ { \ SfxChildWindow *pWin = new Class(pParent, nId, pBindings, pInfo);\ diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx index d17553e2b2d0..9b775f8e827d 100644 --- a/sfx2/inc/sfx2/filedlghelper.hxx +++ b/sfx2/inc/sfx2/filedlghelper.hxx @@ -102,30 +102,6 @@ class Window; #define FILE_OPEN_SERVICE_NAME_SYSTEM "com.sun.star.ui.dialogs.SystemFilePicker" #define FILE_OPEN_SERVICE_NAME_OOO "com.sun.star.ui.dialogs.OfficeFilePicker" -//***************************************************************************** -// SfxUrlDialog -//***************************************************************************** - -//#if 0 // _SOLAR__PRIVATE -#ifndef DONT_USE_FILE_DIALOG_SERVICE - -class SfxUrlDialog : public ModalDialog -{ -private: - Edit aEdit; - OKButton aOk; - CancelButton aCancel; - -public: - SfxUrlDialog( Window* pParent ); - - String GetUrl() const { return aEdit.GetText(); } - void SetUrl( const String& rUrl ) { aEdit.SetText( rUrl ); } -}; - -#endif -//#endif - //----------------------------------------------------------------------------- namespace sfx2 { diff --git a/sfx2/inc/sfx2/mnumgr.hxx b/sfx2/inc/sfx2/mnumgr.hxx index ee1c81daa603..9c9b566d9d9d 100644 --- a/sfx2/inc/sfx2/mnumgr.hxx +++ b/sfx2/inc/sfx2/mnumgr.hxx @@ -102,22 +102,34 @@ private: DECL_LINK( SelectHdl, void * ); Menu* pSVMenu; -private: - // only declared, but not defined: don't allow copying - SfxPopupMenuManager( const SfxPopupMenuManager& ); - SfxPopupMenuManager& operator=( const SfxPopupMenuManager& ); + // when #i107205 gets fixed this one should be superfluous. + // But right now we want to avoid the memory leak that would otherwise occur, + // if we don't delete the pointer that got created in SfxPopupMenuManager::Popup + static PopupMenu * pStaticThesSubMenu; + + // only declared, but not defined: don't allow copying + SfxPopupMenuManager( const SfxPopupMenuManager& ); + SfxPopupMenuManager& operator=( const SfxPopupMenuManager& ); public: SfxPopupMenuManager( const ResId&, SfxBindings& ); SfxPopupMenuManager( PopupMenu*, SfxBindings& ); ~SfxPopupMenuManager(); static void ExecutePopup( const ResId&, SfxViewFrame* pViewFrame, const Point& rPoint, Window* pWindow ); + // @deprecated!! + // Don't use this method any longer. The whole class will be removed in the future. + // Changing code which relies on Popup would need much more effort. + // Please contact cd@openoffice.org if you have questions or need help static SfxPopupMenuManager* Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, Window* pWindow ); USHORT Execute( const Point& rPos, Window *pWindow ); USHORT Execute( const Point& rPoint, Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 ); USHORT Execute( const Point& rPoint, Window* pWindow, const SfxPoolItem *pArg1 ... ); + // @deprecated (start)!! + // Don't use these methods any longer. The whole class will be removed in the future. + // Changing code which relies on these methods would need much more effort! + // Please contact cd@openoffice.org if you have questions or need help void StartInsert(); void EndInsert(); void CheckItem( USHORT, BOOL ); @@ -125,6 +137,8 @@ public: void InsertItem( USHORT, const String&, MenuItemBits, USHORT nPos = MENU_APPEND ); void InsertSeparator( USHORT nPos = MENU_APPEND ); + // @deprecated (end) + void RemoveDisabledEntries(); void AddClipboardFunctions(); Menu* GetSVMenu(); diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx index 793dd8f76cab..ad83bb4a7418 100644 --- a/sfx2/inc/sfx2/module.hxx +++ b/sfx2/inc/sfx2/module.hxx @@ -93,6 +93,8 @@ public: virtual void Invalidate(USHORT nId = 0); BOOL IsActive() const; + /*virtual*/ bool IsChildWindowAvailable( const USHORT i_nId, const SfxViewFrame* i_pViewFrame ) const; + static SfxModule* GetActiveModule( SfxViewFrame* pFrame=NULL ); static FieldUnit GetCurrentFieldUnit(); FieldUnit GetFieldUnit() const; diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index bc4c11b53184..275e5c06a7be 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -477,6 +477,9 @@ #define SID_CAPTION (SID_SFX_START + 641) #define SID_STATUSBARTEXT (SID_SFX_START + 642) +// id for thesaurs entry in context menu +#define SID_THES (SID_SFX_START + 698) + // default-ids for editing, cursor travellung and selection #define SID_REDO (SID_SFX_START + 700) #define SID_UNDO (SID_SFX_START + 701) @@ -867,6 +870,7 @@ #define SID_HYPERLINK_GETLINK (SID_SVX_START + 361) #define SID_HYPERLINK_SETLINK (SID_SVX_START + 362) #define SID_NAVIGATOR (SID_SVX_START + 366) +#define SID_TASKPANE (SID_SVX_START + 370) #define SID_ZOOM_NEXT (SID_SVX_START + 402) #define SID_ZOOM_PREV (SID_SVX_START + 403) #define SID_INET_DLG (SID_SVX_START + 416) diff --git a/sfx2/inc/sfx2/taskpane.hxx b/sfx2/inc/sfx2/taskpane.hxx new file mode 100644 index 000000000000..69ebd866a50b --- /dev/null +++ b/sfx2/inc/sfx2/taskpane.hxx @@ -0,0 +1,245 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SFX_TASKPANE_HXX +#define SFX_TASKPANE_HXX + +#include "sfx2/dllapi.h" +#include "sfx2/childwin.hxx" +#include "sfx2/titledockwin.hxx" + +#include <svtools/toolpanel/tabalignment.hxx> +#include <svtools/toolpanel/tabitemcontent.hxx> + +#include <boost/scoped_ptr.hpp> +#include <boost/optional.hpp> + +namespace svt +{ + class ToolPanelDeck; +} + +//...................................................................................................................... +namespace sfx2 +{ +//...................................................................................................................... + + //================================================================================================================== + //= ITaskPaneToolPanelAccess + //================================================================================================================== + class SAL_NO_VTABLE ITaskPaneToolPanelAccess + { + public: + virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ) = 0; + }; + + //================================================================================================================== + //= TaskPaneWrapper + //================================================================================================================== + class SFX2_DLLPUBLIC TaskPaneWrapper :public SfxChildWindow + ,public ITaskPaneToolPanelAccess + { + public: + TaskPaneWrapper( + Window* i_pParent, + USHORT i_nId, + SfxBindings* i_pBindings, + SfxChildWinInfo* i_pInfo + ); + + SFX_DECL_CHILDWINDOW( TaskPaneWrapper ); + + // ITaskPaneToolPanelAccess + virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ); + }; + + //================================================================================================================== + //= IToolPanelCompare + //================================================================================================================== + class SFX2_DLLPUBLIC SAL_NO_VTABLE IToolPanelCompare + { + public: + /** compares to tool panel URLs + @return + <ul> + <li>-1 if the tool panel described by i_rLHS should precede the one described by i_rRHS</li> + <li>0 if the two panels have no particular relative order</li> + <li>1 if the tool panel described by i_rLHS should succeed the one described by i_rRHS</li> + + */ + virtual short compareToolPanelsURLs( + const ::rtl::OUString& i_rLHS, + const ::rtl::OUString& i_rRHS + ) const = 0; + }; + + //================================================================================================================== + //= ModuleTaskPane + //================================================================================================================== + class ModuleTaskPane_Impl; + /** SFX-less version of a module dependent task pane, filled with tool panels as specified in the respective + module's configuration + */ + class SFX2_DLLPUBLIC ModuleTaskPane : public Window + { + public: + /** creates a new instance + @param i_rParentWindow + the parent window + @param i_rDocumentFrame + the frame to which the task pane belongs. Will be passed to any custom tool panels created + via an XUIElementFactory. Also, it is used to determine the module which the task pane is + responsible for, thus controlling which tool panels are actually available. + */ + ModuleTaskPane( + Window& i_rParentWindow, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocumentFrame + ); + /** creates a new instance + @param i_rParentWindow + the parent window + @param i_rDocumentFrame + the frame to which the task pane belongs. Will be passed to any custom tool panels created + via an XUIElementFactory. Also, it is used to determine the module which the task pane is + responsible for, thus controlling which tool panels are actually available. + @param i_rCompare + a comparator for tool panel URLs, which allows controlling the order in which the panels are + added to the tool panel deck. + */ + ModuleTaskPane( + Window& i_rParentWindow, + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocumentFrame, + const IToolPanelCompare& i_rCompare + ); + ~ModuleTaskPane(); + + /** determines whether a given module has any registered tool panels + */ + static bool ModuleHasToolPanels( const ::rtl::OUString& i_rModuleIdentifier ); + /** determines whether a given module has any registered tool panels + */ + static bool ModuleHasToolPanels( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocumentFrame ); + + /** provides access to the Window aspect of the PanelDeck + + Be careful with this method. For instance, you're not allowed to insert arbitrary IToolPanel implementations + into the deck, as the ModuleTaskPane has certain assumptions about the panel implementations. However, + you're allowed to remove and re-insert panels, which have originally been created by the ModuleTaskPane + itself. + */ + ::svt::ToolPanelDeck& GetPanelDeck(); + const ::svt::ToolPanelDeck& GetPanelDeck() const; + + /** returns the position of the panel with the given resource URL + */ + ::boost::optional< size_t > + GetPanelPos( const ::rtl::OUString& i_rResourceURL ); + + /** returns the resource URL of the panel at the specified position + */ + ::rtl::OUString + GetPanelResourceURL( const size_t i_nPanelPos ) const; + + /// sets the "classical" layout of the tool panel deck, using drawers + void SetDrawersLayout(); + /// sets the new layout of the tool panel deck, using tabs + void SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent ); + + protected: + // Window overridables + virtual void Resize(); + virtual void GetFocus(); + + private: + ::boost::scoped_ptr< ModuleTaskPane_Impl > m_pImpl; + }; + + //================================================================================================================== + //= TaskPaneController + //================================================================================================================== + class TaskPaneController_Impl; + /** is a helper class for connecting a ModuleTaskPane and a TitledDockingWindow, for clients of the ModuleTaskPane + which do not use the TaskPaneDockingWindow + + The controller will add a drop down menu to the docking window which contains one item for each panel in the + panel deck, and allows toggling their visibility. + */ + class SFX2_DLLPUBLIC TaskPaneController + { + public: + TaskPaneController( + ModuleTaskPane& i_rTaskPane, + TitledDockingWindow& i_rDockingWindow + ); + ~TaskPaneController(); + + /** sets the default title to be used for the TitledDockingWindow + + When the controller switches the docking window to "tabbed" mode, then the title of the docking window + will contain the name of the currently active panel (since this name isn't to be seen elsewhere). + When the controller switches the docking window to "drawer" mode, then the title of the docking window + contains the default title as given here (since in this mode, the names of the panels are shown in + the drawers). + */ + void SetDefaultTitle( const String& i_rTitle ); + + /// activates the panel with the given URL + void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ); + + private: + ::boost::scoped_ptr< TaskPaneController_Impl > m_pImpl; + }; + + //================================================================================================================== + //= TaskPaneDockingWindow + //================================================================================================================== + class TaskPaneDockingWindow :public TitledDockingWindow + ,public ITaskPaneToolPanelAccess + { + public: + TaskPaneDockingWindow( SfxBindings* i_pBindings, TaskPaneWrapper& i_rWrapper, + Window* i_pParent, WinBits i_nBits ); + + // ITaskPaneToolPanelAccess + virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ); + + protected: + // Window overridables + virtual void GetFocus(); + + // TitledDockingWindow overridables + virtual void onLayoutDone(); + + private: + ModuleTaskPane m_aTaskPane; + TaskPaneController m_aPaneController; + }; + +//...................................................................................................................... +} // namespace sfx2 +//...................................................................................................................... + +#endif // SFX_TASKPANE_HXX diff --git a/sfx2/inc/sfx2/titledockwin.hxx b/sfx2/inc/sfx2/titledockwin.hxx new file mode 100644 index 000000000000..ebb4497a0ba2 --- /dev/null +++ b/sfx2/inc/sfx2/titledockwin.hxx @@ -0,0 +1,162 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SFX_TITLEDOCKWIN_HXX +#define SFX_TITLEDOCKWIN_HXX + +#include "sfx2/dllapi.h" +#include "sfx2/dockwin.hxx" + +#include <vcl/toolbox.hxx> +#include <tools/svborder.hxx> + +//...................................................................................................................... +namespace sfx2 +{ +//...................................................................................................................... + + //================================================================================================================== + //= TitledDockingWindow + //================================================================================================================== + class SFX2_DLLPUBLIC TitledDockingWindow : public SfxDockingWindow + { + public: + TitledDockingWindow( + SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow, + Window* i_pParent, WinBits i_nStyle = 0 + ); + + TitledDockingWindow( SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow, + Window* i_pParent, const ResId& i_rResId + ); + + virtual ~TitledDockingWindow(); + + /** sets a title to be displayed in the docking window + */ + void SetTitle( const String& i_rTitle ); + /** returns the current title displayed in the docking window + + Note that if you never called SetTitle before, then this method will not return an empty string, + but the window text (Window::GetText), since this is what is displayed as title then. + */ + String GetTitle() const; + + /** adds a drop down item to the toolbox. Usually, this is used to add some kind of menu to the toolbox. + + @param i_rItemText + the text to display for the item + @param i_nHelpId + the help ID for the new toolbox item + @param i_rCallback + the callback to invoke when the drop item has been clicked + @return + the ID of the newly created toolbox item + */ + USHORT AddDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback ) + { + return impl_addDropDownToolBoxItem( i_rItemText, i_nHelpId, i_rCallback ); + } + + void SetEndDockingHdl( const Link& i_rEndDockingHdl ) { m_aEndDockingHdl = i_rEndDockingHdl; } + const Link& GetEndDockingHdl() const { return m_aEndDockingHdl; } + + /** resets the toolbox. Upon return, the only item in the toolbox is the closer. + */ + void ResetToolBox() + { + impl_resetToolBox(); + } + + /** returns the content window, which is to be used as parent window for any content to be displayed + in the docking window. + */ + ::Window& GetContentWindow() { return m_aContentWindow; } + const ::Window& GetContentWindow() const { return m_aContentWindow; } + + ToolBox& GetToolBox() { return m_aToolbox; } + const ToolBox& GetToolBox() const { return m_aToolbox; } + + protected: + // Window overridables + virtual void Paint( const Rectangle& i_rArea ); + virtual void Resize(); + virtual void StateChanged( StateChangedType i_nType ); + virtual void DataChanged( const DataChangedEvent& i_rDataChangedEvent ); + virtual void SetText( const String& i_rText ); + + // DockingWindow overridables + void EndDocking( const Rectangle& rRect, BOOL bFloatMode ); + + // own overridables + virtual void onLayoutDone(); + + protected: + /** internal version of ResetToolBox + */ + void impl_resetToolBox(); + + /** internal version of AddDropDownToolBoxItem + */ + USHORT impl_addDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback ); + + /** returns the current title. + + If no title has been set via SetTitle, then the window text (Window::GetText) is returned. + */ + String impl_getTitle() const; + + private: + DECL_LINK( OnToolboxItemSelected, ToolBox* ); + + void impl_construct(); + void impl_layout(); + void impl_scheduleLayout(); + + private: + String m_sTitle; + ToolBox m_aToolbox; + Window m_aContentWindow; + + Link m_aEndDockingHdl; + + /** The border that is painted arround the inner window. The bevel + shadow lines are part of the border, so where the border is 0 no + such line is painted. + */ + SvBorder m_aBorder; + + /** Remember that a layout is pending, i.e. Resize() has been called + since the last Paint(). + */ + bool m_bLayoutPending; + }; + +//...................................................................................................................... +} // namespace sfx2 +//...................................................................................................................... + +#endif // SFX_TITLEDOCKWIN_HXX diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx index 8350bc5f0f9d..d376236bf830 100644 --- a/sfx2/inc/sfx2/viewfrm.hxx +++ b/sfx2/inc/sfx2/viewfrm.hxx @@ -40,6 +40,8 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/frame/XController2.hpp> +#include <tools/svborder.hxx> + class SfxMacro; class SvBorder; class SfxDispatcher; @@ -70,67 +72,6 @@ SV_DECL_REF(SfxObjectShell) #endif //======================================================================== -#include <tools/gen.hxx> -class SvBorder -{ - long nTop, nRight, nBottom, nLeft; -public: - SvBorder() - { nTop = nRight = nBottom = nLeft = 0; } - SvBorder( const Size & rSz ) - { nTop = nBottom = rSz.Height(); nRight = nLeft = rSz.Width(); } - SvBorder( const Rectangle & rOuter, const Rectangle & rInner ); - SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP ) - { nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; } - BOOL operator == ( const SvBorder & rObj ) const - { - return nTop == rObj.nTop && nRight == rObj.nRight && - nBottom == rObj.nBottom && nLeft == rObj.nLeft; - } - BOOL operator != ( const SvBorder & rObj ) const - { return !(*this == rObj); } - SvBorder & operator = ( const SvBorder & rBorder ) - { - Left() = rBorder.Left(); - Top() = rBorder.Top(); - Right() = rBorder.Right(); - Bottom() = rBorder.Bottom(); - return *this; - } - SvBorder & operator += ( const SvBorder & rBorder ) - { - Left() += rBorder.Left(); - Top() += rBorder.Top(); - Right() += rBorder.Right(); - Bottom() += rBorder.Bottom(); - return *this; - } - SvBorder & operator -= ( const SvBorder & rBorder ) - { - Left() -= rBorder.Left(); - Top() -= rBorder.Top(); - Right() -= rBorder.Right(); - Bottom() -= rBorder.Bottom(); - return *this; - } - BOOL IsInside( const SvBorder & rInside ) - { - return nTop >= rInside.nTop && nRight >= rInside.nRight && - nBottom >= rInside.nBottom && nLeft >= rInside.nLeft; - } - long & Top() { return nTop; } - long & Right() { return nRight; } - long & Bottom() { return nBottom; } - long & Left() { return nLeft; } - long Top() const { return nTop; } - long Right() const { return nRight; } - long Bottom() const { return nBottom; } - long Left() const { return nLeft; } -}; -Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder ); -Rectangle & operator -= ( Rectangle & rRect, const SvBorder & rBorder ); - - DBG_NAMEEX(SfxViewFrame) class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener { @@ -228,6 +169,8 @@ public: String UpdateTitle(); + static void ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL ); + // interne Handler SAL_DLLPRIVATE virtual BOOL SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder ); SAL_DLLPRIVATE virtual const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const; @@ -304,6 +247,7 @@ public: SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &); SAL_DLLPRIVATE void SetCurViewId_Impl( const USHORT i_nID ); + SAL_DLLPRIVATE void ActivateToolPanel_Impl( const ::rtl::OUString& i_rPanelURL ); //#endif private: diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index 3e791fbc2000..96320614eaaf 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,8 +1,7 @@ -sf sfx2 : l10n idl basic xmlscript framework shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL +sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL sf sfx2 usr1 - all sf_mkout NULL sf sfx2\inc nmake - all sf_inc NULL sf sfx2\prj get - all sf_prj NULL -sf sfx2\win\res get - all sf_wres NULL sf sfx2\mac\res get - all sf_mres NULL sf sfx2\source\inc get - all sf_sinc NULL sf sfx2\sdi nmake - all sf_sdi NULL @@ -20,5 +19,7 @@ sf sfx2\source\statbar nmake - all sf_sbar sf_sdi sf_inc NULL sf sfx2\source\toolbox nmake - all sf_tbox sf_sdi sf_inc NULL sf sfx2\source\inet nmake - all sf_inet sf_sdi sf_inc NULL sf sfx2\source\explorer nmake - all sf_expl sf_sdi sf_inc NULL +sf sfx2\workben\custompanel nmake - all sf_wb_custompanel NULL sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL sf sfx2\qa\unoapi nmake - all sf_qa_unoapi NULL +sf sfx2\qa\cppunit nmake - all sf_qa_cppunit sf_util NULL diff --git a/sfx2/qa/cppunit/makefile.mk b/sfx2/qa/cppunit/makefile.mk new file mode 100644 index 000000000000..2794c2ae92bb --- /dev/null +++ b/sfx2/qa/cppunit/makefile.mk @@ -0,0 +1,74 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=../.. +PRJNAME=sfx2 +TARGET=qa_cppunit + +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +CFLAGSCXX += $(CPPUNIT_CFLAGS) +DLLPRE = # no leading "lib" on .so files + +# --- Libs --------------------------------------------------------- + +SHL1OBJS= \ + $(SLO)/test_metadatable.obj \ + + +SHL1STDLIBS= \ + $(CPPUNITLIB) \ + $(SALLIB) \ + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(VCLLIB) \ + $(SFXLIB) \ + + +SHL1TARGET= test_metadatable +SHL1RPATH = NONE +SHL1IMPLIB= i$(SHL1TARGET) +# SHL1DEF= $(MISC)/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +# DEF1EXPORTFILE= export.exp +SHL1VERSIONMAP= version.map + +# --- All object files --------------------------------------------- + +SLOFILES= \ + $(SHL1OBJS) \ + + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk +.INCLUDE : _cppunit.mk + diff --git a/sfx2/qa/cppunit/test_metadatable.cxx b/sfx2/qa/cppunit/test_metadatable.cxx new file mode 100644 index 000000000000..903be6920327 --- /dev/null +++ b/sfx2/qa/cppunit/test_metadatable.cxx @@ -0,0 +1,280 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_sfx2.hxx" + +#include <cppunit/TestAssert.h> +#include <cppunit/TestFixture.h> +#include <cppunit/extensions/HelperMacros.h> +#include <cppunit/plugin/TestPlugIn.h> + +#include <rtl/ustrbuf.hxx> + +#include <com/sun/star/util/DateTime.hpp> +#include <com/sun/star/util/Date.hpp> +#include <com/sun/star/util/Duration.hpp> + +#include <sfx2/Metadatable.hxx> +#include <sfx2/XmlIdRegistry.hxx> + + +using namespace ::com::sun::star; + + +namespace { + +class MetadatableTest + : public ::CppUnit::TestFixture +{ +public: + virtual void setUp(); + virtual void tearDown(); + + void test(); + + CPPUNIT_TEST_SUITE(MetadatableTest); + CPPUNIT_TEST(test); + CPPUNIT_TEST_SUITE_END(); + +private: +}; + +void MetadatableTest::setUp() +{ +} + +void MetadatableTest::tearDown() +{ +} + + +class MockMetadatable + : public ::sfx2::Metadatable +{ +private: + ::sfx2::IXmlIdRegistry & m_rRegistry; + +public: + MockMetadatable(::sfx2::IXmlIdRegistry & i_rReg, + bool const i_isInClip = false) + : m_rRegistry(i_rReg) + , m_bInClipboard(i_isInClip), m_bInUndo(false), m_bInContent(true) {} + bool m_bInClipboard; + bool m_bInUndo; + bool m_bInContent; + virtual bool IsInClipboard() const { return m_bInClipboard; } + virtual bool IsInUndo() const { return m_bInUndo; } + virtual bool IsInContent() const { return m_bInContent; } + virtual ::sfx2::IXmlIdRegistry& GetRegistry() { return m_rRegistry; } + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::rdf::XMetadatable > MakeUnoObject() { return 0; } +}; + +static bool operator==(beans::StringPair p1, beans::StringPair p2) +{ + return p1.First == p2.First && p1.Second == p2.Second; +} + +void MetadatableTest::test() +{ + OSL_TRACE("SwMetadatable test(): start\n"); + ::std::auto_ptr< ::sfx2::IXmlIdRegistry > const pReg( + ::sfx2::createXmlIdRegistry(false) ); + ::std::auto_ptr< ::sfx2::IXmlIdRegistry > const pRegClip( + ::sfx2::createXmlIdRegistry(true) ); + + MockMetadatable m1(*pReg); + MockMetadatable m2(*pReg); + MockMetadatable m3(*pReg); + MockMetadatable m4(*pReg); + MockMetadatable m5(*pReg); + ::rtl::OUString empty; + ::rtl::OUString content( ::rtl::OUString::createFromAscii("content.xml") ); + ::rtl::OUString styles ( ::rtl::OUString::createFromAscii("styles.xml") ); + ::rtl::OUString sid1( ::rtl::OUString::createFromAscii("id1") ); + ::rtl::OUString sid2( ::rtl::OUString::createFromAscii("id2") ); + ::rtl::OUString sid3( ::rtl::OUString::createFromAscii("id3") ); + ::rtl::OUString sid4( ::rtl::OUString::createFromAscii("id4") ); + beans::StringPair id1(content, sid1); + beans::StringPair id2(content, sid2); + beans::StringPair id3(content, sid3); + beans::StringPair id4(styles, sid4); + beans::StringPair id3e(empty, sid3); + beans::StringPair id4e(empty, sid4); + m1.SetMetadataReference(id1); + CPPUNIT_ASSERT_MESSAGE("set failed", m1.GetMetadataReference() == id1); + try { + m2.SetMetadataReference(id1); + CPPUNIT_ASSERT_MESSAGE("set duplicate succeeded", false); + } catch (lang::IllegalArgumentException) { } + m1.SetMetadataReference(id1); + CPPUNIT_ASSERT_MESSAGE("set failed (existing)", + m1.GetMetadataReference() == id1); + m1.EnsureMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("ensure failed (existing)", + m1.GetMetadataReference() == id1); + + m2.EnsureMetadataReference(); + beans::StringPair m2id(m2.GetMetadataReference()); + CPPUNIT_ASSERT_MESSAGE("ensure failed", m2id.Second.getLength()); + m2.EnsureMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("ensure failed (idempotent)", + m2.GetMetadataReference() == m2id); + + m1.m_bInUndo = true; + CPPUNIT_ASSERT_MESSAGE("move to undo failed", + !m1.GetMetadataReference().Second.getLength()); + + m1.m_bInUndo = false; + CPPUNIT_ASSERT_MESSAGE("move from undo failed", + m1.GetMetadataReference() == id1); + + m1.m_bInUndo = true; + try { + m2.SetMetadataReference(id1); // steal! + } catch (lang::IllegalArgumentException &) { + CPPUNIT_FAIL("set duplicate to undo failed"); + } + m1.m_bInUndo = false; + CPPUNIT_ASSERT_MESSAGE("move from undo: duplicate", + !m1.GetMetadataReference().Second.getLength()); + + m3.RegisterAsCopyOf(m2); + CPPUNIT_ASSERT_MESSAGE("copy: source", m2.GetMetadataReference() == id1); + CPPUNIT_ASSERT_MESSAGE("copy: duplicate", + !m3.GetMetadataReference().Second.getLength()); + m4.RegisterAsCopyOf(m3); + CPPUNIT_ASSERT_MESSAGE("copy: source", m2.GetMetadataReference() == id1); + CPPUNIT_ASSERT_MESSAGE("copy: duplicate", + !m3.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("copy: duplicate", + !m4.GetMetadataReference().Second.getLength()); + m2.m_bInUndo = true; + CPPUNIT_ASSERT_MESSAGE("duplicate to undo", + m3.GetMetadataReference() == id1); + CPPUNIT_ASSERT_MESSAGE("duplicate to undo", + !m2.GetMetadataReference().Second.getLength()); + m2.m_bInUndo = false; + CPPUNIT_ASSERT_MESSAGE("duplicate from undo", + m2.GetMetadataReference() == id1); + CPPUNIT_ASSERT_MESSAGE("duplicate from undo", + !m3.GetMetadataReference().Second.getLength()); + + m4.EnsureMetadataReference(); // new! + beans::StringPair m4id(m4.GetMetadataReference()); + CPPUNIT_ASSERT_MESSAGE("ensure on duplicate", + m4id.Second.getLength() && !(m4id == id1)); + + MockMetadatable mc1(*pRegClip, true); // in clipboard + MockMetadatable mc2(*pRegClip, true); + MockMetadatable mc3(*pRegClip, true); + MockMetadatable mc4(*pRegClip, true); + MockMetadatable m2p(*pReg); + MockMetadatable m3p(*pReg); + + mc1.SetMetadataReference(id2); + CPPUNIT_ASSERT_MESSAGE("set failed", mc1.GetMetadataReference() == id2); + try { + mc2.SetMetadataReference(id2); + CPPUNIT_FAIL("set duplicate succeeded"); + } catch (lang::IllegalArgumentException) { } + mc1.SetMetadataReference(id2); + CPPUNIT_ASSERT_MESSAGE("set failed (existing)", + mc1.GetMetadataReference() == id2); + mc1.EnsureMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("ensure failed (existing)", + mc1.GetMetadataReference() == id2); + mc2.EnsureMetadataReference(); + beans::StringPair mc2id(mc2.GetMetadataReference()); + CPPUNIT_ASSERT_MESSAGE("ensure failed", mc2id.Second.getLength()); + mc2.EnsureMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("ensure failed (idempotent)", + mc2.GetMetadataReference() == mc2id); + mc2.RemoveMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("remove failed", + !mc2.GetMetadataReference().Second.getLength()); + + // set up mc2 as copy of m2 and mc3 as copy of m3 + mc3.RegisterAsCopyOf(m3); + CPPUNIT_ASSERT_MESSAGE("copy to clipboard (latent)", + !mc3.GetMetadataReference().Second.getLength() ); + mc2.RegisterAsCopyOf(m2); + CPPUNIT_ASSERT_MESSAGE("copy to clipboard (non-latent)", + mc2.GetMetadataReference() == id1); + // paste mc2 to m2p and mc3 to m3p + m2p.RegisterAsCopyOf(mc2); + CPPUNIT_ASSERT_MESSAGE("paste from clipboard (non-latent)", + !m2p.GetMetadataReference().Second.getLength() ); + m3p.RegisterAsCopyOf(mc3); + CPPUNIT_ASSERT_MESSAGE("paste from clipboard (latent)", + !m3p.GetMetadataReference().Second.getLength() ); + // delete m2, m2p, m3 + m2.RemoveMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("remove failed", + !m2.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("paste-remove (non-latent)", + m2p.GetMetadataReference() == id1); + m2p.RemoveMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("remove failed", + !m2p.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("paste-remove2 (non-latent)", + m3.GetMetadataReference() == id1); + m3.RemoveMetadataReference(); + CPPUNIT_ASSERT_MESSAGE("remove failed", + !m3.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("paste-remove (latent)", + m3p.GetMetadataReference() == id1); + // delete mc2 + mc2.SetMetadataReference(beans::StringPair()); + CPPUNIT_ASSERT_MESSAGE("in clipboard becomes non-latent", + !mc3.GetMetadataReference().Second.getLength() ); + // paste mc2 + m2p.RegisterAsCopyOf(mc2); + CPPUNIT_ASSERT_MESSAGE("remove-paste", + !m2p.GetMetadataReference().Second.getLength()); + CPPUNIT_ASSERT_MESSAGE("remove-paste (stolen)", + m3p.GetMetadataReference() == id1); + + // auto-detect stream + m5.SetMetadataReference(id3e); + CPPUNIT_ASSERT_MESSAGE("auto-detect (content)", + m5.GetMetadataReference() == id3); + m5.m_bInContent = false; + m5.SetMetadataReference(id4e); + CPPUNIT_ASSERT_MESSAGE("auto-detect (styles)", + m5.GetMetadataReference() == id4); + + OSL_TRACE("sfx2::Metadatable test(): finished\n"); +} + + +CPPUNIT_TEST_SUITE_REGISTRATION(MetadatableTest); + +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + diff --git a/sfx2/qa/cppunit/version.map b/sfx2/qa/cppunit/version.map new file mode 100644 index 000000000000..3308588ef6f8 --- /dev/null +++ b/sfx2/qa/cppunit/version.map @@ -0,0 +1,34 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +UDK_3_0_0 { + global: + cppunitTestPlugIn; + + local: + *; +}; diff --git a/sfx2/qa/unoapi/sfx.sce b/sfx2/qa/unoapi/sfx.sce index 2aaf12c25950..6176c0668731 100644 --- a/sfx2/qa/unoapi/sfx.sce +++ b/sfx2/qa/unoapi/sfx.sce @@ -2,4 +2,4 @@ -o sfx.DocumentTemplates -o sfx.FrameLoader -o sfx.SfxMacroLoader --o sfx.StandaloneDocumentInfo +#i111283 -o sfx.StandaloneDocumentInfo diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi index c4210b801bf6..dbf9267448e1 100644 --- a/sfx2/sdi/frmslots.sdi +++ b/sfx2/sdi/frmslots.sdi @@ -50,6 +50,11 @@ interface Window ExecMethod = ChildWindowExecute ; StateMethod = ChildWindowState ; ] + SID_TASKPANE // status(final|play) + [ + ExecMethod = ChildWindowExecute ; + StateMethod = ChildWindowState ; + ] SID_SHOW_BROWSER // ole(no) api(final/play/rec) [ ExecMethod = ChildWindowExecute ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 10a920852848..e4e43c51052f 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -3931,6 +3931,33 @@ SfxBoolItem Navigator SID_NAVIGATOR ToolBoxConfig = TRUE, GroupId = GID_NAVIGATOR; ] + +//-------------------------------------------------------------------------- +SfxBoolItem TaskPane SID_TASKPANE +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + Readonly = FALSE, + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_VIEW; +] + //-------------------------------------------------------------------------- SfxVoidItem RestoreEditingView SID_RESTORE_EDITING_VIEW @@ -8194,3 +8221,29 @@ SfxInt16Item PasteUnformatted SID_PASTE_UNFORMATTED GroupId = GID_EDIT; ] +//-------------------------------------------------------------------------- +// call thesaurus dialog from context menu +SfxInt16Item ThesaurusFromContext SID_THES +(SfxStringItem WordReplace SID_THES) +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_TEXT; +] + diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index d42d203e57f5..6e13894feb49 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -322,6 +322,7 @@ SfxApplication* SfxApplication::GetOrCreate() ::framework::SetStatusBarControllerCreator( SfxStatusBarControllerFactory ); ::framework::SetDockingWindowCreator( SfxDockingWindowFactory ); ::framework::SetIsDockingWindowVisible( IsDockingWindowVisible ); + ::framework::SetActivateToolPanel( &SfxViewFrame::ActivateToolPanel ); SfxHelp* pSfxHelp = new SfxHelp; Application::SetHelp( pSfxHelp ); diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index a34a2e0d6a32..08023c5414a6 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -35,7 +35,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <svtools/soerr.hxx> -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #include <unotools/saveopt.hxx> #include <unotools/localisationoptions.hxx> #include <tools/config.hxx> diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx index 47bf98292316..addace134362 100644 --- a/sfx2/source/appl/appreg.cxx +++ b/sfx2/source/appl/appreg.cxx @@ -42,6 +42,7 @@ #include "inettbc.hxx" #include "stbitem.hxx" #include <sfx2/navigat.hxx> +#include <sfx2/taskpane.hxx> #include <sfx2/module.hxx> #include <sfx2/viewfrm.hxx> #include "partwnd.hxx" diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index f7cccf2712b8..3b26eae1858d 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -71,7 +71,7 @@ static WeakReference< XModuleUIConfigurationManagerSupplier > m_xModuleCfgMgrSup static WeakReference< XURLTransformer > m_xURLTransformer; static ModuleIdToImagegMgr m_aModuleIdToImageMgrMap; -Image SAL_CALL GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ) +Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ) { // TODO/LATeR: shouldn't this become a method at SfxViewFrame?! That would save the UnoTunnel if ( !rFrame.is() ) diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index c8a9742f49cf..895263ef4783 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -49,6 +49,8 @@ #include <sfx2/objface.hxx> #include <sfx2/viewfrm.hxx> #include <svl/intitem.hxx> +#include "sfx2/taskpane.hxx" +#include <tools/diagnose_ex.h> #define SfxModule #include "sfxslots.hxx" @@ -400,6 +402,17 @@ BOOL SfxModule::IsActive() const return FALSE; } +bool SfxModule::IsChildWindowAvailable( const USHORT i_nId, const SfxViewFrame* i_pViewFrame ) const +{ + if ( i_nId != SID_TASKPANE ) + // by default, assume it is + return true; + + const SfxViewFrame* pViewFrame = i_pViewFrame ? i_pViewFrame : GetFrame(); + ENSURE_OR_RETURN( pViewFrame, "SfxModule::IsChildWindowAvailable: no frame to ask for the module identifier!", false ); + return ::sfx2::ModuleTaskPane::ModuleHasToolPanels( pViewFrame->GetFrame().GetFrameInterface() ); +} + SfxModule* SfxModule::GetActiveModule( SfxViewFrame* pFrame ) { if ( !pFrame ) diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 24cf7dab8095..f9a388deee5c 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -53,6 +53,7 @@ #include <vcl/taskpanelist.hxx> #include <vcl/toolbox.hxx> #include <tools/rcid.h> +#include <tools/diagnose_ex.h> #include <toolkit/helper/vclunohelper.hxx> #include <svl/itempool.hxx> #include <svl/itemiter.hxx> @@ -1538,6 +1539,16 @@ void SfxWorkWindow::UpdateObjectBars_Impl() } } +bool SfxWorkWindow::AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const +{ + // or checking the availability of child windows, we need access to the module + const SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame(); + const SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : NULL; + const SfxModule* pModule = pShell ? pShell->GetModule() : NULL; + ENSURE_OR_RETURN( pModule, "SfxWorkWindow::UpdateChildWindows_Impl: did not find an SfxModule to ask for the child win availability!", true ); + return pModule->IsChildWindowAvailable( i_rCW.nId, pViewFrame ); +} + void SfxWorkWindow::UpdateChildWindows_Impl() { // alle vorhandenen oder in den Kontext gekommenen ChildWindows @@ -1550,7 +1561,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl() { // Im Kontext ist ein geeignetes ChildWindow erlaubt; // ist es auch eingeschaltet ? - if ( pChildWin == 0 && pCW->bCreate ) + if ( pChildWin == NULL && pCW->bCreate ) { // Internal docking is only used for embedding into another // container. We force the floating state of all floatable @@ -1571,6 +1582,9 @@ void SfxWorkWindow::UpdateChildWindows_Impl() else bCreate = TRUE; + if ( bCreate ) + bCreate = AllowChildWindowCreation_Impl( *pCW ); + // Momentan kein Fenster da, aber es ist eingeschaltet; Fenster // und ggf. Context erzeugen if ( bCreate ) @@ -1588,19 +1602,25 @@ void SfxWorkWindow::UpdateChildWindows_Impl() if ( ( !bIsFullScreen || pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT ) && bAllChildsVisible ) { // Updatemode ist kompatibel; auf jeden Fall wieder einschalten - bCreate = TRUE; - if ( pCW->pCli ) + bCreate = AllowChildWindowCreation_Impl( *pCW ); + if ( bCreate ) { - // Fenster ist direktes Child - if ( bAllChildsVisible && ( (IsDockingAllowed() && bInternalDockingAllowed) || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) ) - pCW->pCli->nVisible |= CHILD_NOT_HIDDEN; + if ( pCW->pCli ) + { + // Fenster ist direktes Child + if ( bAllChildsVisible && ( (IsDockingAllowed() && bInternalDockingAllowed) || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) ) + pCW->pCli->nVisible |= CHILD_NOT_HIDDEN; + } + else + { + if ( pCW->bCreate && IsDockingAllowed() && bInternalDockingAllowed ) + // Fenster liegt in einem SplitWindow + ((SfxDockingWindow*)pChildWin->GetWindow())->Reappear_Impl(); + } + + if ( pCW->nInterfaceId != pChildWin->GetContextId() ) + pChildWin->CreateContext( pCW->nInterfaceId, GetBindings() ); } - else if ( pCW->bCreate && IsDockingAllowed() && bInternalDockingAllowed ) - // Fenster liegt in einem SplitWindow - ((SfxDockingWindow*)pChildWin->GetWindow())->Reappear_Impl(); - - if ( pCW->nInterfaceId != pChildWin->GetContextId() ) - pChildWin->CreateContext( pCW->nInterfaceId, GetBindings() ); } } } @@ -2225,7 +2245,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus) SfxChildWin_Impl *pCW = (*pChildWins)[n]; SfxChildWindow *pChild = pCW->pWin; - bool bCreationAllowed( sal_True ); + bool bCreationAllowed( true ); if ( !bInternalDockingAllowed ) { // Special case for all non-floatable child windows. We have @@ -2233,43 +2253,51 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus) bCreationAllowed = !( pCW->aInfo.nFlags & SFX_CHILDWIN_FORCEDOCK ); } - if ( pChild && pCW->bCreate && bCreationAllowed ) + if ( bCreationAllowed ) { - if ( pChild->QueryClose() ) + if ( pCW->bCreate ) { - if ( pChild && pChild->IsHideAtToggle() ) + if ( pChild ) { - pCW->bCreate = !pCW->bCreate; - ShowChildWindow_Impl( nId, pCW->bCreate, bSetFocus ); + if ( pChild->QueryClose() ) + { + pCW->bCreate = FALSE; + if ( pChild->IsHideAtToggle() ) + { + ShowChildWindow_Impl( nId, FALSE, bSetFocus ); + } + else + { + // Fenster soll ausgeschaltet werdem + pChild->SetVisible_Impl( FALSE ); + RemoveChildWin_Impl( pCW ); + } + } } else { - // Fenster soll ausgeschaltet werdem + // no actual Window exists, yet => just remember the "switched off" state pCW->bCreate = FALSE; - pChild->SetVisible_Impl( FALSE ); - RemoveChildWin_Impl( pCW ); } } - } - else if ( pCW->bCreate && bCreationAllowed ) - { - pCW->bCreate = FALSE; - } - else if ( bCreationAllowed ) - { - pCW->bCreate = TRUE; - - if ( pChild ) - { - ShowChildWindow_Impl( nId, pCW->bCreate, bSetFocus ); - } else { - // Fenster erzeugen - CreateChildWin_Impl( pCW, bSetFocus ); - if ( !pCW->pWin ) - // Erzeugung war erfolglos - pCW->bCreate = FALSE; + pCW->bCreate = AllowChildWindowCreation_Impl( *pCW ); + if ( pCW->bCreate ) + { + if ( pChild ) + { + ShowChildWindow_Impl( nId, TRUE, bSetFocus ); + } + else + { + // create actual Window + CreateChildWin_Impl( pCW, bSetFocus ); + if ( !pCW->pWin ) + // no success + pCW->bCreate = FALSE; + } + } } } @@ -2488,7 +2516,6 @@ void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL bSetFoc SfxChildWindow *pChildWin = pCW->pWin; if ( pChildWin ) { -// pCW->bCreate = bVisible; if ( bVisible ) { if ( pCW->pCli ) diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc index f1e100e17cf5..7f03bf416431 100644 --- a/sfx2/source/dialog/dialog.hrc +++ b/sfx2/source/dialog/dialog.hrc @@ -39,54 +39,24 @@ #define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0) #define STR_RESET ( RC_DIALOG_BEGIN + 0) -#define STR_BASEFMT ( RC_DIALOG_BEGIN + 1) -#define CB_USE_PASSWD ( RC_DIALOG_BEGIN + 2) -#define CB_READ_ONLY ( RC_DIALOG_BEGIN + 3) -#define BTN_MANAGER ( RC_DIALOG_BEGIN + 4) -#define BTN_STANDARD ( RC_DIALOG_BEGIN + 5) #define DLG_PASSWD ( RC_DIALOG_BEGIN + 8) -#define STR_FILEDLG_INSERT ( RC_DIALOG_BEGIN + 10) #define STR_TABPAGE_MANAGESTYLES ( RC_DIALOG_BEGIN + 12) #define MSG_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13) #define MSG_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14) #define DLG_NEW_STYLE_BY_EXAMPLE ( RC_DIALOG_BEGIN + 15) #define MSG_POOL_STYLE_NAME ( RC_DIALOG_BEGIN + 16) -#define MSG_OVERWRITE_STYLE ( RC_DIALOG_BEGIN + 17) #define MSG_TABPAGE_INVALIDPARENT ( RC_DIALOG_BEGIN + 18) #define STR_DELETE_STYLE ( RC_DIALOG_BEGIN + 18) #define STR_DELETE_STYLE_USED ( RC_DIALOG_BEGIN + 20) -#define LOGO_IMAGELIST ( RC_DIALOG_BEGIN + 45) #define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46) -#define MSG_LAYOUT_NOT_LOADING ( RC_DIALOG_BEGIN + 49) -#define ACC_LAYOUT_NOT_LOADING ( RC_DIALOG_BEGIN + 50) - -#define MSG_ERR_CANT_EDIT_OLD_FORMAT ( RC_DIALOG_BEGIN + 60 ) -#define MSG_ERR_CANT_EDIT_OPEN_DOCS ( RC_DIALOG_BEGIN + 61 ) - -#define RID_URLOPEN ( RC_DIALOG_BEGIN + 62 ) -#define RID_URLOPEN_OK 1 -#define RID_URLOPEN_CANCEL 2 -#define RID_URLOPEN_URL 3 - -#define CB_FILE ( RC_DIALOG_BEGIN + 63 ) -#define CB_URL ( RC_DIALOG_BEGIN + 64 ) - -#define STR_INTERNET ( RC_DIALOG_BEGIN + 65 ) -#define RID_AUTOHIDE ( RC_DIALOG_BEGIN + 66 ) - -#define DLG_ONLINE_REGISTER ( RC_DIALOG_BEGIN + 68 ) #define DLG_VERSIONS ( RC_DIALOG_BEGIN + 69 ) #define DLG_COMMENTS ( RC_DIALOG_BEGIN + 70 ) -#define RID_REGISTER_DLG ( RC_DIALOG_BEGIN + 73 ) -#define DLG_PHONE_CONFIGURATION ( RC_DIALOG_BEGIN + 74 ) -#define DLG_RECOGNIZER_ENGINEMODE ( RC_DIALOG_BEGIN + 75 ) #define MSG_ERROR_WRONG_CONFIRM ( RC_DIALOG_BEGIN + 76 ) -#define DLG_RECOGNIZER_SPEAKER ( RC_DIALOG_BEGIN + 77 ) #define STR_APPLY ( RC_DIALOG_BEGIN + 87 ) @@ -104,7 +74,6 @@ #define RID_DLG_SEARCH ( RC_DIALOG_BEGIN + 109 ) #define STR_PDF_EXPORT_SEND ( RC_DIALOG_BEGIN + 120 ) -#define STR_RECHECK_DOCUMENT ( RC_DIALOG_BEGIN + 121 ) #define IMG_INFO ( RC_DIALOG_BEGIN + 122 ) #define RID_EDIT_DURATIONS ( RC_DIALOG_BEGIN + 123 ) #define SFX_PB_EDIT ( RC_DIALOG_BEGIN + 124 ) diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src index a54d2c340d04..c39425510ae2 100644 --- a/sfx2/source/dialog/dialog.src +++ b/sfx2/source/dialog/dialog.src @@ -31,30 +31,6 @@ #include "helpid.hrc" #include "sfxlocal.hrc" - // Imageliste fuer die AboutBox -ImageList LOGO_IMAGELIST -{ - Prefix = "an"; - MaskColor = Color - { - Red = 0xFFFF ; - Green = 0x0000 ; - Blue = 0xFFFF ; - }; - IdList = - { - 1 ; - 2 ; - 3 ; - 4 ; - 5 ; - 6 ; - }; - IdCount = - { - 6 ; - }; -}; String STR_RESET { Text [ en-US ] = "~Reset" ; @@ -63,48 +39,6 @@ String STR_APPLY { Text [ en-US ] = "Apply"; }; -String STR_INTERNET -{ - Text [ en-US ] = "(Internet)" ; -}; -String STR_BASEFMT -{ - Text [ en-US ] = "Base format" ; -}; -CheckBox CB_USE_PASSWD -{ - HelpId = HID_FILEDLG_USE_PASSWD ; - Text [ en-US ] = "~Password" ; -}; -CheckBox CB_READ_ONLY -{ - HelpId = HID_FILEDLG_READ_ONLY ; - Text [ en-US ] = "~Read-only" ; -}; -PushButton CB_FILE -{ - HelpId = HID_FILEDLG_FILE ; - Text [ en-US ] = "~File System" ; -}; -PushButton CB_URL -{ - HelpId = HID_FILEDLG_URL ; - Text [ en-US ] = "Int~ernet" ; -}; -PushButton BTN_MANAGER -{ - HelpId = HID_FILEDLG_MANAGER ; - Text [ en-US ] = "~Manager..." ; -}; -PushButton BTN_STANDARD -{ - HelpId = HID_FILEDLG_STANDARD ; - Text [ en-US ] = "~Home" ; -}; -String STR_FILEDLG_INSERT -{ - Text [ en-US ] = "Insert File" ; -}; String STR_TABPAGE_MANAGESTYLES { Text [ en-US ] = "Organizer" ; @@ -131,12 +65,6 @@ InfoBox MSG_POOL_STYLE_NAME { Message [ en-US ] = "Name already exists as a default Style.\nPlease choose another name." ; }; -QueryBox MSG_OVERWRITE_STYLE -{ - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Style already exists. Overwrite?" ; -}; String STR_DELETE_STYLE { Text [ en-US ] = "Do you really want to delete Style $1?" ; @@ -170,87 +98,15 @@ Menu MN_CONTEXT_TEMPLDLG }; }; -InfoBox MSG_LAYOUT_NOT_LOADING -{ - BUTTONS = WB_OK ; - DEFBUTTON = WB_DEF_OK ; - Message [ en-US ] = "Loading document without layout." ; -}; -Accelerator ACC_LAYOUT_NOT_LOADING -{ - ItemList = - { - AcceleratorItem - { - Key = KeyCode - { - Code = KEY_L ; - Shift = FALSE ; Modifier1 = TRUE ; Modifier2 = TRUE ; - }; - Identifier = 1 ; - }; - }; -}; //------------------------------------------------------------------------ -ErrorBox MSG_ERR_CANT_EDIT_OLD_FORMAT -{ - Message [ en-US ] = "Cannot edit document info for documents\n in this file format." ; -}; - //------------------------------------------------------------------------ -ErrorBox MSG_ERR_CANT_EDIT_OPEN_DOCS -{ - Message [ en-US ] = "Document info of documents\n being currently edited cannot be modified from within the document manager." ; -}; -ModalDialog RID_URLOPEN -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 204 , 44 ) ; - Moveable = TRUE ; - Text [ en-US ] = "Enter URL" ; - Moveable = TRUE ; - OKButton RID_URLOPEN_OK - { - Pos = MAP_APPFONT ( 148 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton RID_URLOPEN_CANCEL - { - Pos = MAP_APPFONT ( 148 , 24 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - Edit RID_URLOPEN_URL - { - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 16 ) ; - Size = MAP_APPFONT ( 138 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - }; -}; -Menu RID_AUTOHIDE -{ - ItemList = - { - MenuItem - { - Identifier = SID_AUTOHIDE ; - HelpID = SID_AUTOHIDE ; - Text [ en-US ] = "Hide" ; - }; - }; -}; -String RID_AUTOHIDE -{ - Text [ en-US ] = "Don't Hide" ; -}; String SID_NAVIGATOR { Text [ en-US ] = "Navigator"; }; +String SID_TASKPANE +{ + Text [ en-US ] = "Task Pane"; +}; ErrorBox MSG_ERROR_WRONG_CONFIRM { @@ -264,11 +120,6 @@ String STR_PDF_EXPORT_SEND Text [ en-US ] = "Send" ; }; -String STR_RECHECK_DOCUMENT -{ - Text [ en-US ] = "Recheck Document" ; -}; - Image IMG_INFO { ImageBitmap = Bitmap diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk index 87ef0f1a7af1..3d0c53cdb932 100644 --- a/sfx2/source/dialog/makefile.mk +++ b/sfx2/source/dialog/makefile.mk @@ -45,7 +45,8 @@ EXCEPTIONSFILES=\ $(SLO)$/recfloat.obj \ $(SLO)$/templdlg.obj \ $(SLO)$/dinfdlg.obj \ - $(SLO)$/dockwin.obj + $(SLO)$/dockwin.obj \ + $(SLO)$/taskpane.obj SLOFILES =\ $(EXCEPTIONSFILES) \ @@ -60,7 +61,6 @@ SLOFILES =\ $(SLO)$/passwd.obj \ $(SLO)$/printopt.obj \ $(SLO)$/sfxdlg.obj \ - $(SLO)$/sfxurl.obj \ $(SLO)$/splitwin.obj \ $(SLO)$/srchdlg.obj \ $(SLO)$/styfitem.obj \ @@ -68,7 +68,8 @@ SLOFILES =\ $(SLO)$/tabdlg.obj \ $(SLO)$/tplcitem.obj \ $(SLO)$/tplpitem.obj \ - $(SLO)$/versdlg.obj + $(SLO)$/versdlg.obj \ + $(SLO)$/titledockwin.obj SRS1NAME=$(TARGET) SRC1FILES =\ @@ -85,7 +86,9 @@ SRC1FILES =\ templdlg.src \ versdlg.src \ printopt.src \ - srchdlg.src + srchdlg.src \ + titledockwin.src \ + taskpane.src .IF "$(BUILD_VER_STRING)"!="" .IF "$(GUI)"=="UNX" @@ -102,9 +105,9 @@ CFLAGS+=-DBUILD_VER_STRING="$(subst,",\" "$(BUILD_VER_STRING)")" $(INCCOM)$/cuilib.hxx: makefile.mk .IF "$(GUI)"=="UNX" $(RM) $@ - echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ + @echo \#define DLL_NAME \"libcui$(DLLPOSTFIX)$(DLLPOST)\" >$@ .ELSE - echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ + @echo $(EMQ)#define DLL_NAME $(EMQ)"cui$(DLLPOSTFIX)$(DLLPOST)$(EMQ)" >$@ .ENDIF $(SLO)$/sfxdlg.obj : $(INCCOM)$/cuilib.hxx diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx new file mode 100644 index 000000000000..f25485a1401c --- /dev/null +++ b/sfx2/source/dialog/taskpane.cxx @@ -0,0 +1,1283 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_sfx2.hxx" + +#include "sfx2/taskpane.hxx" +#include "imagemgr.hxx" +#include "sfx2/sfxsids.hrc" +#include "sfx2/bindings.hxx" +#include "sfx2/dispatch.hxx" +#include "sfxresid.hxx" +#include "sfxlocal.hrc" +#include "helpid.hrc" + +/** === begin UNO includes === **/ +#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/ui/XToolPanel.hpp> +#include <com/sun/star/ui/XUIElementFactory.hpp> +#include <com/sun/star/awt/XWindowPeer.hpp> +#include <com/sun/star/awt/PosSize.hpp> +#include <com/sun/star/frame/XModuleManager.hpp> +#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/accessibility/XAccessible.hpp> +#include <com/sun/star/awt/XControl.hpp> +/** === end UNO includes === **/ + +#include <comphelper/componentcontext.hxx> +#include <comphelper/namedvaluecollection.hxx> +#include <comphelper/types.hxx> +#include <comphelper/processfactory.hxx> +#include <tools/diagnose_ex.h> +#include <svtools/toolpanel/toolpaneldeck.hxx> +#include <svtools/toolpanel/tablayouter.hxx> +#include <svtools/toolpanel/drawerlayouter.hxx> +#include <unotools/confignode.hxx> +#include <vcl/menu.hxx> +#include <vcl/svapp.hxx> +#include <toolkit/helper/vclunohelper.hxx> + +#include <boost/noncopyable.hpp> + +//...................................................................................................................... +namespace sfx2 +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::frame::XModuleManager; + using ::com::sun::star::container::XNameAccess; + using ::com::sun::star::ui::XToolPanel; + using ::com::sun::star::ui::XUIElementFactory; + using ::com::sun::star::ui::XUIElement; + using ::com::sun::star::awt::XWindow; + using ::com::sun::star::frame::XModuleManager; + using ::com::sun::star::frame::XFrame; + using ::com::sun::star::lang::XComponent; + using ::com::sun::star::graphic::XGraphicProvider; + using ::com::sun::star::graphic::XGraphic; + using ::com::sun::star::accessibility::XAccessible; + using ::com::sun::star::awt::XControl; + /** === end UNO using === **/ + namespace PosSize = ::com::sun::star::awt::PosSize; + + //================================================================================================================== + //= helpers + //================================================================================================================== + namespace + { + //-------------------------------------------------------------------------------------------------------------- + ::utl::OConfigurationTreeRoot lcl_getModuleUIElementStatesConfig( const ::rtl::OUString& i_rModuleIdentifier, + const ::rtl::OUString& i_rResourceURL = ::rtl::OUString() ) + { + const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); + ::rtl::OUStringBuffer aPathComposer; + try + { + const Reference< XNameAccess > xModuleAccess( aContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW ); + const ::comphelper::NamedValueCollection aModuleProps( xModuleAccess->getByName( i_rModuleIdentifier ) ); + + const ::rtl::OUString sWindowStateRef( aModuleProps.getOrDefault( "ooSetupFactoryWindowStateConfigRef", ::rtl::OUString() ) ); + + aPathComposer.appendAscii( "org.openoffice.Office.UI." ); + aPathComposer.append( sWindowStateRef ); + aPathComposer.appendAscii( "/UIElements/States" ); + if ( i_rResourceURL.getLength() ) + { + aPathComposer.appendAscii( "/" ); + aPathComposer.append( i_rResourceURL ); + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return ::utl::OConfigurationTreeRoot( aContext, aPathComposer.makeStringAndClear(), false ); + } + + //-------------------------------------------------------------------------------------------------------------- + ::rtl::OUString lcl_identifyModule( const Reference< XFrame >& i_rDocumentFrame ) + { + ::rtl::OUString sModuleName; + try + { + const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); + const Reference< XModuleManager > xModuleManager( aContext.createComponent( "com.sun.star.frame.ModuleManager" ), UNO_QUERY_THROW ); + sModuleName = xModuleManager->identify( i_rDocumentFrame ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return sModuleName; + } + + //-------------------------------------------------------------------------------------------------------------- + Reference< XFrame > lcl_getFrame( const SfxBindings* i_pBindings ) + { + const SfxViewFrame* pViewFrame = i_pBindings->GetDispatcher()->GetFrame(); + const SfxFrame& rFrame = pViewFrame->GetFrame(); + const Reference< XFrame > xFrame( rFrame.GetFrameInterface() ); + return xFrame; + } + + //-------------------------------------------------------------------------------------------------------------- + ::rtl::OUString lcl_getPanelHelpURL( const ::utl::OConfigurationNode& i_rPanelConfigNode ) + { + const ::rtl::OUString sHelpURL( ::comphelper::getString( i_rPanelConfigNode.getNodeValue( "HelpURL" ) ) ); + return sHelpURL; + } + + //-------------------------------------------------------------------------------------------------------------- + Image lcl_getPanelImage( const Reference< XFrame >& i_rDocFrame, const ::utl::OConfigurationNode& i_rPanelConfigNode ) + { + const ::rtl::OUString sImageURL( ::comphelper::getString( i_rPanelConfigNode.getNodeValue( "ImageURL" ) ) ); + if ( sImageURL.getLength() ) + { + try + { + ::comphelper::NamedValueCollection aMediaProperties; + aMediaProperties.put( "URL", sImageURL ); + + // special handling: if the ImageURL denotes a CommandName, then retrieve the image for that command + const sal_Char* pCommandImagePrefix = "private:commandimage/"; + const sal_Int32 nCommandImagePrefixLen = strlen( pCommandImagePrefix ); + if ( sImageURL.compareToAscii( pCommandImagePrefix, nCommandImagePrefixLen ) == 0 ) + { + ::rtl::OUStringBuffer aCommandName; + aCommandName.appendAscii( ".uno:" ); + aCommandName.append( sImageURL.copy( nCommandImagePrefixLen ) ); + const ::rtl::OUString sCommandName( aCommandName.makeStringAndClear() ); + + const BOOL bHiContrast( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); + const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, FALSE, bHiContrast ) ); + return aPanelImage.GetXGraphic(); + } + + // otherwise, delegate to the GraphicProvider + const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); + const Reference< XGraphicProvider > xGraphicProvider( aContext.createComponent( "com.sun.star.graphic.GraphicProvider" ), UNO_QUERY_THROW ); + + const Reference< XGraphic > xGraphic( xGraphicProvider->queryGraphic( aMediaProperties.getPropertyValues() ), UNO_SET_THROW ); + return Image( xGraphic ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + return Image(); + } + } + + //================================================================================================================== + //= TaskPaneDockingWindow + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + TaskPaneDockingWindow::TaskPaneDockingWindow( SfxBindings* i_pBindings, TaskPaneWrapper& i_rWrapper, Window* i_pParent, WinBits i_nBits ) + :TitledDockingWindow( i_pBindings, &i_rWrapper, i_pParent, i_nBits ) + ,m_aTaskPane( GetContentWindow(), lcl_getFrame( i_pBindings ) ) + ,m_aPaneController( m_aTaskPane, *this ) + { + m_aTaskPane.Show(); + SetText( String( SfxResId( SID_TASKPANE ) ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + void TaskPaneDockingWindow::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ) + { + m_aPaneController.ActivateToolPanel( i_rPanelURL ); + } + + //------------------------------------------------------------------------------------------------------------------ + void TaskPaneDockingWindow::GetFocus() + { + TitledDockingWindow::GetFocus(); + m_aTaskPane.GrabFocus(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TaskPaneDockingWindow::onLayoutDone() + { + m_aTaskPane.SetPosSizePixel( Point(), GetContentWindow().GetOutputSizePixel() ); + } + + //================================================================================================================== + //= TaskPaneWrapper + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + SFX_IMPL_DOCKINGWINDOW( TaskPaneWrapper, SID_TASKPANE ); + + //------------------------------------------------------------------------------------------------------------------ + TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, USHORT i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo ) + :SfxChildWindow( i_pParent, i_nId ) + { + pWindow = new TaskPaneDockingWindow( i_pBindings, *this, i_pParent, + WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE); + eChildAlignment = SFX_ALIGN_RIGHT; + + pWindow->SetHelpId( HID_TASKPANE_WINDOW ); + pWindow->SetOutputSizePixel( Size( 300, 450 ) ); + pWindow->Show(); + + dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo ); + SetHideNotDelete( TRUE ); + } + + //------------------------------------------------------------------------------------------------------------------ + void TaskPaneWrapper::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ) + { + TaskPaneDockingWindow* pDockingWindow = dynamic_cast< TaskPaneDockingWindow* >( GetWindow() ); + ENSURE_OR_RETURN_VOID( pDockingWindow, "TaskPaneWrapper::ActivateToolPanel: invalid docking window implementation!" ); + pDockingWindow->ActivateToolPanel( i_rPanelURL ); + } + + //================================================================================================================== + //= CustomPanelUIElement + //================================================================================================================== + class CustomPanelUIElement + { + public: + CustomPanelUIElement() + :m_xUIElement() + ,m_xToolPanel() + ,m_xPanelWindow() + { + } + + CustomPanelUIElement( const Reference< XUIElement >& i_rUIElement ) + :m_xUIElement( i_rUIElement, UNO_SET_THROW ) + ,m_xToolPanel( i_rUIElement->getRealInterface(), UNO_QUERY_THROW ) + ,m_xPanelWindow( m_xToolPanel->getWindow(), UNO_SET_THROW ) + { + } + + bool is() const { return m_xPanelWindow.is(); } + + const Reference< XUIElement >& getUIElement() const { return m_xUIElement; } + const Reference< XToolPanel >& getToolPanel() const { return m_xToolPanel; } + const Reference< XWindow >& getPanelWindow() const { return m_xPanelWindow; } + + private: + Reference< XUIElement > m_xUIElement; + Reference< XToolPanel > m_xToolPanel; + Reference< XWindow > m_xPanelWindow; + }; + + //================================================================================================================== + //= CustomToolPanel + //================================================================================================================== + class CustomToolPanel : public ::svt::ToolPanelBase + { + public: + CustomToolPanel( const ::utl::OConfigurationNode& i_rPanelWindowState, const Reference< XFrame >& i_rFrame ); + + virtual ::rtl::OUString GetDisplayName() const; + virtual Image GetImage() const; + virtual SmartId GetHelpID() const; + virtual void Activate( Window& i_rParentWindow ); + virtual void Deactivate(); + virtual void SetSizePixel( const Size& i_rPanelWindowSize ); + virtual void GrabFocus(); + virtual void Dispose(); + virtual Reference< XAccessible > + CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible ); + + const ::rtl::OUString& + GetResourceURL() const { return m_sResourceURL; } + + protected: + ~CustomToolPanel(); + + private: + bool impl_ensureToolPanelWindow( Window& i_rPanelParentWindow ); + void impl_updatePanelConfig( const bool i_bVisible ) const; + + private: + const ::rtl::OUString m_sUIName; + const Image m_aPanelImage; + const ::rtl::OUString m_aPanelHelpURL; + const ::rtl::OUString m_sResourceURL; + const ::rtl::OUString m_sPanelConfigPath; + Reference< XFrame > m_xFrame; + CustomPanelUIElement m_aCustomPanel; + bool m_bAttemptedCreation; + }; + + //------------------------------------------------------------------------------------------------------------------ + CustomToolPanel::CustomToolPanel( const ::utl::OConfigurationNode& i_rPanelWindowState, const Reference< XFrame >& i_rFrame ) + :m_sUIName( ::comphelper::getString( i_rPanelWindowState.getNodeValue( "UIName" ) ) ) + ,m_aPanelImage( lcl_getPanelImage( i_rFrame, i_rPanelWindowState ) ) + ,m_aPanelHelpURL( lcl_getPanelHelpURL( i_rPanelWindowState ) ) + ,m_sResourceURL( i_rPanelWindowState.getLocalName() ) + ,m_sPanelConfigPath( i_rPanelWindowState.getNodePath() ) + ,m_xFrame( i_rFrame ) + ,m_aCustomPanel() + ,m_bAttemptedCreation( false ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + CustomToolPanel::~CustomToolPanel() + { + } + + //------------------------------------------------------------------------------------------------------------------ + bool CustomToolPanel::impl_ensureToolPanelWindow( Window& i_rPanelParentWindow ) + { + if ( m_bAttemptedCreation ) + return m_aCustomPanel.is(); + + m_bAttemptedCreation = true; + try + { + const ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); + const Reference< XUIElementFactory > xFactory( aContext.createComponent( "com.sun.star.ui.UIElementFactoryManager" ), UNO_QUERY_THROW ); + + ::comphelper::NamedValueCollection aCreationArgs; + aCreationArgs.put( "Frame", makeAny( m_xFrame ) ); + aCreationArgs.put( "ParentWindow", makeAny( i_rPanelParentWindow.GetComponentInterface() ) ); + + const Reference< XUIElement > xElement( + xFactory->createUIElement( m_sResourceURL, aCreationArgs.getPropertyValues() ), + UNO_SET_THROW ); + + m_aCustomPanel = CustomPanelUIElement( xElement ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return m_aCustomPanel.is(); + } + + //------------------------------------------------------------------------------------------------------------------ + void CustomToolPanel::impl_updatePanelConfig( const bool i_bVisible ) const + { + ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() ); + ::utl::OConfigurationTreeRoot aConfig( aContext, m_sPanelConfigPath, true ); + + aConfig.setNodeValue( "Visible", makeAny( i_bVisible ) ); + aConfig.commit(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString CustomToolPanel::GetDisplayName() const + { + return m_sUIName; + } + + //------------------------------------------------------------------------------------------------------------------ + Image CustomToolPanel::GetImage() const + { + return m_aPanelImage; + } + + //------------------------------------------------------------------------------------------------------------------ + SmartId CustomToolPanel::GetHelpID() const + { + return SmartId( m_aPanelHelpURL ); + } + + //------------------------------------------------------------------------------------------------------------------ + void CustomToolPanel::Activate( Window& i_rParentWindow ) + { + ENSURE_OR_RETURN_VOID( impl_ensureToolPanelWindow( i_rParentWindow ), "no panel to activate!" ); + + // TODO: we might need a mechanism to decide whether the panel should be destroyed/re-created, or (as it is + // done now) hidden/shown + m_aCustomPanel.getPanelWindow()->setVisible( sal_True ); + + // update the panel's configuration + impl_updatePanelConfig( true ); + } + + //------------------------------------------------------------------------------------------------------------------ + void CustomToolPanel::Deactivate() + { + ENSURE_OR_RETURN_VOID( m_aCustomPanel.is(), "no panel to deactivate!" ); + + m_aCustomPanel.getPanelWindow()->setVisible( sal_False ); + + // update the panel's configuration + impl_updatePanelConfig( false ); + } + + //------------------------------------------------------------------------------------------------------------------ + void CustomToolPanel::SetSizePixel( const Size& i_rPanelWindowSize ) + { + ENSURE_OR_RETURN_VOID( m_aCustomPanel.is(), "no panel/window to position!" ); + + try + { + m_aCustomPanel.getPanelWindow()->setPosSize( 0, 0, i_rPanelWindowSize.Width(), i_rPanelWindowSize.Height(), + PosSize::POSSIZE ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + void CustomToolPanel::GrabFocus() + { + ENSURE_OR_RETURN_VOID( m_aCustomPanel.is(), "no panel/window to focus!" ); + + m_aCustomPanel.getPanelWindow()->setFocus(); + } + + //------------------------------------------------------------------------------------------------------------------ + void CustomToolPanel::Dispose() + { + if ( !m_bAttemptedCreation ) + // nothing to dispose + return; + + ENSURE_OR_RETURN_VOID( m_aCustomPanel.is(), "no panel to destroy!" ); + try + { + Reference< XComponent > xUIElementComponent( m_aCustomPanel.getUIElement(), UNO_QUERY_THROW ); + xUIElementComponent->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XAccessible > CustomToolPanel::CreatePanelAccessible( const Reference< XAccessible >& i_rParentAccessible ) + { + ENSURE_OR_RETURN( m_aCustomPanel.is(), "no panel to ask!", NULL ); + + Reference< XAccessible > xPanelAccessible; + try + { + xPanelAccessible.set( m_aCustomPanel.getToolPanel()->createAccessible( i_rParentAccessible ), UNO_SET_THROW ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return xPanelAccessible; + } + + //================================================================================================================== + //= ModuleTaskPane_Impl + //================================================================================================================== + class ModuleTaskPane_Impl : public ::boost::noncopyable + { + public: + ModuleTaskPane_Impl( ModuleTaskPane& i_rAntiImpl, const Reference< XFrame >& i_rDocumentFrame, + const IToolPanelCompare* i_pPanelCompare ) + :m_rAntiImpl( i_rAntiImpl ) + ,m_sModuleIdentifier( lcl_identifyModule( i_rDocumentFrame ) ) + ,m_xFrame( i_rDocumentFrame ) + ,m_aPanelDeck( i_rAntiImpl ) + { + m_aPanelDeck.Show(); + OnResize(); + impl_initFromConfiguration( i_pPanelCompare ); + } + + ~ModuleTaskPane_Impl() + { + } + + void OnResize(); + void OnGetFocus(); + + static bool ModuleHasToolPanels( const ::rtl::OUString& i_rModuleIdentifier ); + + ::svt::ToolPanelDeck& GetPanelDeck() { return m_aPanelDeck; } + const ::svt::ToolPanelDeck& GetPanelDeck() const { return m_aPanelDeck; } + + ::boost::optional< size_t > + GetPanelPos( const ::rtl::OUString& i_rResourceURL ); + ::rtl::OUString + GetPanelResourceURL( const size_t i_nPanelPos ) const; + + void SetDrawersLayout(); + void SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent ); + + private: + void impl_initFromConfiguration( const IToolPanelCompare* i_pPanelCompare ); + + static bool + impl_isToolPanelResource( const ::rtl::OUString& i_rResourceURL ); + + DECL_LINK( OnActivatePanel, void* ); + + private: + ModuleTaskPane& m_rAntiImpl; + const ::rtl::OUString m_sModuleIdentifier; + const Reference< XFrame > m_xFrame; + ::svt::ToolPanelDeck m_aPanelDeck; + }; + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane_Impl::OnResize() + { + m_aPanelDeck.SetPosSizePixel( Point(), m_rAntiImpl.GetOutputSizePixel() ); + } + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane_Impl::OnGetFocus() + { + m_aPanelDeck.GrabFocus(); + } + + //------------------------------------------------------------------------------------------------------------------ + IMPL_LINK( ModuleTaskPane_Impl, OnActivatePanel, void*, i_pArg ) + { + m_aPanelDeck.ActivatePanel( reinterpret_cast< size_t >( i_pArg ) ); + return 1L; + } + + //------------------------------------------------------------------------------------------------------------------ + bool ModuleTaskPane_Impl::impl_isToolPanelResource( const ::rtl::OUString& i_rResourceURL ) + { + return i_rResourceURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/toolpanel/" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane_Impl::impl_initFromConfiguration( const IToolPanelCompare* i_pPanelCompare ) + { + const ::utl::OConfigurationTreeRoot aWindowStateConfig( lcl_getModuleUIElementStatesConfig( m_sModuleIdentifier ) ); + if ( !aWindowStateConfig.isValid() ) + return; + + ::rtl::OUString sFirstVisiblePanelResource; + + const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() ); + for ( const ::rtl::OUString* resource = aUIElements.getConstArray(); + resource != aUIElements.getConstArray() + aUIElements.getLength(); + ++resource + ) + { + if ( !impl_isToolPanelResource( *resource ) ) + continue; + + ::utl::OConfigurationNode aResourceNode( aWindowStateConfig.openNode( *resource ) ); + ::svt::PToolPanel pCustomPanel( new CustomToolPanel( aResourceNode, m_xFrame ) ); + + size_t nPanelPos = m_aPanelDeck.GetPanelCount(); + if ( i_pPanelCompare ) + { + // assuming that nobody will insert hundreths of panels, a simple O(n) search should suffice here ... + while ( nPanelPos > 0 ) + { + const short nCompare = i_pPanelCompare->compareToolPanelsURLs( + *resource, + GetPanelResourceURL( --nPanelPos ) + ); + if ( nCompare >= 0 ) + { + ++nPanelPos; + break; + } + } + } + nPanelPos = m_aPanelDeck.InsertPanel( pCustomPanel, nPanelPos ); + + if ( ::comphelper::getBOOL( aResourceNode.getNodeValue( "Visible" ) ) ) + sFirstVisiblePanelResource = *resource; + } + + if ( sFirstVisiblePanelResource.getLength() ) + { + ::boost::optional< size_t > aPanelPos( GetPanelPos( sFirstVisiblePanelResource ) ); + OSL_ENSURE( !!aPanelPos, "ModuleTaskPane_Impl::impl_isToolPanelResource: just inserted it, and it's not there?!" ); + if ( !!aPanelPos ) + m_rAntiImpl.PostUserEvent( LINK( this, ModuleTaskPane_Impl, OnActivatePanel ), reinterpret_cast< void* >( *aPanelPos ) ); + } + } + + //------------------------------------------------------------------------------------------------------------------ + bool ModuleTaskPane_Impl::ModuleHasToolPanels( const ::rtl::OUString& i_rModuleIdentifier ) + { + const ::utl::OConfigurationTreeRoot aWindowStateConfig( lcl_getModuleUIElementStatesConfig( i_rModuleIdentifier ) ); + if ( !aWindowStateConfig.isValid() ) + return false; + + const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() ); + for ( const ::rtl::OUString* resource = aUIElements.getConstArray(); + resource != aUIElements.getConstArray() + aUIElements.getLength(); + ++resource + ) + { + if ( impl_isToolPanelResource( *resource ) ) + return true; + } + return false; + } + + //------------------------------------------------------------------------------------------------------------------ + ::boost::optional< size_t > ModuleTaskPane_Impl::GetPanelPos( const ::rtl::OUString& i_rResourceURL ) + { + ::boost::optional< size_t > aPanelPos; + for ( size_t i = 0; i < m_aPanelDeck.GetPanelCount(); ++i ) + { + const ::svt::PToolPanel pPanel( m_aPanelDeck.GetPanel( i ) ); + const CustomToolPanel* pCustomPanel = dynamic_cast< const CustomToolPanel* >( pPanel.get() ); + ENSURE_OR_CONTINUE( pCustomPanel != NULL, "ModuleTaskPane_Impl::GetPanelPos: illegal panel implementation!" ); + if ( pCustomPanel->GetResourceURL() == i_rResourceURL ) + { + aPanelPos = i; + break; + } + } + return aPanelPos; + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString ModuleTaskPane_Impl::GetPanelResourceURL( const size_t i_nPanelPos ) const + { + ENSURE_OR_RETURN( i_nPanelPos < m_aPanelDeck.GetPanelCount(), "ModuleTaskPane_Impl::GetPanelResourceURL: illegal panel position!", ::rtl::OUString() ); + const ::svt::PToolPanel pPanel( m_aPanelDeck.GetPanel( i_nPanelPos ) ); + const CustomToolPanel* pCustomPanel = dynamic_cast< const CustomToolPanel* >( pPanel.get() ); + ENSURE_OR_RETURN( pCustomPanel != NULL, "ModuleTaskPane_Impl::GetPanelPos: illegal panel implementation!", ::rtl::OUString() ); + return pCustomPanel->GetResourceURL(); + } + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane_Impl::SetDrawersLayout() + { + const ::svt::PDeckLayouter pLayouter( m_aPanelDeck.GetLayouter() ); + const ::svt::DrawerDeckLayouter* pDrawerLayouter = dynamic_cast< const ::svt::DrawerDeckLayouter* >( pLayouter.get() ); + if ( pDrawerLayouter != NULL ) + // already have the proper layout + return; + m_aPanelDeck.SetLayouter( new ::svt::DrawerDeckLayouter( m_aPanelDeck, m_aPanelDeck ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane_Impl::SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent ) + { + ::svt::PDeckLayouter pLayouter( m_aPanelDeck.GetLayouter() ); + ::svt::TabDeckLayouter* pTabLayouter = dynamic_cast< ::svt::TabDeckLayouter* >( pLayouter.get() ); + if ( ( pTabLayouter != NULL ) + && ( pTabLayouter->GetTabAlignment() == i_eTabAlignment ) + && ( pTabLayouter->GetTabItemContent() == i_eTabContent ) + ) + // already have the requested layout + return; + + if ( pTabLayouter && ( pTabLayouter->GetTabAlignment() == i_eTabAlignment ) ) + { + // changing only the item content does not require a new layouter instance + pTabLayouter->SetTabItemContent( i_eTabContent ); + return; + } + + m_aPanelDeck.SetLayouter( new ::svt::TabDeckLayouter( m_aPanelDeck, m_aPanelDeck, i_eTabAlignment, i_eTabContent ) ); + } + + //================================================================================================================== + //= ModuleTaskPane + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + ModuleTaskPane::ModuleTaskPane( Window& i_rParentWindow, const Reference< XFrame >& i_rDocumentFrame ) + :Window( &i_rParentWindow, WB_DIALOGCONTROL ) + ,m_pImpl( new ModuleTaskPane_Impl( *this, i_rDocumentFrame, NULL ) ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + ModuleTaskPane::ModuleTaskPane( Window& i_rParentWindow, const Reference< XFrame >& i_rDocumentFrame, + const IToolPanelCompare& i_rCompare ) + :Window( &i_rParentWindow, WB_DIALOGCONTROL ) + ,m_pImpl( new ModuleTaskPane_Impl( *this, i_rDocumentFrame, &i_rCompare ) ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + ModuleTaskPane::~ModuleTaskPane() + { + } + + //------------------------------------------------------------------------------------------------------------------ + bool ModuleTaskPane::ModuleHasToolPanels( const ::rtl::OUString& i_rModuleIdentifier ) + { + return ModuleTaskPane_Impl::ModuleHasToolPanels( i_rModuleIdentifier ); + } + + //------------------------------------------------------------------------------------------------------------------ + bool ModuleTaskPane::ModuleHasToolPanels( const Reference< XFrame >& i_rDocumentFrame ) + { + return ModuleTaskPane_Impl::ModuleHasToolPanels( lcl_identifyModule( i_rDocumentFrame ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane::Resize() + { + Window::Resize(); + m_pImpl->OnResize(); + } + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane::GetFocus() + { + Window::GetFocus(); + m_pImpl->OnGetFocus(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::svt::ToolPanelDeck& ModuleTaskPane::GetPanelDeck() + { + return m_pImpl->GetPanelDeck(); + } + + //------------------------------------------------------------------------------------------------------------------ + const ::svt::ToolPanelDeck& ModuleTaskPane::GetPanelDeck() const + { + return m_pImpl->GetPanelDeck(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::boost::optional< size_t > ModuleTaskPane::GetPanelPos( const ::rtl::OUString& i_rResourceURL ) + { + return m_pImpl->GetPanelPos( i_rResourceURL ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString ModuleTaskPane::GetPanelResourceURL( const size_t i_nPanelPos ) const + { + return m_pImpl->GetPanelResourceURL( i_nPanelPos ); + } + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane::SetDrawersLayout() + { + m_pImpl->SetDrawersLayout(); + } + + //------------------------------------------------------------------------------------------------------------------ + void ModuleTaskPane::SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent ) + { + m_pImpl->SetTabsLayout( i_eTabAlignment, i_eTabContent ); + } + + // ===================================================================================================================== + // = PanelSelectorLayout + // ===================================================================================================================== + enum PanelSelectorLayout + { + LAYOUT_DRAWERS, + LAYOUT_TABS_RIGHT, + LAYOUT_TABS_LEFT, + LAYOUT_TABS_TOP, + LAYOUT_TABS_BOTTOM + }; + + //================================================================================================================== + //= helper + //================================================================================================================== + namespace + { + PanelSelectorLayout lcl_getTabLayoutFromAlignment( const SfxChildAlignment i_eAlignment ) + { + switch ( i_eAlignment ) + { + case SFX_ALIGN_LEFT: + return LAYOUT_TABS_LEFT; + case SFX_ALIGN_TOP: + return LAYOUT_TABS_TOP; + case SFX_ALIGN_BOTTOM: + return LAYOUT_TABS_BOTTOM; + default: + return LAYOUT_TABS_RIGHT; + } + } + } + + // ===================================================================================================================== + // = PanelDescriptor + // ===================================================================================================================== + /** is a helper class for TaskPaneController_Impl, holding the details about a single panel which is not + contained in the IToolPanel implementation itself. + */ + struct PanelDescriptor + { + ::svt::PToolPanel pPanel; + bool bHidden; + + PanelDescriptor() + :pPanel() + ,bHidden( false ) + { + } + + PanelDescriptor( const ::svt::PToolPanel& i_rPanel ) + :pPanel( i_rPanel ) + ,bHidden( false ) + { + } + }; + + //================================================================================================================== + //= TaskPaneController_Impl + //================================================================================================================== + class TaskPaneController_Impl :public ::boost::noncopyable + ,public ::svt::IToolPanelDeckListener + { + public: + TaskPaneController_Impl( + ModuleTaskPane& i_rTaskPane, + TitledDockingWindow& i_rDockingWindow + ); + ~TaskPaneController_Impl(); + + void SetDefaultTitle( const String& i_rTitle ); + void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ); + + protected: + // IToolPanelDeckListener overridables + virtual void PanelInserted( const ::svt::PToolPanel& i_pPanel, const size_t i_nPosition ); + virtual void PanelRemoved( const size_t i_nPosition ); + virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive ); + virtual void LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter ); + virtual void Dying(); + + private: + DECL_LINK( OnToolboxClicked, ToolBox* ); + DECL_LINK( OnMenuItemSelected, Menu* ); + DECL_LINK( DockingChanged, TitledDockingWindow* ); + ::std::auto_ptr< PopupMenu > impl_createPopupMenu() const; + + /// sets the given layout for the panel selector + void impl_setLayout( const PanelSelectorLayout i_eLayout, const bool i_bForce = false ); + + /// returns the current layout of the panel selector + PanelSelectorLayout + impl_getLayout() const { return m_eCurrentLayout; } + + void impl_updateDockingWindowTitle(); + void impl_togglePanelVisibility( const size_t i_nLogicalPanelIndex ); + size_t impl_getLogicalPanelIndex( const size_t i_nVisibleIndex ); + + private: + enum MenuId + { + MID_UNLOCK_TASK_PANEL = 1, + MID_LOCK_TASK_PANEL = 2, + MID_LAYOUT_TABS = 3, + MID_LAYOUT_DRAWERS = 4, + MID_FIRST_PANEL = 5 + }; + + private: + typedef ::std::vector< PanelDescriptor > PanelDescriptors; + + ModuleTaskPane& m_rTaskPane; + TitledDockingWindow& m_rDockingWindow; + USHORT m_nViewMenuID; + PanelSelectorLayout m_eCurrentLayout; + PanelDescriptors m_aPanelRepository; + bool m_bTogglingPanelVisibility; + ::rtl::OUString m_sDefaultTitle; + }; + + //------------------------------------------------------------------------------------------------------------------ + TaskPaneController_Impl::TaskPaneController_Impl( ModuleTaskPane& i_rTaskPane, TitledDockingWindow& i_rDockingWindow ) + :m_rTaskPane( i_rTaskPane ) + ,m_rDockingWindow( i_rDockingWindow ) + ,m_nViewMenuID( 0 ) + ,m_eCurrentLayout( LAYOUT_DRAWERS ) + ,m_aPanelRepository() + ,m_bTogglingPanelVisibility( false ) + ,m_sDefaultTitle() + { + m_rDockingWindow.ResetToolBox(); + m_nViewMenuID = m_rDockingWindow.AddDropDownToolBoxItem( + String( SfxResId( STR_SFX_TASK_PANE_VIEW ) ), + HID_TASKPANE_VIEW_MENU, + LINK( this, TaskPaneController_Impl, OnToolboxClicked ) + ); + m_rDockingWindow.SetEndDockingHdl( LINK( this, TaskPaneController_Impl, DockingChanged ) ); + impl_setLayout( LAYOUT_DRAWERS, true ); + + m_rTaskPane.GetPanelDeck().AddListener( *this ); + + // initialize the panel repository + for ( size_t i = 0; i < m_rTaskPane.GetPanelDeck().GetPanelCount(); ++i ) + { + ::svt::PToolPanel pPanel( m_rTaskPane.GetPanelDeck().GetPanel( i ) ); + m_aPanelRepository.push_back( PanelDescriptor( pPanel ) ); + } + + SetDefaultTitle( String( SfxResId( STR_SFX_TASKS ) ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + TaskPaneController_Impl::~TaskPaneController_Impl() + { + m_rTaskPane.GetPanelDeck().RemoveListener( *this ); + + // remove the panels which are not under the control of the panel deck currently + for ( PanelDescriptors::iterator panelPos = m_aPanelRepository.begin(); + panelPos != m_aPanelRepository.end(); + ++panelPos + ) + { + if ( panelPos->bHidden ) + panelPos->pPanel->Dispose(); + } + m_aPanelRepository.clear(); + } + + // ----------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::SetDefaultTitle( const String& i_rTitle ) + { + m_sDefaultTitle = i_rTitle; + impl_updateDockingWindowTitle(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TaskPaneController_Impl::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ) + { + ::boost::optional< size_t > aPanelPos( m_rTaskPane.GetPanelPos( i_rPanelURL ) ); + ENSURE_OR_RETURN_VOID( !!aPanelPos, "TaskPaneController_Impl::ActivateToolPanel: no such panel!" ); + + if ( aPanelPos == m_rTaskPane.GetPanelDeck().GetActivePanel() ) + { + ::svt::PToolPanel pPanel( m_rTaskPane.GetPanelDeck().GetPanel( *aPanelPos ) ); + pPanel->GrabFocus(); + } + else + { + m_rTaskPane.GetPanelDeck().ActivatePanel( aPanelPos ); + } + } + + // ----------------------------------------------------------------------------------------------------------------- + IMPL_LINK( TaskPaneController_Impl, DockingChanged, TitledDockingWindow*, i_pDockingWindow ) + { + ENSURE_OR_RETURN( i_pDockingWindow && &m_rDockingWindow, "TaskPaneController_Impl::DockingChanged: where does this come from?", 0L ); + + if ( impl_getLayout() == LAYOUT_DRAWERS ) + return 0L; + + impl_setLayout( lcl_getTabLayoutFromAlignment( i_pDockingWindow->GetAlignment() ) ); + return 1L; + } + + // ----------------------------------------------------------------------------------------------------------------- + IMPL_LINK( TaskPaneController_Impl, OnToolboxClicked, ToolBox*, i_pToolBox ) + { + if ( i_pToolBox->GetCurItemId() == m_nViewMenuID ) + { + i_pToolBox->EndSelection(); + + ::std::auto_ptr< PopupMenu > pMenu = impl_createPopupMenu(); + pMenu->SetSelectHdl( LINK( this, TaskPaneController_Impl, OnMenuItemSelected ) ); + + // pass toolbox button rect so the menu can stay open on button up + Rectangle aMenuRect( i_pToolBox->GetItemRect( m_nViewMenuID ) ); + aMenuRect.SetPos( i_pToolBox->GetPosPixel() ); + pMenu->Execute( &m_rDockingWindow, aMenuRect, POPUPMENU_EXECUTE_DOWN ); + } + + return 0; + } + + // --------------------------------------------------------------------------------------------------------------------- + IMPL_LINK( TaskPaneController_Impl, OnMenuItemSelected, Menu*, i_pMenu ) + { + ENSURE_OR_RETURN( i_pMenu, "TaskPaneController_Impl::OnMenuItemSelected: illegal menu!", 0L ); + + i_pMenu->Deactivate(); + switch ( i_pMenu->GetCurItemId() ) + { + case MID_UNLOCK_TASK_PANEL: + m_rDockingWindow.SetFloatingMode( TRUE ); + break; + + case MID_LOCK_TASK_PANEL: + m_rDockingWindow.SetFloatingMode( FALSE ); + break; + + case MID_LAYOUT_DRAWERS: + impl_setLayout( LAYOUT_DRAWERS ); + break; + + case MID_LAYOUT_TABS: + impl_setLayout( lcl_getTabLayoutFromAlignment( m_rDockingWindow.GetAlignment() ) ); + break; + + default: + { + size_t nPanelIndex = size_t( i_pMenu->GetCurItemId() - MID_FIRST_PANEL ); + impl_togglePanelVisibility( nPanelIndex ); + } + break; + } + + return 1L; + } + + // --------------------------------------------------------------------------------------------------------------------- + size_t TaskPaneController_Impl::impl_getLogicalPanelIndex( const size_t i_nVisibleIndex ) + { + size_t nLogicalIndex = 0; + size_t nVisibleIndex( i_nVisibleIndex ); + for ( size_t i=0; i < m_aPanelRepository.size(); ++i ) + { + if ( !m_aPanelRepository[i].bHidden ) + { + if ( !nVisibleIndex ) + break; + --nVisibleIndex; + } + ++nLogicalIndex; + } + return nLogicalIndex; + } + + // --------------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::PanelInserted( const ::svt::PToolPanel& i_pPanel, const size_t i_nPosition ) + { + if ( m_bTogglingPanelVisibility ) + return; + + const size_t nLogicalIndex( impl_getLogicalPanelIndex( i_nPosition ) ); + m_aPanelRepository.insert( m_aPanelRepository.begin() + nLogicalIndex, PanelDescriptor( i_pPanel ) ); + } + + // --------------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::PanelRemoved( const size_t i_nPosition ) + { + if ( m_bTogglingPanelVisibility ) + return; + + const size_t nLogicalIndex( impl_getLogicalPanelIndex( i_nPosition ) ); + m_aPanelRepository.erase( m_aPanelRepository.begin() + nLogicalIndex ); + } + + // --------------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive ) + { + if ( impl_getLayout() == LAYOUT_DRAWERS ) + // no adjustment of the title when we use the classical "drawers" layout + return; + + impl_updateDockingWindowTitle( ); + (void)i_rOldActive; + (void)i_rNewActive; + } + + // --------------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter ) + { + // not interested in + (void)i_rNewLayouter; + } + + // --------------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::Dying() + { + OSL_ENSURE( false, "TaskPaneController_Impl::Dying: unexpected call!" ); + // We are expected to live longer than the ToolPanelDeck we work with. Since we remove ourself, in our dtor, + // as listener from the panel deck, this method here should never be called. + } + + // --------------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::impl_togglePanelVisibility( const size_t i_nLogicalPanelIndex ) + { + ENSURE_OR_RETURN_VOID( i_nLogicalPanelIndex < m_aPanelRepository.size(), "illegal index" ); + + // get the actual panel index, within the deck + size_t nActualPanelIndex(0); + for ( size_t i=0; i < i_nLogicalPanelIndex; ++i ) + { + if ( !m_aPanelRepository[i].bHidden ) + ++nActualPanelIndex; + } + + ::boost::optional< size_t > aActivatePanel; + + m_bTogglingPanelVisibility = true; + if ( m_aPanelRepository[ i_nLogicalPanelIndex ].bHidden ) + { + OSL_VERIFY( m_rTaskPane.GetPanelDeck().InsertPanel( m_aPanelRepository[ i_nLogicalPanelIndex ].pPanel, nActualPanelIndex ) == nActualPanelIndex ); + // if there has not been an active panel before, activate the newly inserted one + ::boost::optional< size_t > aActivePanel( m_rTaskPane.GetPanelDeck().GetActivePanel() ); + if ( !aActivePanel ) + aActivatePanel = nActualPanelIndex; + } + else + { + OSL_VERIFY( m_rTaskPane.GetPanelDeck().RemovePanel( nActualPanelIndex ).get() == m_aPanelRepository[ i_nLogicalPanelIndex ].pPanel.get() ); + } + m_bTogglingPanelVisibility = false; + m_aPanelRepository[ i_nLogicalPanelIndex ].bHidden = !m_aPanelRepository[ i_nLogicalPanelIndex ].bHidden; + + if ( !!aActivatePanel ) + m_rTaskPane.GetPanelDeck().ActivatePanel( *aActivatePanel ); + } + + // --------------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::impl_setLayout( const PanelSelectorLayout i_eLayout, const bool i_bForce ) + { + if ( !i_bForce && ( m_eCurrentLayout == i_eLayout ) ) + return; + + switch ( i_eLayout ) + { + case LAYOUT_DRAWERS: + m_rTaskPane.SetDrawersLayout(); + break; + case LAYOUT_TABS_TOP: + m_rTaskPane.SetTabsLayout( ::svt::TABS_TOP, ::svt::TABITEM_IMAGE_ONLY ); + break; + case LAYOUT_TABS_BOTTOM: + m_rTaskPane.SetTabsLayout( ::svt::TABS_BOTTOM, ::svt::TABITEM_IMAGE_ONLY ); + break; + case LAYOUT_TABS_LEFT: + m_rTaskPane.SetTabsLayout( ::svt::TABS_LEFT, ::svt::TABITEM_IMAGE_ONLY ); + break; + case LAYOUT_TABS_RIGHT: + m_rTaskPane.SetTabsLayout( ::svt::TABS_RIGHT, ::svt::TABITEM_IMAGE_ONLY ); + break; + } + m_eCurrentLayout = i_eLayout; + + impl_updateDockingWindowTitle(); + } + + // --------------------------------------------------------------------------------------------------------------------- + void TaskPaneController_Impl::impl_updateDockingWindowTitle() + { + ::boost::optional< size_t > aActivePanel( m_rTaskPane.GetPanelDeck().GetActivePanel() ); + if ( !aActivePanel || ( impl_getLayout() == LAYOUT_DRAWERS ) ) + m_rDockingWindow.SetTitle( m_sDefaultTitle ); + else + { + size_t nNewActive( *aActivePanel ); + for ( size_t i=0; i < m_aPanelRepository.size(); ++i ) + { + if ( m_aPanelRepository[i].bHidden ) + continue; + + if ( !nNewActive ) + { + m_rDockingWindow.SetTitle( m_aPanelRepository[i].pPanel->GetDisplayName() ); + break; + } + --nNewActive; + } + } + } + + // --------------------------------------------------------------------------------------------------------------------- + ::std::auto_ptr< PopupMenu > TaskPaneController_Impl::impl_createPopupMenu() const + { + ::std::auto_ptr<PopupMenu> pMenu( new PopupMenu ); + FloatingWindow* pMenuWindow = static_cast< FloatingWindow* >( pMenu->GetWindow() ); + if ( pMenuWindow != NULL ) + { + pMenuWindow->SetPopupModeFlags ( pMenuWindow->GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ); + } + + // Add one entry for every tool panel element to individually make + // them visible or hide them. + USHORT nIndex = MID_FIRST_PANEL; + for ( size_t i=0; i<m_aPanelRepository.size(); ++i, ++nIndex ) + { + const PanelDescriptor& rPanelDesc( m_aPanelRepository[i] ); + pMenu->InsertItem( nIndex, rPanelDesc.pPanel->GetDisplayName(), MIB_CHECKABLE ); + pMenu->CheckItem( nIndex, !rPanelDesc.bHidden ); + } + pMenu->InsertSeparator(); + + #if OSL_DEBUG_LEVEL > 0 + pMenu->InsertItem( MID_LAYOUT_TABS, String::CreateFromAscii( "Tab-Layout (exp.)" ), MIB_CHECKABLE ); + pMenu->CheckItem( MID_LAYOUT_TABS, impl_getLayout() != LAYOUT_DRAWERS ); + pMenu->InsertItem( MID_LAYOUT_DRAWERS, String::CreateFromAscii( "Drawer-Layout" ), MIB_CHECKABLE ); + pMenu->CheckItem( MID_LAYOUT_DRAWERS, impl_getLayout() == LAYOUT_DRAWERS ); + + pMenu->InsertSeparator(); + #endif + + // Add entry for docking or un-docking the tool panel. + if ( m_rDockingWindow.IsFloatingMode() ) + pMenu->InsertItem( + MID_LOCK_TASK_PANEL, + String( SfxResId( STR_SFX_DOCK ) ) + ); + else + pMenu->InsertItem( + MID_UNLOCK_TASK_PANEL, + String( SfxResId( STR_SFX_UNDOCK ) ) + ); + + pMenu->RemoveDisabledEntries( FALSE, FALSE ); + + return pMenu; + } + + //================================================================================================================== + //= TaskPaneController + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + TaskPaneController::TaskPaneController( ModuleTaskPane& i_rTaskPane, TitledDockingWindow& i_rDockingWindow ) + :m_pImpl( new TaskPaneController_Impl( i_rTaskPane, i_rDockingWindow ) ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + TaskPaneController::~TaskPaneController() + { + } + + //------------------------------------------------------------------------------------------------------------------ + void TaskPaneController::SetDefaultTitle( const String& i_rTitle ) + { + m_pImpl->SetDefaultTitle( i_rTitle ); + } + + //------------------------------------------------------------------------------------------------------------------ + void TaskPaneController::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL ) + { + m_pImpl->ActivateToolPanel( i_rPanelURL ); + } + +//...................................................................................................................... +} // namespace sfx2 +//...................................................................................................................... diff --git a/sfx2/source/dialog/sfxurl.cxx b/sfx2/source/dialog/taskpane.src index 47e4062ac350..5a955e8587d1 100644 --- a/sfx2/source/dialog/sfxurl.cxx +++ b/sfx2/source/dialog/taskpane.src @@ -1,5 +1,4 @@ /************************************************************************* - * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. @@ -25,17 +24,24 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sfx2.hxx" -#include <sfx2/filedlghelper.hxx> -#include <sfxresid.hxx> -#include <dialog.hrc> +#include <sfx2/sfx.hrc> +#include "sfxlocal.hrc" + +String STR_SFX_DOCK +{ + Text [ en-US ] = "Dock"; +}; + +String STR_SFX_UNDOCK +{ + Text [ en-US ] = "Undock"; +}; -SfxUrlDialog::SfxUrlDialog( Window *pParent ) - : ModalDialog( pParent, SfxResId( RID_URLOPEN ) ), - aEdit( this, SfxResId(RID_URLOPEN_URL) ), - aOk( this, SfxResId(RID_URLOPEN_OK) ), - aCancel( this, SfxResId(RID_URLOPEN_CANCEL) ) +String STR_SFX_TASK_PANE_VIEW +{ + Text [ en-US ] = "View"; +}; +String STR_SFX_TASKS { - FreeResource(); -} + Text [ en-US ] = "Tasks"; +}; diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx new file mode 100644 index 000000000000..58a61d66ba8b --- /dev/null +++ b/sfx2/source/dialog/titledockwin.cxx @@ -0,0 +1,364 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_sfx2.hxx" + +#include "sfx2/titledockwin.hxx" +#include "sfx2/bindings.hxx" +#include "sfx2/dispatch.hxx" +#include "sfxlocal.hrc" +#include "sfxresid.hxx" + +#include <svl/eitem.hxx> + +//...................................................................................................................... +namespace sfx2 +{ +//...................................................................................................................... + + //================================================================================================================== + //= TitledDockingWindow + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + TitledDockingWindow::TitledDockingWindow( SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow, Window* i_pParent, + WinBits i_nStyle ) + :SfxDockingWindow( i_pBindings, i_pChildWindow, i_pParent, i_nStyle ) + ,m_sTitle() + ,m_aToolbox( this ) + ,m_aContentWindow( this, WB_DIALOGCONTROL ) + ,m_aBorder( 3, 1, 3, 3 ) + ,m_bLayoutPending( false ) + { + impl_construct(); + } + + //------------------------------------------------------------------------------------------------------------------ + TitledDockingWindow::TitledDockingWindow( SfxBindings* i_pBindings, SfxChildWindow* i_pChildWindow, Window* i_pParent, + const ResId& i_rResId ) + :SfxDockingWindow( i_pBindings, i_pChildWindow, i_pParent, i_rResId ) + ,m_sTitle() + ,m_aToolbox( this ) + ,m_aContentWindow( this ) + ,m_aBorder( 3, 1, 3, 3 ) + ,m_bLayoutPending( false ) + { + impl_construct(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::impl_construct() + { + SetBackground( Wallpaper() ); + + m_aToolbox.SetSelectHdl( LINK( this, TitledDockingWindow, OnToolboxItemSelected ) ); + m_aToolbox.SetOutStyle( TOOLBOX_STYLE_FLAT ); + m_aToolbox.SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetDialogColor() ) ); + m_aToolbox.Show(); + impl_resetToolBox(); + + m_aContentWindow.Show(); + } + + //------------------------------------------------------------------------------------------------------------------ + TitledDockingWindow::~TitledDockingWindow() + { + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::SetTitle( const String& i_rTitle ) + { + m_sTitle = i_rTitle; + Invalidate(); + } + + //------------------------------------------------------------------------------------------------------------------ + String TitledDockingWindow::GetTitle() const + { + return impl_getTitle(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::SetText( const String& i_rText ) + { + SfxDockingWindow::SetText( i_rText ); + if ( m_sTitle.Len() == 0 ) + // our text is used as title, too => repaint + Invalidate(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::Resize() + { + SfxDockingWindow::Resize(); + impl_scheduleLayout(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::onLayoutDone() + { + // not interested in + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::impl_scheduleLayout() + { + m_bLayoutPending = true; + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::impl_layout() + { + m_bLayoutPending = false; + + m_aToolbox.ShowItem( 1, !IsFloatingMode() ); + + const Size aToolBoxSize( m_aToolbox.CalcWindowSizePixel() ); + Size aWindowSize( GetOutputSizePixel() ); + + // position the tool box + int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() ); + if ( aToolBoxSize.Height() > nTitleBarHeight ) + nTitleBarHeight = aToolBoxSize.Height(); + m_aToolbox.SetPosSizePixel( + Point( + aWindowSize.Width() - aToolBoxSize.Width(), + ( nTitleBarHeight - aToolBoxSize.Height() ) / 2 + ), + aToolBoxSize + ); + + // Place the content window. + if ( nTitleBarHeight < aToolBoxSize.Height() ) + nTitleBarHeight = aToolBoxSize.Height(); + aWindowSize.Height() -= nTitleBarHeight; + m_aContentWindow.SetPosSizePixel( + Point( m_aBorder.Left(), nTitleBarHeight + m_aBorder.Top() ), + Size( + aWindowSize.Width() - m_aBorder.Left() - m_aBorder.Right(), + aWindowSize.Height() - m_aBorder.Top() - m_aBorder.Bottom() + ) + ); + + onLayoutDone(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::Paint( const Rectangle& i_rArea ) + { + if ( m_bLayoutPending ) + impl_layout(); + + SfxDockingWindow::Paint( i_rArea ); + + Push( PUSH_FONT | PUSH_FILLCOLOR | PUSH_LINECOLOR ); + + int nTitleBarHeight( GetSettings().GetStyleSettings().GetTitleHeight() ); + const Size aToolBoxSize = m_aToolbox.CalcWindowSizePixel(); + if ( aToolBoxSize.Height() > nTitleBarHeight ) + nTitleBarHeight = aToolBoxSize.Height(); + + SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() ); + SetLineColor(); + + // bold font + Font aFont( GetFont() ); + aFont.SetWeight( WEIGHT_BOLD ); + SetFont( aFont ); + + // Set border values. + Size aWindowSize( GetOutputSizePixel() ); + int nOuterLeft = 0; + int nInnerLeft = nOuterLeft + m_aBorder.Left() - 1; + int nOuterRight = aWindowSize.Width() - 1; + int nInnerRight = nOuterRight - m_aBorder.Right() + 1; + int nInnerTop = nTitleBarHeight + m_aBorder.Top() - 1; + int nOuterBottom = aWindowSize.Height() - 1; + int nInnerBottom = nOuterBottom - m_aBorder.Bottom() + 1; + + // Paint title bar background. + Rectangle aTitleBarBox( Rectangle( + nOuterLeft, + 0, + nOuterRight, + nInnerTop-1 + ) ); + DrawRect( aTitleBarBox ); + + if ( nInnerLeft > nOuterLeft ) + DrawRect( Rectangle( nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom ) ); + if ( nOuterRight > nInnerRight ) + DrawRect( Rectangle( nInnerRight, nInnerTop, nOuterRight, nInnerBottom ) ); + if ( nInnerBottom < nOuterBottom ) + DrawRect( Rectangle( nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom ) ); + + // Paint bevel border. + SetFillColor(); + SetLineColor( GetSettings().GetStyleSettings().GetShadowColor() ); + if ( m_aBorder.Top() > 0 ) + DrawLine( Point( nInnerLeft, nInnerTop ), Point( nInnerLeft, nInnerBottom ) ); + if ( m_aBorder.Left() > 0 ) + DrawLine( Point( nInnerLeft, nInnerTop ), Point( nInnerRight, nInnerTop ) ); + + SetLineColor( GetSettings().GetStyleSettings().GetLightColor() ); + if ( m_aBorder.Bottom() > 0 ) + DrawLine( Point( nInnerRight, nInnerBottom ), Point( nInnerLeft, nInnerBottom ) ); + if ( m_aBorder.Right() > 0 ) + DrawLine( Point( nInnerRight, nInnerBottom ), Point( nInnerRight, nInnerTop ) ); + + // Paint title bar text. + SetLineColor( GetSettings().GetStyleSettings().GetActiveTextColor() ); + aTitleBarBox.Left() += 3; + DrawText( aTitleBarBox, impl_getTitle(), TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); + + // Restore original values of the output device. + Pop(); + } + + //------------------------------------------------------------------------------------------------------------------ + String TitledDockingWindow::impl_getTitle() const + { + return m_sTitle.Len() ? m_sTitle : GetText(); + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::impl_resetToolBox() + { + m_aToolbox.Clear(); + + // Get the closer bitmap and set it as right most button. + Image aImage( SfxResId( SFX_IMG_CLOSE_DOC ) ); + Image aImageHC( SfxResId( SFX_IMG_CLOSE_DOC_HC ) ); + m_aToolbox.InsertItem( 1, + GetSettings().GetStyleSettings().GetHighContrastMode() + ? aImageHC + : aImage + ); + m_aToolbox.ShowItem( 1 ); + } + + //------------------------------------------------------------------------------------------------------------------ + USHORT TitledDockingWindow::impl_addDropDownToolBoxItem( const String& i_rItemText, ULONG i_nHelpId, const Link& i_rCallback ) + { + // Add the menu before the closer button. + const USHORT nItemCount( m_aToolbox.GetItemCount() ); + const USHORT nItemId( nItemCount + 1 ); + m_aToolbox.InsertItem( nItemId, i_rItemText, TIB_DROPDOWNONLY, nItemCount > 0 ? nItemCount - 1 : TOOLBOX_APPEND ); + m_aToolbox.SetHelpId( nItemId, i_nHelpId ); + m_aToolbox.SetClickHdl( i_rCallback ); + m_aToolbox.SetDropdownClickHdl( i_rCallback ); + + // The tool box has likely changed its size. The title bar has to be + // resized. + impl_scheduleLayout(); + Invalidate(); + + return nItemId; + } + + //------------------------------------------------------------------------------------------------------------------ + IMPL_LINK( TitledDockingWindow, OnToolboxItemSelected, ToolBox*, pToolBox ) + { + const USHORT nId = pToolBox->GetCurItemId(); + + if ( nId == 1 ) + { + // the closer + EndTracking(); + const sal_uInt16 nChildWindowId( GetChildWindow_Impl()->GetType() ); + const SfxBoolItem aVisibility( nChildWindowId, FALSE ); + GetBindings().GetDispatcher()->Execute( + nChildWindowId, + SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, + &aVisibility, + NULL + ); + } + + return 0; + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::StateChanged( StateChangedType i_nType ) + { + switch ( i_nType ) + { + case STATE_CHANGE_INITSHOW: + impl_scheduleLayout(); + break; + } + SfxDockingWindow::StateChanged( i_nType ); + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::EndDocking( const Rectangle& i_rRect, BOOL i_bFloatMode ) + { + SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode ); + + if ( m_aEndDockingHdl.IsSet() ) + m_aEndDockingHdl.Call( this ); + } + + //------------------------------------------------------------------------------------------------------------------ + void TitledDockingWindow::DataChanged( const DataChangedEvent& i_rDataChangedEvent ) + { + SfxDockingWindow::DataChanged( i_rDataChangedEvent ); + + switch ( i_rDataChangedEvent.GetType() ) + { + case DATACHANGED_SETTINGS: + if ( ( i_rDataChangedEvent.GetFlags() & SETTINGS_STYLE ) == 0) + break; + // else fall through. + case DATACHANGED_FONTS: + case DATACHANGED_FONTSUBSTITUTION: + { + const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); + + // Font. + Font aFont = rStyleSettings.GetAppFont(); + if ( IsControlFont() ) + aFont.Merge( GetControlFont() ); + SetZoomedPointFont( aFont ); + + // Color. + Color aColor; + if ( IsControlForeground() ) + aColor = GetControlForeground(); + else + aColor = rStyleSettings.GetButtonTextColor(); + SetTextColor( aColor ); + SetTextFillColor(); + + impl_scheduleLayout(); + Invalidate(); + } + break; + } + } + +//...................................................................................................................... +} // namespace sfx2 +//...................................................................................................................... diff --git a/sfx2/source/dialog/titledockwin.src b/sfx2/source/dialog/titledockwin.src new file mode 100644 index 000000000000..3f52e84ab75d --- /dev/null +++ b/sfx2/source/dialog/titledockwin.src @@ -0,0 +1,39 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <sfx2/sfx.hrc> +#include "sfxlocal.hrc" + +Image SFX_IMG_CLOSE_DOC +{ + ImageBitmap = Bitmap { File = "closedoc.png" ; }; +}; + +Image SFX_IMG_CLOSE_DOC_HC +{ + ImageBitmap = Bitmap { File = "closedochc.png" ; }; +}; + diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index 1a51bee5024f..94c5826569f2 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -1682,168 +1682,6 @@ throw (uno::RuntimeException) #if OSL_DEBUG_LEVEL > 1 -static ::sfx2::XmlIdRegistryDocument s_Reg; -static ::sfx2::XmlIdRegistryClipboard s_RegClip; - -class MockMetadatable : public ::sfx2::Metadatable -{ -public: - MockMetadatable(bool i_isInClip = false) : - m_bInClipboard(i_isInClip), m_bInUndo(false), m_bInContent(true) {} - bool m_bInClipboard; - bool m_bInUndo; - bool m_bInContent; - virtual bool IsInClipboard() const { return m_bInClipboard; } - virtual bool IsInUndo() const { return m_bInUndo; } - virtual bool IsInContent() const { return m_bInContent; } - virtual ::sfx2::XmlIdRegistry& GetRegistry() { return m_bInClipboard ? static_cast< ::sfx2::XmlIdRegistry&>(s_RegClip) : static_cast< ::sfx2::XmlIdRegistry&>(s_Reg); } - virtual ::com::sun::star::uno::Reference< - ::com::sun::star::rdf::XMetadatable > MakeUnoObject() { return 0; } -}; - -bool operator==(beans::StringPair p1, beans::StringPair p2) -{ - return p1.First == p2.First && p1.Second == p2.Second; -} - -void test() -{ - OSL_TRACE("SwMetadatable test(): start\n"); - MockMetadatable m1; - MockMetadatable m2; - MockMetadatable m3; - MockMetadatable m4; - MockMetadatable m5; - ::rtl::OUString empty; - ::rtl::OUString content( ::rtl::OUString::createFromAscii("content.xml") ); - ::rtl::OUString styles ( ::rtl::OUString::createFromAscii("styles.xml") ); - ::rtl::OUString sid1( ::rtl::OUString::createFromAscii("id1") ); - ::rtl::OUString sid2( ::rtl::OUString::createFromAscii("id2") ); - ::rtl::OUString sid3( ::rtl::OUString::createFromAscii("id3") ); - ::rtl::OUString sid4( ::rtl::OUString::createFromAscii("id4") ); - beans::StringPair id1(content, sid1); - beans::StringPair id2(content, sid2); - beans::StringPair id3(content, sid3); - beans::StringPair id4(styles, sid4); - beans::StringPair id3e(empty, sid3); - beans::StringPair id4e(empty, sid4); - m1.SetMetadataReference(id1); - OSL_ENSURE(m1.GetMetadataReference() == id1, "set failed"); - try { - m2.SetMetadataReference(id1); - OSL_ENSURE(false, "set duplicate succeeded"); - } catch (lang::IllegalArgumentException) { } - m1.SetMetadataReference(id1); - OSL_ENSURE(m1.GetMetadataReference() == id1, "set failed (existing)"); - m1.EnsureMetadataReference(); - OSL_ENSURE(m1.GetMetadataReference() == id1, "ensure failed (existing)"); - - m2.EnsureMetadataReference(); - beans::StringPair m2id(m2.GetMetadataReference()); - OSL_ENSURE(m2id.Second.getLength(), "ensure failed"); - m2.EnsureMetadataReference(); - OSL_ENSURE(m2.GetMetadataReference() == m2id, "ensure failed (idempotent)"); - - m1.m_bInUndo = true; - OSL_ENSURE(!m1.GetMetadataReference().Second.getLength(), "move to undo failed"); - - m1.m_bInUndo = false; - OSL_ENSURE(m1.GetMetadataReference() == id1, "move from undo failed"); - - m1.m_bInUndo = true; - try { - m2.SetMetadataReference(id1); // steal! - } catch (lang::IllegalArgumentException &) { - OSL_ENSURE(false, "set duplicate to undo failed"); - } - m1.m_bInUndo = false; - OSL_ENSURE(!m1.GetMetadataReference().Second.getLength(), "move from undo: duplicate"); - - m3.RegisterAsCopyOf(m2); - OSL_ENSURE(m2.GetMetadataReference() == id1, "copy: source"); - OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "copy: duplicate"); - m4.RegisterAsCopyOf(m3); - OSL_ENSURE(m2.GetMetadataReference() == id1, "copy: source"); - OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "copy: duplicate"); - OSL_ENSURE(!m4.GetMetadataReference().Second.getLength(), "copy: duplicate"); - m2.m_bInUndo = true; - OSL_ENSURE(m3.GetMetadataReference() == id1, "duplicate to undo"); - OSL_ENSURE(!m2.GetMetadataReference().Second.getLength(), "duplicate to undo"); - m2.m_bInUndo = false; - OSL_ENSURE(m2.GetMetadataReference() == id1, "duplicate from undo"); - OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "duplicate from undo"); - - m4.EnsureMetadataReference(); // new! - beans::StringPair m4id(m4.GetMetadataReference()); - OSL_ENSURE(m4id.Second.getLength() && !(m4id == id1), "ensure on duplicate"); - - MockMetadatable mc1(true); // in clipboard - MockMetadatable mc2(true); - MockMetadatable mc3(true); - MockMetadatable mc4(true); - MockMetadatable m2p; - MockMetadatable m3p; - - mc1.SetMetadataReference(id2); - OSL_ENSURE(mc1.GetMetadataReference() == id2, "set failed"); - try { - mc2.SetMetadataReference(id2); - OSL_ENSURE(false, "set duplicate succeeded"); - } catch (lang::IllegalArgumentException) { } - mc1.SetMetadataReference(id2); - OSL_ENSURE(mc1.GetMetadataReference() == id2, "set failed (existing)"); - mc1.EnsureMetadataReference(); - OSL_ENSURE(mc1.GetMetadataReference() == id2, "ensure failed (existing)"); - mc2.EnsureMetadataReference(); - beans::StringPair mc2id(mc2.GetMetadataReference()); - OSL_ENSURE(mc2id.Second.getLength(), "ensure failed"); - mc2.EnsureMetadataReference(); - OSL_ENSURE(mc2.GetMetadataReference() == mc2id, "ensure failed (idempotent)"); - mc2.RemoveMetadataReference(); - OSL_ENSURE(!mc2.GetMetadataReference().Second.getLength(), "remove failed"); - - // set up mc2 as copy of m2 and mc3 as copy of m3 - mc3.RegisterAsCopyOf(m3); - OSL_ENSURE(!mc3.GetMetadataReference().Second.getLength() , "copy to clipboard (latent)"); - mc2.RegisterAsCopyOf(m2); - OSL_ENSURE(mc2.GetMetadataReference() == id1, "copy to clipboard (non-latent)"); - // paste mc2 to m2p and mc3 to m3p - m2p.RegisterAsCopyOf(mc2); - OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength() , "paste from clipboard (non-latent)"); - m3p.RegisterAsCopyOf(mc3); - OSL_ENSURE(!m3p.GetMetadataReference().Second.getLength() , "paste from clipboard (latent)"); - // delete m2, m2p, m3 - m2.RemoveMetadataReference(); - OSL_ENSURE(!m2.GetMetadataReference().Second.getLength(), "remove failed"); - OSL_ENSURE(m2p.GetMetadataReference() == id1, "paste-remove (non-latent)"); - m2p.RemoveMetadataReference(); - OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength(), "remove failed"); - OSL_ENSURE(m3.GetMetadataReference() == id1, "paste-remove2 (non-latent)"); - m3.RemoveMetadataReference(); - OSL_ENSURE(!m3.GetMetadataReference().Second.getLength(), "remove failed"); - OSL_ENSURE(m3p.GetMetadataReference() == id1, "paste-remove (latent)"); - // delete mc2 - mc2.SetMetadataReference(beans::StringPair()); - OSL_ENSURE(!mc3.GetMetadataReference().Second.getLength() , "in clipboard becomes non-latent"); - // paste mc2 - m2p.RegisterAsCopyOf(mc2); - OSL_ENSURE(!m2p.GetMetadataReference().Second.getLength(), "remove-paste"); - OSL_ENSURE(m3p.GetMetadataReference() == id1, "remove-paste (stolen)"); - - // auto-detect stream - m5.SetMetadataReference(id3e); - OSL_ENSURE(m5.GetMetadataReference() == id3, "auto-detect (content)"); - m5.m_bInContent = false; - m5.SetMetadataReference(id4e); - OSL_ENSURE(m5.GetMetadataReference() == id4, "auto-detect (styles)"); - - OSL_TRACE("sfx2::Metadatable test(): finished\n"); -} - -struct Test { Test() { test(); } }; -static Test s_test; - - #include <stdio.h> static void dump(sfx2::XmlIdList_t * pList) diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index f46f3583cfd8..14474dd2904d 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -38,7 +38,6 @@ #include "com/sun/star/util/XModifiable.hpp" #include "com/sun/star/xml/sax/XSAXSerializable.hpp" -#include "com/sun/star/lang/NullPointerException.hpp" #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" #include "com/sun/star/lang/EventObject.hpp" #include "com/sun/star/beans/XPropertySet.hpp" @@ -248,25 +247,21 @@ public: const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL loadFromMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL storeToStorage( const css::uno::Reference< css::embed::XStorage > & Storage, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL storeToMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); // ::com::sun::star::lang::XInitialization: virtual void SAL_CALL initialize( @@ -1869,8 +1864,7 @@ SfxDocumentMetaData::loadFromStorage( const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { if (!xStorage.is()) throw css::lang::IllegalArgumentException( ::rtl::OUString::createFromAscii("SfxDocumentMetaData::loadFromStorage:" @@ -1882,10 +1876,10 @@ SfxDocumentMetaData::loadFromStorage( xStorage->openStreamElement( ::rtl::OUString::createFromAscii(s_metaXml), css::embed::ElementModes::READ) ); - if (!xStream.is()) throw css::lang::NullPointerException(); + if (!xStream.is()) throw css::uno::RuntimeException(); css::uno::Reference<css::io::XInputStream> xInStream = xStream->getInputStream(); - if (!xInStream.is()) throw css::lang::NullPointerException(); + if (!xInStream.is()) throw css::uno::RuntimeException(); // create DOM parser service css::uno::Reference<css::lang::XMultiComponentFactory> xMsf ( @@ -1949,8 +1943,7 @@ SfxDocumentMetaData::storeToStorage( const css::uno::Reference< css::embed::XStorage > & xStorage, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { if (!xStorage.is()) throw css::lang::IllegalArgumentException( ::rtl::OUString::createFromAscii("SfxDocumentMetaData::storeToStorage:" @@ -1966,7 +1959,7 @@ SfxDocumentMetaData::storeToStorage( xStorage->openStreamElement(::rtl::OUString::createFromAscii(s_metaXml), css::embed::ElementModes::WRITE | css::embed::ElementModes::TRUNCATE); - if (!xStream.is()) throw css::lang::NullPointerException(); + if (!xStream.is()) throw css::uno::RuntimeException(); css::uno::Reference< css::beans::XPropertySet > xStreamProps(xStream, css::uno::UNO_QUERY_THROW); xStreamProps->setPropertyValue( @@ -1980,7 +1973,7 @@ SfxDocumentMetaData::storeToStorage( css::uno::makeAny(static_cast<sal_Bool> (sal_False))); css::uno::Reference<css::io::XOutputStream> xOutStream = xStream->getOutputStream(); - if (!xOutStream.is()) throw css::lang::NullPointerException(); + if (!xOutStream.is()) throw css::uno::RuntimeException(); css::uno::Reference<css::lang::XMultiComponentFactory> xMsf ( m_xContext->getServiceManager()); css::uno::Reference<css::io::XActiveDataSource> xSaxWriter( @@ -2028,8 +2021,7 @@ void SAL_CALL SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { css::uno::Reference<css::io::XInputStream> xIn; ::comphelper::MediaDescriptor md(Medium); @@ -2063,7 +2055,7 @@ SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL, css::uno::makeAny(e)); } if (!xStorage.is()) { - throw css::lang::NullPointerException(::rtl::OUString::createFromAscii( + throw css::uno::RuntimeException(::rtl::OUString::createFromAscii( "SfxDocumentMetaData::loadFromMedium: cannot get Storage"), *this); } @@ -2074,8 +2066,7 @@ void SAL_CALL SfxDocumentMetaData::storeToMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { ::comphelper::MediaDescriptor md(Medium); if (!URL.equalsAscii("")) { @@ -2087,7 +2078,7 @@ SfxDocumentMetaData::storeToMedium(const ::rtl::OUString & URL, if (!xStorage.is()) { - throw css::lang::NullPointerException(::rtl::OUString::createFromAscii( + throw css::uno::RuntimeException(::rtl::OUString::createFromAscii( "SfxDocumentMetaData::storeToMedium: cannot get Storage"), *this); } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 5b12ac5537f7..24f2f359607f 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -835,7 +835,8 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, } ::rtl::OUString aAdjustToType; - if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )) + + if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) ) { // it is export, set the preselected filter ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc index 29ad461d18da..848446a774e9 100644 --- a/sfx2/source/inc/helpid.hrc +++ b/sfx2/source/inc/helpid.hrc @@ -330,7 +330,8 @@ #define HID_CONFIG_SAVE (HID_SFX_START + 310) #define HID_SEARCHDIALOG (HID_SFX_START + 311) - +#define HID_TASKPANE_WINDOW (HID_SFX_START + 312) +#define HID_TASKPANE_VIEW_MENU (HID_SFX_START + 313) #define HID_XMLSEC_WARNING_BROKENSIGNATURE (HID_SFX_START + 314) #define HID_XMLSEC_QUERY_LOSINGSIGNATURE (HID_SFX_START + 315) #define HID_XMLSEC_QUERY_SAVEBEFORESIGN (HID_SFX_START + 316) diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc index fb21cb0ab13c..202ed6f6f00f 100644 --- a/sfx2/source/inc/sfxlocal.hrc +++ b/sfx2/source/inc/sfxlocal.hrc @@ -44,6 +44,10 @@ #define STR_SFX_EXPLORERFILE_BUTTONINSERT (RID_SFX_SFXLOCAL_START + 4) #define STR_SFX_IMPORT_ALL (RID_SFX_SFXLOCAL_START + 5) #define STR_SFX_EXPLORERFILE_EXPORT (RID_SFX_SFXLOCAL_START + 6) +#define STR_SFX_DOCK (RID_SFX_SFXLOCAL_START + 7) +#define STR_SFX_UNDOCK (RID_SFX_SFXLOCAL_START + 8) +#define STR_SFX_TASK_PANE_VIEW (RID_SFX_SFXLOCAL_START + 9) +#define STR_SFX_TASKS (RID_SFX_SFXLOCAL_START + 10) // Controls -------------------------------------------------------------- @@ -55,13 +59,17 @@ #define SFX_PB_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 5) #define SFX_WIN_PROPERTY_YESNO (RID_SFX_SFXLOCAL_START + 6) #define SFX_QB_WRONG_TYPE (RID_SFX_SFXLOCAL_START + 7) -#define SFX_IMG_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 8) -#define SFX_IMG_PROPERTY_REMOVE_HC (RID_SFX_SFXLOCAL_START + 9) #define SFX_FLD_DATE (RID_SFX_SFXLOCAL_START + 10) #define SFX_FLD_TIME (RID_SFX_SFXLOCAL_START + 11) #define SFX_FLD_DURATION (RID_SFX_SFXLOCAL_START + 12) #define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13) +// Images ---------------------------------------------------------------- + +#define SFX_IMG_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 0) +#define SFX_IMG_PROPERTY_REMOVE_HC (RID_SFX_SFXLOCAL_START + 1) +#define SFX_IMG_CLOSE_DOC (RID_SFX_SFXLOCAL_START + 2) +#define SFX_IMG_CLOSE_DOC_HC (RID_SFX_SFXLOCAL_START + 3) #endif diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx index ae005d1bad88..a82b72bc2947 100644 --- a/sfx2/source/inc/workwin.hxx +++ b/sfx2/source/inc/workwin.hxx @@ -365,6 +365,7 @@ public: void SetActiveChild_Impl( Window *pChild ); Window* GetActiveChild_Impl(); virtual BOOL ActivateNextChild_Impl( BOOL bForward = TRUE ); + bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const; // Methoden f"ur StatusBar void SetTempStatusBar_Impl( BOOL bSet ); diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk index d3b209fc4a45..8b55bd0840ea 100644 --- a/sfx2/source/menu/makefile.mk +++ b/sfx2/source/menu/makefile.mk @@ -43,10 +43,11 @@ SRS1NAME=$(TARGET) SRC1FILES = menu.src SLOFILES = \ + $(SLO)$/mnuitem.obj \ $(SLO)$/mnumgr.obj \ - $(SLO)$/virtmenu.obj \ $(SLO)$/objmnctl.obj \ - $(SLO)$/mnuitem.obj + $(SLO)$/thessubmenu.obj \ + $(SLO)$/virtmenu.obj # --- Tagets ------------------------------------------------------- diff --git a/sfx2/source/menu/menu.hrc b/sfx2/source/menu/menu.hrc index 5017f980872b..b437f797c26e 100644 --- a/sfx2/source/menu/menu.hrc +++ b/sfx2/source/menu/menu.hrc @@ -64,6 +64,10 @@ #define STR_MENU_ADDONS RID_SFX_MENU_START+2 #define STR_MENU_ADDONHELP RID_SFX_MENU_START+3 +#define STR_MENU_SYNONYMS (RID_SFX_MENU_START+11) +#define STR_MENU_NO_SYNONYM_FOUND (RID_SFX_MENU_START+12) +#define STR_MENU_THESAURUS (RID_SFX_MENU_START+13) + #define MN_CLIPBOARDFUNCS RID_SFX_MENU_START+1 #endif diff --git a/sfx2/source/menu/menu.src b/sfx2/source/menu/menu.src index 97c9c7f640fa..a2e07a3348b0 100644 --- a/sfx2/source/menu/menu.src +++ b/sfx2/source/menu/menu.src @@ -72,6 +72,21 @@ String STR_MENU_ADDONHELP Text [ en-US ] = "Add-~On Help" ; }; +String STR_MENU_SYNONYMS +{ + Text [ en-US ] = "Synonyms" ; +}; + +String STR_MENU_NO_SYNONYM_FOUND +{ + Text [ en-US ] = "(none)" ; +}; + +String STR_MENU_THESAURUS +{ + Text [ en-US ] = "~Thesaurus..." ; +}; + // ******************************************************************* EOF diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index ec803718f457..b264a5b47861 100644..100755 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -27,8 +27,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" + #include <com/sun/star/embed/VerbDescriptor.hpp> #include <com/sun/star/embed/VerbAttributes.hpp> +#include <com/sun/star/container/XNamed.hpp> #ifdef SOLARIS // HACK: prevent conflict between STLPORT and Workshop headers on Solaris 8 @@ -50,9 +52,14 @@ #include <framework/addonmenu.hxx> #include <comphelper/processfactory.hxx> #include <unotools/ucbstreamhelper.hxx> +#include <unotools/lingucfg.hxx> #include <tools/urlobj.hxx> #include <unotools/pathoptions.hxx> +#include <svl/stritem.hxx> #include <toolkit/helper/vclunohelper.hxx> +#include <osl/file.hxx> +#include <vcl/graph.hxx> +#include <svtools/filter.hxx> #include <sfx2/mnumgr.hxx> @@ -76,10 +83,15 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/objface.hxx> +#include "thessubmenu.hxx" + static const USHORT nCompatVersion = 4; static const USHORT nVersion = 5; +// static member initialization +PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = NULL; + using namespace com::sun::star; //========================================================================= @@ -166,6 +178,101 @@ void InsertVerbs_Impl( SfxBindings* pBindings, const com::sun::star::uno::Sequen } +//-------------------------------------------------------------------- + + +static Image lcl_GetImageFromPngUrl( const ::rtl::OUString &rFileUrl ) +{ + Image aRes; + + ::rtl::OUString aTmp; + osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp ); + + Graphic aGraphic; + const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) ); + if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) ) + { + aRes = Image( aGraphic.GetBitmapEx() ); + } + return aRes; +} + + +PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) +{ + // + // build thesaurus sub menu if look-up string is available + // + PopupMenu* pThesSubMenu = 0; + SfxPoolItem *pItem = 0; + pBindings->QueryState( SID_THES, pItem ); + String aThesLookUpStr; + SfxStringItem *pStrItem = dynamic_cast< SfxStringItem * >(pItem); + xub_StrLen nDelimPos = STRING_LEN; + if (pStrItem) + { + aThesLookUpStr = pStrItem->GetValue(); + nDelimPos = aThesLookUpStr.SearchBackward( '#' ); + } + if (aThesLookUpStr.Len() > 0 && nDelimPos != STRING_NOTFOUND) + { + // get synonym list for sub menu + std::vector< ::rtl::OUString > aSynonyms; + SfxThesSubMenuHelper aHelper; + ::rtl::OUString aText( aHelper.GetText( aThesLookUpStr, nDelimPos ) ); + lang::Locale aLocale; + aHelper.GetLocale( aLocale, aThesLookUpStr, nDelimPos ); + const bool bHasMoreSynonyms = aHelper.GetMeanings( aSynonyms, aText, aLocale, 7 /*max number of synonyms to retrieve*/ ); + (void) bHasMoreSynonyms; + + pThesSubMenu = new PopupMenu; + pThesSubMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); + const size_t nNumSynonyms = aSynonyms.size(); + if (nNumSynonyms > 0) + { + SvtLinguConfig aCfg; + const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + + Image aImage; + String sThesImplName( aHelper.GetThesImplName( aLocale ) ); + ::rtl::OUString aSynonymsImageUrl( aCfg.GetSynonymsContextImage( sThesImplName, bHC ) ); + if (sThesImplName.Len() > 0 && aSynonymsImageUrl.getLength() > 0) + aImage = Image( lcl_GetImageFromPngUrl( aSynonymsImageUrl ) ); + + for (USHORT i = 0; (size_t)i < nNumSynonyms; ++i) + { + //! item ids should start with values > 0, since 0 has special meaning + const USHORT nId = i + 1; + + String aItemText( GetThesaurusReplaceText_Impl( aSynonyms[i] ) ); + pThesSubMenu->InsertItem( nId, aItemText ); + ::rtl::OUString aCmd( ::rtl::OUString::createFromAscii( ".uno:ThesaurusFromContext?WordReplace:string=" ) ); + aCmd += aItemText; + pThesSubMenu->SetItemCommand( nId, aCmd ); + + if (aSynonymsImageUrl.getLength() > 0) + pThesSubMenu->SetItemImage( nId, aImage ); + } + } + else // nNumSynonyms == 0 + { + const String aItemText( SfxResId( STR_MENU_NO_SYNONYM_FOUND ) ); + pThesSubMenu->InsertItem( 1, aItemText, MIB_NOSELECT ); + } + pThesSubMenu->InsertSeparator(); + const String sThesaurus( SfxResId( STR_MENU_THESAURUS ) ); + pThesSubMenu->InsertItem( 100, sThesaurus ); + pThesSubMenu->SetItemCommand( 100, ::rtl::OUString::createFromAscii( ".uno:ThesaurusDialog" ) ); + + pSVMenu->InsertSeparator(); + const String sSynonyms( SfxResId( STR_MENU_SYNONYMS ) ); + pSVMenu->InsertItem( SID_THES, sSynonyms ); + pSVMenu->SetPopupMenu( SID_THES, pThesSubMenu ); + } + + return pThesSubMenu; +} + //-------------------------------------------------------------------- @@ -305,7 +412,9 @@ void SfxPopupMenuManager::RemoveDisabledEntries() USHORT SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow ) { DBG_MEMTEST(); - return ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos ); + USHORT nVal = ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos ); + delete pStaticThesSubMenu; pStaticThesSubMenu = NULL; + return nVal; } //-------------------------------------------------------------------- @@ -429,6 +538,10 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra break; } + PopupMenu* pThesSubMenu = InsertThesaurusSubmenu_Impl( &pFrame->GetBindings(), pSVMenu ); + // #i107205# (see comment in header file) + pStaticThesSubMenu = pThesSubMenu; + if ( n == nCount ) { PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS ) ); @@ -461,6 +574,7 @@ SfxPopupMenuManager* SfxPopupMenuManager::Popup( const ResId& rResId, SfxViewFra aMgr->RemoveDisabledEntries(); return aMgr; } + return 0; } @@ -475,6 +589,8 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram break; } + PopupMenu* pThesSubMenu = InsertThesaurusSubmenu_Impl( &pFrame->GetBindings(), pSVMenu ); + if ( n == nCount ) { PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS ) ); @@ -507,6 +623,8 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram aPop.RemoveDisabledEntries(); aPop.Execute( rPoint, pWindow ); } + + delete pThesSubMenu; } Menu* SfxPopupMenuManager::GetSVMenu() diff --git a/sfx2/source/menu/thessubmenu.cxx b/sfx2/source/menu/thessubmenu.cxx new file mode 100755 index 000000000000..de1137bd6a74 --- /dev/null +++ b/sfx2/source/menu/thessubmenu.cxx @@ -0,0 +1,274 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thessubmenu.cxx,v $ + * $Revision: 1.0 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sfx2.hxx" + +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/linguistic2/XThesaurus.hpp> +#include <com/sun/star/linguistic2/XMeaning.hpp> +#include <com/sun/star/linguistic2/XLinguServiceManager.hpp> + +#include <comphelper/processfactory.hxx> +#include <svl/stritem.hxx> +#include <tools/debug.hxx> +#include <vcl/graph.hxx> +#include <svtools/filter.hxx> + + +#include <vector> + +#include <sfx2/bindings.hxx> +#include <sfx2/dispatch.hxx> +#include <sfx2/viewsh.hxx> +#include "thessubmenu.hxx" + + +using namespace ::com::sun::star; +using ::rtl::OUString; + + +// STATIC DATA ----------------------------------------------------------- + +SFX_IMPL_MENU_CONTROL(SfxThesSubMenuControl, SfxStringItem); + +//////////////////////////////////////////////////////////// + +String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText ) +{ + // The strings returned by the thesaurus sometimes have some + // explanation text put in between '(' and ')' or a trailing '*'. + // These parts should not be put in the ReplaceEdit Text that may get + // inserted into the document. Thus we strip them from the text. + + String aText( rText ); + + xub_StrLen nPos = aText.Search( sal_Unicode('(') ); + while (STRING_NOTFOUND != nPos) + { + xub_StrLen nEnd = aText.Search( sal_Unicode(')'), nPos ); + if (STRING_NOTFOUND != nEnd) + aText.Erase( nPos, nEnd-nPos+1 ); + else + break; + nPos = aText.Search( sal_Unicode('(') ); + } + + nPos = aText.Search( sal_Unicode('*') ); + if (STRING_NOTFOUND != nPos) + aText.Erase( nPos ); + + // remove any possible remaining ' ' that may confuse the thesaurus + // when it gets called with the text + aText.EraseLeadingAndTrailingChars( sal_Unicode(' ') ); + + return aText; +} + +//////////////////////////////////////////////////////////// + + +/* + Ctor; setzt Select-Handler am Menu und traegt Menu + in seinen Parent ein. + */ +SfxThesSubMenuControl::SfxThesSubMenuControl( USHORT nSlotId, Menu &rMenu, SfxBindings &rBindings ) + : SfxMenuControl( nSlotId, rBindings ), + pMenu(new PopupMenu), + rParent(rMenu) +{ + rMenu.SetPopupMenu(nSlotId, pMenu); + pMenu->SetSelectHdl(LINK(this, SfxThesSubMenuControl, MenuSelect)); + pMenu->Clear(); + rParent.EnableItem( GetId(), FALSE ); +} + + +SfxThesSubMenuControl::~SfxThesSubMenuControl() +{ + delete pMenu; +} + + +/* + Statusbenachrichtigung; + Ist die Funktionalit"at disabled, wird der entsprechende + Menueeintrag im Parentmenu disabled, andernfalls wird er enabled. + */ +void SfxThesSubMenuControl::StateChanged( + USHORT /*nSID*/, + SfxItemState eState, + const SfxPoolItem* /*pState*/ ) +{ + rParent.EnableItem(GetId(), SFX_ITEM_AVAILABLE == eState ); +} + + +/* + Select-Handler des Menus; + das selektierte Verb mit ausgef"uhrt, + */ +IMPL_LINK_INLINE_START( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu ) +{ + const USHORT nSlotId = pSelMenu->GetCurItemId(); + if( nSlotId ) + GetBindings().Execute(nSlotId); + return 1; +} +IMPL_LINK_INLINE_END( SfxThesSubMenuControl, MenuSelect, Menu *, pSelMenu ) + + +PopupMenu* SfxThesSubMenuControl::GetPopup() const +{ + return pMenu; +} + + +//////////////////////////////////////////////////////////// + +OUString SfxThesSubMenuHelper::GetText( + const String &rLookUpString, + xub_StrLen nDelimPos ) +{ + return OUString( rLookUpString.Copy( 0, nDelimPos ) ); +} + + +void SfxThesSubMenuHelper::GetLocale( + lang::Locale /*out */ &rLocale, + const String &rLookUpString, + xub_StrLen nDelimPos ) +{ + String aIsoLang( rLookUpString.Copy( nDelimPos + 1) ); + const xub_StrLen nPos = aIsoLang.Search( '-' ); + if (nPos != STRING_NOTFOUND) + { + rLocale.Language = aIsoLang.Copy( 0, nPos ); + rLocale.Country = aIsoLang.Copy( nPos + 1 ); + rLocale.Variant = String::EmptyString(); + } +} + + +SfxThesSubMenuHelper::SfxThesSubMenuHelper() +{ + try + { + uno::Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); + m_xLngMgr = uno::Reference< linguistic2::XLinguServiceManager >( xMSF->createInstance( + OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.linguistic2.LinguServiceManager" ))), uno::UNO_QUERY_THROW ); + m_xThesarus = m_xLngMgr->getThesaurus(); + } + catch (uno::Exception &e) + { + (void) e; + DBG_ASSERT( 0, "failed to get thesaurus" ); + } +} + + +SfxThesSubMenuHelper::~SfxThesSubMenuHelper() +{ +} + + +bool SfxThesSubMenuHelper::IsSupportedLocale( const lang::Locale & rLocale ) const +{ + return m_xThesarus.is() && m_xThesarus->hasLocale( rLocale ); +} + + +bool SfxThesSubMenuHelper::GetMeanings( + std::vector< OUString > & rSynonyms, + const OUString & rWord, + const lang::Locale & rLocale, + sal_Int16 nMaxSynonms ) +{ + bool bHasMoreSynonyms = false; + rSynonyms.clear(); + if (IsSupportedLocale( rLocale ) && rWord.getLength() && nMaxSynonms > 0) + { + try + { + // get all meannings + const uno::Sequence< uno::Reference< linguistic2::XMeaning > > aMeaningSeq( + m_xThesarus->queryMeanings( rWord, rLocale, uno::Sequence< beans::PropertyValue >() )); + const uno::Reference< linguistic2::XMeaning > *pxMeaning = aMeaningSeq.getConstArray(); + const sal_Int32 nMeanings = aMeaningSeq.getLength(); + + // iterate over all meanings until nMaxSynonms are found or all meanings are processed + sal_Int32 nCount = 0; + sal_Int32 i = 0; + for ( ; i < nMeanings && nCount < nMaxSynonms; ++i) + { + const uno::Sequence< OUString > aSynonymSeq( pxMeaning[i]->querySynonyms() ); + const OUString *pSynonyms = aSynonymSeq.getConstArray(); + const sal_Int32 nSynonyms = aSynonymSeq.getLength(); + sal_Int32 k = 0; + for ( ; k < nSynonyms && nCount < nMaxSynonms; ++k) + { + rSynonyms.push_back( pSynonyms[k] ); + ++nCount; + } + bHasMoreSynonyms = k < nSynonyms; // any synonym from this meaning skipped? + } + + bHasMoreSynonyms |= i < nMeanings; // any meaning skipped? + } + catch (uno::Exception &e) + { + (void) e; + DBG_ASSERT( 0, "failed to get synonyms" ); + } + } + return bHasMoreSynonyms; +} + + +String SfxThesSubMenuHelper::GetThesImplName( const lang::Locale &rLocale ) const +{ + String aRes; + DBG_ASSERT( m_xLngMgr.is(), "LinguServiceManager missing" ); + if (m_xLngMgr.is()) + { + uno::Sequence< OUString > aServiceNames = m_xLngMgr->getConfiguredServices( + OUString::createFromAscii("com.sun.star.linguistic2.Thesaurus"), rLocale ); + // there should be at most one thesaurus configured for each language + DBG_ASSERT( aServiceNames.getLength() <= 1, "more than one thesaurus found. Should not be possible" ); + if (aServiceNames.getLength() == 1) + aRes = aServiceNames[0]; + } + return aRes; +} + +//////////////////////////////////////////////////////////// + + diff --git a/sfx2/source/menu/thessubmenu.hxx b/sfx2/source/menu/thessubmenu.hxx new file mode 100644 index 000000000000..14d7473cb7c0 --- /dev/null +++ b/sfx2/source/menu/thessubmenu.hxx @@ -0,0 +1,107 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: thessubmenu.hxx,v $ + * $Revision: 1.0 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#ifndef _THESSUBMENU_HXX_ +#define _THESSUBMENU_HXX_ + +#include <com/sun/star/linguistic2/XThesaurus.hpp> +#include <com/sun/star/linguistic2/XLinguServiceManager.hpp> + +#include <vcl/menu.hxx> +#include <sfx2/mnuitem.hxx> + +class SfxBindings; +class PopupMenu; +class Menu; + +namespace css = ::com::sun::star; + +//////////////////////////////////////////////////////////// + +String GetThesaurusReplaceText_Impl( const ::rtl::OUString &rText ); + +//////////////////////////////////////////////////////////// + +class SfxThesSubMenuControl : public SfxMenuControl +{ + PopupMenu* pMenu; + Menu& rParent; + +private: + virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState ); + DECL_LINK( MenuSelect, Menu * ); + +public: + SfxThesSubMenuControl(USHORT, Menu&, SfxBindings&); + ~SfxThesSubMenuControl(); + + virtual PopupMenu* GetPopup() const; + + SFX_DECL_MENU_CONTROL(); +}; + +//////////////////////////////////////////////////////////// + +class SfxThesSubMenuHelper +{ + css::uno::Reference< css::linguistic2::XLinguServiceManager > m_xLngMgr; + css::uno::Reference< css::linguistic2::XThesaurus > m_xThesarus; + +private: + + // don't use copy c-tor and assignment operator + SfxThesSubMenuHelper( const SfxThesSubMenuHelper & ); + SfxThesSubMenuHelper & operator = ( const SfxThesSubMenuHelper & ); + +public: + SfxThesSubMenuHelper(); + ~SfxThesSubMenuHelper(); + + static ::rtl::OUString GetText( const String &rLookUpString, xub_StrLen nDelimPos ); + + // returns the Locale to be used for the selected text when the thesaurus is to be called + static void GetLocale( css::lang::Locale /*out */ &rLocale, const String &rLookUpString, xub_StrLen nDelimPos ); + + // returns true if the locale is upported by the theasaurus + bool IsSupportedLocale( const css::lang::Locale & rLocale ) const; + + // get the first nMax Synonym entries, even if different meanings need to be evaluated + bool GetMeanings( std::vector< ::rtl::OUString > & rSynonyms, const ::rtl::OUString & rWord, const css::lang::Locale & rLocale, sal_Int16 nMaxSynonms ); + + String GetThesImplName( const css::lang::Locale &rLocale ) const; +}; + +//////////////////////////////////////////////////////////// + + +#endif + + diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx index 5460d613c7e8..abe4cb6852d9 100644 --- a/sfx2/source/view/impviewframe.hxx +++ b/sfx2/source/view/impviewframe.hxx @@ -31,6 +31,8 @@ #include <svtools/asynclink.hxx> #include <vcl/window.hxx> +#include <boost/optional.hpp> + struct SfxViewFrame_Impl { SvBorder aBorder; @@ -56,6 +58,8 @@ struct SfxViewFrame_Impl sal_Bool bWindowWasEnabled:1; sal_Bool bActive; String aFactoryName; + ::boost::optional< bool > + aHasToolPanels; SfxViewFrame_Impl( SfxFrame& i_rFrame ) : rFrame( i_rFrame ) diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 66af0d7ac8ba..189c9a8aae0e 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -44,6 +44,7 @@ #endif #include <unotools/moduleoptions.hxx> #include <svl/intitem.hxx> +#include <svl/visitem.hxx> #include <svl/stritem.hxx> #include <svl/eitem.hxx> #include <svl/slstitm.hxx> @@ -94,6 +95,8 @@ #include <svtools/asynclink.hxx> #include <svl/sharecontrolfile.hxx> +#include <boost/optional.hpp> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; @@ -108,6 +111,7 @@ namespace css = ::com::sun::star; // wg. ViewFrame::Current #include "appdata.hxx" +#include <sfx2/taskpane.hxx> #include <sfx2/app.hxx> #include <sfx2/objface.hxx> #include "openflag.hxx" @@ -169,6 +173,19 @@ TYPEINIT1(SfxViewFrameItem, SfxPoolItem); //========================================================================= //------------------------------------------------------------------------- +namespace +{ + bool moduleHasToolPanels( SfxViewFrame_Impl& i_rViewFrameImpl ) + { + if ( !i_rViewFrameImpl.aHasToolPanels ) + { + i_rViewFrameImpl.aHasToolPanels.reset( ::sfx2::ModuleTaskPane::ModuleHasToolPanels( + i_rViewFrameImpl.rFrame.GetFrameInterface() ) ); + } + return *i_rViewFrameImpl.aHasToolPanels; + } +} +//------------------------------------------------------------------------- void SfxViewFrame::SetDowning_Impl() { pImp->bIsDowning = sal_True; @@ -3294,6 +3311,22 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) else if ( KnowsChildWindow(nSID) ) rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) ); } + else if ( nSID == SID_TASKPANE ) + { + if ( !KnowsChildWindow( nSID ) ) + { + OSL_ENSURE( false, "SID_TASKPANE state requested, but no task pane child window exists for this ID!" ); + rState.DisableItem( nSID ); + } + else if ( !moduleHasToolPanels( *pImp ) ) + { + rState.Put( SfxVisibilityItem( nSID, sal_False ) ); + } + else + { + rState.Put( SfxBoolItem( nSID, HasChildWindow( nSID ) ) ); + } + } else if ( KnowsChildWindow(nSID) ) rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) ); else @@ -3381,3 +3414,37 @@ void SfxViewFrame::SetViewFrame( SfxViewFrame* pFrame ) { SFX_APP()->SetViewFrame_Impl( pFrame ); } + +// --------------------------------------------------------------------------------------------------------------------- +void SfxViewFrame::ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL ) +{ + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + + // look up the SfxFrame for the given XFrame + SfxFrame* pFrame = NULL; + for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) ) + { + if ( pFrame->GetFrameInterface() == i_rFrame ) + break; + } + SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : NULL; + ENSURE_OR_RETURN_VOID( pViewFrame != NULL, "SfxViewFrame::ActivateToolPanel: did not find an SfxFrame for the given XFrame!" ); + + pViewFrame->ActivateToolPanel_Impl( i_rPanelURL ); +} + +// --------------------------------------------------------------------------------------------------------------------- +void SfxViewFrame::ActivateToolPanel_Impl( const ::rtl::OUString& i_rPanelURL ) +{ + // ensure the task pane is visible + ENSURE_OR_RETURN_VOID( KnowsChildWindow( SID_TASKPANE ), "SfxViewFrame::ActivateToolPanel: this frame/module does not allow for a task pane!" ); + if ( !HasChildWindow( SID_TASKPANE ) ) + ToggleChildWindow( SID_TASKPANE ); + + SfxChildWindow* pTaskPaneChildWindow = GetChildWindow( SID_TASKPANE ); + ENSURE_OR_RETURN_VOID( pTaskPaneChildWindow, "SfxViewFrame::ActivateToolPanel_Impl: just switched it on, but it is not there!" ); + + ::sfx2::ITaskPaneToolPanelAccess* pPanelAccess = dynamic_cast< ::sfx2::ITaskPaneToolPanelAccess* >( pTaskPaneChildWindow ); + ENSURE_OR_RETURN_VOID( pPanelAccess, "SfxViewFrame::ActivateToolPanel_Impl: task pane child window does not implement a required interface!" ); + pPanelAccess->ActivateToolPanel( i_rPanelURL ); +} diff --git a/sfx2/util/hidother.src b/sfx2/util/hidother.src index 72b178b2d629..bbea19100df9 100644 --- a/sfx2/util/hidother.src +++ b/sfx2/util/hidother.src @@ -165,3 +165,4 @@ hidspecial HID_DID_SAVE_PACKED_XML { HelpID = HID_DID_SAVE_PACKED_X hidspecial HID_HELP_ONHELP { HelpID = HID_HELP_ONHELP; }; hidspecial HID_HELP_TEXT_SELECTION_MODE { HelpID = HID_HELP_TEXT_SELECTION_MODE; }; hidspecial HID_DLG_CHECKFORONLINEUPDATE { HelpID = HID_DLG_CHECKFORONLINEUPDATE; }; +hidspecial HID_TASKPANE_VIEW_MENU { HelpID = HID_TASKPANE_VIEW_MENU; };
\ No newline at end of file diff --git a/sfx2/win/res/expdesk.ico b/sfx2/win/res/expdesk.ico Binary files differdeleted file mode 100644 index 06fb6e712e89..000000000000 --- a/sfx2/win/res/expdesk.ico +++ /dev/null diff --git a/sfx2/win/res/expexp.ico b/sfx2/win/res/expexp.ico Binary files differdeleted file mode 100644 index e0643765f605..000000000000 --- a/sfx2/win/res/expexp.ico +++ /dev/null diff --git a/sfx2/win/res/expfld.ico b/sfx2/win/res/expfld.ico Binary files differdeleted file mode 100644 index aeefecbdad51..000000000000 --- a/sfx2/win/res/expfld.ico +++ /dev/null diff --git a/sfx2/win/res/expftp.ico b/sfx2/win/res/expftp.ico Binary files differdeleted file mode 100644 index e1a442067d35..000000000000 --- a/sfx2/win/res/expftp.ico +++ /dev/null diff --git a/sfx2/win/res/exptrash.ico b/sfx2/win/res/exptrash.ico Binary files differdeleted file mode 100644 index 5c3e956863c3..000000000000 --- a/sfx2/win/res/exptrash.ico +++ /dev/null diff --git a/sfx2/win/res/expwork.ico b/sfx2/win/res/expwork.ico Binary files differdeleted file mode 100644 index 93fe39c7a492..000000000000 --- a/sfx2/win/res/expwork.ico +++ /dev/null diff --git a/sfx2/win/res/frameset.ico b/sfx2/win/res/frameset.ico Binary files differdeleted file mode 100644 index c9546f1e4d40..000000000000 --- a/sfx2/win/res/frameset.ico +++ /dev/null diff --git a/sfx2/win/res/search.ico b/sfx2/win/res/search.ico Binary files differdeleted file mode 100644 index 13e96131e3b8..000000000000 --- a/sfx2/win/res/search.ico +++ /dev/null diff --git a/sfx2/workben/custompanel/CalcWindowState.xcu b/sfx2/workben/custompanel/CalcWindowState.xcu new file mode 100644 index 000000000000..2f224f32aa77 --- /dev/null +++ b/sfx2/workben/custompanel/CalcWindowState.xcu @@ -0,0 +1,21 @@ +<?xml version='1.0' encoding='UTF-8'?> +<oor:component-data oor:name="CalcWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" 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="UIElements"> + <node oor:name="States"> + <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/0000FF" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Soylent Blue</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value> + </prop> + <prop oor:name="HelpURL" oor:type="xs:string"> + <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value> + </prop> + </node> + </node> + </node> +</oor:component-data> diff --git a/sfx2/workben/custompanel/DrawWindowState.xcu b/sfx2/workben/custompanel/DrawWindowState.xcu new file mode 100644 index 000000000000..3c0992bc4871 --- /dev/null +++ b/sfx2/workben/custompanel/DrawWindowState.xcu @@ -0,0 +1,21 @@ +<?xml version='1.0' encoding='UTF-8'?> +<oor:component-data oor:name="DrawWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" 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="UIElements"> + <node oor:name="States"> + <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FFFF00" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Soylent Yellow</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value> + </prop> + <prop oor:name="HelpURL" oor:type="xs:string"> + <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value> + </prop> + </node> + </node> + </node> +</oor:component-data> diff --git a/sfx2/workben/custompanel/Factories.xcu b/sfx2/workben/custompanel/Factories.xcu new file mode 100644 index 000000000000..f8df23e9f40a --- /dev/null +++ b/sfx2/workben/custompanel/Factories.xcu @@ -0,0 +1,21 @@ +<?xml version='1.0' encoding='UTF-8'?> +<oor:component-data oor:name="Factories" 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="UIElementFactories"> + <node oor:name="org.openoffice.example.CustomToolPanel" oor:op="replace"> + <prop oor:name="Type"> + <value>toolpanel</value> + </prop> + <prop oor:name="Name"> + <value>org.openoffice.example.colorpanel</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="FactoryImplementation"> + <value>org.openoffice.example.colorpanel.ToolPanelFactory</value> + </prop> + </node> + </node> + </node> +</oor:component-data> diff --git a/sfx2/workben/custompanel/ImpressWindowState.xcu b/sfx2/workben/custompanel/ImpressWindowState.xcu new file mode 100644 index 000000000000..0fc1bb9d40c8 --- /dev/null +++ b/sfx2/workben/custompanel/ImpressWindowState.xcu @@ -0,0 +1,21 @@ +<?xml version='1.0' encoding='UTF-8'?> +<oor:component-data oor:name="ImpressWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" 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="UIElements"> + <node oor:name="States"> + <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FFCC99" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Soylent Orange</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value> + </prop> + <prop oor:name="HelpURL" oor:type="xs:string"> + <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value> + </prop> + </node> + </node> + </node> +</oor:component-data> diff --git a/sfx2/workben/custompanel/WriterWindowState.xcu b/sfx2/workben/custompanel/WriterWindowState.xcu new file mode 100644 index 000000000000..f1edd4a12881 --- /dev/null +++ b/sfx2/workben/custompanel/WriterWindowState.xcu @@ -0,0 +1,35 @@ +<?xml version='1.0' encoding='UTF-8'?> +<oor:component-data oor:name="WriterWindowState" oor:package="org.openoffice.Office.UI" xmlns:install="http://openoffice.org/2004/installation" 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="UIElements"> + <node oor:name="States"> + <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/00FF00" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Soylent Green</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value> + </prop> + <prop oor:name="HelpURL" oor:type="xs:string"> + <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value> + </prop> + </node> + <node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FF0000" oor:op="replace"> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Soylent Red</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="ImageURL" oor:type="xs:string"> + <value>vnd.sun.star.extension://UPDATED_IDENTIFIER/panel.png</value> + </prop> + <prop oor:name="HelpURL" oor:type="xs:string"> + <value>vnd.sun.star.help://UPDATED_IDENTIFIER/colorpanel</value> + </prop> + </node> + </node> + </node> +</oor:component-data> diff --git a/sfx2/workben/custompanel/ctp_factory.cxx b/sfx2/workben/custompanel/ctp_factory.cxx new file mode 100644 index 000000000000..54880cc5fcc7 --- /dev/null +++ b/sfx2/workben/custompanel/ctp_factory.cxx @@ -0,0 +1,167 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#include "precompiled_sfx2.hxx" + +#include "ctp_factory.hxx" +#include "ctp_panel.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/lang/NotInitializedException.hpp> +#include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/lang/XComponent.hpp> +/** === end UNO includes === **/ + +//...................................................................................................................... +namespace sd { namespace colortoolpanel +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::uno::XComponentContext; + using ::com::sun::star::lang::NotInitializedException; + using ::com::sun::star::lang::IllegalArgumentException; + using ::com::sun::star::lang::XComponent; + using ::com::sun::star::ui::XUIElement; + using ::com::sun::star::beans::PropertyValue; + using ::com::sun::star::container::NoSuchElementException; + using ::com::sun::star::beans::PropertyValue; + using ::com::sun::star::awt::XWindow; + /** === end UNO using === **/ + + //================================================================================================================== + //= ToolPanelFactory + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + ToolPanelFactory::ToolPanelFactory( const Reference< XComponentContext >& i_rContext ) + :m_xContext( i_rContext ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + ToolPanelFactory::~ToolPanelFactory() + { + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XUIElement > SAL_CALL ToolPanelFactory::createUIElement( const ::rtl::OUString& i_rResourceURL, const Sequence< PropertyValue >& i_rArgs ) throw (NoSuchElementException, IllegalArgumentException, RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + + if ( !i_rResourceURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/toolpanel/org.openoffice.example.colorpanel/" ) ) ) + throw NoSuchElementException( i_rResourceURL, *this ); + + const ::rtl::OUString sColor( i_rResourceURL.copy( i_rResourceURL.lastIndexOf( '/' ) + 1 ) ); + const sal_Int32 nPanelColor = sColor.toInt32( 16 ); + + // retrieve the parent window + Reference< XWindow > xParentWindow; + const PropertyValue* pArg = i_rArgs.getConstArray(); + const PropertyValue* pArgEnd = i_rArgs.getConstArray() + i_rArgs.getLength(); + for ( ; pArg != pArgEnd; ++pArg ) + { + if ( pArg->Name.equalsAscii( "ParentWindow" ) ) + { + xParentWindow.set( pArg->Value, UNO_QUERY ); + break; + } + } + if ( !xParentWindow.is() ) + { + OSL_ENSURE( false, "ToolPanelFactory::createUIElement: no parent window in the args!" ); + throw IllegalArgumentException( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No parent window provided in the creation arguments. Cannot create tool panel." ) ), + *this, + 2 + ); + } + + /// create the panel + Reference< XUIElement > xUIElement( new PanelUIElement( m_xContext, xParentWindow, i_rResourceURL, nPanelColor ) ); + return xUIElement; + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL ToolPanelFactory::getImplementationName( ) throw (RuntimeException) + { + return getImplementationName_static(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL ToolPanelFactory::getImplementationName_static( ) throw (RuntimeException) + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.example.custompanel.ToolPanelFactory" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL ToolPanelFactory::supportsService( const ::rtl::OUString& i_rServiceName ) throw (RuntimeException) + { + const Sequence< ::rtl::OUString > aServiceNames( getSupportedServiceNames() ); + for ( const ::rtl::OUString* serviceName = aServiceNames.getConstArray(); + serviceName != aServiceNames.getConstArray() + aServiceNames.getLength(); + ++serviceName + ) + { + if ( i_rServiceName == *serviceName ) + return sal_True; + } + return sal_False; + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL ToolPanelFactory::getSupportedServiceNames() throw (RuntimeException) + { + return getSupportedServiceNames_static(); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL ToolPanelFactory::getSupportedServiceNames_static() throw (RuntimeException) + { + Sequence< ::rtl::OUString > aServiceNames(1); + aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.example.colorpanel.ToolPanelFactory" ) ); + return aServiceNames; + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XInterface > SAL_CALL ToolPanelFactory::Create( const Reference< XComponentContext >& i_rContext ) throw (RuntimeException) + { + return *( new ToolPanelFactory( i_rContext ) ); + } + +//...................................................................................................................... +} } // namespace sd::colortoolpanel +//...................................................................................................................... diff --git a/sfx2/workben/custompanel/ctp_factory.hxx b/sfx2/workben/custompanel/ctp_factory.hxx new file mode 100644 index 000000000000..8a359f59caaf --- /dev/null +++ b/sfx2/workben/custompanel/ctp_factory.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SD_WORKBENCH_CTP_FACTORY_HXX +#define SD_WORKBENCH_CTP_FACTORY_HXX + +/** === begin UNO includes === **/ +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/ui/XUIElementFactory.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +/** === end UNO includes === **/ + +#include <cppuhelper/implbase2.hxx> +#include <cppuhelper/basemutex.hxx> + +//...................................................................................................................... +namespace sd { namespace colortoolpanel +{ +//...................................................................................................................... + + class FactoryGuard; + + //================================================================================================================== + //= ToolPanelFactory + //================================================================================================================== + typedef ::cppu::WeakImplHelper2 < ::com::sun::star::ui::XUIElementFactory + , ::com::sun::star::lang::XServiceInfo + > ToolPanelFactory_Base; + class ToolPanelFactory :public ::cppu::BaseMutex + ,public ToolPanelFactory_Base + { + public: + ToolPanelFactory( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext + ); + ~ToolPanelFactory(); + + // XUIElementFactory + virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL createUIElement( const ::rtl::OUString& i_rResourceURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rArgs ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + + // XServiceInfo + 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); + + // XServiceInfo - static versions + static ::rtl::OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ) throw (::com::sun::star::uno::RuntimeException); + + private: + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + m_xContext; + }; + +//...................................................................................................................... +} } // namespace sd::colortoolpanel +//...................................................................................................................... + +#endif // SD_WORKBENCH_CTP_FACTORY_HXX diff --git a/sfx2/workben/custompanel/ctp_panel.cxx b/sfx2/workben/custompanel/ctp_panel.cxx new file mode 100644 index 000000000000..ee94287bedbf --- /dev/null +++ b/sfx2/workben/custompanel/ctp_panel.cxx @@ -0,0 +1,270 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#include "precompiled_sfx2.hxx" + +#include "ctp_panel.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/awt/XWindowPeer.hpp> +#include <com/sun/star/awt/XToolkit.hpp> +#include <com/sun/star/awt/WindowClass.hpp> +#include <com/sun/star/awt/WindowAttribute.hpp> +#include <com/sun/star/awt/PosSize.hpp> +#include <com/sun/star/awt/XDevice.hpp> +#include <com/sun/star/awt/XGraphics.hpp> +#include <com/sun/star/ui/UIElementType.hpp> +/** === end UNO includes === **/ + +#include <tools/diagnose_ex.h> + +//...................................................................................................................... +namespace sd { namespace colortoolpanel +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::uno::XComponentContext; + using ::com::sun::star::awt::XWindow; + using ::com::sun::star::lang::DisposedException; + using ::com::sun::star::awt::XWindowPeer; + using ::com::sun::star::lang::XMultiComponentFactory; + using ::com::sun::star::awt::XToolkit; + using ::com::sun::star::awt::WindowDescriptor; + using ::com::sun::star::awt::WindowClass_SIMPLE; + using ::com::sun::star::awt::Rectangle; + using ::com::sun::star::awt::PaintEvent; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::awt::XDevice; + using ::com::sun::star::awt::XGraphics; + using ::com::sun::star::accessibility::XAccessible; + using ::com::sun::star::frame::XFrame; + /** === end UNO using === **/ + namespace WindowAttribute = ::com::sun::star::awt::WindowAttribute; + namespace PosSize = ::com::sun::star::awt::PosSize; + namespace UIElementType = ::com::sun::star::ui::UIElementType; + + //================================================================================================================== + //= helpers + //================================================================================================================== + namespace + { + Reference< XWindow > lcl_createPlainWindow_nothrow( const Reference< XComponentContext >& i_rContext, + const Reference< XWindowPeer >& i_rParentWindow ) + { + try + { + ENSURE_OR_THROW( i_rContext.is(), "illegal component context" ); + Reference< XMultiComponentFactory > xFactory( i_rContext->getServiceManager(), UNO_SET_THROW ); + Reference< XToolkit > xToolkit( xFactory->createInstanceWithContext( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), + i_rContext + ), UNO_QUERY_THROW ); + + WindowDescriptor aWindow; + aWindow.Type = WindowClass_SIMPLE; + aWindow.WindowServiceName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "window" ) ); + aWindow.Parent = i_rParentWindow; + aWindow.WindowAttributes = WindowAttribute::BORDER; + + Reference< XWindowPeer > xWindow( xToolkit->createWindow( aWindow ), UNO_SET_THROW ); + return Reference< XWindow >( xWindow, UNO_QUERY_THROW ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return NULL; + } + } + //================================================================================================================== + //= class SingleColorPanel + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + SingleColorPanel::SingleColorPanel( const Reference< XComponentContext >& i_rContext, const Reference< XWindow >& i_rParentWindow, const ::sal_Int32 i_nPanelColor ) + :SingleColorPanel_Base( m_aMutex ) + ,m_xWindow() + ,m_nPanelColor( i_nPanelColor ) + { + // retrieve the parent window for our to-be-created pane window + Reference< XWindowPeer > xParentPeer( i_rParentWindow, UNO_QUERY ); + + osl_incrementInterlockedCount( &m_refCount ); + if ( xParentPeer.is() ) + { + m_xWindow = lcl_createPlainWindow_nothrow( i_rContext, xParentPeer ); + m_xWindow->addPaintListener( this ); + if ( m_xWindow.is() ) + { + const Rectangle aPanelAnchorSize( i_rParentWindow->getPosSize() ); + m_xWindow->setPosSize( 0, 0, aPanelAnchorSize.Width, aPanelAnchorSize.Height, PosSize::POSSIZE ); + m_xWindow->setVisible( sal_True ); + } + } + osl_decrementInterlockedCount( &m_refCount ); + } + + //------------------------------------------------------------------------------------------------------------------ + SingleColorPanel::~SingleColorPanel() + { + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XWindow > SAL_CALL SingleColorPanel::getWindow() throw (RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !m_xWindow.is() ) + throw DisposedException( ::rtl::OUString(), *this ); + return m_xWindow; + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XAccessible > SAL_CALL SingleColorPanel::createAccessible( const Reference< XAccessible >& i_rParentAccessible ) throw (RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !m_xWindow.is() ) + throw DisposedException( ::rtl::OUString(), *this ); + + // TODO: the following is wrong, since it doesn't respect i_rParentAccessible. In a real extension, you should + // implement this correctly :) + (void)i_rParentAccessible; + return Reference< XAccessible >( getWindow(), UNO_QUERY ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SingleColorPanel::windowPaint( const PaintEvent& i_rEvent ) throw (RuntimeException) + { + try + { + const Reference< XDevice > xDevice( i_rEvent.Source, UNO_QUERY_THROW ); + const Reference< XGraphics > xGraphics( xDevice->createGraphics(), UNO_SET_THROW ); + xGraphics->setFillColor( m_nPanelColor ); + xGraphics->setLineColor( 0x00FFFFFF ); + + const Reference< XWindow > xWindow( i_rEvent.Source, UNO_QUERY_THROW ); + const Rectangle aWindowRect( xWindow->getPosSize() ); + xGraphics->drawRect( 0, 0, aWindowRect.Width - 1, aWindowRect.Height - 1 ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SingleColorPanel::disposing( const EventObject& i_rSource ) throw (RuntimeException) + { + (void)i_rSource; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL SingleColorPanel::disposing() + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !m_xWindow.is() ) + // already disposed + return; + m_xWindow->removePaintListener( this ); + try + { + Reference< XComponent > xWindowComp( m_xWindow, UNO_QUERY_THROW ); + xWindowComp->dispose(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + m_xWindow.clear(); + } + + //================================================================================================================== + //= PanelUIElement + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + PanelUIElement::PanelUIElement( const Reference< XComponentContext >& i_rContext, const Reference< XWindow >& i_rParentWindow, + const ::rtl::OUString& i_rResourceURL, const ::sal_Int32 i_nPanelColor ) + :PanelUIElement_Base( m_aMutex ) + ,m_sResourceURL( i_rResourceURL ) + ,m_xToolPanel( new SingleColorPanel( i_rContext, i_rParentWindow, i_nPanelColor ) ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + PanelUIElement::~PanelUIElement() + { + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XFrame > SAL_CALL PanelUIElement::getFrame() throw (RuntimeException) + { + // TODO + return NULL; + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL PanelUIElement::getResourceURL() throw (RuntimeException) + { + return m_sResourceURL; + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Int16 SAL_CALL PanelUIElement::getType() throw (RuntimeException) + { + return UIElementType::TOOLPANEL; + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XInterface > SAL_CALL PanelUIElement::getRealInterface( ) throw (RuntimeException) + { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( !m_xToolPanel.is() ) + throw DisposedException(); + return m_xToolPanel; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL PanelUIElement::disposing() + { + Reference< XComponent > xPanelComponent( m_xToolPanel, UNO_QUERY_THROW ); + m_xToolPanel.clear(); + xPanelComponent->dispose(); + } + +//...................................................................................................................... +} } // namespace sd::colortoolpanel +//...................................................................................................................... diff --git a/sfx2/workben/custompanel/ctp_panel.hxx b/sfx2/workben/custompanel/ctp_panel.hxx new file mode 100644 index 000000000000..39c46c9d93a5 --- /dev/null +++ b/sfx2/workben/custompanel/ctp_panel.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef SD_WORKBENCH_CTP_PANEL_HXX +#define SD_WORKBENCH_CTP_PANEL_HXX + +/** === begin UNO includes === **/ +#include <com/sun/star/ui/XToolPanel.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/awt/XPaintListener.hpp> +#include <com/sun/star/awt/XWindow.hpp> +#include <com/sun/star/ui/XUIElement.hpp> +/** === end UNO includes === **/ + +#include <cppuhelper/compbase2.hxx> +#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/basemutex.hxx> + +#include <boost/scoped_ptr.hpp> + +//...................................................................................................................... +namespace sd { namespace colortoolpanel +{ +//...................................................................................................................... + + //================================================================================================================== + //= SingleColorPanel + //================================================================================================================== + typedef ::cppu::WeakComponentImplHelper2 < ::com::sun::star::ui::XToolPanel + , ::com::sun::star::awt::XPaintListener + > SingleColorPanel_Base; + class SingleColorPanel :public ::cppu::BaseMutex + ,public SingleColorPanel_Base + { + public: + SingleColorPanel( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& i_rParentWindow, + const ::sal_Int32 i_nPanelColor + ); + + // XToolPanel + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getWindow() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL createAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible ) throw (::com::sun::star::uno::RuntimeException); + + // XPaintListener + virtual void SAL_CALL windowPaint( const ::com::sun::star::awt::PaintEvent& e ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); + + // XComponent equivalents + virtual void SAL_CALL disposing(); + + protected: + ~SingleColorPanel(); + + private: + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xWindow; + const sal_Int32 m_nPanelColor; + }; + + //================================================================================================================== + //= PanelUIElement + //================================================================================================================== + typedef ::cppu::WeakComponentImplHelper1 < ::com::sun::star::ui::XUIElement + > PanelUIElement_Base; + class PanelUIElement :public ::cppu::BaseMutex + ,public PanelUIElement_Base + { + public: + PanelUIElement( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& i_rParentWindow, + const ::rtl::OUString& i_rResourceURL, + const ::sal_Int32 i_nPanelColor + ); + + // XUIElement + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface( ) throw (::com::sun::star::uno::RuntimeException); + + // OComponentHelper + virtual void SAL_CALL disposing(); + + protected: + ~PanelUIElement(); + + private: + const ::rtl::OUString m_sResourceURL; + ::com::sun::star::uno::Reference< ::com::sun::star::ui::XToolPanel > + m_xToolPanel; + }; + +//...................................................................................................................... +} } // namespace sd::colortoolpanel +//...................................................................................................................... + +#endif // SD_WORKBENCH_CTP_PANEL_HXX diff --git a/sfx2/workben/custompanel/ctp_services.cxx b/sfx2/workben/custompanel/ctp_services.cxx new file mode 100644 index 000000000000..4164e8bc1629 --- /dev/null +++ b/sfx2/workben/custompanel/ctp_services.cxx @@ -0,0 +1,92 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#include "precompiled_sfx2.hxx" + +#include "ctp_factory.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +#include <cppuhelper/implementationentry.hxx> + +//...................................................................................................................... +namespace sd { namespace colortoolpanel +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + /** === end UNO using === **/ + + //================================================================================================================== + //= descriptors for the services implemented in this component + //================================================================================================================== + static struct ::cppu::ImplementationEntry s_aServiceEntries[] = + { + { + ToolPanelFactory::Create, + ToolPanelFactory::getImplementationName_static, + ToolPanelFactory::getSupportedServiceNames_static, + ::cppu::createSingleComponentFactory, NULL, 0 + }, + { 0, 0, 0, 0, 0, 0 } + }; + +//...................................................................................................................... +} } // namespace sd::colortoolpanel +//...................................................................................................................... + +extern "C" +{ + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) + { + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey ) + { + return ::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, ::sd::colortoolpanel::s_aServiceEntries ); + } + + //------------------------------------------------------------------------------------------------------------------ + void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) + { + return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::sd::colortoolpanel::s_aServiceEntries ); + } +} diff --git a/sfx2/workben/custompanel/delzip b/sfx2/workben/custompanel/delzip new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sfx2/workben/custompanel/delzip diff --git a/sfx2/workben/custompanel/description.xml b/sfx2/workben/custompanel/description.xml new file mode 100644 index 000000000000..7b85d64eaf69 --- /dev/null +++ b/sfx2/workben/custompanel/description.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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="UPDATED_IDENTIFIER"/> + <version value="0.1" /> + <platform value="UPDATED_SUPPORTED_PLATFORM" /> + <display-name> + <name lang="en-US">Custom Tool Panel Example</name> + </display-name> + <dependencies> + <OpenOffice.org-minimal-version value="3.3" d:name="OpenOffice.org 3.3"/> + </dependencies> +</description> diff --git a/sfx2/workben/custompanel/makefile.mk b/sfx2/workben/custompanel/makefile.mk new file mode 100644 index 000000000000..1eb20ceed35d --- /dev/null +++ b/sfx2/workben/custompanel/makefile.mk @@ -0,0 +1,120 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=../.. +PRJNAME=sfx2 + +TARGET=custompanel +ENABLE_EXCEPTIONS=TRUE +LIBTARGET=NO +EXTENSIONNAME:=custom-tool-panel + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +#------------------------------------------------------------------- + +#---- extension version +EXTENSION_VERSION_BASE=0.1 +.IF ( "$(CWS_WORK_STAMP)" == "" ) || ( "$(UPDATER)" == "YES" ) + EXTENSION_VERSION=$(EXTENSION_VERSION_BASE) +.ELSE + EXTENSION_VERSION=$(EXTENSION_VERSION_BASE).cws.$(CWS_WORK_STAMP) +.ENDIF + +#---- extension title package name +EXTENSION_TITLE=Custom Tool Panel Example +EXTENSION_ZIPNAME=$(EXTENSIONNAME)-$(EXTENSION_VERSION_BASE)-$(RTL_OS:l)-$(RTL_ARCH:l) + +#-------------------------------------------------- + +SHL1DLLPRE= +SHL1TARGET=$(TARGET).uno +LIB1TARGET=$(SLB)/$(SHL1TARGET).lib +LIB1OBJFILES= \ + $(SLO)/ctp_factory.obj \ + $(SLO)/ctp_services.obj \ + $(SLO)/ctp_panel.obj + +SHL1STDLIBS= \ + $(CPPULIB) \ + $(SALLIB) \ + $(SALHELPERLIB) \ + $(CPPUHELPERLIB) + +SHL1VERSIONMAP=$(SOLARSRC)/solenv/src/component.map +SHL1LIBS= $(LIB1TARGET) +SHL1DEF= $(MISC)/$(SHL1TARGET).def +SHL1RPATH= OXT +DEF1NAME= $(SHL1TARGET) + +# create Extension ----------------------------- + +COMPONENT_CONFIGDEST=. + +COMPONENT_XCU = \ + $(EXTENSIONDIR)/WriterWindowState.xcu \ + $(EXTENSIONDIR)/CalcWindowState.xcu \ + $(EXTENSIONDIR)/DrawWindowState.xcu \ + $(EXTENSIONDIR)/ImpressWindowState.xcu \ + $(EXTENSIONDIR)/Factories.xcu + +COMPONENT_LIBRARIES = \ + $(EXTENSIONDIR)/$(SHL1TARGET)$(DLLPOST) + +COMPONENT_IMAGES= \ + $(EXTENSIONDIR)/panel.png + +# ........ dependencies for packaging the extension ........ +EXTENSION_PACKDEPS=makefile.mk $(COMPONENT_IMAGES) + +# --- Targets ------------------------------------------------------ +.INCLUDE : extension_pre.mk +.INCLUDE : target.mk +.INCLUDE : extension_post.mk + +$(EXTENSIONDIR)/%.png : ./%.png + @@-$(MKDIRHIER) $(@:d) + @$(COPY) $< $@ > $(NULLDEV) + +$(EXTENSIONDIR)/WriterWindowState.xcu: ./WriterWindowState.xcu + @@-$(MKDIRHIER) $(@:d) + $(COMMAND_ECHO)$(TYPE) ./WriterWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/WriterWindowState.xcu + +$(EXTENSIONDIR)/CalcWindowState.xcu: ./CalcWindowState.xcu + @@-$(MKDIRHIER) $(@:d) + $(COMMAND_ECHO)$(TYPE) ./CalcWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/CalcWindowState.xcu + +$(EXTENSIONDIR)/DrawWindowState.xcu: ./DrawWindowState.xcu + @@-$(MKDIRHIER) $(@:d) + $(COMMAND_ECHO)$(TYPE) ./DrawWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/DrawWindowState.xcu + +$(EXTENSIONDIR)/ImpressWindowState.xcu: ./ImpressWindowState.xcu + @@-$(MKDIRHIER) $(@:d) + $(COMMAND_ECHO)$(TYPE) ./ImpressWindowState.xcu | sed s/UPDATED_IDENTIFIER/$(IMPLEMENTATION_IDENTIFIER)/ > $(EXTENSIONDIR)/ImpressWindowState.xcu + diff --git a/sfx2/workben/custompanel/manifest.xml b/sfx2/workben/custompanel/manifest.xml new file mode 100644 index 000000000000..9122d16a4189 --- /dev/null +++ b/sfx2/workben/custompanel/manifest.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!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.uno-component;type=native" + manifest:full-path="custompanel.unoSHARED_EXTENSION"/> + <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" + manifest:full-path="WriterWindowState.xcu"/> + <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" + manifest:full-path="CalcWindowState.xcu"/> + <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" + manifest:full-path="DrawWindowState.xcu"/> + <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" + manifest:full-path="ImpressWindowState.xcu"/> + <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" + manifest:full-path="Factories.xcu"/> + <!-- <manifest:file-entry manifest:media-type="image/png" + manifest:full-path="panel.png"/>--> +</manifest:manifest> diff --git a/sfx2/workben/custompanel/panel.png b/sfx2/workben/custompanel/panel.png Binary files differnew file mode 100644 index 000000000000..2438714af8a6 --- /dev/null +++ b/sfx2/workben/custompanel/panel.png diff --git a/svx/inc/extrusioncontrols.hxx b/svx/inc/extrusioncontrols.hxx deleted file mode 100644 index 4560c7463bc9..000000000000 --- a/svx/inc/extrusioncontrols.hxx +++ /dev/null @@ -1,390 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SVX_EXTRUSION_CONTROLS_HXX -#define _SVX_EXTRUSION_CONTROLS_HXX - -#include <svtools/valueset.hxx> -#include <svl/lstner.hxx> -#include <sfx2/tbxctrl.hxx> -#include <svtools/svtreebx.hxx> -#ifndef _SV_BUTTON_HXX -#include <vcl/button.hxx> -#endif -#include <vcl/dialog.hxx> -#include <vcl/field.hxx> -#include <com/sun/star/frame/XFrame.hpp> -#include "svx/svxdllapi.h" - -class SfxBindings; -class ToolbarMenu; -class SfxStatusForwarder; - -//======================================================================== - -namespace svx -{ -class ToolboxButtonColorUpdater; - -class ExtrusionDirectionWindow : public SfxPopupWindow -{ - using FloatingWindow::StateChanged; - -private: - ToolbarMenu* mpMenu; - ValueSet* mpDirectionSet; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - - SfxStatusForwarder* mpDirectionForewarder; - SfxStatusForwarder* mpProjectionForewarder; - - Image maImgDirection[9]; - Image maImgDirectionH[9]; - - Image maImgPerspective; - Image maImgPerspectiveH; - Image maImgParallel; - Image maImgParallelH; - - bool mbPopupMode; - - DECL_LINK( SelectHdl, void * ); - void FillValueSet(); - - void implSetDirection( sal_Int32 nSkew, bool bEnabled = true ); - void implSetProjection( sal_Int32 nProjection, bool bEnabled = true ); - void implInit(); - -protected: - virtual BOOL Close(); - virtual void PopupModeEnd(); - - /** This function is called when the window gets the focus. It grabs - the focus to the line ends value set so that it can be controlled with - the keyboard. - */ - virtual void GetFocus (void); - -public: - ExtrusionDirectionWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); - ExtrusionDirectionWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ); - ~ExtrusionDirectionWindow(); - - void StartSelection(); - - virtual SfxPopupWindow* Clone() const; - - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); -}; - -//======================================================================== - -class SVX_DLLPUBLIC ExtrusionDirectionControl : public SfxToolBoxControl -{ -public: - SFX_DECL_TOOLBOX_CONTROL(); - ExtrusionDirectionControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); - ~ExtrusionDirectionControl(); - - virtual void StateChanged( USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState ); - virtual SfxPopupWindowType GetPopupWindowType() const; - virtual SfxPopupWindow* CreatePopupWindow(); -}; - -//======================================================================== - -class ExtrusionDepthWindow : public SfxPopupWindow -{ - using FloatingWindow::StateChanged; - -private: - ToolbarMenu* mpMenu; - - Image maImgDepth0; - Image maImgDepth1; - Image maImgDepth2; - Image maImgDepth3; - Image maImgDepth4; - Image maImgDepthInfinity; - - Image maImgDepth0h; - Image maImgDepth1h; - Image maImgDepth2h; - Image maImgDepth3h; - Image maImgDepth4h; - Image maImgDepthInfinityh; - - SfxStatusForwarder* mpDepthForewarder; - SfxStatusForwarder* mpMetricForewarder; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - - bool mbPopupMode; - FieldUnit meUnit; - double mfDepth; - bool mbEnabled; - - DECL_LINK( SelectHdl, void * ); - - void implFillStrings( FieldUnit eUnit ); - void implSetDepth( double fDepth, bool bEnabled ); - void implInit(); - -protected: - virtual BOOL Close(); - virtual void PopupModeEnd(); - - /** This function is called when the window gets the focus. It grabs - the focus to the line ends value set so that it can be controlled with - the keyboard. - */ - virtual void GetFocus (void); - -public: - ExtrusionDepthWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); - ExtrusionDepthWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ); - ~ExtrusionDepthWindow(); - - void StartSelection(); - - virtual SfxPopupWindow* Clone() const; - - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); -}; - -//======================================================================== - -class SVX_DLLPUBLIC ExtrusionDepthControl : public SfxToolBoxControl -{ -public: - SFX_DECL_TOOLBOX_CONTROL(); - ExtrusionDepthControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); - ~ExtrusionDepthControl(); - - virtual void StateChanged( USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState ); - virtual SfxPopupWindowType GetPopupWindowType() const; - virtual SfxPopupWindow* CreatePopupWindow(); -}; - -//======================================================================== - -class ExtrusionLightingWindow : public SfxPopupWindow -{ - using FloatingWindow::StateChanged; - -private: - ToolbarMenu* mpMenu; - ValueSet* mpLightingSet; - - Image maImgLightingOff[9]; - Image maImgLightingOn[9]; - Image maImgLightingPreview[9]; - - Image maImgLightingOffh[9]; - Image maImgLightingOnh[9]; - Image maImgLightingPreviewh[9]; - - Image maImgBright; - Image maImgNormal; - Image maImgDim; - Image maImgBrighth; - Image maImgNormalh; - Image maImgDimh; - - SfxStatusForwarder* mpLightingDirectionForewarder; - SfxStatusForwarder* mpLightingIntensityForewarder; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - - bool mbPopupMode; - int mnLevel; - bool mbLevelEnabled; - int mnDirection; - bool mbDirectionEnabled; - - void implSetIntensity( int nLevel, bool bEnabled ); - void implSetDirection( int nDirection, bool bEnabled ); - void implInit(); - - DECL_LINK( SelectHdl, void * ); - -protected: - virtual BOOL Close(); - virtual void PopupModeEnd(); - - /** This function is called when the window gets the focus. It grabs - the focus to the line ends value set so that it can be controlled with - the keyboard. - */ - virtual void GetFocus (void); - -public: - ExtrusionLightingWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); - ExtrusionLightingWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ); - ~ExtrusionLightingWindow(); - - void StartSelection(); - - virtual SfxPopupWindow* Clone() const; - - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); -}; - -//======================================================================== - -class SVX_DLLPUBLIC ExtrusionLightingControl : public SfxToolBoxControl -{ -public: - SFX_DECL_TOOLBOX_CONTROL(); - ExtrusionLightingControl( USHORT nSlotid, USHORT nId, ToolBox& rTbx ); - ~ExtrusionLightingControl(); - - virtual void StateChanged( USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState ); - virtual SfxPopupWindowType GetPopupWindowType() const; - virtual SfxPopupWindow* CreatePopupWindow(); -}; - -//======================================================================== - -class ExtrusionSurfaceWindow : public SfxPopupWindow -{ - using FloatingWindow::StateChanged; -private: - ToolbarMenu* mpMenu; - - Image maImgSurface1; - Image maImgSurface2; - Image maImgSurface3; - Image maImgSurface4; - Image maImgSurface1h; - Image maImgSurface2h; - Image maImgSurface3h; - Image maImgSurface4h; - - SfxStatusForwarder* mpSurfaceForewarder; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - - bool mbPopupMode; - - DECL_LINK( SelectHdl, void * ); - - void implSetSurface( int nSurface, bool bEnabled ); - void implInit(); - -protected: - virtual BOOL Close(); - virtual void PopupModeEnd(); - - /** This function is called when the window gets the focus. It grabs - the focus to the line ends value set so that it can be controlled with - the keyboard. - */ - virtual void GetFocus (void); - -public: - ExtrusionSurfaceWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); - ExtrusionSurfaceWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ); - ~ExtrusionSurfaceWindow(); - - void StartSelection(); - - virtual SfxPopupWindow* Clone() const; - - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); -}; - -//======================================================================== - -class SVX_DLLPUBLIC ExtrusionSurfaceControl : public SfxToolBoxControl -{ -public: - SFX_DECL_TOOLBOX_CONTROL(); - ExtrusionSurfaceControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); - ~ExtrusionSurfaceControl(); - - virtual void StateChanged( USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState ); - virtual SfxPopupWindowType GetPopupWindowType() const; - virtual SfxPopupWindow* CreatePopupWindow(); -}; - -//======================================================================== - -class SVX_DLLPUBLIC ExtrusionColorControl : public SfxToolBoxControl -{ -private: - ToolboxButtonColorUpdater* mpBtnUpdater; - -public: - SFX_DECL_TOOLBOX_CONTROL(); - ExtrusionColorControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); - ~ExtrusionColorControl(); - - virtual void StateChanged( USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState ); - virtual SfxPopupWindowType GetPopupWindowType() const; - virtual SfxPopupWindow* CreatePopupWindow(); -}; - -//======================================================================== - -class ExtrusionDepthDialog : public ModalDialog -{ - FixedText maFLDepth; - MetricField maMtrDepth; - OKButton maOKButton; - CancelButton maCancelButton; - HelpButton maHelpButton; - - FieldUnit meDefaultUnit; - -public: - ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit ); - ~ExtrusionDepthDialog(); - - double getDepth() const; -}; - -} -#endif - diff --git a/svx/inc/extrusiondepthdialog.hxx b/svx/inc/extrusiondepthdialog.hxx new file mode 100644 index 000000000000..600e646e8cb6 --- /dev/null +++ b/svx/inc/extrusiondepthdialog.hxx @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_EXTRUSIONDEPTHDIALOG_HXX +#define _SVX_EXTRUSIONDEPTHDIALOG_HXX + +#include "svx/svxdllapi.h" + +#include <vcl/fixed.hxx> +#include <vcl/dialog.hxx> +#include <vcl/button.hxx> +#include <vcl/field.hxx> + +namespace svx { + +class ExtrusionDepthDialog : public ModalDialog +{ + FixedText maFLDepth; + MetricField maMtrDepth; + OKButton maOKButton; + CancelButton maCancelButton; + HelpButton maHelpButton; + + FieldUnit meDefaultUnit; + +public: + ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit ); + ~ExtrusionDepthDialog(); + + double getDepth() const; +}; + +} + +#endif // _SVX_EXTRUSIONDEPTHDIALOG_HXX + diff --git a/svx/inc/fontworkgallery.hxx b/svx/inc/fontworkgallery.hxx index 9f6b1f9f4b2f..40ac3cef966a 100644 --- a/svx/inc/fontworkgallery.hxx +++ b/svx/inc/fontworkgallery.hxx @@ -29,16 +29,16 @@ #ifndef _SVX_FONTWORK_GALLERY_DIALOG_HXX #define _SVX_FONTWORK_GALLERY_DIALOG_HXX -#ifndef _FIXED_HXX //autogen +#include "svx/svxdllapi.h" + #include <vcl/fixed.hxx> -#endif -#include <svtools/valueset.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/dialog.hxx> +#include <vcl/field.hxx> + +#include <svtools/valueset.hxx> + #include <sfx2/tbxctrl.hxx> -#include "svx/svxdllapi.h" #include <vector> @@ -50,7 +50,6 @@ class SdrObject; class SdrModel; class SfxBindings; -class ToolbarMenu; class SfxStatusForwarder; //------------------------------------------------------------------------ @@ -58,130 +57,6 @@ class SfxStatusForwarder; namespace svx { -class FontWorkAlignmentWindow : public SfxPopupWindow -{ - using FloatingWindow::StateChanged; -private: - ToolbarMenu* mpMenu; - - Image maImgAlgin1; - Image maImgAlgin2; - Image maImgAlgin3; - Image maImgAlgin4; - Image maImgAlgin5; - Image maImgAlgin1h; - Image maImgAlgin2h; - Image maImgAlgin3h; - Image maImgAlgin4h; - Image maImgAlgin5h; - - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - - bool mbPopupMode; - - DECL_LINK( SelectHdl, void * ); - - void implSetAlignment( int nAlignmentMode, bool bEnabled ); - void implInit(); - -protected: - virtual BOOL Close(); - virtual void PopupModeEnd(); - - /** This function is called when the window gets the focus. It grabs - the focus to the line ends value set so that it can be controlled with - the keyboard. - */ - virtual void GetFocus (void); - -public: - FontWorkAlignmentWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); - FontWorkAlignmentWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ); - ~FontWorkAlignmentWindow(); - - void StartSelection(); - - virtual SfxPopupWindow* Clone() const; - - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); -}; - -class SVX_DLLPUBLIC FontWorkAlignmentControl : public SfxToolBoxControl -{ -public: - SFX_DECL_TOOLBOX_CONTROL(); - FontWorkAlignmentControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); - ~FontWorkAlignmentControl(); - - virtual void StateChanged( USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState ); - virtual SfxPopupWindowType GetPopupWindowType() const; - virtual SfxPopupWindow* CreatePopupWindow(); -}; - -//------------------------------------------------------------------------ - -class FontWorkCharacterSpacingWindow : public SfxPopupWindow -{ - using FloatingWindow::StateChanged; -private: - ToolbarMenu* mpMenu; - - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - - bool mbPopupMode; - - DECL_LINK( SelectHdl, void * ); - - void implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled ); - void implSetKernCharacterPairs( sal_Bool bKernOnOff, bool bEnabled ); - void implInit(); - -protected: - virtual BOOL Close(); - virtual void PopupModeEnd(); - - /** This function is called when the window gets the focus. It grabs - the focus to the line ends value set so that it can be controlled with - the keyboard. - */ - virtual void GetFocus (void); - -public: - FontWorkCharacterSpacingWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); - FontWorkCharacterSpacingWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ); - ~FontWorkCharacterSpacingWindow(); - - void StartSelection(); - - virtual SfxPopupWindow* Clone() const; - - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); -}; - -class SVX_DLLPUBLIC FontWorkCharacterSpacingControl : public SfxToolBoxControl -{ -public: - SFX_DECL_TOOLBOX_CONTROL(); - FontWorkCharacterSpacingControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); - ~FontWorkCharacterSpacingControl(); - - virtual void StateChanged( USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState ); - virtual SfxPopupWindowType GetPopupWindowType() const; - virtual SfxPopupWindow* CreatePopupWindow(); -}; - -//------------------------------------------------------------------------ - class SVX_DLLPUBLIC FontWorkShapeTypeControl : public SfxToolBoxControl { using SfxToolBoxControl::Select; @@ -192,8 +67,6 @@ public: ~FontWorkShapeTypeControl(); virtual void Select( BOOL bMod1 = FALSE ); - virtual void StateChanged( USHORT nSID, SfxItemState eState, - const SfxPoolItem* pState ); virtual SfxPopupWindowType GetPopupWindowType() const; virtual SfxPopupWindow* CreatePopupWindow(); }; diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc index e328a39a0707..be037a1ca3cc 100644 --- a/svx/inc/globlmn_tmpl.hrc +++ b/svx/inc/globlmn_tmpl.hrc @@ -1332,17 +1332,38 @@ {\ MenuItem\ {\ - Identifier = SID_TRANSLITERATE_UPPER ; \ - Command = ".uno:ChangeCaseToUpper" ; \ - HelpID = SID_TRANSLITERATE_UPPER ; \ - Text [ en-US ] = "~Uppercase";\ + Identifier = SID_TRANSLITERATE_SENTENCE_CASE; \ + Command = ".uno:ChangeCaseToSentenceCase" ; \ + HelpID = SID_TRANSLITERATE_SENTENCE_CASE; \ + Text [ en-US ] = "~Sentence case";\ };\ MenuItem\ {\ Identifier = SID_TRANSLITERATE_LOWER; \ Command = ".uno:ChangeCaseToLower" ; \ HelpID = SID_TRANSLITERATE_LOWER; \ - Text [ en-US ] = "~Lowercase";\ + Text [ en-US ] = "~lowercase";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_UPPER ; \ + Command = ".uno:ChangeCaseToUpper" ; \ + HelpID = SID_TRANSLITERATE_UPPER ; \ + Text [ en-US ] = "~UPPERCASE";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_TITLE_CASE; \ + Command = ".uno:ChangeCaseToTitleCase" ; \ + HelpID = SID_TRANSLITERATE_TITLE_CASE; \ + Text [ en-US ] = "~Capitalize Every Word";\ + };\ + MenuItem\ + {\ + Identifier = SID_TRANSLITERATE_TOGGLE_CASE; \ + Command = ".uno:ChangeCaseToToggleCase" ; \ + HelpID = SID_TRANSLITERATE_TOGGLE_CASE; \ + Text [ en-US ] = "~tOGGLE cASE";\ };\ MenuItem\ {\ diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 6d9153818cde..1f6fe1538a85 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -278,6 +278,7 @@ #define HID_SVX_SENDMENU_SIGNANDENCRYPT (HID_SVX_START + 245) #define HID_SVX_TP_APPEARANCE (HID_SVX_START + 246) #define HID_SVX_TP_DESKTOP (HID_SVX_START + 247) +#define HID_CT_THES_ALTERNATIVES (HID_SVX_START + 248) // please adjust ACT_SVX_HID_END2 below if you add entries here! @@ -285,7 +286,7 @@ // Overrun check --------------------------------------------------------- // ----------------------------------------------------------------------- -#define ACT_SVX_HID_END (HID_SVX_START+247) +#define ACT_SVX_HID_END (HID_SVX_START+248) #if ACT_SVX_HID_END > HID_SVX_END #error Resource-Ueberlauf in #line, #file #endif diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index d193652b57fc..d193652b57fc 100644..100755 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc diff --git a/svx/inc/svx/extrusioncolorcontrol.hxx b/svx/inc/svx/extrusioncolorcontrol.hxx new file mode 100644 index 000000000000..ff4a53e65a41 --- /dev/null +++ b/svx/inc/svx/extrusioncolorcontrol.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_EXTRUSIONCOLORCONTROL_HXX +#define _SVX_EXTRUSIONCOLORCONTROL_HXX + +#include <sfx2/tbxctrl.hxx> +#include "svx/svxdllapi.h" +#include "svx/tbxcolorupdate.hxx" + +namespace svx { + +class SVX_DLLPUBLIC ExtrusionColorControl : public SfxToolBoxControl +{ +private: + ToolboxButtonColorUpdater* mpBtnUpdater; + +public: + SFX_DECL_TOOLBOX_CONTROL(); + ExtrusionColorControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ); + ~ExtrusionColorControl(); + + virtual void StateChanged( USHORT nSID, SfxItemState eState, + const SfxPoolItem* pState ); + virtual SfxPopupWindowType GetPopupWindowType() const; + virtual SfxPopupWindow* CreatePopupWindow(); +}; + +} + +#endif // _SVX_EXTRUSIONCOLORCONTROL_HXX + diff --git a/svx/inc/svx/fmshell.hxx b/svx/inc/svx/fmshell.hxx index 0688beec65b3..f37eeab8c5e6 100644 --- a/svx/inc/svx/fmshell.hxx +++ b/svx/inc/svx/fmshell.hxx @@ -60,6 +60,11 @@ namespace com { namespace sun { namespace star { namespace form { } } } } } +namespace svx +{ + class ISdrObjectFilter; +} + //======================================================================== class SVX_DLLPUBLIC FmDesignModeChangedHint : public SfxHint { @@ -146,11 +151,28 @@ public: const OutputDevice& _rDevice, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _out_rxControl ) const; + ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > GetFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, const SdrView& _rView, const OutputDevice& _rDevice ) const; + + /** puts the focus into the document window, if current a form control has the focus. Otherwise, moves the focus + to the control belonging to the given SdrUnoObj. + */ + void ToggleControlFocus( + const SdrUnoObj& i_rNextCandidate, + const SdrView& i_rView, + OutputDevice& i_rDevice + ) const; + + ::std::auto_ptr< ::svx::ISdrObjectFilter > + CreateFocusableControlFilter( + const SdrView& i_rView, + const OutputDevice& i_rDevice + ) const; + sal_Bool IsDesignMode() const { return m_bDesignMode; } void SetDesignMode( sal_Bool _bDesignMode ); diff --git a/svx/inc/svx/fmtools.hxx b/svx/inc/svx/fmtools.hxx index 36fa180fa348..b39f46e85d14 100644 --- a/svx/inc/svx/fmtools.hxx +++ b/svx/inc/svx/fmtools.hxx @@ -76,6 +76,7 @@ #include <comphelper/uno3.hxx> #include <comphelper/stl_types.hxx> #include <cppuhelper/implbase1.hxx> +#include <svl/svstdarr.hxx> #include <set> diff --git a/svx/inc/svx/gridctrl.hxx b/svx/inc/svx/gridctrl.hxx index 6334137bc221..445d986b2c5e 100644 --- a/svx/inc/svx/gridctrl.hxx +++ b/svx/inc/svx/gridctrl.hxx @@ -29,6 +29,8 @@ #include <tools/list.hxx> #include <com/sun/star/sdbc/XRowSet.hpp> +#include <com/sun/star/sdbc/XRowSetListener.hpp> +#include <com/sun/star/sdb/XRowsChangeListener.hpp> #include <com/sun/star/beans/PropertyChangeEvent.hpp> #include <com/sun/star/util/XNumberFormatter.hpp> #include <com/sun/star/util/Date.hpp> @@ -247,6 +249,8 @@ private: // For that reason we have to listen to some properties of our data source. ::comphelper::OPropertyChangeMultiplexer* m_pDataSourcePropMultiplexer; FmXGridSourcePropListener* m_pDataSourcePropListener; + ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XRowsChangeListener> + m_xRowSetListener; // get notification when rows were changed void* m_pFieldListeners; // property listeners for field values @@ -523,15 +527,20 @@ public: void setGridListener( FmGridListener* _pListener ) { m_pGridListener = _pListener; } // helper class to grant access to selected methods from within the DbCellControl class - struct GrantCellControlAccess + struct GrantControlAccess { friend class DbCellControl; + friend class RowSetEventListener; protected: - GrantCellControlAccess() { } + GrantControlAccess() { } }; /// called when a controller needs to be re-initialized - void refreshController(sal_uInt16 _nColId, GrantCellControlAccess _aAccess); + void refreshController(sal_uInt16 _nColId, GrantControlAccess _aAccess); + + CursorWrapper* GetSeekCursor(GrantControlAccess /*_aAccess*/) const { return m_pSeekCursor; } + const DbGridRowRef& GetSeekRow(GrantControlAccess /*_aAccess*/) const { return m_xSeekRow; } + void SetSeekPos(sal_Int32 nPos,GrantControlAccess /*_aAccess*/) {m_nSeekPos = nPos;} /** @return @@ -586,6 +595,7 @@ protected: const DbGridRowRef& GetPaintRow() const { return m_xPaintRow; } CursorWrapper* GetSeekCursor() const { return m_pSeekCursor; } + void ConnectToFields(); void DisconnectFromFields(); diff --git a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx index aa52efd03c41..1fbf0b6add3d 100644 --- a/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx +++ b/svx/inc/svx/sdr/overlay/overlaybitmapex.hxx @@ -47,13 +47,16 @@ namespace sdr sal_uInt16 mnCenterX; sal_uInt16 mnCenterY; + // optional transparency + double mfAlpha; + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); public: OverlayBitmapEx( const basegfx::B2DPoint& rBasePos, const BitmapEx& rBitmapEx, - sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0); + sal_uInt16 nCenX = 0, sal_uInt16 nCenY = 0, double fAlpha = 0.0 ); virtual ~OverlayBitmapEx(); const BitmapEx& getBitmapEx() const { return maBitmapEx; } diff --git a/svx/inc/svx/sdrobjectfilter.hxx b/svx/inc/svx/sdrobjectfilter.hxx new file mode 100644 index 000000000000..55eda09c99af --- /dev/null +++ b/svx/inc/svx/sdrobjectfilter.hxx @@ -0,0 +1,58 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef SDROBJECTFILTER_HXX +#define SDROBJECTFILTER_HXX + +#include "svx/svxdllapi.h" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +class SdrObject; + +//........................................................................ +namespace svx +{ +//........................................................................ + + //==================================================================== + //= SdrObjectFilter + //==================================================================== + /** specifies a boolean predicate on the set of all SdrObjects - vulgo a filter. + */ + class SVX_DLLPUBLIC SAL_NO_VTABLE ISdrObjectFilter + { + public: + virtual bool includeObject( const SdrObject& i_rObject ) const = 0; + + virtual ~ISdrObjectFilter() = 0; + }; + +//........................................................................ +} // namespace svx +//........................................................................ + +#endif // SDROBJECTFILTER_HXX diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx index d4b4d5d3369e..f96b650d2be4 100644 --- a/svx/inc/svx/svdhdl.hxx +++ b/svx/inc/svx/svdhdl.hxx @@ -55,6 +55,7 @@ class SdrHdlList; class SdrMarkView; class SdrObject; class SdrPageView; +class MouseEvent; //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -184,6 +185,9 @@ protected: // cleanup marker if one exists void GetRidOfIAObject(); +private: + bool mbMouseOver; // is true if the mouse is over this handle + protected: ::sdr::overlay::OverlayObject* CreateOverlayObject( const basegfx::B2DPoint& rPos, @@ -241,6 +245,16 @@ public: virtual BOOL IsFocusHdl() const; void SetMoveOutside( bool bMoveOutside ); + + /** is called when the mouse enters the area of this handle. If the handle changes his + visualisation during mouse over it must override this method and call Touch(). */ + virtual void onMouseEnter(const MouseEvent& rMEvt); + + /** is called when the mouse leaves the area of this handle. If the handle changes his + visualisation during mouse over it must override this method and call Touch(). */ + virtual void onMouseLeave(); + + bool isMouseOver() const; }; //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/inc/svx/svdmrkv.hxx b/svx/inc/svx/svdmrkv.hxx index eecbc1f2c4f3..fc136b8e5a3c 100644 --- a/svx/inc/svx/svdmrkv.hxx +++ b/svx/inc/svx/svdmrkv.hxx @@ -169,6 +169,7 @@ protected: virtual void SetMarkRects(); // Rects an den PageViews virtual void CheckMarked(); // MarkList nach Del und Lock Layer durchsuchen... virtual void AddDragModeHdl(SdrDragMode eMode); + virtual BOOL MouseMove(const MouseEvent& rMEvt, Window* pWin); // add custom handles (used by other apps, e.g. AnchorPos) virtual void AddCustomHdl(); diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx index 7acc69ab5b9f..cf7ca2eda5ee 100644 --- a/svx/inc/svx/svdobj.hxx +++ b/svx/inc/svx/svdobj.hxx @@ -810,6 +810,14 @@ public: virtual void SetLogicRect(const Rectangle& rRect); virtual void NbcSetLogicRect(const Rectangle& rRect); + /** the defaul is to set the logic rect to the given rectangle rMaxRect. If the shape + has an intrinsic aspect ratio it may set the logic rect so the aspect + ratio is kept but still inside the rectangle rMaxRect. + + If bShrinkOnly is set to true, the size of the current logic rect will not + be changed if it is smaller than the given rectangle rMaxRect. */ + virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false ); + // Drehwinkel und Shear virtual long GetRotateAngle() const; virtual long GetShearAngle(FASTBOOL bVertical=FALSE) const; diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx index 89e2d35c9220..23d9204ca891 100644 --- a/svx/inc/svx/svdograf.hxx +++ b/svx/inc/svx/svdograf.hxx @@ -202,7 +202,7 @@ public: virtual SdrObject* DoConvertToPolyObj(BOOL bBezier) const; - void AdjustToMaxRect( const Rectangle& rMaxRect, BOOL bShrinkOnly ); + virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false ); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); diff --git a/svx/inc/svx/svdomedia.hxx b/svx/inc/svx/svdomedia.hxx index b572bb989451..5b0980d8bb30 100644 --- a/svx/inc/svx/svdomedia.hxx +++ b/svx/inc/svx/svdomedia.hxx @@ -63,6 +63,8 @@ public: virtual void operator=(const SdrObject& rObj); + virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false ); + public: void setURL( const ::rtl::OUString& rURL ); diff --git a/svx/inc/svx/svdotable.hxx b/svx/inc/svx/svdotable.hxx index a40b33c3ad18..02044f0dbc25 100644 --- a/svx/inc/svx/svdotable.hxx +++ b/svx/inc/svx/svdotable.hxx @@ -234,6 +234,7 @@ public: virtual const Rectangle& GetLogicRect() const; virtual void NbcSetLogicRect(const Rectangle& rRect); + virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false ); virtual sal_uInt32 GetSnapPointCount() const; virtual Point GetSnapPoint(sal_uInt32 i) const; diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index b53b5f6dac26..7a90b5c75526 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -383,6 +383,7 @@ #define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hard space */ #define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* hyphen withou break*/ +//!! be aware to not overwrite something that is used in sw/inc/cmdid.h already !! #define FN_FORMAT (SID_SW_START + 400) #define FN_SET_JUSTIFY_PARA (FN_FORMAT + 21) #define FN_FORMAT_RESET (FN_FORMAT + 69) @@ -706,6 +707,7 @@ #define SID_ATTR_TEXT_FITTOSIZE ( SID_SVX_START + 367 ) #define SID_ATTR_BRUSH_ROW ( SID_SVX_START + 368 ) #define SID_OPTFILTER_MSOFFICE ( SID_SVX_START + 369 ) +//#define SID_TASKPANE ( SID_SVX_START + 370 ) -> sfxsids.hrc #define SID_IMAP ( SID_SVX_START + 371 ) #define SID_IMAP_DLG ( SID_SVX_START + 372 ) #define SID_IMAP_SELECT ( SID_SVX_START + 373 ) @@ -1026,7 +1028,7 @@ #define SID_DSBROWSER_EXPLORER ( SID_SVX_START + 764 ) #define SID_FM_CREATE_FIELDCONTROL ( SID_SVX_START + 765 ) #define SID_FM_DATACCESS_DESCRIPTOR ( SID_SVX_START + 766 ) -#define SID_FM_GRABCONTROLFOCUS ( SID_SVX_START + 767 ) +#define SID_FM_TOGGLECONTROLFOCUS ( SID_SVX_START + 767 ) #define SID_FM_SCROLLBAR ( SID_SVX_START + 768 ) #define SID_FM_SPINBUTTON ( SID_SVX_START + 769 ) #define SID_FM_CONVERTTO_SCROLLBAR ( SID_SVX_START + 770 ) @@ -1238,6 +1240,7 @@ #define SID_TABLE_STYLE_SETTINGS (SID_SVX_START+1089) #define SID_CHAR_DLG_PREVIEW_STRING (SID_SVX_START+1090) #define SID_RECHECK_DOCUMENT (SID_SVX_START+1091) + #define SID_OBJECT_MIRROR (SID_SVX_START+1093) #define SID_DELETE_POSTIT (SID_SVX_START+1094) @@ -1249,8 +1252,12 @@ #define SID_DELETEALLBYAUTHOR_POSTIT (SID_SVX_START+1100) #define SID_INSERT_POSTIT (SID_SVX_START+1101) +#define SID_TRANSLITERATE_SENTENCE_CASE (SID_SVX_START+1102) +#define SID_TRANSLITERATE_TITLE_CASE (SID_SVX_START+1103) +#define SID_TRANSLITERATE_TOGGLE_CASE (SID_SVX_START+1104) + // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id -#define SID_SVX_FIRSTFREE SID_INSERT_POSTIT + 1 +#define SID_SVX_FIRSTFREE (SID_TRANSLITERATE_TOGGLE_CASE + 1) // -------------------------------------------------------------------------- // Overflow check for slot IDs diff --git a/svx/inc/tbunocontroller.hxx b/svx/inc/tbunocontroller.hxx index fa7329a525e1..266dc917f33e 100644 --- a/svx/inc/tbunocontroller.hxx +++ b/svx/inc/tbunocontroller.hxx @@ -75,6 +75,7 @@ class FontHeightToolBoxControl : public svt::ToolboxController, virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException); void dispatchCommand( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ); + using svt::ToolboxController::dispatchCommand; private: SvxFontSizeBox_Impl* m_pBox; diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx new file mode 100644 index 000000000000..aec07042e1fc --- /dev/null +++ b/svx/inc/tbunosearchcontrollers.hxx @@ -0,0 +1,282 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __TBUNOSEARCHCONTROLLERS_HXX_ +#define __TBUNOSEARCHCONTROLLERS_HXX_ + +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/frame/DispatchDescriptor.hpp> +#include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XDispatchHelper.hpp> +#include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XInitialization.hpp> + +#include <comphelper/sequenceasvector.hxx> +#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/weak.hxx> +#include <svtools/toolboxcontroller.hxx> +#include <vcl/combobox.hxx> +#include <vcl/window.hxx> + +#include <map> + +namespace css = ::com::sun::star ; +namespace svx +{ + +class FindTextFieldControl : public ComboBox +{ +public: + FindTextFieldControl( Window* pParent, WinBits nStyle, + css::uno::Reference< css::frame::XFrame >& xFrame, + css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); + virtual ~FindTextFieldControl(); + + virtual void Modify(); + virtual long PreNotify( NotifyEvent& rNEvt ); + + void InitControls_Impl(); + void Remember_Impl(const String& rStr); + +private: + + css::uno::Reference< css::frame::XFrame > m_xFrame; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager; + sal_Bool m_bToClearTextField; + +}; + +class SearchToolbarControllersManager +{ +public: + + SearchToolbarControllersManager(); + ~SearchToolbarControllersManager(); + + static SearchToolbarControllersManager* createControllersManager(); + + void registryController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL ); + void freeController ( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL ); + css::uno::Reference< css::frame::XStatusListener > findController( const css::uno::Reference< css::frame::XFrame >& xFrame, const ::rtl::OUString& sCommandURL ); + +private: + + static SearchToolbarControllersManager* m_pInstance; + + typedef ::comphelper::SequenceAsVector< css::beans::PropertyValue > SearchToolbarControllersVec; + typedef ::std::map< css::uno::Reference< css::frame::XFrame >, SearchToolbarControllersVec > SearchToolbarControllersMap; + SearchToolbarControllersMap aSearchToolbarControllersMap; + +}; + +class FindTextToolbarController : public svt::ToolboxController, + public css::lang::XServiceInfo +{ +public: + + FindTextToolbarController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager ); + ~FindTextToolbarController(); + + // XInterface + virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.FindTextToolboxController" )); + } + + static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XComponent + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException); + virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException ); + + // XStatusListener + virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException ); + + DECL_LINK(EditModifyHdl, void*); + +private: + + FindTextFieldControl* m_pFindTextFieldControl; + + USHORT m_nDownSearchId; // item position of findbar + USHORT m_nUpSearchId; // item position of findbar + +}; + +class DownSearchToolboxController : public svt::ToolboxController, + public css::lang::XServiceInfo +{ +public: + + DownSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager ); + ~DownSearchToolboxController(); + + // XInterface + virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.DownSearchToolboxController" )); + } + + static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XComponent + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException); + + // XStatusListener + virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ); + +}; + +class UpSearchToolboxController : public svt::ToolboxController, + public css::lang::XServiceInfo +{ +public: + + UpSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager ); + ~UpSearchToolboxController(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svx.UpSearchToolboxController" )); + } + + static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XComponent + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException ); + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException); + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw ( css::uno::RuntimeException ); + + // XStatusListener + virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ); + +}; + +// protocol handler for "vnd.sun.star.findbar:*" URLs +// The dispatch object will be used for shortcut commands for findbar +class FindbarDispatcher : public css::lang::XServiceInfo, + public css::lang::XInitialization, + public css::frame::XDispatchProvider, + public css::frame::XDispatch, + public ::cppu::OWeakObject +{ +public: + + FindbarDispatcher( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); + virtual ~FindbarDispatcher(); + + // XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException ); + + static ::rtl::OUString getImplementationName_Static() throw() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.Impl.FindbarDispatcher" )); + } + + static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ); + + // XDispatchProvider + virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL, const ::rtl::OUString& sTargetFrameName , sal_Int32 nSearchFlags ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptions ) throw( css::uno::RuntimeException ); + + // XDispatch + virtual void SAL_CALL dispatch( const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener, const css::util::URL& aURL ) throw( css::uno::RuntimeException ); + virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener, const css::util::URL& aURL ) throw( css::uno::RuntimeException ); + +private: + + css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory; + css::uno::Reference< css::frame::XFrame > m_xFrame; + +}; + +// createInstance +css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); +css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ); + +} + +#endif // __TBUNOSEARCHCONTROLLERS_HXX_ diff --git a/svx/prj/build.lst b/svx/prj/build.lst index 7fe1114e7e66..9f7597488644 100644 --- a/svx/prj/build.lst +++ b/svx/prj/build.lst @@ -30,9 +30,10 @@ sx svx\source\unodraw nmake - all sx_undrw sx_inc NULL sx svx\source\unogallery nmake - all sx_ungal sx_inc NULL sx svx\source\gallery2 nmake - all sx_gall sx_inc NULL sx svx\source\xml nmake - all sx_xml sx_inc NULL +sx svx\source\core nmake - all sx_core sx_inc NULL sx svx\source\accessibility nmake - all sx_accessibility sx_inc NULL sx svx\source\customshapes nmake - all sx_customshapes sx_inc NULL sx svx\source\toolbars nmake - all sx_toolbars sx_inc NULL -sx svx\util nmake - all sx_util sx_3deng sx_dlg sx_draw sx_attribute sx_properties sx_contact sx_event sx_animation sx_primitive2d sx_primitive3d sx_overlay sx_fmcmp sx_form sx_gall sx_items sx_mnuc sx_sdi sx_stbc sx_tbxc sx_undrw sx_ungal sx_xml sx_xout sx_accessibility sx_intro sx_customshapes sx_toolbars sx_table sx_smarttags NULL +sx svx\util nmake - all sx_util sx_3deng sx_dlg sx_draw sx_attribute sx_properties sx_contact sx_event sx_animation sx_primitive2d sx_primitive3d sx_overlay sx_fmcmp sx_form sx_gall sx_items sx_mnuc sx_sdi sx_stbc sx_tbxc sx_undrw sx_ungal sx_xml sx_core sx_xout sx_accessibility sx_intro sx_customshapes sx_toolbars sx_table sx_smarttags NULL sx svx\source\gengal nmake - all sx_gengal sx_util NULL sx svx\qa\unoapi nmake - all sx_qa_unoapi NULL diff --git a/svx/prj/d.lst b/svx/prj/d.lst index 7d2f508d9d21..2403c04c43a0 100644 --- a/svx/prj/d.lst +++ b/svx/prj/d.lst @@ -2,9 +2,6 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid mkdir: %COMMON_DEST%\res%_EXT% mkdir: %_DEST%\xml%_EXT%\uiconfig mkdir: %_DEST%\xml%_EXT%\uiconfig\global -mkdir: %_DEST%\xml%_EXT%\uiconfig\global\accelerator -mkdir: %_DEST%\xml%_EXT%\uiconfig\global\accelerator\en-US -mkdir: %_DEST%\xml%_EXT%\uiconfig\global\accelerator\es ..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid ..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.* @@ -35,7 +32,6 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\%__SRC%\inc\svxslots.hxx %_DEST%\inc%_EXT%\svx\svxslots.hxx ..\%__SRC%\inc\globlmn.hrc %_DEST%\inc%_EXT%\svx\globlmn.hrc ..\source\inc\fmresids.hrc %_DEST%\inc%_EXT%\svx\fmresids.hrc -..\source\items\boxobj.hxx %_DEST%\inc%_EXT%\svx\boxobj.hxx ..\source\dialog\hyprlink.hxx %_DEST%\inc%_EXT%\svx\hyprlink.hxx ../source/customshapes/EnhancedCustomShapeTypeNames.hxx %_DEST%\inc%_EXT%\svx\EnhancedCustomShapeTypeNames.hxx @@ -46,20 +42,12 @@ mkdir: %_DEST%\inc%_EXT%\svx ../inc/svdglob.hxx %_DEST%\inc%_EXT%\svx\svdglob.hxx ../source/svdraw/svditext.hxx %_DEST%\inc%_EXT%\svx\svditext.hxx -..\inc\AccessibleSelectionBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleSelectionBase.hxx -..\inc\AccessibleStaticTextBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleStaticTextBase.hxx -..\inc\acorrcfg.hxx %_DEST%\inc%_EXT%\svx\acorrcfg.hxx ..\inc\ActionDescriptionProvider.hxx %_DEST%\inc%_EXT%\svx\ActionDescriptionProvider.hxx ..\inc\anchorid.hxx %_DEST%\inc%_EXT%\svx\anchorid.hxx -..\inc\asiancfg.hxx %_DEST%\inc%_EXT%\svx\asiancfg.hxx -..\inc\bolnitem.hxx %_DEST%\inc%_EXT%\svx\bolnitem.hxx -..\inc\bulitem.hxx %_DEST%\inc%_EXT%\svx\bulitem.hxx -..\inc\charhiddenitem.hxx %_DEST%\inc%_EXT%\svx\charhiddenitem.hxx ..\inc\chrtitem.hxx %_DEST%\inc%_EXT%\svx\chrtitem.hxx ..\inc\clipboardctl.hxx %_DEST%\inc%_EXT%\svx\clipboardctl.hxx ..\inc\clipfmtitem.hxx %_DEST%\inc%_EXT%\svx\clipfmtitem.hxx ..\inc\connctrl.hxx %_DEST%\inc%_EXT%\svx\connctrl.hxx -..\inc\countryid.hxx %_DEST%\inc%_EXT%\svx\countryid.hxx ..\inc\databaseregistrationui.hxx %_DEST%\inc%_EXT%\svx\databaseregistrationui.hxx ..\inc\dbexch.hrc %_DEST%\inc%_EXT%\svx\dbexch.hrc ..\inc\DescriptionGenerator.hxx %_DEST%\inc%_EXT%\svx\DescriptionGenerator.hxx @@ -69,52 +57,38 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\editstat.hxx %_DEST%\inc%_EXT%\svx\editstat.hxx ..\inc\editund2.hxx %_DEST%\inc%_EXT%\svx\editund2.hxx ..\inc\eerdll.hxx %_DEST%\inc%_EXT%\svx\editdll.hxx -..\inc\extrusioncontrols.hxx %_DEST%\inc%_EXT%\svx\extrusioncontrols.hxx ..\inc\flstitem.hxx %_DEST%\inc%_EXT%\svx\flstitem.hxx +..\inc\extrusioncontrols.hxx %_DEST%\inc%_EXT%\svx\extrusioncontrols.hxx ..\inc\fmgridif.hxx %_DEST%\inc%_EXT%\svx\fmgridif.hxx ..\inc\fmobjfac.hxx %_DEST%\inc%_EXT%\svx\fmobjfac.hxx -..\inc\fontitem.hxx %_DEST%\inc%_EXT%\svx\fontitem.hxx ..\inc\fontlb.hxx %_DEST%\inc%_EXT%\svx\fontlb.hxx ..\inc\fontworkgallery.hxx %_DEST%\inc%_EXT%\svx\fontworkgallery.hxx -..\inc\forbiddencharacterstable.hxx %_DEST%\inc%_EXT%\svx\forbiddencharacterstable.hxx ..\inc\formatpaintbrushctrl.hxx %_DEST%\inc%_EXT%\svx\formatpaintbrushctrl.hxx -..\inc\fwdtitem.hxx %_DEST%\inc%_EXT%\svx\fwdtitem.hxx ..\inc\gallery.hxx %_DEST%\inc%_EXT%\svx\gallery.hxx ..\inc\galbrws.hxx %_DEST%\inc%_EXT%\svx\galbrws.hxx ..\inc\globlac.hrc %_DEST%\inc%_EXT%\svx\globlac.hrc ..\inc\globl3d.hxx %_DEST%\inc%_EXT%\svx\globl3d.hxx ..\inc\grafctrl.hxx %_DEST%\inc%_EXT%\svx\grafctrl.hxx ..\inc\hlnkitem.hxx %_DEST%\inc%_EXT%\svx\hlnkitem.hxx -..\inc\htmlcfg.hxx %_DEST%\inc%_EXT%\svx\htmlcfg.hxx ..\inc\htmlmode.hxx %_DEST%\inc%_EXT%\svx\htmlmode.hxx ..\inc\hyperdlg.hxx %_DEST%\inc%_EXT%\svx\hyperdlg.hxx ..\inc\imapdlg.hxx %_DEST%\inc%_EXT%\svx\imapdlg.hxx -..\inc\opengrf.hxx %_DEST%\inc%_EXT%\svx\opengrf.hxx ..\inc\insctrl.hxx %_DEST%\inc%_EXT%\svx\insctrl.hxx ..\inc\layctrl.hxx %_DEST%\inc%_EXT%\svx\layctrl.hxx ..\inc\lboxctrl.hxx %_DEST%\inc%_EXT%\svx\lboxctrl.hxx ..\inc\linectrl.hxx %_DEST%\inc%_EXT%\svx\linectrl.hxx -..\inc\linkmgr.hxx %_DEST%\inc%_EXT%\svx\linkmgr.hxx ..\inc\measctrl.hxx %_DEST%\inc%_EXT%\svx\measctrl.hxx ..\inc\modctrl.hxx %_DEST%\inc%_EXT%\svx\modctrl.hxx -..\inc\mscodec.hxx %_DEST%\inc%_EXT%\svx\mscodec.hxx -..\inc\msoleexp.hxx %_DEST%\inc%_EXT%\svx\msoleexp.hxx -..\inc\nlbkitem.hxx %_DEST%\inc%_EXT%\svx\nlbkitem.hxx ..\inc\numvset.hxx %_DEST%\inc%_EXT%\svx\numvset.hxx ..\inc\objfac3d.hxx %_DEST%\inc%_EXT%\svx\objfac3d.hxx ..\inc\ofaitem.hxx %_DEST%\inc%_EXT%\svx\ofaitem.hxx -..\inc\opaqitem.hxx %_DEST%\inc%_EXT%\svx\opaqitem.hxx ..\inc\optgenrl.hxx %_DEST%\inc%_EXT%\svx\optgenrl.hxx ..\inc\optgrid.hxx %_DEST%\inc%_EXT%\svx\optgrid.hxx -..\inc\optitems.hxx %_DEST%\inc%_EXT%\svx\optitems.hxx ..\inc\orienthelper.hxx %_DEST%\inc%_EXT%\svx\orienthelper.hxx ..\inc\ParseContext.hxx %_DEST%\inc%_EXT%\svx\ParseContext.hxx ..\inc\passwd.hxx %_DEST%\inc%_EXT%\svx\passwd.hxx ..\inc\pfiledlg.hxx %_DEST%\inc%_EXT%\svx\pfiledlg.hxx -..\inc\pgrditem.hxx %_DEST%\inc%_EXT%\svx\pgrditem.hxx ..\inc\postattr.hxx %_DEST%\inc%_EXT%\svx\postattr.hxx -..\inc\prntitem.hxx %_DEST%\inc%_EXT%\svx\prntitem.hxx -..\inc\protitem.hxx %_DEST%\inc%_EXT%\svx\protitem.hxx ..\inc\prtqry.hxx %_DEST%\inc%_EXT%\svx\prtqry.hxx ..\inc\pszctrl.hxx %_DEST%\inc%_EXT%\svx\pszctrl.hxx ..\inc\relfld.hxx %_DEST%\inc%_EXT%\svx\relfld.hxx @@ -123,7 +97,6 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\rulritem.hxx %_DEST%\inc%_EXT%\svx\rulritem.hxx ..\inc\sdrpaintwindow.hxx %_DEST%\inc%_EXT%\svx\sdrpaintwindow.hxx ..\inc\selctrl.hxx %_DEST%\inc%_EXT%\svx\selctrl.hxx -..\inc\srchcfg.hxx %_DEST%\inc%_EXT%\svx\srchcfg.hxx ..\inc\srchdlg.hxx %_DEST%\inc%_EXT%\svx\srchdlg.hxx ..\inc\srchitem.hxx %_DEST%\inc%_EXT%\svx\srchitem.hxx ..\inc\svditer.hxx %_DEST%\inc%_EXT%\svx\svditer.hxx @@ -132,8 +105,6 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svimbase.hxx %_DEST%\inc%_EXT%\svx\svimbase.hxx ..\inc\svxerr.hxx %_DEST%\inc%_EXT%\svx\svxerr.hxx ..\inc\svxgrahicitem.hxx %_DEST%\inc%_EXT%\svx\svxgrahicitem.hxx -..\inc\svxmsbas.hxx %_DEST%\inc%_EXT%\svx\svxmsbas.hxx -..\inc\svxrtf.hxx %_DEST%\inc%_EXT%\svx\svxrtf.hxx ..\inc\swframeposstrings.hxx %_DEST%\inc%_EXT%\svx\swframeposstrings.hxx ..\inc\swframevalidation.hxx %_DEST%\inc%_EXT%\svx\swframevalidation.hxx ..\inc\swframeexample.hxx %_DEST%\inc%_EXT%\svx\swframeexample.hxx @@ -144,22 +115,15 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\tbxdraw.hxx %_DEST%\inc%_EXT%\svx\tbxdraw.hxx ..\inc\txencbox.hxx %_DEST%\inc%_EXT%\svx\txencbox.hxx ..\inc\txenctab.hxx %_DEST%\inc%_EXT%\svx\txenctab.hxx -..\inc\txtrange.hxx %_DEST%\inc%_EXT%\svx\txtrange.hxx ..\inc\unoapi.hxx %_DEST%\inc%_EXT%\svx\unoapi.hxx -..\inc\unoedhlp.hxx %_DEST%\inc%_EXT%\svx\unoedhlp.hxx -..\inc\unofdesc.hxx %_DEST%\inc%_EXT%\svx\unofdesc.hxx ..\inc\unofill.hxx %_DEST%\inc%_EXT%\svx\unofill.hxx -..\inc\UnoForbiddenCharsTable.hxx %_DEST%\inc%_EXT%\svx\UnoForbiddenCharsTable.hxx -..\inc\unolingu.hxx %_DEST%\inc%_EXT%\svx\unolingu.hxx ..\inc\unomaster.hxx %_DEST%\inc%_EXT%\svx\unomaster.hxx ..\inc\UnoNamespaceMap.hxx %_DEST%\inc%_EXT%\svx\UnoNamespaceMap.hxx -..\inc\unonrule.hxx %_DEST%\inc%_EXT%\svx\unonrule.hxx ..\inc\unopool.hxx %_DEST%\inc%_EXT%\svx\unopool.hxx ..\inc\unoshcol.hxx %_DEST%\inc%_EXT%\svx\unoshcol.hxx ..\inc\verttexttbxctrl.hxx %_DEST%\inc%_EXT%\svx\verttexttbxctrl.hxx ..\inc\wrapfield.hxx %_DEST%\inc%_EXT%\svx\wrapfield.hxx ..\inc\xexch.hxx %_DEST%\inc%_EXT%\svx\xexch.hxx -..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\svx\xmlcnitm.hxx ..\inc\xmleohlp.hxx %_DEST%\inc%_EXT%\svx\xmleohlp.hxx ..\inc\xmlexchg.hxx %_DEST%\inc%_EXT%\svx\xmlexchg.hxx ..\inc\xmlgrhlp.hxx %_DEST%\inc%_EXT%\svx\xmlgrhlp.hxx @@ -170,38 +134,24 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\zoomctrl.hxx %_DEST%\inc%_EXT%\svx\zoomctrl.hxx ..\inc\svx\xlinjoit.hxx %_DEST%\inc%_EXT%\svx\xlinjoit.hxx -..\inc\svx\impgrf.hxx %_DEST%\inc%_EXT%\svx\impgrf.hxx ..\inc\svx\dstribut_enum.hxx %_DEST%\inc%_EXT%\svx\dstribut_enum.hxx ..\inc\svx\svdfield.hxx %_DEST%\inc%_EXT%\svx\svdfield.hxx ..\inc\svx\svxitems.hrc %_DEST%\inc%_EXT%\svx\svxitems.hrc ..\inc\svx\svddef.hxx %_DEST%\inc%_EXT%\svx\svddef.hxx -..\inc\svx\svdfppt.hxx %_DEST%\inc%_EXT%\svx\svdfppt.hxx ..\inc\svx\ipolypolygoneditorcontroller.hxx %_DEST%\inc%_EXT%\svx\ipolypolygoneditorcontroller.hxx ..\inc\svx\polypolygoneditor.hxx %_DEST%\inc%_EXT%\svx\polypolygoneditor.hxx ..\inc\svx\svdsob.hxx %_DEST%\inc%_EXT%\svx\svdsob.hxx ..\inc\svx\svdlayer.hxx %_DEST%\inc%_EXT%\svx\svdlayer.hxx -..\inc\svx\adjitem.hxx %_DEST%\inc%_EXT%\svx\adjitem.hxx -..\inc\svx\akrnitem.hxx %_DEST%\inc%_EXT%\svx\akrnitem.hxx ..\inc\svx\algitem.hxx %_DEST%\inc%_EXT%\svx\algitem.hxx ..\inc\svx\simptabl.hxx %_DEST%\inc%_EXT%\svx\simptabl.hxx ..\inc\svx\ctredlin.hxx %_DEST%\inc%_EXT%\svx\ctredlin.hxx -..\inc\svx\blnkitem.hxx %_DEST%\inc%_EXT%\svx\blnkitem.hxx ..\inc\svx\bmpmask.hxx %_DEST%\inc%_EXT%\svx\bmpmask.hxx -..\inc\svx\borderline.hxx %_DEST%\inc%_EXT%\svx\borderline.hxx -..\inc\svx\boxitem.hxx %_DEST%\inc%_EXT%\svx\boxitem.hxx -..\inc\svx\brkitem.hxx %_DEST%\inc%_EXT%\svx\brkitem.hxx -..\inc\svx\brshitem.hxx %_DEST%\inc%_EXT%\svx\brshitem.hxx ..\inc\svx\camera3d.hxx %_DEST%\inc%_EXT%\svx\camera3d.hxx ..\inc\svx\charmap.hxx %_DEST%\inc%_EXT%\svx\charmap.hxx ..\inc\svx\checklbx.hxx %_DEST%\inc%_EXT%\svx\checklbx.hxx -..\inc\svx\cmapitem.hxx %_DEST%\inc%_EXT%\svx\cmapitem.hxx -..\inc\svx\cntritem.hxx %_DEST%\inc%_EXT%\svx\cntritem.hxx -..\inc\svx\colritem.hxx %_DEST%\inc%_EXT%\svx\colritem.hxx ..\inc\svx\contdlg.hxx %_DEST%\inc%_EXT%\svx\contdlg.hxx ..\inc\svx\tabarea.hxx %_DEST%\inc%_EXT%\svx\tabarea.hxx ..\inc\svx\tabline.hxx %_DEST%\inc%_EXT%\svx\tabline.hxx -..\inc\svx\crsditem.hxx %_DEST%\inc%_EXT%\svx\crsditem.hxx -..\inc\svx\cscoitem.hxx %_DEST%\inc%_EXT%\svx\cscoitem.hxx ..\inc\svx\colrctrl.hxx %_DEST%\inc%_EXT%\svx\colrctrl.hxx ..\inc\svx\cube3d.hxx %_DEST%\inc%_EXT%\svx\cube3d.hxx ..\inc\svx\polygn3d.hxx %_DEST%\inc%_EXT%\svx\polygn3d.hxx @@ -215,14 +165,10 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\dlgctl3d.hxx %_DEST%\inc%_EXT%\svx\dlgctl3d.hxx ..\inc\svx\dlgctrl.hxx %_DEST%\inc%_EXT%\svx\dlgctrl.hxx ..\inc\svx\dialogs.hrc %_DEST%\inc%_EXT%\svx\dialogs.hrc -..\inc\svx\escpitem.hxx %_DEST%\inc%_EXT%\svx\escpitem.hxx ..\inc\svx\extrud3d.hxx %_DEST%\inc%_EXT%\svx\extrud3d.hxx -..\inc\svx\escherex.hxx %_DEST%\inc%_EXT%\svx\escherex.hxx ..\inc\svx\f3dchild.hxx %_DEST%\inc%_EXT%\svx\f3dchild.hxx -..\inc\svx\fhgtitem.hxx %_DEST%\inc%_EXT%\svx\fhgtitem.hxx ..\inc\svx\fillctrl.hxx %_DEST%\inc%_EXT%\svx\fillctrl.hxx ..\inc\svx\float3d.hxx %_DEST%\inc%_EXT%\svx\float3d.hxx -..\inc\svx\flditem.hxx %_DEST%\inc%_EXT%\svx\flditem.hxx ..\inc\svx\fntctl.hxx %_DEST%\inc%_EXT%\svx\fntctl.hxx ..\inc\svx\fntctrl.hxx %_DEST%\inc%_EXT%\svx\fntctrl.hxx ..\inc\svx\fntszctl.hxx %_DEST%\inc%_EXT%\svx\fntszctl.hxx @@ -233,31 +179,16 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\frmsel.hxx %_DEST%\inc%_EXT%\svx\frmsel.hxx ..\inc\svx\graphctl.hxx %_DEST%\inc%_EXT%\svx\graphctl.hxx ..\inc\svx\hdft.hxx %_DEST%\inc%_EXT%\svx\hdft2.hxx -..\inc\svx\hyznitem.hxx %_DEST%\inc%_EXT%\svx\hyznitem.hxx ..\inc\svx\ifaceids.hxx %_DEST%\inc%_EXT%\svx\ifaceids.hxx ..\inc\svx\itemwin.hxx %_DEST%\inc%_EXT%\svx\itemwin.hxx -..\inc\svx\keepitem.hxx %_DEST%\inc%_EXT%\svx\keepitem.hxx -..\inc\svx\kernitem.hxx %_DEST%\inc%_EXT%\svx\kernitem.hxx ..\inc\svx\langbox.hxx %_DEST%\inc%_EXT%\svx\langbox.hxx -..\inc\svx\langitem.hxx %_DEST%\inc%_EXT%\svx\langitem.hxx -..\inc\svx\lcolitem.hxx %_DEST%\inc%_EXT%\svx\lcolitem.hxx -..\inc\svx\lrspitem.hxx %_DEST%\inc%_EXT%\svx\lrspitem.hxx -..\inc\svx\lspcitem.hxx %_DEST%\inc%_EXT%\svx\lspcitem.hxx -..\inc\svx\nhypitem.hxx %_DEST%\inc%_EXT%\svx\nhypitem.hxx ..\inc\svx\numinf.hxx %_DEST%\inc%_EXT%\svx\numinf.hxx ..\inc\svx\numfmtsh.hxx %_DEST%\inc%_EXT%\svx\numfmtsh.hxx ..\inc\svx\obj3d.hxx %_DEST%\inc%_EXT%\svx\obj3d.hxx -..\inc\svx\optlingu.hxx %_DEST%\inc%_EXT%\svx\optlingu.hxx -..\inc\svx\orphitem.hxx %_DEST%\inc%_EXT%\svx\orphitem.hxx ..\inc\svx\pagectrl.hxx %_DEST%\inc%_EXT%\svx\pagectrl.hxx ..\inc\svx\pageitem.hxx %_DEST%\inc%_EXT%\svx\pageitem.hxx -..\inc\svx\paperinf.hxx %_DEST%\inc%_EXT%\svx\paperinf.hxx ..\inc\svx\paraprev.hxx %_DEST%\inc%_EXT%\svx\paraprev.hxx -..\inc\svx\pbinitem.hxx %_DEST%\inc%_EXT%\svx\pbinitem.hxx -..\inc\svx\pmdlitem.hxx %_DEST%\inc%_EXT%\svx\pmdlitem.hxx ..\inc\svx\polysc3d.hxx %_DEST%\inc%_EXT%\svx\polysc3d.hxx -..\inc\svx\postitem.hxx %_DEST%\inc%_EXT%\svx\postitem.hxx -..\inc\svx\prszitem.hxx %_DEST%\inc%_EXT%\svx\prszitem.hxx ..\inc\svx\rectenum.hxx %_DEST%\inc%_EXT%\svx\rectenum.hxx ..\inc\svx\ruler.hxx %_DEST%\inc%_EXT%\svx\ruler.hxx ..\inc\svx\scene3d.hxx %_DEST%\inc%_EXT%\svx\scene3d.hxx @@ -292,15 +223,8 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\sdtfsitm.hxx %_DEST%\inc%_EXT%\svx\sdtfsitm.hxx ..\inc\svx\sdtmfitm.hxx %_DEST%\inc%_EXT%\svx\sdtmfitm.hxx ..\inc\svx\sdynitm.hxx %_DEST%\inc%_EXT%\svx\sdynitm.hxx -..\inc\svx\shaditem.hxx %_DEST%\inc%_EXT%\svx\shaditem.hxx -..\inc\svx\shdditem.hxx %_DEST%\inc%_EXT%\svx\shdditem.hxx -..\inc\svx\sizeitem.hxx %_DEST%\inc%_EXT%\svx\sizeitem.hxx ..\inc\svx\sphere3d.hxx %_DEST%\inc%_EXT%\svx\sphere3d.hxx -..\inc\svx\spltitem.hxx %_DEST%\inc%_EXT%\svx\spltitem.hxx -..\inc\svx\hangulhanja.hxx %_DEST%\inc%_EXT%\svx\hangulhanja.hxx -..\inc\svx\SpellPortions.hxx %_DEST%\inc%_EXT%\svx\SpellPortions.hxx ..\inc\svx\SpellDialogChildWindow.hxx %_DEST%\inc%_EXT%\svx\SpellDialogChildWindow.hxx -..\inc\svx\splwrap.hxx %_DEST%\inc%_EXT%\svx\splwrap.hxx ..\inc\svx\stddlg.hxx %_DEST%\inc%_EXT%\svx\stddlg.hxx ..\inc\svx\strarray.hxx %_DEST%\inc%_EXT%\svx\strarray.hxx ..\inc\svx\svdattr.hxx %_DEST%\inc%_EXT%\svx\svdattr.hxx @@ -351,9 +275,6 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\svdoutl.hxx %_DEST%\inc%_EXT%\svx\svdoutl.hxx ..\inc\svx\svdview.hxx %_DEST%\inc%_EXT%\svx\svdview.hxx ..\inc\svx\svdxcgv.hxx %_DEST%\inc%_EXT%\svx\svdxcgv.hxx -..\inc\svx\svxbox.hxx %_DEST%\inc%_EXT%\svx\svxbox.hxx -..\inc\svx\svxfont.hxx %_DEST%\inc%_EXT%\svx\svxfont.hxx -..\inc\svx\svxenum.hxx %_DEST%\inc%_EXT%\svx\svxenum.hxx ..\inc\svx\svxids.hrc %_DEST%\inc%_EXT%\svx\svxids.hrc ..\inc\svx\sxallitm.hxx %_DEST%\inc%_EXT%\svx\sxallitm.hxx ..\inc\svx\sxcaitm.hxx %_DEST%\inc%_EXT%\svx\sxcaitm.hxx @@ -397,17 +318,11 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\sxsoitm.hxx %_DEST%\inc%_EXT%\svx\sxsoitm.hxx ..\inc\svx\sxtraitm.hxx %_DEST%\inc%_EXT%\svx\sxtraitm.hxx ..\inc\svx\tbcontrl.hxx %_DEST%\inc%_EXT%\svx\tbcontrl.hxx -..\inc\svx\thesdlg.hxx %_DEST%\inc%_EXT%\svx\thesdlg.hxx -..\inc\svx\tstpitem.hxx %_DEST%\inc%_EXT%\svx\tstpitem.hxx -..\inc\svx\udlnitem.hxx %_DEST%\inc%_EXT%\svx\udlnitem.hxx -..\inc\svx\ulspitem.hxx %_DEST%\inc%_EXT%\svx\ulspitem.hxx ..\inc\svx\unomid.hxx %_DEST%\inc%_EXT%\svx\unomid.hxx ..\inc\svx\unopage.hxx %_DEST%\inc%_EXT%\svx\unopage.hxx -..\inc\svx\unoprnms.hxx %_DEST%\inc%_EXT%\svx\unoprnms.hxx ..\inc\svx\unoshape.hxx %_DEST%\inc%_EXT%\svx\unoshape.hxx ..\inc\svx\shapepropertynotifier.hxx %_DEST%\inc%_EXT%\svx\shapepropertynotifier.hxx ..\inc\svx\shapeproperty.hxx %_DEST%\inc%_EXT%\svx\shapeproperty.hxx -..\inc\svx\unoipset.hxx %_DEST%\inc%_EXT%\svx\unoipset.hxx ..\inc\svx\unoprov.hxx %_DEST%\inc%_EXT%\svx\unoprov.hxx ..\inc\svx\unomod.hxx %_DEST%\inc%_EXT%\svx\unomod.hxx ..\inc\svx\unomodel.hxx %_DEST%\inc%_EXT%\svx\unomodel.hxx @@ -415,9 +330,6 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\fmsearch.hxx %_DEST%\inc%_EXT%\svx\fmsearch.hxx ..\inc\svx\view3d.hxx %_DEST%\inc%_EXT%\svx\view3d.hxx ..\inc\svx\viewpt3d.hxx %_DEST%\inc%_EXT%\svx\viewpt3d.hxx -..\inc\svx\wghtitem.hxx %_DEST%\inc%_EXT%\svx\wghtitem.hxx -..\inc\svx\widwitem.hxx %_DEST%\inc%_EXT%\svx\widwitem.hxx -..\inc\svx\wrlmitem.hxx %_DEST%\inc%_EXT%\svx\wrlmitem.hxx ..\inc\svx\xbitmap.hxx %_DEST%\inc%_EXT%\svx\xbitmap.hxx ..\inc\svx\xbtmpit.hxx %_DEST%\inc%_EXT%\svx\xbtmpit.hxx ..\inc\svx\xcolit.hxx %_DEST%\inc%_EXT%\svx\xcolit.hxx @@ -484,21 +396,8 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\viewlayoutitem.hxx %_DEST%\inc%_EXT%\svx\viewlayoutitem.hxx ..\inc\svx\zoomslideritem.hxx %_DEST%\inc%_EXT%\svx\zoomslideritem.hxx ..\inc\svx\zoomsliderctrl.hxx %_DEST%\inc%_EXT%\svx\zoomsliderctrl.hxx +..\inc\svx\extrusioncolorcontrol.hxx %_DEST%\inc%_EXT%\svx\extrusioncolorcontrol.hxx - -..\inc\svx\itemtype.hxx %_DEST%\inc%_EXT%\svx\itemtype.hxx -..\inc\svx\outliner.hxx %_DEST%\inc%_EXT%\svx\outliner.hxx -..\inc\svx\paragraphdata.hxx %_DEST%\inc%_EXT%\svx\paragraphdata.hxx -..\inc\svx\outlobj.hxx %_DEST%\inc%_EXT%\svx\outlobj.hxx -..\inc\svx\editdata.hxx %_DEST%\inc%_EXT%\svx\editdata.hxx -..\inc\svx\editeng.hxx %_DEST%\inc%_EXT%\svx\editeng.hxx -..\inc\svx\eedata.hxx %_DEST%\inc%_EXT%\svx\eedata.hxx -..\inc\svx\editobj.hxx %_DEST%\inc%_EXT%\svx\editobj.hxx -..\inc\svx\editview.hxx %_DEST%\inc%_EXT%\svx\editview.hxx -..\inc\svx\eeitem.hxx %_DEST%\inc%_EXT%\svx\eeitem.hxx -..\inc\svx\eeitemid.hxx %_DEST%\inc%_EXT%\svx\eeitemid.hxx -..\inc\svx\svxacorr.hxx %_DEST%\inc%_EXT%\svx\svxacorr.hxx -..\inc\svx\swafopt.hxx %_DEST%\inc%_EXT%\svx\swafopt.hxx ..\inc\svx\fmmodel.hxx %_DEST%\inc%_EXT%\svx\fmmodel.hxx ..\inc\svx\fmpage.hxx %_DEST%\inc%_EXT%\svx\fmpage.hxx ..\inc\svx\fmview.hxx %_DEST%\inc%_EXT%\svx\fmview.hxx @@ -506,22 +405,10 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\fmshell.hxx %_DEST%\inc%_EXT%\svx\fmshell.hxx ..\inc\svx\svdouno.hxx %_DEST%\inc%_EXT%\svx\svdouno.hxx ..\inc\svx\deflt3d.hxx %_DEST%\inc%_EXT%\svx\deflt3d.hxx -..\inc\svx\unotext.hxx %_DEST%\inc%_EXT%\svx\unotext.hxx -..\inc\svx\unofield.hxx %_DEST%\inc%_EXT%\svx\unofield.hxx -..\inc\svx\mutxhelp.hxx %_DEST%\inc%_EXT%\svx\mutxhelp.hxx ..\inc\svx\AccessibleTextHelper.hxx %_DEST%\inc%_EXT%\svx\AccessibleTextHelper.hxx -..\inc\svx\unoviwed.hxx %_DEST%\inc%_EXT%\svx\unoviwed.hxx -..\inc\svx\unoviwou.hxx %_DEST%\inc%_EXT%\svx\unoviwou.hxx -..\inc\svx\unoedsrc.hxx %_DEST%\inc%_EXT%\svx\unoedsrc.hxx -..\inc\svx\unofored.hxx %_DEST%\inc%_EXT%\svx\unofored.hxx -..\inc\svx\unoforou.hxx %_DEST%\inc%_EXT%\svx\unoforou.hxx ..\inc\svx\e3dundo.hxx %_DEST%\inc%_EXT%\svx\e3dundo.hxx -..\inc\svx\msdffimp.hxx %_DEST%\inc%_EXT%\svx\msdffimp.hxx ..\inc\svx\msdffdef.hxx %_DEST%\inc%_EXT%\svx\msdffdef.hxx -..\inc\svx\msfiltertracer.hxx %_DEST%\inc%_EXT%\svx\msfiltertracer.hxx ..\inc\svx\unoshtxt.hxx %_DEST%\inc%_EXT%\svx\unoshtxt.hxx -..\inc\svx\numitem.hxx %_DEST%\inc%_EXT%\svx\numitem.hxx -..\inc\svx\numdef.hxx %_DEST%\inc%_EXT%\svx\numdef.hxx ..\inc\svx\fmdmod.hxx %_DEST%\inc%_EXT%\svx\fmdmod.hxx ..\inc\svx\fmgridcl.hxx %_DEST%\inc%_EXT%\svx\fmgridcl.hxx ..\inc\svx\gridctrl.hxx %_DEST%\inc%_EXT%\svx\gridctrl.hxx @@ -531,27 +418,12 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\grfcrop.hxx %_DEST%\inc%_EXT%\svx\grfcrop.hxx ..\inc\svx\grfflt.hxx %_DEST%\inc%_EXT%\svx\grfflt.hxx ..\inc\svx\svx3ditems.hxx %_DEST%\inc%_EXT%\svx\svx3ditems.hxx -..\inc\svx\msocximex.hxx %_DEST%\inc%_EXT%\svx\msocximex.hxx -..\inc\svx\emphitem.hxx %_DEST%\inc%_EXT%\svx\emphitem.hxx -..\inc\svx\twolinesitem.hxx %_DEST%\inc%_EXT%\svx\twolinesitem.hxx -..\inc\svx\scripttypeitem.hxx %_DEST%\inc%_EXT%\svx\scripttypeitem.hxx -..\inc\svx\scriptspaceitem.hxx %_DEST%\inc%_EXT%\svx\scriptspaceitem.hxx -..\inc\svx\hngpnctitem.hxx %_DEST%\inc%_EXT%\svx\hngpnctitem.hxx -..\inc\svx\forbiddenruleitem.hxx %_DEST%\inc%_EXT%\svx\forbiddenruleitem.hxx -..\inc\svx\charscaleitem.hxx %_DEST%\inc%_EXT%\svx\charscaleitem.hxx -..\inc\svx\charrotateitem.hxx %_DEST%\inc%_EXT%\svx\charrotateitem.hxx -..\inc\svx\charreliefitem.hxx %_DEST%\inc%_EXT%\svx\charreliefitem.hxx -..\inc\svx\paravertalignitem.hxx %_DEST%\inc%_EXT%\svx\paravertalignitem.hxx ..\inc\svx\dbaexchange.hxx %_DEST%\inc%_EXT%\svx\dbaexchange.hxx ..\inc\svx\dbaobjectex.hxx %_DEST%\inc%_EXT%\svx\dbaobjectex.hxx ..\inc\svx\ucsubset.hxx %_DEST%\inc%_EXT%\svx\ucsubset.hxx ..\inc\svx\ucsubset.hrc %_DEST%\inc%_EXT%\svx\ucsubset.hrc ..\inc\svx\dataaccessdescriptor.hxx %_DEST%\inc%_EXT%\svx\dataaccessdescriptor.hxx -..\inc\svx\frmdir.hxx %_DEST%\inc%_EXT%\svx\frmdir.hxx -..\inc\svx\frmdiritem.hxx %_DEST%\inc%_EXT%\svx\frmdiritem.hxx ..\inc\svx\frmdirlbox.hxx %_DEST%\inc%_EXT%\svx\frmdirlbox.hxx -..\inc\svx\AccessibleContextBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleContextBase.hxx -..\inc\svx\AccessibleComponentBase.hxx %_DEST%\inc%_EXT%\svx\AccessibleComponentBase.hxx ..\inc\svx\AccessibleShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleShape.hxx ..\inc\svx\AccessibleGraphicShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleGraphicShape.hxx ..\inc\svx\AccessibleOLEShape.hxx %_DEST%\inc%_EXT%\svx\AccessibleOLEShape.hxx @@ -564,7 +436,6 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\ChildrenManager.hxx %_DEST%\inc%_EXT%\svx\ChildrenManager.hxx ..\inc\svx\ShapeTypeHandler.hxx %_DEST%\inc%_EXT%\svx\ShapeTypeHandler.hxx ..\inc\svx\SvxShapeTypes.hxx %_DEST%\inc%_EXT%\svx\SvxShapeTypes.hxx -..\inc\svx\writingmodeitem.hxx %_DEST%\inc%_EXT%\svx\writingmodeitem.hxx ..\inc\svx\svdoashp.hxx %_DEST%\inc%_EXT%\svx\svdoashp.hxx ..\inc\svx\extrusionbar.hxx %_DEST%\inc%_EXT%\svx\extrusionbar.hxx ..\inc\svx\fontworkbar.hxx %_DEST%\inc%_EXT%\svx\fontworkbar.hxx @@ -577,13 +448,13 @@ mkdir: %_DEST%\inc%_EXT%\svx ..\inc\svx\databaselocationinput.hxx %_DEST%\inc%_EXT%\svx\databaselocationinput.hxx ..\inc\svx\dbcharsethelper.hxx %_DEST%\inc%_EXT%\svx\dbcharsethelper.hxx ..\inc\svx\dbtoolsclient.hxx %_DEST%\inc%_EXT%\svx\dbtoolsclient.hxx +..\inc\svx\sdrobjectfilter.hxx %_DEST%\inc%_EXT%\svx\sdrobjectfilter.hxx ..\inc\svx\subtoolboxcontrol.hxx %_DEST%\inc%_EXT%\svx\subtoolboxcontrol.hxx ..\inc\svx\svdtext.hxx %_DEST%\inc%_EXT%\svx\svdtext.hxx ..\inc\svx\svdotable.hxx %_DEST%\inc%_EXT%\svx\svdotable.hxx ..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx ..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx -..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx mkdir: %_DEST%\inc%_EXT%\svx\sdr mkdir: %_DEST%\inc%_EXT%\svx\sdr\properties @@ -619,7 +490,6 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\contact ..\inc\svx\sdr\contact\viewobjectcontactredirector.hxx %_DEST%\inc%_EXT%\svx\sdr\contact\viewobjectcontactredirector.hxx ..\inc\svx\sdr\contact\viewobjectcontactofpageobj.hxx %_DEST%\inc%_EXT%\svx\sdr\contact\viewobjectcontactofpageobj.hxx ..\inc\svx\sdr\contact\viewobjectcontactofsdrobj.hxx %_DEST%\inc%_EXT%\svx\sdr\contact\viewobjectcontactofsdrobj.hxx -..\inc\svx\sdr\contact\vocbitmapbuffer.hxx %_DEST%\inc%_EXT%\svx\sdr\contact\vocbitmapbuffer.hxx mkdir: %_DEST%\inc%_EXT%\svx\sdr\overlay ..\inc\svx\sdr\overlay\overlayanimatedbitmapex.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayanimatedbitmapex.hxx @@ -641,10 +511,6 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\primitive2d ..\inc\svx\sdr\primitive2d\sdrprimitivetools.hxx %_DEST%\inc%_EXT%\svx\sdr\primitive2d\sdrprimitivetools.hxx mkdir: %_DEST%\inc%_EXT%\svx\sdr\animation -..\inc\svx\sdr\animation\ainfographic.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\ainfographic.hxx -..\inc\svx\sdr\animation\ainfoscrolltext.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\ainfoscrolltext.hxx -..\inc\svx\sdr\animation\ainfotext.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\ainfotext.hxx -..\inc\svx\sdr\animation\animationinfo.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\animationinfo.hxx ..\inc\svx\sdr\animation\animationstate.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\animationstate.hxx ..\inc\svx\sdr\animation\objectanimator.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\objectanimator.hxx ..\inc\svx\sdr\animation\scheduler.hxx %_DEST%\inc%_EXT%\svx\sdr\animation\scheduler.hxx @@ -679,16 +545,10 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\table ..\xml\AccessibleControlShape.xml %_DEST%\xml%_EXT%\AccessibleControlShape.xml ..\xml\AccessibleEditableTextPara.xml %_DEST%\xml%_EXT%\AccessibleEditableTextPara.xml -..\uiconfig\accelerator\*.xml %_DEST%\xml%_EXT%\uiconfig\global\accelerator\*.xml -..\uiconfig\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\global\accelerator\en-US\*.xml -..\uiconfig\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\global\accelerator\es\*.xml - ..\inc\svx\subtoolboxcontrol.hxx %_DEST%\inc%_EXT%\svx\subtoolboxcontrol.hxx ..\inc\svx\svdtext.hxx %_DEST%\inc%_EXT%\svx\svdtext.hxx ..\inc\svx\svdotable.hxx %_DEST%\inc%_EXT%\svx\svdotable.hxx ..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx ..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx -..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx -..\inc\svx\msvbahelper.hxx %_DEST%\inc%_EXT%\svx\msvbahelper.hxx ..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.* diff --git a/svx/qa/unoapi/knownissues.xcl b/svx/qa/unoapi/knownissues.xcl index 6d59511b75e0..89369160bb45 100644 --- a/svx/qa/unoapi/knownissues.xcl +++ b/svx/qa/unoapi/knownissues.xcl @@ -78,4 +78,10 @@ svx.GraphicExporter ### i98339 ### svx.AccessibleControlShape -# -> disbaled in svx.sce
\ No newline at end of file +# -> disbaled in svx.sce + +### i111114 ### +svx.AccessiblePresentationOLEShape::com::sun::star::accessibility::XAccessibleComponent + +### i111169 ### +svx.AccessiblePageShape::com::sun::star::accessibility::XAccessibleComponent diff --git a/svx/qa/unoapi/svx.sce b/svx/qa/unoapi/svx.sce index 84237f3c6f4b..82ee2ea6b193 100644 --- a/svx/qa/unoapi/svx.sce +++ b/svx/qa/unoapi/svx.sce @@ -1,11 +1,11 @@ #i98339 -o svx.AccessibleControlShape --o svx.AccessibleEditableTextPara --o svx.AccessibleGraphicShape +#i111278 -o svx.AccessibleEditableTextPara +#i111252 -o svx.AccessibleGraphicShape #i46736 -o svx.AccessibleImageBullet --o svx.AccessibleOLEShape --o svx.AccessiblePageShape --o svx.AccessiblePresentationGraphicShape --o svx.AccessiblePresentationOLEShape +#i111252 -o svx.AccessibleOLEShape +#i111252 -o svx.AccessiblePageShape +#i111216 -o svx.AccessiblePresentationGraphicShape +#i111216 -o svx.AccessiblePresentationOLEShape #i85539 -o svx.AccessiblePresentationShape -o svx.AccessibleShape #i90294 -o svx.GraphicExporter diff --git a/svx/sdi/fmslots.sdi b/svx/sdi/fmslots.sdi index 83803b2bdaf6..1a368920ab9a 100644 --- a/svx/sdi/fmslots.sdi +++ b/svx/sdi/fmslots.sdi @@ -657,7 +657,7 @@ shell FmFormShell [ ExecMethod = Execute ; ] - SID_FM_GRABCONTROLFOCUS + SID_FM_TOGGLECONTROLFOCUS [ ExecMethod = Execute ; ] diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 5f243b90067d..240ca9cbd4e1 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -1455,6 +1455,81 @@ SfxVoidItem ChangeCaseToKatakana SID_TRANSLITERATE_KATAGANA ] //-------------------------------------------------------------------------- +SfxVoidItem ChangeCaseToSentenceCase SID_TRANSLITERATE_SENTENCE_CASE +() +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_FORMAT; +] + +//-------------------------------------------------------------------------- +SfxVoidItem ChangeCaseToTitleCase SID_TRANSLITERATE_TITLE_CASE +() +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_FORMAT; +] + +//-------------------------------------------------------------------------- +SfxVoidItem ChangeCaseToToggleCase SID_TRANSLITERATE_TOGGLE_CASE +() +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_FORMAT; +] + +//-------------------------------------------------------------------------- SfxVoidItem ChangeCaseToLower SID_TRANSLITERATE_LOWER () [ @@ -10834,7 +10909,7 @@ SdrTextFitToSizeTypeItem TextFitToSize SID_ATTR_TEXT_FITTOSIZE ] //-------------------------------------------------------------------------- -SfxVoidItem Thesaurus SID_THESAURUS +SfxVoidItem ThesaurusDialog SID_THESAURUS () [ /* flags: */ @@ -10843,7 +10918,7 @@ SfxVoidItem Thesaurus SID_THESAURUS FastCall = FALSE, HasCoreId = FALSE, HasDialog = TRUE, - ReadOnlyDoc = TRUE, + ReadOnlyDoc = FALSE, Toggle = FALSE, Container = FALSE, RecordAbsolute = FALSE, @@ -11700,7 +11775,7 @@ SfxVoidItem ZoomVisArea SID_SIZE_VISAREA ] //-------------------------------------------------------------------------- -SfxVoidItem GrabControlFocus SID_FM_GRABCONTROLFOCUS +SfxVoidItem ToggleControlFocus SID_FM_TOGGLECONTROLFOCUS () [ /* flags: */ diff --git a/svx/source/core/coreservices.cxx b/svx/source/core/coreservices.cxx new file mode 100644 index 000000000000..1f1d69781756 --- /dev/null +++ b/svx/source/core/coreservices.cxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +/** this file contains the uno service registrations for all services in the svxcore lib */ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +#include "sal/types.h" +#include "osl/diagnose.h" +#include "cppuhelper/factory.hxx" +#include "uno/lbnames.h" + +using rtl::OUString; + +using namespace com::sun::star::uno; +using namespace com::sun::star::lang; +using namespace com::sun::star::registry; + +namespace svx +{ +extern OUString SAL_CALL ExtrusionDepthController_getImplementationName(); +extern Reference< XInterface > SAL_CALL ExtrusionDepthController_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException ); +extern Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException ); + +extern OUString SAL_CALL ExtrusionDirectionControl_getImplementationName(); +extern Reference< XInterface > SAL_CALL ExtrusionDirectionControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException ); +extern Sequence< OUString > SAL_CALL ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException ); + +extern OUString SAL_CALL ExtrusionLightingControl_getImplementationName(); +extern Reference< XInterface > SAL_CALL ExtrusionLightingControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException ); +extern Sequence< OUString > SAL_CALL ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException ); + +extern OUString SAL_CALL ExtrusionSurfaceControl_getImplementationName(); +extern Reference< XInterface > SAL_CALL ExtrusionSurfaceControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException ); +extern Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException ); + +extern OUString SAL_CALL FontWorkAlignmentControl_getImplementationName(); +extern Reference< XInterface > SAL_CALL FontWorkAlignmentControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException ); +extern Sequence< OUString > SAL_CALL FontWorkAlignmentControl_getSupportedServiceNames() throw( RuntimeException ); + +extern OUString SAL_CALL FontWorkCharacterSpacingControl_getImplementationName(); +extern Reference< XInterface > SAL_CALL FontWorkCharacterSpacingControl_createInstance(const Reference< XMultiServiceFactory > &) throw( RuntimeException ); +extern Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException ); +} + +extern "C" +{ + +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment ( + const sal_Char ** ppEnvTypeName, uno_Environment ** ) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} + +static void writeInfo ( + XRegistryKey * pRegistryKey, + const OUString& rImplementationName, + const Sequence< OUString >& rServices) +{ + Reference< XRegistryKey > xNewKey( + pRegistryKey->createKey( + OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); + + for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) + xNewKey->createKey( rServices.getConstArray()[i]); +} + +SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( + void * , void * pRegistryKey) +{ + if( pRegistryKey ) + { + try + { + XRegistryKey *pKey = reinterpret_cast< XRegistryKey * >( pRegistryKey ); + + writeInfo( pKey, ::svx::ExtrusionDepthController_getImplementationName(),::svx::ExtrusionDepthController_getSupportedServiceNames() ); + writeInfo( pKey, ::svx::ExtrusionDirectionControl_getImplementationName(),::svx::ExtrusionDirectionControl_getSupportedServiceNames() ); + writeInfo( pKey, ::svx::ExtrusionLightingControl_getImplementationName(),::svx::ExtrusionLightingControl_getSupportedServiceNames() ); + writeInfo( pKey, ::svx::ExtrusionSurfaceControl_getImplementationName(),::svx::ExtrusionSurfaceControl_getSupportedServiceNames() ); + writeInfo( pKey, ::svx::FontWorkAlignmentControl_getImplementationName(),::svx::FontWorkAlignmentControl_getSupportedServiceNames() ); + writeInfo( pKey, ::svx::FontWorkCharacterSpacingControl_getImplementationName(),::svx::FontWorkCharacterSpacingControl_getSupportedServiceNames() ); + } + catch (InvalidRegistryException &) + { + OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); + } + } + + return sal_True; +} + +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( + const sal_Char * pImplName, void * pServiceManager, void * ) +{ + void * pRet = 0; + if( pServiceManager ) + { + Reference< XSingleServiceFactory > xFactory; + + if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + ::svx::ExtrusionDepthController_getImplementationName(), + ::svx::ExtrusionDepthController_createInstance, + ::svx::ExtrusionDepthController_getSupportedServiceNames() ); + } + else if( ::svx::ExtrusionDirectionControl_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + ::svx::ExtrusionDirectionControl_getImplementationName(), + ::svx::ExtrusionDirectionControl_createInstance, + ::svx::ExtrusionDirectionControl_getSupportedServiceNames() ); + } + else if( ::svx::ExtrusionLightingControl_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + ::svx::ExtrusionLightingControl_getImplementationName(), + ::svx::ExtrusionLightingControl_createInstance, + ::svx::ExtrusionLightingControl_getSupportedServiceNames() ); + } + else if( ::svx::ExtrusionSurfaceControl_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + ::svx::ExtrusionSurfaceControl_getImplementationName(), + ::svx::ExtrusionSurfaceControl_createInstance, + ::svx::ExtrusionSurfaceControl_getSupportedServiceNames() ); + } + else if( ::svx::FontWorkAlignmentControl_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + ::svx::FontWorkAlignmentControl_getImplementationName(), + ::svx::FontWorkAlignmentControl_createInstance, + ::svx::FontWorkAlignmentControl_getSupportedServiceNames() ); + } + else if( ::svx::FontWorkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ), + ::svx::FontWorkCharacterSpacingControl_getImplementationName(), + ::svx::FontWorkCharacterSpacingControl_createInstance, + ::svx::FontWorkCharacterSpacingControl_getSupportedServiceNames() ); + } if( xFactory.is()) + { + xFactory->acquire(); + pRet = xFactory.get(); + } + } + + return pRet; +} + +} diff --git a/svx/source/core/makefile.mk b/svx/source/core/makefile.mk new file mode 100644 index 000000000000..da874894bae6 --- /dev/null +++ b/svx/source/core/makefile.mk @@ -0,0 +1,47 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=..$/.. + +PRJNAME=svx +TARGET=core +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# --- Files -------------------------------------------------------- + +SLOFILES = \ + $(SLO)$/coreservices.obj + +# --- Targets ------------------------------------------------------- + +.INCLUDE : target.mk + diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk index 01951caa1471..ac608fae8ec8 100644 --- a/svx/source/dialog/makefile.mk +++ b/svx/source/dialog/makefile.mk @@ -74,6 +74,7 @@ SRC2FILES = \ LIB1TARGET=$(SLB)$/$(TARGET)-core.lib LIB1OBJFILES= \ + $(SLO)$/checklbx.obj \ $(SLO)$/dialmgr.obj\ $(SLO)$/dlgutil.obj \ $(SLO)$/framelink.obj\ @@ -86,7 +87,6 @@ LIB2TARGET=$(SLB)$/$(TARGET).lib LIB2OBJFILES= \ $(SLO)$/charmap.obj \ - $(SLO)$/checklbx.obj \ $(SLO)$/connctrl.obj \ $(SLO)$/contwnd.obj \ $(SLO)$/ctredlin.obj \ diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index 672dd32d28b5..0a6e36219ed3 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -135,30 +135,19 @@ namespace svx { try { - // need a query composer for this - Reference< XSQLQueryComposerFactory > xComposerFac; - _rxForm->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) >>= xComposerFac; - Reference< XSQLQueryComposer > xComposer; - if (xComposerFac.is()) - xComposer = xComposerFac->createQueryComposer(); - - if (xComposer.is()) + Reference< XTablesSupplier > xSupTab; + _rxForm->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SingleSelectQueryComposer"))) >>= xSupTab; + + if(xSupTab.is()) { - ::rtl::OUString sActiveCommand; - _rxForm->getPropertyValue(FM_PROP_ACTIVECOMMAND) >>= sActiveCommand; - xComposer->setQuery(sActiveCommand); - Reference< XTablesSupplier > xSupTab(xComposer, UNO_QUERY); - if(xSupTab.is()) + Reference< XNameAccess > xNames = xSupTab->getTables(); + if (xNames.is()) { - Reference< XNameAccess > xNames = xSupTab->getTables(); - if (xNames.is()) + Sequence< ::rtl::OUString > aTables = xNames->getElementNames(); + if (1 == aTables.getLength()) { - Sequence< ::rtl::OUString > aTables = xNames->getElementNames(); - if (1 == aTables.getLength()) - { - sCommand = aTables[0]; - nCommandType = CommandType::TABLE; - } + sCommand = aTables[0]; + nCommandType = CommandType::TABLE; } } } @@ -457,34 +446,10 @@ namespace svx String sObjectKind = (CommandType::TABLE == nObjectType) ? String('1') : String('0'); // check if the SQL-statement is modified - sal_Bool bHasFilterOrSort(sal_False); ::rtl::OUString sCompleteStatement; try { - ::rtl::OUString sFilter, sSort; - if (::cppu::any2bool(_rxLivingForm->getPropertyValue(FM_PROP_APPLYFILTER))) - _rxLivingForm->getPropertyValue(FM_PROP_FILTER) >>= sFilter; - _rxLivingForm->getPropertyValue(FM_PROP_SORT) >>= sSort; - bHasFilterOrSort = (sFilter.getLength()>0) || (sSort.getLength()>0); - _rxLivingForm->getPropertyValue(FM_PROP_ACTIVECOMMAND) >>= sCompleteStatement; - - // create a composer - Reference< XSQLQueryComposerFactory > xFactory( xConnection, UNO_QUERY ); - Reference< XSQLQueryComposer > xComposer; - if (xFactory.is()) - xComposer = xFactory->createQueryComposer(); - - // let the composer compose - if (xComposer.is()) - { - xComposer->setQuery(sCompleteStatement); - xComposer->setFilter(sFilter); - xComposer->setOrder(sSort); - sCompleteStatement = xComposer->getComposedQuery(); - } - // Usually, I would expect the result of the composing to be the same as the ActiveCommand property - // But this code here is pretty old, and I don't know wha the side effects are if I remove it now ... } catch(Exception&) { @@ -496,7 +461,7 @@ namespace svx ,sConnectionResource ,nObjectType ,sObjectName,xConnection - ,!((CommandType::QUERY == nObjectType) && !bHasFilterOrSort) + ,!((CommandType::QUERY == nObjectType)) ,sCompleteStatement); } diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index cbe9b49b81f1..d64b0c9ab958 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -210,10 +210,11 @@ void FmGridHeader::RequestHelp( const HelpEvent& rHEvt ) Reference< ::com::sun::star::container::XIndexContainer > xColumns(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns()); try { - Reference< ::com::sun::star::beans::XPropertySet > xColumn; - ::cppu::extractInterface(xColumn, xColumns->getByIndex(nPos)); + Reference< ::com::sun::star::beans::XPropertySet > xColumn(xColumns->getByIndex(nPos),UNO_QUERY); ::rtl::OUString aHelpText; xColumn->getPropertyValue(FM_PROP_HELPTEXT) >>= aHelpText; + if ( !aHelpText.getLength() ) + xColumn->getPropertyValue(FM_PROP_DESCRIPTION) >>= aHelpText; if ( aHelpText.getLength() ) { if ( rHEvt.GetMode() & HELPMODE_BALLOON ) @@ -1737,11 +1738,12 @@ void FmGridControl::InitColumnByField( _pColumn->SetObject( (sal_Int16)nFieldPos ); return; } - +/* // handle readonly columns sal_Bool bReadOnly = sal_True; xField->getPropertyValue( FM_PROP_ISREADONLY ) >>= bReadOnly; _pColumn->SetReadOnly( bReadOnly ); +*/ } // the control type is determined by the ColumnServiceName @@ -1999,7 +2001,11 @@ namespace { Reference<XPropertySet> xProp(GetPeer()->getColumns(),UNO_QUERY); if ( xProp.is() ) + { xProp->getPropertyValue(FM_PROP_HELPTEXT) >>= sRetText; + if ( !sRetText.getLength() ) + xProp->getPropertyValue(FM_PROP_DESCRIPTION) >>= sRetText; + } } break; case ::svt::BBTYPE_COLUMNHEADERCELL: @@ -2008,6 +2014,13 @@ namespace GetModelColumnPos( sal::static_int_cast< sal_uInt16 >(_nPosition)), FM_PROP_HELPTEXT); + if ( !sRetText.getLength() ) + sRetText = getColumnPropertyFromPeer( + GetPeer(), + GetModelColumnPos( + sal::static_int_cast< sal_uInt16 >(_nPosition)), + FM_PROP_DESCRIPTION); + break; default: sRetText = DbGridControl::GetAccessibleObjectDescription(_eObjType,_nPosition); @@ -2029,7 +2042,7 @@ void FmGridControl::Select() // die HandleColumn wird nicht selektiert switch (nSelectedColumn) { - case -1 : break; // no selection + case SAL_MAX_UINT16: break; // no selection case 0 : nSelectedColumn = SAL_MAX_UINT16; break; // handle col can't be seledted default : diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 6a3e4a17f5d7..bb8afd502d43 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -45,6 +45,8 @@ #include <com/sun/star/form/XBoundComponent.hpp> #include <com/sun/star/script/XEventAttacherManager.hpp> #include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp> +#include <com/sun/star/sdbcx/XTablesSupplier.hpp> +#include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdbc/ColumnValue.hpp> #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/XStatement.hpp> @@ -82,6 +84,7 @@ using namespace ::svt; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; +using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::form; @@ -551,6 +554,7 @@ TYPEINIT1( DbFilterField, DbCellControl ) //------------------------------------------------------------------------------ DbCellControl::DbCellControl( DbGridColumn& _rColumn, sal_Bool /*_bText*/ ) :OPropertyChangeListener(m_aMutex) + ,m_pFieldChangeBroadcaster(NULL) ,m_bTransparent( sal_False ) ,m_bAlignedController( sal_True ) ,m_bAccessingValueProperty( sal_False ) @@ -574,6 +578,27 @@ DbCellControl::DbCellControl( DbGridColumn& _rColumn, sal_Bool /*_bText*/ ) implDoPropertyListening( FM_PROP_STATE, sal_False ); implDoPropertyListening( FM_PROP_TEXT, sal_False ); implDoPropertyListening( FM_PROP_EFFECTIVE_VALUE, sal_False ); + + // be listener at the bound field as well + try + { + Reference< XPropertySetInfo > xPSI( xColModelProps->getPropertySetInfo(), UNO_SET_THROW ); + if ( xPSI->hasPropertyByName( FM_PROP_BOUNDFIELD ) ) + { + Reference< XPropertySet > xField; + xColModelProps->getPropertyValue( FM_PROP_BOUNDFIELD ) >>= xField; + if ( xField.is() ) + { + m_pFieldChangeBroadcaster = new ::comphelper::OPropertyChangeMultiplexer(this, xField); + m_pFieldChangeBroadcaster->acquire(); + m_pFieldChangeBroadcaster->addProperty( FM_PROP_ISREADONLY ); + } + } + } + catch( const Exception& ) + { + DBG_ERROR( "DbCellControl::doPropertyListening: caught an exception!" ); + } } } @@ -605,17 +630,22 @@ void DbCellControl::doPropertyListening( const ::rtl::OUString& _rPropertyName ) { implDoPropertyListening( _rPropertyName ); } - //------------------------------------------------------------------------------ -DbCellControl::~DbCellControl() +void lcl_clearBroadCaster(::comphelper::OPropertyChangeMultiplexer*& _pBroadcaster) { - if ( m_pModelChangeBroadcaster ) + if ( _pBroadcaster ) { - m_pModelChangeBroadcaster->dispose(); - m_pModelChangeBroadcaster->release(); - m_pModelChangeBroadcaster = NULL; + _pBroadcaster->dispose(); + _pBroadcaster->release(); + _pBroadcaster = NULL; // no delete, this is done implicitly } +} +//------------------------------------------------------------------------------ +DbCellControl::~DbCellControl() +{ + lcl_clearBroadCaster(m_pModelChangeBroadcaster); + lcl_clearBroadCaster(m_pFieldChangeBroadcaster); delete m_pWindow; delete m_pPainter; @@ -660,7 +690,14 @@ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(R } else if ( _rEvent.PropertyName.equals( FM_PROP_READONLY ) ) { - implAdjustReadOnly( xSourceProps ); + implAdjustReadOnly( xSourceProps, true); + } + else if ( _rEvent.PropertyName.equals( FM_PROP_ISREADONLY ) ) + { + sal_Bool bReadOnly = sal_True; + _rEvent.NewValue >>= bReadOnly; + m_rColumn.SetReadOnly(bReadOnly); + implAdjustReadOnly( xSourceProps, false); } else if ( _rEvent.PropertyName.equals( FM_PROP_ENABLED ) ) { @@ -798,7 +835,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni } //------------------------------------------------------------------------------ -void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxModel ) +void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxModel,bool i_bReadOnly ) { DBG_ASSERT( m_pWindow, "DbCellControl::implAdjustReadOnly: not to be called without window!" ); DBG_ASSERT( _rxModel.is(), "DbCellControl::implAdjustReadOnly: invalid model!" ); @@ -807,9 +844,12 @@ void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxMode Edit* pEditWindow = dynamic_cast< Edit* >( m_pWindow ); if ( pEditWindow ) { - sal_Bool bReadOnly = sal_True; - _rxModel->getPropertyValue( FM_PROP_READONLY ) >>= bReadOnly; - static_cast< Edit* >( m_pWindow )->SetReadOnly( m_rColumn.IsReadOnly() || bReadOnly ); + sal_Bool bReadOnly = m_rColumn.IsReadOnly(); + if ( !bReadOnly ) + { + _rxModel->getPropertyValue( i_bReadOnly ? FM_PROP_READONLY : FM_PROP_ISREADONLY) >>= bReadOnly; + } + static_cast< Edit* >( m_pWindow )->SetReadOnly( bReadOnly ); } } } @@ -846,7 +886,7 @@ void DbCellControl::Init( Window& rParent, const Reference< XRowSet >& _rxCursor if ( xModelPSI->hasPropertyByName( FM_PROP_READONLY ) ) { - implAdjustReadOnly( xModel ); + implAdjustReadOnly( xModel,true ); } if ( xModelPSI->hasPropertyByName( FM_PROP_ENABLED ) ) @@ -1003,7 +1043,7 @@ double DbCellControl::GetValue(const Reference< ::com::sun::star::sdb::XColumn > //------------------------------------------------------------------------------ void DbCellControl::invalidatedController() { - m_rColumn.GetParent().refreshController(m_rColumn.GetId(), DbGridControl::GrantCellControlAccess()); + m_rColumn.GetParent().refreshController(m_rColumn.GetId(), DbGridControl::GrantControlAccess()); } /*************************************************************************/ @@ -3039,43 +3079,22 @@ void DbFilterField::Update() if (!xForm.is()) return; - Reference< XConnection > xConnection(getRowSetConnection(xForm)); - if (!xConnection.is()) - return; - - Reference< ::com::sun::star::sdb::XSQLQueryComposerFactory > xFactory(xConnection, UNO_QUERY); - if (!xFactory.is()) - { - DBG_ERROR("DbFilterField::Update : used the right place to request the ::com::sun::star::sdb::XSQLQueryComposerFactory interface ?"); - return; - } - - Reference< ::com::sun::star::sdb::XSQLQueryComposer > xComposer = xFactory->createQueryComposer(); - try - { - Reference< ::com::sun::star::beans::XPropertySet > xFormAsSet(xForm, UNO_QUERY); - ::rtl::OUString sStatement; - xFormAsSet->getPropertyValue(FM_PROP_ACTIVECOMMAND) >>= sStatement; - xComposer->setQuery(sStatement); - } - catch(const Exception&) - { - ::comphelper::disposeComponent(xComposer); - return; - } + Reference<XPropertySet> xFormProp(xForm,UNO_QUERY); + Reference< XTablesSupplier > xSupTab; + xFormProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SingleSelectQueryComposer"))) >>= xSupTab; - Reference< ::com::sun::star::beans::XPropertySet > xComposerAsSet(xComposer, UNO_QUERY); - if (!xComposerAsSet.is()) + Reference< XConnection > xConnection(getRowSetConnection(xForm)); + if (!xSupTab.is()) return; // search the field - Reference< ::com::sun::star::container::XNameAccess > xFieldNames; - Reference< ::com::sun::star::container::XNameAccess > xTablesNames; - Reference< ::com::sun::star::beans::XPropertySet > xComposerFieldAsSet; + Reference< XColumnsSupplier > xSupCol(xSupTab,UNO_QUERY); + Reference< ::com::sun::star::container::XNameAccess > xFieldNames = xSupCol->getColumns(); + if (!xFieldNames->hasByName(aName)) + return; - ::cppu::extractInterface(xFieldNames, xComposerAsSet->getPropertyValue(FM_PROP_SELECTED_FIELDS)); - ::cppu::extractInterface(xTablesNames, xComposerAsSet->getPropertyValue(FM_PROP_SELECTED_TABLES)); - ::cppu::extractInterface(xComposerFieldAsSet, xFieldNames->getByName(aName)); + Reference< ::com::sun::star::container::XNameAccess > xTablesNames = xSupTab->getTables(); + Reference< ::com::sun::star::beans::XPropertySet > xComposerFieldAsSet(xFieldNames->getByName(aName),UNO_QUERY); if (xComposerFieldAsSet.is() && ::comphelper::hasProperty(FM_PROP_TABLENAME, xComposerFieldAsSet) && ::comphelper::hasProperty(FM_PROP_FIELDSOURCE, xComposerFieldAsSet)) diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 8cc52e4c0b7d..1944bd47dad5 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -44,6 +44,8 @@ #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> #include <com/sun/star/accessibility/XAccessible.hpp> #include <com/sun/star/sdb/XResultSetAccess.hpp> +#include <com/sun/star/sdb/RowChangeAction.hpp> +#include <com/sun/star/sdb/XRowsChangeBroadcaster.hpp> #include <com/sun/star/sdbc/XResultSetUpdate.hpp> #include <com/sun/star/sdbcx/Privilege.hpp> #include <com/sun/star/container/XChild.hpp> @@ -102,6 +104,39 @@ using namespace com::sun::star::accessibility; | BROWSER_VLINESFULL \ | BROWSER_HEADERBAR_NEW \ +class RowSetEventListener : public ::cppu::WeakImplHelper1<XRowsChangeListener> +{ + DbGridControl* m_pControl; +public: + RowSetEventListener(DbGridControl* i_pControl) : m_pControl(i_pControl) + { + } +private: + // XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& /*i_aEvt*/) throw ( RuntimeException ) + { + } + virtual void SAL_CALL rowsChanged(const ::com::sun::star::sdb::RowsChangeEvent& i_aEvt) throw ( RuntimeException ) + { + if ( i_aEvt.Action == RowChangeAction::UPDATE ) + { + ::DbGridControl::GrantControlAccess aAccess; + CursorWrapper* pSeek = m_pControl->GetSeekCursor(aAccess); + const DbGridRowRef& rSeekRow = m_pControl->GetSeekRow(aAccess); + const Any* pIter = i_aEvt.Bookmarks.getConstArray(); + const Any* pEnd = pIter + i_aEvt.Bookmarks.getLength(); + for(;pIter != pEnd;++pIter) + { + pSeek->moveToBookmark(*pIter); + // get the data + rSeekRow->SetState(pSeek, sal_True); + sal_Int32 nSeekPos = pSeek->getRow() - 1; + m_pControl->SetSeekPos(nSeekPos,aAccess); + m_pControl->RowModified(nSeekPos); + } + } + } +}; //============================================================================== class GridFieldValueListener; @@ -987,6 +1022,7 @@ DbGridControl::~DbGridControl() m_pDataSourcePropMultiplexer = NULL; m_pDataSourcePropListener = NULL; } + m_xRowSetListener.clear(); delete m_pDataCursor; delete m_pSeekCursor; @@ -1377,7 +1413,7 @@ sal_Bool DbGridControl::IsPermanentCursorEnabled() const } //------------------------------------------------------------------------------ -void DbGridControl::refreshController(sal_uInt16 _nColId, GrantCellControlAccess /*_aAccess*/) +void DbGridControl::refreshController(sal_uInt16 _nColId, GrantControlAccess /*_aAccess*/) { if ((GetCurColumnId() == _nColId) && IsEditing()) { // the controller which is currently active needs to be refreshed @@ -1412,6 +1448,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt m_pDataSourcePropMultiplexer = NULL; m_pDataSourcePropListener = NULL; } + m_xRowSetListener.clear(); // is the new cursor valid ? // the cursor is only valid if it contains some columns @@ -1503,7 +1540,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt Reference< XPropertySet > xSet(_xCursor, UNO_QUERY); if (xSet.is()) { - // feststellen welche Updatem�glichkeiten bestehen + // feststellen welche Updatemoeglichkeiten bestehen sal_Int32 nConcurrency = ResultSetConcurrency::READ_ONLY; xSet->getPropertyValue(FM_PROP_RESULTSET_CONCURRENCY) >>= nConcurrency; @@ -1565,6 +1602,12 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt xSet->getPropertyValue(FM_PROP_ROWCOUNT) >>= nRecordCount; m_bRecordCountFinal = ::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_ROWCOUNTFINAL)); + m_xRowSetListener = new RowSetEventListener(this); + Reference< XRowsChangeBroadcaster> xChangeBroad(xSet,UNO_QUERY); + if ( xChangeBroad.is( ) ) + xChangeBroad->addRowsChangeListener(m_xRowSetListener); + + // insert the currently known rows // and one row if we are able to insert rows if (m_nOptions & OPT_INSERT) diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index e02e8664c6ac..8ce3d6e7ba7c 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -43,7 +43,7 @@ #include <svtools/miscopt.hxx> #include <unotools/pathoptions.hxx> #include <unotools/viewoptions.hxx> -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #include <sfx2/app.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/objitem.hxx> diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index f507068b6e2d..96bdd27d62e1 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -78,6 +78,7 @@ #include <svx/fmglob.hxx> #include <svl/eitem.hxx> #include <tools/shl.hxx> +#include <tools/diagnose_ex.h> #include <svx/svdpage.hxx> #include <svx/fmmodel.hxx> #include <svx/dialmgr.hxx> @@ -98,6 +99,8 @@ #include <svx/svxdlg.hxx> //CHINA001 #include <svx/dialogs.hrc> //CHINA001 +#include "svx/sdrobjectfilter.hxx" + #define HANDLE_SQL_ERRORS( action, successflag, context, message ) \ try \ { \ @@ -544,7 +547,7 @@ void FmFormShell::Execute(SfxRequest &rReq) case SID_FM_SCROLLBAR: case SID_FM_SPINBUTTON: { - SFX_REQUEST_ARG( rReq, pGrabFocusItem, SfxBoolItem, SID_FM_GRABCONTROLFOCUS, sal_False ); + SFX_REQUEST_ARG( rReq, pGrabFocusItem, SfxBoolItem, SID_FM_TOGGLECONTROLFOCUS, sal_False ); if ( pGrabFocusItem && pGrabFocusItem->GetValue() ) { // see below SfxViewShell* pShell = GetViewShell(); @@ -572,9 +575,9 @@ void FmFormShell::Execute(SfxRequest &rReq) { // #99013# if selected with control key, return focus to current view // do this asynchron, so that the creation can be finished first - // reusing the SID_FM_GRABCONTROLFOCUS is somewhat hacky ... which it wouldn't if it would have another + // reusing the SID_FM_TOGGLECONTROLFOCUS is somewhat hacky ... which it wouldn't if it would have another // name, so I do not really have a big problem with this .... - SfxBoolItem aGrabFocusIndicatorItem( SID_FM_GRABCONTROLFOCUS, sal_True ); + SfxBoolItem aGrabFocusIndicatorItem( SID_FM_TOGGLECONTROLFOCUS, sal_True ); GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON, &aGrabFocusIndicatorItem, NULL ); } @@ -595,11 +598,27 @@ void FmFormShell::Execute(SfxRequest &rReq) } break; - case SID_FM_GRABCONTROLFOCUS: + case SID_FM_TOGGLECONTROLFOCUS: { FmFormView* pFormView = GetFormView(); - if ( pFormView ) + if ( !pFormView ) + break; + + // if we execute this ourself, then either the application does not implement an own handling for this, + // of we're on the top of the dispatcher stack, which means a control has the focus. + // In the latter case, we put the focus to the document window, otherwise, we focus the first control + const bool bHasControlFocus = GetImpl()->HasControlFocus(); + if ( bHasControlFocus ) + { + const OutputDevice* pDevice = GetCurrentViewDevice(); + Window* pWindow = dynamic_cast< Window* >( const_cast< OutputDevice* >( pDevice ) ); + if ( pWindow ) + pWindow->GrabFocus(); + } + else + { pFormView->GrabFirstControlFocus( ); + } } break; @@ -1353,6 +1372,78 @@ namespace } //------------------------------------------------------------------------ +void FmFormShell::ToggleControlFocus( const SdrUnoObj& i_rUnoObject, const SdrView& i_rView, OutputDevice& i_rDevice ) const +{ + try + { + // check if the focus currently is in a control + // Well, okay, do it the other way 'round: Check whether the current control of the active controller + // actually has the focus. This should be equivalent. + const bool bHasControlFocus = GetImpl()->HasControlFocus(); + + if ( bHasControlFocus ) + { + Window* pWindow( dynamic_cast< Window* >( &i_rDevice ) ); + OSL_ENSURE( pWindow, "FmFormShell::ToggleControlFocus: I need a Window, really!" ); + if ( pWindow ) + pWindow->GrabFocus(); + } + else + { + Reference< XControl > xControl; + GetFormControl( i_rUnoObject.GetUnoControlModel(), i_rView, i_rDevice, xControl ); + Reference< XWindow > xControlWindow( xControl, UNO_QUERY ); + if ( xControlWindow.is() ) + xControlWindow->setFocus(); + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } +} + +//------------------------------------------------------------------------ +namespace +{ + class FocusableControlsFilter : public ::svx::ISdrObjectFilter + { + public: + FocusableControlsFilter( const SdrView& i_rView, const OutputDevice& i_rDevice ) + :m_rView( i_rView ) + ,m_rDevice( i_rDevice ) + { + } + + public: + virtual bool includeObject( const SdrObject& i_rObject ) const + { + const SdrUnoObj* pUnoObj = dynamic_cast< const SdrUnoObj* >( &i_rObject ); + if ( !pUnoObj ) + return false; + + Reference< XControl > xControl = pUnoObj->GetUnoControl( m_rView, m_rDevice ); + return FmXFormView::isFocusable( xControl ); + } + + private: + const SdrView& m_rView; + const OutputDevice& m_rDevice; + }; +} + +//------------------------------------------------------------------------ +::std::auto_ptr< ::svx::ISdrObjectFilter > FmFormShell::CreateFocusableControlFilter( const SdrView& i_rView, const OutputDevice& i_rDevice ) const +{ + ::std::auto_ptr< ::svx::ISdrObjectFilter > pFilter; + + if ( !i_rView.IsDesignMode() ) + pFilter.reset( new FocusableControlsFilter( i_rView, i_rDevice ) ); + + return pFilter; +} + +//------------------------------------------------------------------------ SdrUnoObj* FmFormShell::GetFormControl( const Reference< XControlModel >& _rxModel, const SdrView& _rView, const OutputDevice& _rDevice, Reference< XControl >& _out_rxControl ) const { if ( !_rxModel.is() ) diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 8c752910b15e..52ad139543c5 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -56,6 +56,7 @@ #include "svx/svxids.hrc" /** === begin UNO includes === **/ +#include <com/sun/star/awt/XWindow2.hpp> #include <com/sun/star/awt/XCheckBox.hpp> #include <com/sun/star/awt/XListBox.hpp> #include <com/sun/star/awt/XTextComponent.hpp> @@ -941,7 +942,6 @@ void SAL_CALL FmXFormShell::formDeactivated(const EventObject& rEvent) throw( Ru void FmXFormShell::disposing() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::disposing" ); - OSL_TRACE( "--- FmXFormShell::disposing : %p, ........, ........", this ); impl_checkDisposed(); FmXFormShell_BASE::disposing(); @@ -3793,7 +3793,6 @@ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem) void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeactivateController /* = sal_True */ ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewDeactivated" ); - OSL_TRACE( "--- FmXFormShell::viewDeactivated: %p, %p, ........", this, &_rCurrentView ); if ( _rCurrentView.GetImpl() && !_rCurrentView.IsDesignMode() ) { @@ -3828,7 +3827,6 @@ void FmXFormShell::viewDeactivated( FmFormView& _rCurrentView, sal_Bool _bDeacti // remove callbacks at the page if ( pPage ) { - OSL_TRACE( "--- FmXFormShell::resetHandler : %p, ........, %p", this, pPage ); pPage->GetImpl().SetFormsCreationHdl( Link() ); } UpdateForms( sal_True ); @@ -3867,7 +3865,6 @@ IMPL_LINK( FmXFormShell, OnFormsCreated, FmFormPage*, /*_pPage*/ ) void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncAction /* = sal_False */ ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::viewActivated" ); - OSL_TRACE( "--- FmXFormShell::viewActivated : %p, %p, ........", this, &_rCurrentView ); FmFormPage* pPage = _rCurrentView.GetCurPage(); @@ -3897,7 +3894,6 @@ void FmXFormShell::viewActivated( FmFormView& _rCurrentView, sal_Bool _bSyncActi // set callbacks at the page if ( pPage ) { - OSL_TRACE( "--- FmXFormShell::setHandler : %p, ........, %p", this, pPage ); pPage->GetImpl().SetFormsCreationHdl( LINK( this, FmXFormShell, OnFormsCreated ) ); } @@ -4188,6 +4184,31 @@ void FmXFormShell::handleMouseButtonDown( const SdrViewEvent& _rViewEvent ) } } +//------------------------------------------------------------------------------ +bool FmXFormShell::HasControlFocus() const +{ + bool bHasControlFocus = false; + + try + { + Reference< XFormController > xController( getActiveController() ); + Reference< XControl > xCurrentControl; + if ( xController.is() ) + xCurrentControl.set( xController->getCurrentControl() ); + if ( xCurrentControl.is() ) + { + Reference< XWindow2 > xPeerWindow( xCurrentControl->getPeer(), UNO_QUERY_THROW ); + bHasControlFocus = xPeerWindow->hasFocus(); + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + + return bHasControlFocus; +} + //============================================================================== //============================================================================== SearchableControlIterator::SearchableControlIterator(Reference< XInterface> xStartingPoint) diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 430c52cfa4db..320baea302b7 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -130,7 +130,6 @@ namespace svx SID_ATTR_LRSPACE, /* 48 */ SID_ATTR_ULSPACE, /* 49 */ SID_ATTR_CHAR_AUTOKERN, - SID_ATTR_CHAR_OVERLINE, SID_SET_SUPER_SCRIPT, SID_SET_SUB_SCRIPT, SID_CHAR_DLG, @@ -141,6 +140,7 @@ namespace svx SID_ATTR_CHAR_RELIEF, SID_ATTR_PARA_LEFT_TO_RIGHT, /* 950 */ SID_ATTR_PARA_RIGHT_TO_LEFT, + SID_ATTR_CHAR_OVERLINE, 0 }; diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 068f4aa8a029..460d2e1cd787 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -72,6 +72,8 @@ /** === end UNO includes === **/ #include <basic/sbxvar.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> #include <comphelper/container.hxx> #include <comphelper/extract.hxx> #include <comphelper/processfactory.hxx> diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index fd7da1f7eb8f..22681d511b82 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -339,8 +339,6 @@ void FmFormView::GrabFirstControlFocus( sal_Bool _bForceSync ) //------------------------------------------------------------------------ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage) { - OSL_TRACE( "--- FmFormView::ShowSdrPage : ........, %p, %p", this, pPage ); - SdrPageView* pPV = E3dView::ShowSdrPage(pPage); if (pPage) @@ -377,8 +375,6 @@ SdrPageView* FmFormView::ShowSdrPage(SdrPage* pPage) //------------------------------------------------------------------------ void FmFormView::HideSdrPage() { - OSL_TRACE( "--- FmFormView::HideSdrPage : ........, %p, %p", this, GetCurPage() ); - // --- 1. deactivate controls if ( !IsDesignMode() ) DeactivateControls(GetSdrPageView()); diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 1b5c7daf371c..0bf6a35abd98 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -823,6 +823,48 @@ void FmXFormView::AutoFocus( sal_Bool _bSync ) else m_nAutoFocusEvent = Application::PostUserEvent(LINK(this, FmXFormView, OnAutoFocus)); } + +// ----------------------------------------------------------------------------- +bool FmXFormView::isFocusable( const Reference< XControl >& i_rControl ) +{ + if ( !i_rControl.is() ) + return false; + + try + { + Reference< XPropertySet > xModelProps( i_rControl->getModel(), UNO_QUERY_THROW ); + + // only enabled controls are allowed to participate + sal_Bool bEnabled = sal_False; + OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_ENABLED ) >>= bEnabled ); + if ( !bEnabled ) + return false; + + // check the class id of the control model + sal_Int16 nClassId = FormComponentType::CONTROL; + OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId ); + + // controls which are not focussable + if ( ( FormComponentType::CONTROL != nClassId ) + && ( FormComponentType::IMAGEBUTTON != nClassId ) + && ( FormComponentType::GROUPBOX != nClassId ) + && ( FormComponentType::FIXEDTEXT != nClassId ) + && ( FormComponentType::HIDDENCONTROL != nClassId ) + && ( FormComponentType::IMAGECONTROL != nClassId ) + && ( FormComponentType::SCROLLBAR != nClassId ) + && ( FormComponentType::SPINBUTTON!= nClassId ) + ) + { + return true; + } + } + catch( const Exception& e ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return false; +} + // ----------------------------------------------------------------------------- static Reference< XControl > lcl_firstFocussableControl( const Sequence< Reference< XControl > >& _rControls ) { @@ -833,47 +875,19 @@ static Reference< XControl > lcl_firstFocussableControl( const Sequence< Referen const Reference< XControl >* pControlsEnd = _rControls.getConstArray() + _rControls.getLength(); for ( ; pControls != pControlsEnd; ++pControls ) { - try - { - if ( !pControls->is() ) - continue; - - Reference< XPropertySet > xModelProps( (*pControls)->getModel(), UNO_QUERY_THROW ); - - // only enabled controls are allowed to participate - sal_Bool bEnabled = sal_False; - OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_ENABLED ) >>= bEnabled ); - if ( !bEnabled ) - continue; - - // check the class id of the control model - sal_Int16 nClassId = FormComponentType::CONTROL; - OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_CLASSID ) >>= nClassId ); - - // controls which are not focussable - if ( ( FormComponentType::CONTROL != nClassId ) - && ( FormComponentType::IMAGEBUTTON != nClassId ) - && ( FormComponentType::GROUPBOX != nClassId ) - && ( FormComponentType::FIXEDTEXT != nClassId ) - && ( FormComponentType::HIDDENCONTROL != nClassId ) - && ( FormComponentType::IMAGECONTROL != nClassId ) - && ( FormComponentType::SCROLLBAR != nClassId ) - && ( FormComponentType::SPINBUTTON!= nClassId ) - ) - { - xReturn = *pControls; - break; - } - } - catch( const Exception& e ) + if ( !pControls->is() ) + continue; + + if ( FmXFormView::isFocusable( *pControls ) ) { - (void)e; // make compiler happy + xReturn = *pControls; + break; } - - if ( !xReturn.is() && _rControls.getLength() ) - xReturn = _rControls[0]; } + if ( !xReturn.is() && _rControls.getLength() ) + xReturn = _rControls[0]; + return xReturn; } @@ -1008,11 +1022,6 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/) } // ----------------------------------------------------------------------------- -namespace -{ -} - -// ----------------------------------------------------------------------------- void FmXFormView::onCreatedFormObject( FmFormObj& _rFormObject ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormView::onCreatedFormObject" ); @@ -1590,7 +1599,13 @@ bool FmXFormView::createControlLabelPair( const ::comphelper::ComponentContext& xLabelModel.set( pLabel->GetUnoControlModel(), UNO_QUERY ); if ( xLabelModel.is() ) { - xLabelModel->setPropertyValue( FM_PROP_LABEL, makeAny( sFieldName + _rFieldPostfix ) ); + ::rtl::OUString sLabel; + if ( _rxField.is() && _rxField->getPropertySetInfo()->hasPropertyByName(FM_PROP_LABEL) ) + _rxField->getPropertyValue(FM_PROP_LABEL) >>= sLabel; + if ( !sLabel.getLength() ) + sLabel = sFieldName; + + xLabelModel->setPropertyValue( FM_PROP_LABEL, makeAny( sLabel + _rFieldPostfix ) ); String sObjectLabel( SVX_RES( RID_STR_OBJECT_LABEL ) ); sObjectLabel.SearchAndReplaceAllAscii( "#object#", sFieldName ); xLabelModel->setPropertyValue( FM_PROP_NAME, makeAny( ::rtl::OUString( sObjectLabel ) ) ); diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 5d222e7f5e88..feb160482665 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -40,6 +40,7 @@ #include <com/sun/star/form/XFormComponent.hpp> #include <com/sun/star/form/FormComponentType.hpp> #include <com/sun/star/awt/ScrollBarOrientation.hpp> +#include <com/sun/star/awt/MouseWheelBehavior.hpp> #include <com/sun/star/form/XGridColumnFactory.hpp> #include <com/sun/star/style/VerticalAlignment.hpp> #include <com/sun/star/awt/LineEndFormat.hpp> @@ -97,6 +98,7 @@ namespace svxform /** === end UNO using === **/ namespace FormComponentType = ::com::sun::star::form::FormComponentType; namespace ScrollBarOrientation = ::com::sun::star::awt::ScrollBarOrientation; + namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior; namespace LineEndFormat = ::com::sun::star::awt::LineEndFormat; namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode; namespace DataType = ::com::sun::star::sdbc::DataType; @@ -506,6 +508,12 @@ namespace svxform _rxControlModel->setPropertyValue( FM_PROP_STRICTFORMAT, makeAny( sal_Bool( sal_True ) ) ); } + // mouse wheel: don't use it for scrolling by default (i110036) + if ( xPSI->hasPropertyByName( FM_PROP_MOUSE_WHEEL_BEHAVIOR ) ) + { + _rxControlModel->setPropertyValue( FM_PROP_MOUSE_WHEEL_BEHAVIOR, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) ); + } + if ( xPSI->hasPropertyByName( FM_PROP_WRITING_MODE ) ) _rxControlModel->setPropertyValue( FM_PROP_WRITING_MODE, makeAny( WritingMode2::CONTEXT ) ); } diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 0c83655042d2..ff60597d70fe 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -2232,7 +2232,7 @@ namespace svxform { SdrPaintWindow* pPaintWindow = pFormView->GetPaintWindow( i ); OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); - if ( OUTDEV_WINDOW == rOutDev.GetOutDevType() ) + if ( ( OUTDEV_WINDOW == rOutDev.GetOutDevType() ) && !aMarkRect.IsEmpty() ) { pFormView->MakeVisible( aMarkRect, (Window&)rOutDev ); } diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 7a51348dfaa3..bce51d8d43f5 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -91,9 +91,46 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::form; using namespace ::com::sun::star::container; +using namespace ::com::sun::star; using namespace ::svxform; using namespace ::svx; + +struct ColumnInfo +{ + ::rtl::OUString sColumnName; + ::rtl::OUString sLabel; + bool bColumn; + ColumnInfo(const ::rtl::OUString& i_sColumnName,const ::rtl::OUString& i_sLabel) + : sColumnName(i_sColumnName) + , sLabel(i_sLabel) + , bColumn(true) + { + } + ColumnInfo(const ::rtl::OUString& i_sColumnName) + : sColumnName(i_sColumnName) + , bColumn(false) + { + } +}; + +void lcl_addToList( SvTreeListBox& _rListBox, const uno::Reference< container::XNameAccess>& i_xColumns ) +{ + uno::Sequence< ::rtl::OUString > aEntries = i_xColumns->getElementNames(); + const ::rtl::OUString* pEntries = aEntries.getConstArray(); + sal_Int32 nEntries = aEntries.getLength(); + for ( sal_Int32 i = 0; i < nEntries; ++i, ++pEntries ) + { + uno::Reference< beans::XPropertySet> xColumn(i_xColumns->getByName(*pEntries),UNO_QUERY_THROW); + ::rtl::OUString sLabel; + if ( xColumn->getPropertySetInfo()->hasPropertyByName(FM_PROP_LABEL) ) + xColumn->getPropertyValue(FM_PROP_LABEL) >>= sLabel; + if ( sLabel.getLength() ) + _rListBox.InsertEntry( sLabel,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) ); + else + _rListBox.InsertEntry( *pEntries,NULL,FALSE,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) ); + } +} //================================================================== // class FmFieldWinListBox //================================================================== @@ -149,7 +186,8 @@ void FmFieldWinListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPi aDescriptor[ daConnection ] <<= pTabWin->GetConnection().getTyped(); aDescriptor[ daCommand ] <<= pTabWin->GetObjectName(); aDescriptor[ daCommandType ]<<= pTabWin->GetObjectType(); - aDescriptor[ daColumnName ] <<= ::rtl::OUString( GetEntryText( pSelected ) ); + ColumnInfo* pInfo = static_cast<ColumnInfo*>(pSelected->GetUserData()); + aDescriptor[ daColumnName ] <<= pInfo->sColumnName; TransferableHelper* pTransferColumn = new OColumnTransferable( aDescriptor, CTF_FIELD_DESCRIPTOR | CTF_CONTROL_EXCHANGE | CTF_COLUMN_DESCRIPTOR @@ -238,7 +276,8 @@ sal_Bool FmFieldWin::createSelectionControls( ) aDescr[ daCommand ] <<= GetObjectName(); aDescr[ daCommandType ] <<= GetObjectType(); - aDescr[ daColumnName ] <<= ::rtl::OUString( pListBox->GetEntryText( pSelected) ); + ColumnInfo* pInfo = static_cast<ColumnInfo*>(pSelected->GetUserData()); + aDescr[ daColumnName ] <<= pInfo->sColumnName;//::rtl::OUString( pListBox->GetEntryText( pSelected) ); // transfer this to the SFX world SfxUnoAnyItem aDescriptorItem( SID_FM_DATACCESS_DESCRIPTOR, makeAny( aDescr.createPropertyValueSequence() ) ); @@ -344,15 +383,14 @@ void FmFieldWin::UpdateContent(const ::com::sun::star::uno::Reference< ::com::su // the place, and connectRowset should be replaced with ensureRowSetConnection // get the fields of the object - Sequence< ::rtl::OUString> aFieldNames; - if ( m_aConnection.is() && m_aObjectName.getLength() ) - aFieldNames = getFieldNamesByCommandDescriptor( m_aConnection, m_nObjectType, m_aObjectName ); - // put them into the list - const ::rtl::OUString* pFieldNames = aFieldNames.getConstArray(); - sal_Int32 nFieldsCount = aFieldNames.getLength(); - for ( sal_Int32 i = 0; i < nFieldsCount; ++i, ++pFieldNames) - pListBox->InsertEntry( * pFieldNames); + if ( m_aConnection.is() && m_aObjectName.getLength() ) + { + Reference< XComponent > xKeepFieldsAlive; + Reference< XNameAccess > xColumns = getFieldsByCommandDescriptor( m_aConnection, m_nObjectType, m_aObjectName,xKeepFieldsAlive ); + if ( xColumns.is() ) + lcl_addToList(*pListBox,xColumns); + } // Prefix setzen UniString aPrefix; diff --git a/svx/source/inc/fmprop.hrc b/svx/source/inc/fmprop.hrc index 72758a4cac4e..a0592c80b90b 100644 --- a/svx/source/inc/fmprop.hrc +++ b/svx/source/inc/fmprop.hrc @@ -174,5 +174,6 @@ #define FM_PROP_INPUT_REQUIRED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InputRequired" ) ) #define FM_PROP_WRITING_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WritingMode" ) ) #define FM_PROP_MOUSE_WHEEL_BEHAVIOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MouseWheelBehavior" ) ) +#define FM_PROP_DESCRIPTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Description" ) ) #endif // _SVX_FMPROP_HRC diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 65a2572cd5af..88d2346b9d20 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -481,6 +481,9 @@ public: // if the form belongs to the controller (extern) displaying a grid, the according internal form will // be displayed, _xForm else + // check if the current control of the active controler has the focus + bool HasControlFocus() const; + private: DECL_LINK(OnFoundData, FmFoundRecordInformation*); DECL_LINK(OnCanceledNotFound, FmFoundRecordInformation*); diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx index d643fc4dc403..1131209a384a 100644 --- a/svx/source/inc/fmvwimp.hxx +++ b/svx/source/inc/fmvwimp.hxx @@ -240,6 +240,11 @@ public: void onCreatedFormObject( FmFormObj& _rFormObject ); + static bool + isFocusable( + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& i_rControl + ); + private: FmWinRecList::iterator findWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _rxCC ); //void addWindow(const SdrPageViewWinRec*); diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index c72a59294d6c..acead19ba9ee 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -219,6 +219,7 @@ class DbCellControl { private: ::comphelper::OPropertyChangeMultiplexer* m_pModelChangeBroadcaster; + ::comphelper::OPropertyChangeMultiplexer* m_pFieldChangeBroadcaster; private: sal_Bool m_bTransparent : 1; @@ -348,7 +349,7 @@ private: void implDoPropertyListening( const ::rtl::OUString& _rPropertyName, sal_Bool _bWarnIfNotExistent = sal_True ); /// updates the "readonly" setting on m_pWindow, according to the respective property value in the given model - void implAdjustReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ); + void implAdjustReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel,bool i_bReadOnly ); /// updates the "enabled" setting on m_pWindow, according to the respective property value in the given model void implAdjustEnabled( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ); diff --git a/svx/source/intro/iso.src b/svx/source/intro/iso.src index f963d95721fc..ecadfd9d4c6a 100644 --- a/svx/source/intro/iso.src +++ b/svx/source/intro/iso.src @@ -30,7 +30,7 @@ #endif #ifndef _SVTOOLS_HRC -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #endif #include "intro.hrc" diff --git a/svx/source/intro/ooo.src b/svx/source/intro/ooo.src index b29f3894c0c5..7c3cc150586c 100644 --- a/svx/source/intro/ooo.src +++ b/svx/source/intro/ooo.src @@ -26,7 +26,7 @@ ************************************************************************/ #ifndef _SVTOOLS_HRC -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #endif #ifndef _SVTOOLS_IMAGEMGR_HRC diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 0aecac047121..40b9aa5153ec 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -299,10 +299,14 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void ControlHolder::invalidate() const { - Window* pWindow = VCLUnoHelper::GetWindow( m_xControl->getPeer() ); - OSL_ENSURE( pWindow, "ControlHolder::invalidate: no implementation access!" ); - if ( pWindow ) - pWindow->Invalidate(); + Reference< XWindowPeer > xPeer( m_xControl->getPeer() ); + if ( xPeer.is() ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xPeer ); + OSL_ENSURE( pWindow, "ControlHolder::invalidate: no implementation access!" ); + if ( pWindow ) + pWindow->Invalidate(); + } } //-------------------------------------------------------------------- diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx index ac1e5aa4ef1c..2a3a00b25b99 100644 --- a/svx/source/sdr/overlay/overlaybitmapex.cxx +++ b/svx/source/sdr/overlay/overlaybitmapex.cxx @@ -27,6 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> #include <svx/sdr/overlay/overlaybitmapex.hxx> #include <vcl/salbtype.hxx> #include <vcl/outdev.hxx> @@ -41,24 +42,32 @@ namespace sdr { drawinglayer::primitive2d::Primitive2DSequence OverlayBitmapEx::createOverlayObjectPrimitive2DSequence() { - const drawinglayer::primitive2d::Primitive2DReference aReference( + drawinglayer::primitive2d::Primitive2DReference aReference( new drawinglayer::primitive2d::OverlayBitmapExPrimitive( getBitmapEx(), getBasePosition(), getCenterX(), getCenterY())); + if(basegfx::fTools::more(mfAlpha, 0.0)) + { + const drawinglayer::primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&aReference, 1L); + aReference = drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(aNewTransPrimitiveVector, mfAlpha)); + } + return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1); } OverlayBitmapEx::OverlayBitmapEx( const basegfx::B2DPoint& rBasePos, const BitmapEx& rBitmapEx, - sal_uInt16 nCenX, sal_uInt16 nCenY) + sal_uInt16 nCenX, sal_uInt16 nCenY, double fAlpha) : OverlayObjectWithBasePosition(rBasePos, Color(COL_WHITE)), maBitmapEx(rBitmapEx), mnCenterX(nCenX), - mnCenterY(nCenY) + mnCenterY(nCenY), + mfAlpha(fAlpha) { } diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 5abd9c4b26f1..0f3325a0027e 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -259,6 +259,8 @@ namespace sdr void AttributeProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel) { + OSL_ASSERT(pNewModel!=NULL); + if(pSrcPool && pDestPool && (pSrcPool != pDestPool)) { if(mpItemSet) @@ -291,8 +293,24 @@ namespace sdr } else { - // StyleSheet is NOT from the correct pool; use default - ImpAddStyleSheet(pNewModel->GetDefaultStyleSheet(), sal_True); + // StyleSheet is NOT from the correct pool. + // Look one up in the right pool with the same + // name or use the default. + + // Look up the style in the new document. + OSL_ASSERT(pNewModel->GetStyleSheetPool() != NULL); + SfxStyleSheet* pNewStyleSheet = dynamic_cast<SfxStyleSheet*>( + pNewModel->GetStyleSheetPool()->Find( + pStySheet->GetName(), + SFX_STYLE_FAMILY_ALL)); + if (pNewStyleSheet == NULL + || &pNewStyleSheet->GetPool().GetPool() != pDestPool) + { + // There is no copy of the style in the new + // document. Use the default as a fallback. + pNewStyleSheet = pNewModel->GetDefaultStyleSheet(); + } + ImpAddStyleSheet(pNewStyleSheet, sal_True); } } diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 76bcb828bb24..7235310def0b 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1164,7 +1164,7 @@ BOOL SdrObjEditView::KeyInput(const KeyEvent& rKEvt, Window* pWin) #endif if (pTextEditOutlinerView->PostKeyEvent(rKEvt)) { - if( pMod && !pMod->IsChanged() ) + if( pMod /* && !pMod->IsChanged() */ ) { if( pTextEditOutliner && pTextEditOutliner->IsModified() ) pMod->SetChanged( sal_True ); diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 3d90eae6d68c..47a04241e5bb 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -306,7 +306,8 @@ SdrHdl::SdrHdl(): bSelect(FALSE), b1PixMore(FALSE), bPlusHdl(FALSE), - mbMoveOutside(false) + mbMoveOutside(false), + mbMouseOver(false) { } @@ -324,7 +325,8 @@ SdrHdl::SdrHdl(const Point& rPnt, SdrHdlKind eNewKind): bSelect(FALSE), b1PixMore(FALSE), bPlusHdl(FALSE), - mbMoveOutside(false) + mbMoveOutside(false), + mbMouseOver(false) { } @@ -946,6 +948,19 @@ BOOL SdrHdl::IsFocusHdl() const } } +void SdrHdl::onMouseEnter(const MouseEvent& /*rMEvt*/) +{ +} + +void SdrHdl::onMouseLeave() +{ +} + +bool SdrHdl::isMouseOver() const +{ + return mbMouseOver; +} + //////////////////////////////////////////////////////////////////////////////////////////////////// // class SdrHdlColor diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index b9598cef4ceb..a15cf8c8b2ac 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1060,6 +1060,44 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode) } } +/** handle mouse over effects for handles */ +BOOL SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin) +{ + const ULONG nHdlCount = aHdl.GetHdlCount(); + if( nHdlCount ) + { + SdrHdl* pMouseOverHdl = 0; + if( !rMEvt.IsLeaveWindow() && pWin ) + { + Point aMDPos( pWin->PixelToLogic( rMEvt.GetPosPixel() ) ); + pMouseOverHdl = PickHandle(aMDPos); + } + + // notify last mouse over handle that he lost the mouse + for(ULONG nHdl = 0; nHdl < nHdlCount; nHdl++ ) + { + SdrHdl* pCurrentHdl = GetHdl(nHdl); + if( pCurrentHdl->mbMouseOver ) + { + if( pCurrentHdl != pMouseOverHdl ) + { + pCurrentHdl->mbMouseOver = false; + pCurrentHdl->onMouseLeave(); + } + break; + } + } + + // notify current mouse over handle + if( pMouseOverHdl /* && !pMouseOverHdl->mbMouseOver */ ) + { + pMouseOverHdl->mbMouseOver = true; + pMouseOverHdl->onMouseEnter(rMEvt); + } + } + return SdrSnapView::MouseMove(rMEvt, pWin); +} + void SdrMarkView::ForceRefToMarked() { switch(eDragMode) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 1c534fbcbe98..b594b0404706 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -120,6 +120,7 @@ #include <svx/sdrhittesthelper.hxx> #include <svx/svdundo.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> +#include <svx/sdrobjectfilter.hxx> using namespace ::com::sun::star; @@ -1686,6 +1687,11 @@ void SdrObject::NbcSetLogicRect(const Rectangle& rRect) NbcSetSnapRect(rRect); } +void SdrObject::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) +{ + SetLogicRect( rMaxRect ); +} + void SdrObject::SetSnapRect(const Rectangle& rRect) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); @@ -3265,4 +3271,11 @@ void SdrObjFactory::RemoveMakeUserDataHdl(const Link& rLink) rLL.RemoveLink(rLink); } +namespace svx +{ + ISdrObjectFilter::~ISdrObjectFilter() + { + } +} + // eof diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 1924235e7003..d1f65c30050d 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -1025,7 +1025,7 @@ void SdrGrafObj::ImpSetGrafInfoToAttr() // ----------------------------------------------------------------------------- -void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, BOOL bShrinkOnly ) +void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly ) { Size aSize; Size aMaxSize( rMaxRect.GetSize() ); diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 4008e9494f2e..9dd615490f9e 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -28,6 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include <vcl/svapp.hxx> + #include <svx/svdomedia.hxx> #include "svdglob.hxx" #include "svdstr.hrc" @@ -147,6 +149,53 @@ void SdrMediaObj::operator=(const SdrObject& rObj) // ------------------------------------------------------------------------------ +void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /* = false */ ) +{ + Size aSize( Application::GetDefaultDevice()->PixelToLogic( getPreferredSize(), MAP_100TH_MM ) ); + Size aMaxSize( rMaxRect.GetSize() ); + + if( aSize.Height() != 0 && aSize.Width() != 0 ) + { + Point aPos( rMaxRect.TopLeft() ); + + // Falls Grafik zu gross, wird die Grafik + // in die Seite eingepasst + if ( (!bShrinkOnly || + ( aSize.Height() > aMaxSize.Height() ) || + ( aSize.Width() > aMaxSize.Width() ) )&& + aSize.Height() && aMaxSize.Height() ) + { + float fGrfWH = (float)aSize.Width() / + (float)aSize.Height(); + float fWinWH = (float)aMaxSize.Width() / + (float)aMaxSize.Height(); + + // Grafik an Pagesize anpassen (skaliert) + if ( fGrfWH < fWinWH ) + { + aSize.Width() = (long)(aMaxSize.Height() * fGrfWH); + aSize.Height()= aMaxSize.Height(); + } + else if ( fGrfWH > 0.F ) + { + aSize.Width() = aMaxSize.Width(); + aSize.Height()= (long)(aMaxSize.Width() / fGrfWH); + } + + aPos = rMaxRect.Center(); + } + + if( bShrinkOnly ) + aPos = aRect.TopLeft(); + + aPos.X() -= aSize.Width() / 2; + aPos.Y() -= aSize.Height() / 2; + SetLogicRect( Rectangle( aPos, aSize ) ); + } +} + +// ------------------------------------------------------------------------------ + void SdrMediaObj::setURL( const ::rtl::OUString& rURL ) { ::avmedia::MediaItem aURLItem; diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 856820b6d864..7a4305b9581f 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1358,6 +1358,10 @@ SdrViewContext SdrView::GetContext() const for( ULONG nMarkNum = 0; nMarkNum < nMarkAnz && ( bGraf || bMedia ); nMarkNum++ ) { const SdrObject* pMarkObj = GetMarkedObjectByIndex( nMarkNum ); + DBG_ASSERT( pMarkObj, "SdrView::GetContext(), null pointer in mark list!" ); + + if( !pMarkObj ) + continue; if( !pMarkObj->ISA( SdrGrafObj ) ) bGraf = FALSE; diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index d7f16cd15d3c..e928f94d88ec 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -2178,6 +2178,16 @@ void SdrTableObj::NbcSetLogicRect(const Rectangle& rRect) SetRectsDirty(); } + +// -------------------------------------------------------------------- + +void SdrTableObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool /* bShrinkOnly = false */ ) +{ + Rectangle aAdjustRect( rMaxRect ); + aAdjustRect.setHeight( GetLogicRect().getHeight() ); + SetLogicRect( aAdjustRect ); +} + // -------------------------------------------------------------------- void SdrTableObj::NbcMove(const Size& rSiz) diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index a4cab5f3ef16..f98fd57a0480 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -32,9 +32,14 @@ #include <string> // HACK: prevent conflict between STLPORT and Workshop headers -#ifndef _TOOLBOX_HXX //autogen +#include <com/sun/star/util/XURLTransformer.hpp> +#include <com/sun/star/awt/MenuItemStyle.hpp> +#include <com/sun/star/awt/XPopupMenuExtended.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> + +#include <vos/mutex.hxx> + #include <vcl/toolbox.hxx> -#endif #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> @@ -42,30 +47,35 @@ #include <vcl/settings.hxx> #include <svl/intitem.hxx> #include <editeng/colritem.hxx> -#include "chrtitem.hxx" #include <tools/urlobj.hxx> #include <svx/dialogs.hrc> -#include "helpid.hrc" - #include <svx/svdtrans.hxx> +#include <svx/sdasitm.hxx> #include <svx/dialmgr.hxx> +#include "svx/extrusioncolorcontrol.hxx" + +//#include "chrtitem.hxx" +#include "helpid.hrc" #include "extrusioncontrols.hxx" #include "extrusioncontrols.hrc" -#include <svx/sdasitm.hxx> -#include "toolbarmenu.hxx" #include "colorwindow.hxx" - -#include <svx/tbxcolorupdate.hxx> +#include "extrusiondepthdialog.hxx" //////////// -using namespace svx; +using ::rtl::OUString; +using ::svtools::ToolbarMenu; + +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::util; +using namespace ::com::sun::star::graphic; -SFX_IMPL_TOOLBOX_CONTROL( ExtrusionDirectionControl, SfxBoolItem ); +namespace svx +{ /************************************************************************* |* @@ -75,43 +85,17 @@ SFX_IMPL_TOOLBOX_CONTROL( ExtrusionDirectionControl, SfxBoolItem ); static sal_Int32 gSkewList[] = { 135, 90, 45, 180, 0, -360, -135, -90, -45 }; -ExtrusionDirectionWindow::ExtrusionDirectionWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) : - SfxPopupWindow( nId, - rFrame, - SVX_RES( RID_SVXFLOAT_EXTRUSION_DIRECTION )), - mxFrame( rFrame ), - maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ), - maImgPerspectiveH( SVX_RES( IMG_PERSPECTIVE_H ) ), - maImgParallel( SVX_RES( IMG_PARALLEL ) ), - maImgParallelH( SVX_RES( IMG_PARALLEL_H ) ), - mbPopupMode ( TRUE ) +ExtrusionDirectionWindow::ExtrusionDirectionWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow ) +: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_DIRECTION )) +, mrController( rController ) +, maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ) +, maImgPerspectiveH( SVX_RES( IMG_PERSPECTIVE_H ) ) +, maImgParallel( SVX_RES( IMG_PARALLEL ) ) +, maImgParallelH( SVX_RES( IMG_PARALLEL_H ) ) +, msExtrusionDirection( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirection" ) ) +, msExtrusionProjection( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionProjection" ) ) { - implInit(); -} - -ExtrusionDirectionWindow::ExtrusionDirectionWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ) : - SfxPopupWindow( nId, - rFrame, - pParentWindow, - SVX_RES( RID_SVXFLOAT_EXTRUSION_DIRECTION )), - mxFrame( rFrame ), - maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ), - maImgPerspectiveH( SVX_RES( IMG_PERSPECTIVE_H ) ), - maImgParallel( SVX_RES( IMG_PARALLEL ) ), - maImgParallelH( SVX_RES( IMG_PARALLEL_H ) ), - mbPopupMode ( TRUE ) -{ - implInit(); -} - -void ExtrusionDirectionWindow::implInit() -{ - SetHelpId( HID_POPUP_EXTRUSION_DIRECTION ); + SetHelpId( HID_MENU_EXTRUSION_DIRECTION ); USHORT i; for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) @@ -120,16 +104,10 @@ void ExtrusionDirectionWindow::implInit() maImgDirectionH[i] = Image( SVX_RES( IMG_DIRECTION_H + i ) ); } -// mpDirectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_DIRECTION, *this ); -// mpProjectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_PROJECTION, *this ); - - mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); - mpMenu->SetHelpId( HID_MENU_EXTRUSION_DIRECTION ); - mpMenu->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) ); - mpDirectionSet = new ValueSet( mpMenu, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT ); + SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) ); + mpDirectionSet = createEmptyValueSetControl(); mpDirectionSet->SetHelpId( HID_VALUESET_EXTRUSION_DIRECTION ); - mpDirectionSet->SetHelpId( HID_POPUP_LINEEND_CTRL ); mpDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) ); mpDirectionSet->SetColCount( 3 ); mpDirectionSet->EnableFullItemMode( FALSE ); @@ -144,55 +122,39 @@ void ExtrusionDirectionWindow::implInit() mpDirectionSet->SetOutputSizePixel( Size( 72, 72 ) ); - mpMenu->appendEntry( 2, mpDirectionSet ); - mpMenu->appendSeparator(); - mpMenu->appendEntry( 0, String( SVX_RES( STR_PERSPECTIVE ) ), bHighContrast ? maImgPerspectiveH : maImgPerspective ); - mpMenu->appendEntry( 1, String( SVX_RES( STR_PARALLEL ) ), bHighContrast ? maImgParallelH : maImgParallel ); - - SetOutputSizePixel( mpMenu->getMenuSize() ); - mpMenu->SetOutputSizePixel( GetOutputSizePixel() ); + appendEntry( 2, mpDirectionSet ); + appendSeparator(); + appendEntry( 0, String( SVX_RES( STR_PERSPECTIVE ) ), bHighContrast ? maImgPerspectiveH : maImgPerspective ); + appendEntry( 1, String( SVX_RES( STR_PARALLEL ) ), bHighContrast ? maImgParallelH : maImgParallel ); - mpMenu->Show(); + SetOutputSizePixel( getMenuSize() ); FreeResource(); - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirection" ))); - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionProjection" ))); -} - -SfxPopupWindow* ExtrusionDirectionWindow::Clone() const -{ - return new ExtrusionDirectionWindow( GetId(), mxFrame ); + AddStatusListener( msExtrusionDirection ); + AddStatusListener( msExtrusionProjection ); } void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - SfxPopupWindow::DataChanged( rDCEvt ); + ToolbarMenu::DataChanged( rDCEvt ); if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - USHORT i; - for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) + for( USHORT i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { mpDirectionSet->SetItemImage( i+1, bHighContrast ? maImgDirectionH[ i ] : maImgDirection[ i ] ); } - mpMenu->setEntryImage( 0, bHighContrast ? maImgPerspectiveH : maImgPerspective ); - mpMenu->setEntryImage( 1, bHighContrast ? maImgParallelH : maImgParallel ); + setEntryImage( 0, bHighContrast ? maImgPerspectiveH : maImgPerspective ); + setEntryImage( 1, bHighContrast ? maImgParallelH : maImgParallel ); } } // ----------------------------------------------------------------------- -ExtrusionDirectionWindow::~ExtrusionDirectionWindow() -{ - delete mpMenu; -} - -// ----------------------------------------------------------------------- - void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool bEnabled ) { if( mpDirectionSet ) @@ -213,58 +175,47 @@ void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool bEnabled mpDirectionSet->SetNoSelection(); } } - if( mpMenu ) - { - mpMenu->enableEntry( 2, bEnabled ); - } + enableEntry( 2, bEnabled ); } // ----------------------------------------------------------------------- void ExtrusionDirectionWindow::implSetProjection( sal_Int32 nProjection, bool bEnabled ) { - if( mpMenu ) - { - mpMenu->checkEntry( 0, (nProjection == 0) && bEnabled ); - mpMenu->checkEntry( 1, (nProjection == 1 ) && bEnabled ); - mpMenu->enableEntry( 0, bEnabled ); - mpMenu->enableEntry( 1, bEnabled ); - } + checkEntry( 0, (nProjection == 0) && bEnabled ); + checkEntry( 1, (nProjection == 1 ) && bEnabled ); + enableEntry( 0, bEnabled ); + enableEntry( 1, bEnabled ); } // ----------------------------------------------------------------------- -void ExtrusionDirectionWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void SAL_CALL ExtrusionDirectionWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) { - switch( nSID ) + if( Event.FeatureURL.Main.equals( msExtrusionDirection ) ) { - case SID_EXTRUSION_DIRECTION: + if( !Event.IsEnabled ) { - if( eState == SFX_ITEM_DISABLED ) - { - implSetDirection( -1, false ); - } - else - { - const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState ); - if( pStateItem ) - implSetDirection( pStateItem->GetValue(), true ); - } - break; + implSetDirection( -1, false ); } - case SID_EXTRUSION_PROJECTION: + else { - if( eState == SFX_ITEM_DISABLED ) - { - implSetProjection( -1, false ); - } - else - { - const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState ); - if( pStateItem ) - implSetProjection( pStateItem->GetValue(), true ); - } - break; + sal_Int32 nValue = 0; + if( Event.State >>= nValue ) + implSetDirection( nValue, true ); + } + } + else if( Event.FeatureURL.Main.equals( msExtrusionProjection ) ) + { + if( !Event.IsEnabled ) + { + implSetProjection( -1, false ); + } + else + { + sal_Int32 nValue = 0; + if( Event.State >>= nValue ) + implSetProjection( nValue, true ); } } } @@ -276,48 +227,24 @@ IMPL_LINK( ExtrusionDirectionWindow, SelectHdl, void *, pControl ) if ( IsInPopupMode() ) EndPopupMode(); -// SfxDispatcher* pDisp = GetBindings().GetDispatcher(); - if( pControl == mpDirectionSet ) { - sal_Int32 nSkew = gSkewList[mpDirectionSet->GetSelectItemId()-1]; - - SfxInt32Item aItem( SID_EXTRUSION_DIRECTION, nSkew ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirection" )); - - Any a; - INetURLObject aObj( aCommand ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aItem.QueryValue( a ); - aArgs[0].Value = a; - - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); + aArgs[0].Name = msExtrusionDirection.copy(5); + aArgs[0].Value <<= (sal_Int32)gSkewList[mpDirectionSet->GetSelectItemId()-1]; -// pDisp->Execute( SID_EXTRUSION_DIRECTION, SFX_CALLMODE_RECORD, &aItem, 0L , 0L ); + mrController.dispatchCommand( msExtrusionDirection, aArgs ); } else { - int nProjection = mpMenu->getSelectedEntryId(); + int nProjection = getSelectedEntryId(); if( (nProjection >= 0) && (nProjection < 2 ) ) { - SfxInt32Item aItem( SID_EXTRUSION_PROJECTION, nProjection ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionProjection" )); - - Any a; - INetURLObject aObj( aCommand ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aItem.QueryValue( a ); - aArgs[0].Value = a; - - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); + aArgs[0].Name = msExtrusionProjection.copy(5); + aArgs[0].Value <<= (sal_Int32)nProjection; + + mrController.dispatchCommand( msExtrusionProjection, aArgs ); implSetProjection( nProjection, true ); } } @@ -325,94 +252,59 @@ IMPL_LINK( ExtrusionDirectionWindow, SelectHdl, void *, pControl ) return 0; } -// ----------------------------------------------------------------------- +// ======================================================================= +// ExtrusionDirectionControl +// ======================================================================= -void ExtrusionDirectionWindow::FillValueSet() +ExtrusionDirectionControl::ExtrusionDirectionControl( const Reference< lang::XMultiServiceFactory >& rServiceManager ) +: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirectionFloater" ) ) ) { } // ----------------------------------------------------------------------- -void ExtrusionDirectionWindow::StartSelection() +::Window* ExtrusionDirectionControl::createPopupWindow( ::Window* pParent ) { - mpDirectionSet->StartSelection(); + return new ExtrusionDirectionWindow( *this, m_xFrame, pParent ); } // ----------------------------------------------------------------------- - -BOOL ExtrusionDirectionWindow::Close() -{ - return SfxPopupWindow::Close(); -} - -// ----------------------------------------------------------------------- - -void ExtrusionDirectionWindow::PopupModeEnd() -{ - if ( IsVisible() ) - { - mbPopupMode = FALSE; - } - SfxPopupWindow::PopupModeEnd(); -} - +// XServiceInfo // ----------------------------------------------------------------------- -void ExtrusionDirectionWindow::GetFocus (void) -{ - SfxPopupWindow::GetFocus(); - // Grab the focus to the line ends value set so that it can be controlled - // with the keyboard. - if( mpDirectionSet ) - mpDirectionSet->GrabFocus(); -} - -/************************************************************************* -|* -|* SvxLineEndToolBoxControl -|* -\************************************************************************/ - -ExtrusionDirectionControl::ExtrusionDirectionControl( - USHORT nSlotId, USHORT nId, ToolBox &rTbx ) -: SfxToolBoxControl( nSlotId, nId, rTbx ) +OUString SAL_CALL ExtrusionDirectionControl_getImplementationName() { - rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.ExtrusionDirectionController" )); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -ExtrusionDirectionControl::~ExtrusionDirectionControl() +Sequence< OUString > SAL_CALL ExtrusionDirectionControl_getSupportedServiceNames() throw( RuntimeException ) { + Sequence< OUString > aSNS( 1 ); + aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" )); + return aSNS; } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindowType ExtrusionDirectionControl::GetPopupWindowType() const +Reference< XInterface > SAL_CALL SAL_CALL ExtrusionDirectionControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException ) { - return SFX_POPUPWINDOW_ONCLICK; + return *new ExtrusionDirectionControl( rSMgr ); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindow* ExtrusionDirectionControl::CreatePopupWindow() +OUString SAL_CALL ExtrusionDirectionControl::getImplementationName( ) throw (RuntimeException) { - ExtrusionDirectionWindow* pWin = new ExtrusionDirectionWindow( GetId(), m_xFrame, &GetToolBox() ); - pWin->StartPopupMode( &GetToolBox(), TRUE ); - pWin->StartSelection(); - SetPopupWindow( pWin ); - return pWin; + return ExtrusionDirectionControl_getImplementationName(); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -void ExtrusionDirectionControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* ) +Sequence< OUString > SAL_CALL ExtrusionDirectionControl::getSupportedServiceNames( ) throw (RuntimeException) { - USHORT nId = GetId(); - ToolBox& rTbx = GetToolBox(); - - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); + return ExtrusionDirectionControl_getSupportedServiceNames(); } // #################################################################### @@ -444,135 +336,66 @@ double ExtrusionDepthDialog::getDepth() const // #################################################################### -SFX_IMPL_TOOLBOX_CONTROL( ExtrusionDepthControl, SfxBoolItem ); - -ExtrusionDepthWindow::ExtrusionDepthWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) : - SfxPopupWindow( nId, - rFrame, - SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )), - maImgDepth0( SVX_RES( IMG_DEPTH_0 ) ), - maImgDepth1( SVX_RES( IMG_DEPTH_1 ) ), - maImgDepth2( SVX_RES( IMG_DEPTH_2 ) ), - maImgDepth3( SVX_RES( IMG_DEPTH_3 ) ), - maImgDepth4( SVX_RES( IMG_DEPTH_4 ) ), - maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) ), - maImgDepth0h( SVX_RES( IMG_DEPTH_0_H ) ), - maImgDepth1h( SVX_RES( IMG_DEPTH_1_H ) ), - maImgDepth2h( SVX_RES( IMG_DEPTH_2_H ) ), - maImgDepth3h( SVX_RES( IMG_DEPTH_3_H ) ), - maImgDepth4h( SVX_RES( IMG_DEPTH_4_H ) ), - maImgDepthInfinityh( SVX_RES( IMG_DEPTH_INFINITY_H ) ), - mxFrame( rFrame ), - mbPopupMode ( true ), - mfDepth( -1.0 ), - mbEnabled( false ) -{ - implInit(); -} - -ExtrusionDepthWindow::ExtrusionDepthWindow( USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ) : - SfxPopupWindow( nId, - rFrame, - pParentWindow, - SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )), - maImgDepth0( SVX_RES( IMG_DEPTH_0 ) ), - maImgDepth1( SVX_RES( IMG_DEPTH_1 ) ), - maImgDepth2( SVX_RES( IMG_DEPTH_2 ) ), - maImgDepth3( SVX_RES( IMG_DEPTH_3 ) ), - maImgDepth4( SVX_RES( IMG_DEPTH_4 ) ), - maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) ), - maImgDepth0h( SVX_RES( IMG_DEPTH_0_H ) ), - maImgDepth1h( SVX_RES( IMG_DEPTH_1_H ) ), - maImgDepth2h( SVX_RES( IMG_DEPTH_2_H ) ), - maImgDepth3h( SVX_RES( IMG_DEPTH_3_H ) ), - maImgDepth4h( SVX_RES( IMG_DEPTH_4_H ) ), - maImgDepthInfinityh( SVX_RES( IMG_DEPTH_INFINITY_H ) ), - mxFrame( rFrame ), - mbPopupMode ( true ), - mfDepth( -1.0 ), - mbEnabled( false ) -{ - implInit(); -} - -void ExtrusionDepthWindow::implInit() -{ - SetHelpId( HID_POPUP_EXTRUSION_DEPTH ); - -// mpDepthForewarder = new SfxStatusForwarder( SID_EXTRUSION_DEPTH, *this ); -// mpMetricForewarder = new SfxStatusForwarder( SID_ATTR_METRIC, *this ); - - mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); - mpMenu->SetHelpId( HID_MENU_EXTRUSION_DEPTH ); +double aDepthListInch[] = { 0, 1270,2540,5080,10160 }; +double aDepthListMM[] = { 0, 1000, 2500, 5000, 10000 }; - mpMenu->SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) ); +ExtrusionDepthWindow::ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow ) +: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )) +, mrController( rController ) +, maImgDepth0( SVX_RES( IMG_DEPTH_0 ) ) +, maImgDepth1( SVX_RES( IMG_DEPTH_1 ) ) +, maImgDepth2( SVX_RES( IMG_DEPTH_2 ) ) +, maImgDepth3( SVX_RES( IMG_DEPTH_3 ) ) +, maImgDepth4( SVX_RES( IMG_DEPTH_4 ) ) +, maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) ) +, maImgDepth0h( SVX_RES( IMG_DEPTH_0_H ) ) +, maImgDepth1h( SVX_RES( IMG_DEPTH_1_H ) ) +, maImgDepth2h( SVX_RES( IMG_DEPTH_2_H ) ) +, maImgDepth3h( SVX_RES( IMG_DEPTH_3_H ) ) +, maImgDepth4h( SVX_RES( IMG_DEPTH_4_H ) ) +, maImgDepthInfinityh( SVX_RES( IMG_DEPTH_INFINITY_H ) ) +, mfDepth( -1.0 ) +, msExtrusionDepth( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepth" ) ) +, msMetricUnit( RTL_CONSTASCII_USTRINGPARAM( ".uno:MetricUnit" ) ) +{ + SetHelpId( HID_MENU_EXTRUSION_DEPTH ); + + SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) ); bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); String aEmpty; - mpMenu->appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 ); - mpMenu->appendEntry( 1, aEmpty, bHighContrast ? maImgDepth1h : maImgDepth1 ); - mpMenu->appendEntry( 2, aEmpty, bHighContrast ? maImgDepth2h : maImgDepth2 ); - mpMenu->appendEntry( 3, aEmpty, bHighContrast ? maImgDepth3h : maImgDepth3 ); - mpMenu->appendEntry( 4, aEmpty, bHighContrast ? maImgDepth4h : maImgDepth4 ); - mpMenu->appendEntry( 5, String( SVX_RES( STR_INFINITY ) ), bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity ); - mpMenu->appendEntry( 6, String( SVX_RES( STR_CUSTOM ) ) ); + appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 ); + appendEntry( 1, aEmpty, bHighContrast ? maImgDepth1h : maImgDepth1 ); + appendEntry( 2, aEmpty, bHighContrast ? maImgDepth2h : maImgDepth2 ); + appendEntry( 3, aEmpty, bHighContrast ? maImgDepth3h : maImgDepth3 ); + appendEntry( 4, aEmpty, bHighContrast ? maImgDepth4h : maImgDepth4 ); + appendEntry( 5, String( SVX_RES( STR_INFINITY ) ), bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity ); + appendEntry( 6, String( SVX_RES( STR_CUSTOM ) ) ); - SetOutputSizePixel( mpMenu->getMenuSize() ); - mpMenu->SetOutputSizePixel( GetOutputSizePixel() ); - - mpMenu->Show(); + SetOutputSizePixel( getMenuSize() ); FreeResource(); - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepth" ))); - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:MetricUnit" ))); -// rBindings.Update( SID_ATTR_METRIC ); -// rBindings.Update( SID_EXTRUSION_DEPTH ); -} - -SfxPopupWindow* ExtrusionDepthWindow::Clone() const -{ - return new ExtrusionDepthWindow( GetId(), mxFrame ); + AddStatusListener( msExtrusionDepth ); + AddStatusListener( msMetricUnit ); } // ----------------------------------------------------------------------- -ExtrusionDepthWindow::~ExtrusionDepthWindow() +void ExtrusionDepthWindow::implSetDepth( double fDepth ) { -// delete mpDepthForewarder; -// delete mpMetricForewarder; - - delete mpMenu; -} - -// ----------------------------------------------------------------------- - -double aDepthListInch[] = { 0, 1270,2540,5080,10160 }; -double aDepthListMM[] = { 0, 1000, 2500, 5000, 10000 }; - -void ExtrusionDepthWindow::implSetDepth( double fDepth, bool bEnabled ) -{ - mbEnabled = bEnabled; mfDepth = fDepth; - if( mpMenu ) + int i; + for( i = 0; i < 7; i++ ) { - int i; - for( i = 0; i < 7; i++ ) + if( i == 5 ) { - if( i == 5 ) - { - mpMenu->checkEntry( i, (fDepth >= 338666) && bEnabled ); - } - else if( i != 6 ) - { - mpMenu->checkEntry( i, (fDepth == (IsMetric( meUnit ) ? aDepthListMM[i] : aDepthListInch[i]) && bEnabled ) ); - } - mpMenu->enableEntry( i, bEnabled ); + checkEntry( i, fDepth >= 338666 ); + } + else if( i != 6 ) + { + checkEntry( i, (fDepth == (IsMetric( meUnit ) ? aDepthListMM[i] : aDepthListInch[i]) ) ); } } } @@ -587,38 +410,37 @@ void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit ) for( int i = 0; i < 5; i++ ) { String aStr( SVX_RES( nResource + i ) ); - mpMenu->setEntryText( i, aStr ); + setEntryText( i, aStr ); }; } // ----------------------------------------------------------------------- -void ExtrusionDepthWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void SAL_CALL ExtrusionDepthWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) { - switch( nSID ) + if( Event.FeatureURL.Main.equals( msExtrusionDepth ) ) { - case SID_EXTRUSION_DEPTH: + if( !Event.IsEnabled ) { - if( eState == SFX_ITEM_DISABLED ) - { - implSetDepth( 0, false ); - } - else - { - const SvxDoubleItem* pStateItem = PTR_CAST( SvxDoubleItem, pState ); - if( pStateItem ) - implSetDepth( pStateItem->GetValue(), true ); - } - break; + implSetDepth( 0 ); } - case SID_ATTR_METRIC: + else + { + double fValue = 0.0; + if( Event.State >>= fValue ) + implSetDepth( fValue ); + } + } + else if( Event.FeatureURL.Main.equals( msMetricUnit ) ) + { + if( Event.IsEnabled ) { - const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pState ); - if( pStateItem ) + sal_Int32 nValue = 0; + if( Event.State >>= nValue ) { - implFillStrings( (FieldUnit)pStateItem->GetValue() ); + implFillStrings( static_cast<FieldUnit>(nValue) ); if( mfDepth >= 0.0 ) - implSetDepth( mfDepth, mbEnabled ); + implSetDepth( mfDepth ); } } } @@ -628,18 +450,18 @@ void ExtrusionDepthWindow::StateChanged( USHORT nSID, SfxItemState eState, const void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - SfxPopupWindow::DataChanged( rDCEvt ); + ToolbarMenu::DataChanged( rDCEvt ); if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - mpMenu->setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 ); - mpMenu->setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 ); - mpMenu->setEntryImage( 2, bHighContrast ? maImgDepth2h : maImgDepth2 ); - mpMenu->setEntryImage( 3, bHighContrast ? maImgDepth3h : maImgDepth3 ); - mpMenu->setEntryImage( 4, bHighContrast ? maImgDepth4h : maImgDepth4 ); - mpMenu->setEntryImage( 5, bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity ); + setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 ); + setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 ); + setEntryImage( 2, bHighContrast ? maImgDepth2h : maImgDepth2 ); + setEntryImage( 3, bHighContrast ? maImgDepth3h : maImgDepth3 ); + setEntryImage( 4, bHighContrast ? maImgDepth4h : maImgDepth4 ); + setEntryImage( 5, bHighContrast ? maImgDepthInfinityh : maImgDepthInfinity ); } } @@ -648,9 +470,7 @@ void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt ) IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG ) { -// SfxDispatcher* pDisp = GetBindings().GetDispatcher(); - - int nSelected = mpMenu->getSelectedEntryId(); + int nSelected = getSelectedEntryId(); if( nSelected != -1 ) { if( nSelected == 6 ) @@ -658,24 +478,16 @@ IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG ) if ( IsInPopupMode() ) EndPopupMode(); - SvxDoubleItem aDepthItem( mfDepth, SID_EXTRUSION_DEPTH ); - SfxUInt16Item aMetricItem( - SID_ATTR_METRIC, sal::static_int_cast< UINT16 >( meUnit ) ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepthDialog" )); + const rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepthDialog" )); Any a; Sequence< PropertyValue > aArgs( 2 ); aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Depth" )); - aDepthItem.QueryValue( a ); - aArgs[0].Value = a; + aArgs[0].Value <<= mfDepth; aArgs[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Metric" )); - aMetricItem.QueryValue( a ); - aArgs[1].Value = a; + aArgs[1].Value <<= static_cast<sal_Int32>( meUnit ); - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); + mrController.dispatchCommand( aCommand, aArgs ); } else { @@ -690,21 +502,12 @@ IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG ) fDepth = IsMetric( meUnit ) ? aDepthListMM[nSelected] : aDepthListInch[nSelected]; } - SvxDoubleItem aItem( fDepth, SID_EXTRUSION_DEPTH ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepth" )); - - Any a; - INetURLObject aObj( aCommand ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aItem.QueryValue( a ); - aArgs[0].Value = a; + aArgs[0].Name = msExtrusionDepth.copy(5); + aArgs[0].Value <<= fDepth; - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); - implSetDepth( fDepth, true ); + mrController.dispatchCommand( msExtrusionDepth, aArgs ); + implSetDepth( fDepth ); if ( IsInPopupMode() ) EndPopupMode(); @@ -713,143 +516,83 @@ IMPL_LINK( ExtrusionDepthWindow, SelectHdl, void *, EMPTYARG ) return 0; } -// ----------------------------------------------------------------------- +// ======================================================================= +// ExtrusionDirectionControl +// ======================================================================= -void ExtrusionDepthWindow::StartSelection() +ExtrusionDepthController::ExtrusionDepthController( const Reference< lang::XMultiServiceFactory >& rServiceManager ) +: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDepthFloater" ) ) ) { } // ----------------------------------------------------------------------- -BOOL ExtrusionDepthWindow::Close() +::Window* ExtrusionDepthController::createPopupWindow( ::Window* pParent ) { - return SfxPopupWindow::Close(); + return new ExtrusionDepthWindow( *this, m_xFrame, pParent ); } -// ----------------------------------------------------------------------- - -void ExtrusionDepthWindow::PopupModeEnd() -{ - if ( IsVisible() ) - { - mbPopupMode = FALSE; - } - SfxPopupWindow::PopupModeEnd(); -} // ----------------------------------------------------------------------- - -void ExtrusionDepthWindow::GetFocus (void) -{ - SfxPopupWindow::GetFocus(); - // Grab the focus to the line ends value set so that it can be controlled - // with the keyboard. - if( mpMenu ) - mpMenu->GrabFocus(); -} - -// ======================================================================== - -ExtrusionDepthControl::ExtrusionDepthControl( - USHORT nSlotId, USHORT nId, ToolBox &rTbx ) -: SfxToolBoxControl( nSlotId, nId, rTbx ) -{ - rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); -} - +// XServiceInfo // ----------------------------------------------------------------------- -ExtrusionDepthControl::~ExtrusionDepthControl() +OUString SAL_CALL ExtrusionDepthController_getImplementationName() { + return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.ExtrusionDepthController" )); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindowType ExtrusionDepthControl::GetPopupWindowType() const +Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException ) { - return SFX_POPUPWINDOW_ONCLICK; + Sequence< OUString > aSNS( 1 ); + aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.PopupMenuController" )); + return aSNS; } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindow* ExtrusionDepthControl::CreatePopupWindow() +Reference< XInterface > SAL_CALL SAL_CALL ExtrusionDepthController_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException ) { - ExtrusionDepthWindow* pWin = new ExtrusionDepthWindow( GetId(), m_xFrame, &GetToolBox() ); - pWin->StartPopupMode( &GetToolBox(), TRUE ); - pWin->StartSelection(); - SetPopupWindow( pWin ); - return pWin; + return *new ExtrusionDepthController( rSMgr ); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -void ExtrusionDepthControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* ) +OUString SAL_CALL ExtrusionDepthController::getImplementationName( ) throw (RuntimeException) { - USHORT nId = GetId(); - ToolBox& rTbx = GetToolBox(); - - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); + return ExtrusionDepthController_getImplementationName(); } -// #################################################################### +// -------------------------------------------------------------------- -SFX_IMPL_TOOLBOX_CONTROL( ExtrusionLightingControl, SfxBoolItem ); - -ExtrusionLightingWindow::ExtrusionLightingWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) : - SfxPopupWindow( nId, - rFrame, - SVX_RES( RID_SVXFLOAT_EXTRUSION_LIGHTING ) ), - maImgBright( SVX_RES( IMG_LIGHTING_BRIGHT ) ), - maImgNormal( SVX_RES( IMG_LIGHTING_NORMAL ) ), - maImgDim( SVX_RES( IMG_LIGHTING_DIM ) ), - maImgBrighth( SVX_RES( IMG_LIGHTING_BRIGHT_H ) ), - maImgNormalh( SVX_RES( IMG_LIGHTING_NORMAL_H ) ), - maImgDimh( SVX_RES( IMG_LIGHTING_DIM_H ) ), - mxFrame( rFrame ), - mbPopupMode( true ), - mnLevel( 0 ), - mbLevelEnabled( false ), - mnDirection( FROM_FRONT ), - mbDirectionEnabled( false ) +Sequence< OUString > SAL_CALL ExtrusionDepthController::getSupportedServiceNames( ) throw (RuntimeException) { - implInit(); + return ExtrusionDepthController_getSupportedServiceNames(); } -// ----------------------------------------------------------------------- -ExtrusionLightingWindow::ExtrusionLightingWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ) : - SfxPopupWindow( nId, - rFrame, - pParentWindow, - SVX_RES( RID_SVXFLOAT_EXTRUSION_LIGHTING ) ), - maImgBright( SVX_RES( IMG_LIGHTING_BRIGHT ) ), - maImgNormal( SVX_RES( IMG_LIGHTING_NORMAL ) ), - maImgDim( SVX_RES( IMG_LIGHTING_DIM ) ), - maImgBrighth( SVX_RES( IMG_LIGHTING_BRIGHT_H ) ), - maImgNormalh( SVX_RES( IMG_LIGHTING_NORMAL_H ) ), - maImgDimh( SVX_RES( IMG_LIGHTING_DIM_H ) ), - mxFrame( rFrame ), - mbPopupMode( true ), - mnLevel( 0 ), - mbLevelEnabled( false ), - mnDirection( FROM_FRONT ), - mbDirectionEnabled( false ) -{ - implInit(); -} - -// ----------------------------------------------------------------------- +// #################################################################### -void ExtrusionLightingWindow::implInit() +// ------------------------------------------------------------------------- + +ExtrusionLightingWindow::ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow ) +: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_LIGHTING )) +, mrController( rController ) +, maImgBright( SVX_RES( IMG_LIGHTING_BRIGHT ) ) +, maImgNormal( SVX_RES( IMG_LIGHTING_NORMAL ) ) +, maImgDim( SVX_RES( IMG_LIGHTING_DIM ) ) +, maImgBrighth( SVX_RES( IMG_LIGHTING_BRIGHT_H ) ) +, maImgNormalh( SVX_RES( IMG_LIGHTING_NORMAL_H ) ) +, maImgDimh( SVX_RES( IMG_LIGHTING_DIM_H ) ) +, mnLevel( 0 ) +, mbLevelEnabled( false ) +, mnDirection( FROM_FRONT ) +, mbDirectionEnabled( false ) +, msExtrusionLightingDirection( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingDirection" )) +, msExtrusionLightingIntensity( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingIntensity" )) { - SetHelpId( HID_POPUP_EXTRUSION_LIGHTING ); - USHORT i; for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ ) { @@ -864,17 +607,12 @@ void ExtrusionLightingWindow::implInit() maImgLightingPreviewh[i] = Image( SVX_RES( IMG_LIGHT_PREVIEW_H + i ) ); } -// mpLightingDirectionForewarder = new SfxStatusForwarder( SID_EXTRUSION_LIGHTING_DIRECTION, *this ); -// mpLightingIntensityForewarder = new SfxStatusForwarder( SID_EXTRUSION_LIGHTING_INTENSITY, *this ); - - mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); - mpMenu->SetHelpId( HID_MENU_EXTRUSION_LIGHTING ); - mpMenu->SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) ); + SetHelpId( HID_MENU_EXTRUSION_LIGHTING ); + SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) ); - mpLightingSet = new ValueSet( mpMenu, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT ); + mpLightingSet = createEmptyValueSetControl(); mpLightingSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING ); - mpLightingSet->SetHelpId( HID_POPUP_LINEEND_CTRL ); mpLightingSet->SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) ); mpLightingSet->SetColCount( 3 ); mpLightingSet->EnableFullItemMode( FALSE ); @@ -894,35 +632,18 @@ void ExtrusionLightingWindow::implInit() } mpLightingSet->SetOutputSizePixel( Size( 72, 72 ) ); - mpMenu->appendEntry( 3, mpLightingSet ); - mpMenu->appendSeparator(); - mpMenu->appendEntry( 0, String( SVX_RES( STR_BRIGHT ) ), bHighContrast ? maImgBrighth : maImgBright ); - mpMenu->appendEntry( 1, String( SVX_RES( STR_NORMAL ) ), bHighContrast ? maImgNormalh : maImgNormal ); - mpMenu->appendEntry( 2, String( SVX_RES( STR_DIM ) ), bHighContrast ? maImgDimh : maImgDim ); - - SetOutputSizePixel( mpMenu->getMenuSize() ); - mpMenu->SetOutputSizePixel( GetOutputSizePixel() ); + appendEntry( 3, mpLightingSet ); + appendSeparator(); + appendEntry( 0, String( SVX_RES( STR_BRIGHT ) ), bHighContrast ? maImgBrighth : maImgBright ); + appendEntry( 1, String( SVX_RES( STR_NORMAL ) ), bHighContrast ? maImgNormalh : maImgNormal ); + appendEntry( 2, String( SVX_RES( STR_DIM ) ), bHighContrast ? maImgDimh : maImgDim ); - mpMenu->Show(); + SetOutputSizePixel( getMenuSize() ); FreeResource(); - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingDirection" ))); - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingIntensity" ))); -} - -// ----------------------------------------------------------------------- - -SfxPopupWindow* ExtrusionLightingWindow::Clone() const -{ - return new ExtrusionLightingWindow( GetId(), mxFrame ); -} - -// ----------------------------------------------------------------------- - -ExtrusionLightingWindow::~ExtrusionLightingWindow() -{ - delete mpMenu; + AddStatusListener( msExtrusionLightingDirection ); + AddStatusListener( msExtrusionLightingIntensity ); } // ----------------------------------------------------------------------- @@ -934,8 +655,8 @@ void ExtrusionLightingWindow::implSetIntensity( int nLevel, bool bEnabled ) int i = 0; for( i = 0; i < 3; i++ ) { - mpMenu->checkEntry( i, (i == nLevel) && bEnabled ); - mpMenu->enableEntry( i, bEnabled ); + checkEntry( i, (i == nLevel) && bEnabled ); + enableEntry( i, bEnabled ); } } @@ -971,42 +692,37 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) } } - mpMenu->enableEntry( 3, bEnabled ); + enableEntry( 3, bEnabled ); } // ----------------------------------------------------------------------- -void ExtrusionLightingWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void SAL_CALL ExtrusionLightingWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) { - switch( nSID ) + if( Event.FeatureURL.Main.equals( msExtrusionLightingIntensity ) ) { - case SID_EXTRUSION_LIGHTING_INTENSITY: + if( !Event.IsEnabled ) { - if( eState == SFX_ITEM_DISABLED ) - { - implSetIntensity( 0, false ); - } - else - { - const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState ); - if( pStateItem ) - implSetIntensity( pStateItem->GetValue(), true ); - } - break; + implSetIntensity( 0, false ); } - case SID_EXTRUSION_LIGHTING_DIRECTION: + else { - if( eState == SFX_ITEM_DISABLED ) - { - implSetDirection( 0, false ); - } - else - { - const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState ); - if( pStateItem ) - implSetDirection( pStateItem->GetValue(), true ); - } - break; + sal_Int32 nValue = 0; + if( Event.State >>= nValue ) + implSetIntensity( nValue, true ); + } + } + else if( Event.FeatureURL.Main.equals( msExtrusionLightingDirection ) ) + { + if( !Event.IsEnabled ) + { + implSetDirection( 0, false ); + } + else + { + sal_Int32 nValue = 0; + if( Event.State >>= nValue ) + implSetDirection( nValue, true ); } } } @@ -1015,16 +731,16 @@ void ExtrusionLightingWindow::StateChanged( USHORT nSID, SfxItemState eState, co void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - SfxPopupWindow::DataChanged( rDCEvt ); + ToolbarMenu::DataChanged( rDCEvt ); if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); implSetDirection( mnDirection, mbDirectionEnabled ); - mpMenu->setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright ); - mpMenu->setEntryImage( 1, bHighContrast ? maImgNormalh : maImgNormal ); - mpMenu->setEntryImage( 2, bHighContrast ? maImgDimh : maImgDim ); + setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright ); + setEntryImage( 1, bHighContrast ? maImgNormalh : maImgNormal ); + setEntryImage( 2, bHighContrast ? maImgDimh : maImgDim ); } } @@ -1035,31 +751,19 @@ IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl ) if ( IsInPopupMode() ) EndPopupMode(); -// SfxDispatcher* pDisp = GetBindings().GetDispatcher(); - - if( pControl == mpMenu ) + if( pControl == this ) { - int nLevel = mpMenu->getSelectedEntryId(); + int nLevel = getSelectedEntryId(); if( nLevel >= 0 ) { if( nLevel != 3 ) { - SfxInt32Item aItem( SID_EXTRUSION_LIGHTING_INTENSITY, nLevel ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingIntensity" )); - - Any a; - INetURLObject aObj( aCommand ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aItem.QueryValue( a ); - aArgs[0].Value = a; + aArgs[0].Name = msExtrusionLightingIntensity.copy(5); + aArgs[0].Value <<= (sal_Int32)nLevel; - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); + mrController.dispatchCommand( msExtrusionLightingIntensity, aArgs ); -// pDisp->Execute( SID_EXTRUSION_LIGHTING_INTENSITY, SFX_CALLMODE_RECORD, &aItem, 0L , 0L ); implSetIntensity( nLevel, true ); } } @@ -1072,21 +776,11 @@ IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl ) { nDirection--; - SfxInt32Item aItem( SID_EXTRUSION_LIGHTING_DIRECTION, nDirection ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingDirection" )); - - Any a; - INetURLObject aObj( aCommand ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aItem.QueryValue( a ); - aArgs[0].Value = a; + aArgs[0].Name = msExtrusionLightingDirection.copy(5); + aArgs[0].Value <<= (sal_Int32)nDirection; - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); -// pDisp->Execute( SID_EXTRUSION_LIGHTING_DIRECTION, SFX_CALLMODE_RECORD, &aItem, 0L , 0L ); + mrController.dispatchCommand( msExtrusionLightingDirection, aArgs ); implSetDirection( nDirection, true ); } @@ -1096,229 +790,122 @@ IMPL_LINK( ExtrusionLightingWindow, SelectHdl, void *, pControl ) return 0; } -// ----------------------------------------------------------------------- +// ======================================================================== -void ExtrusionLightingWindow::StartSelection() +ExtrusionLightingControl::ExtrusionLightingControl( const Reference< lang::XMultiServiceFactory >& rServiceManager ) +: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionDirectionFloater" ) ) ) { } // ----------------------------------------------------------------------- -BOOL ExtrusionLightingWindow::Close() +::Window* ExtrusionLightingControl::createPopupWindow( ::Window* pParent ) { - return SfxPopupWindow::Close(); + return new ExtrusionLightingWindow( *this, m_xFrame, pParent ); } // ----------------------------------------------------------------------- - -void ExtrusionLightingWindow::PopupModeEnd() -{ - if ( IsVisible() ) - { - mbPopupMode = FALSE; - } - SfxPopupWindow::PopupModeEnd(); -} - +// XServiceInfo // ----------------------------------------------------------------------- -void ExtrusionLightingWindow::GetFocus (void) -{ - SfxPopupWindow::GetFocus(); - // Grab the focus to the line ends value set so that it can be controlled - // with the keyboard. - if( mpMenu ) - mpMenu->GrabFocus(); -} - -// ======================================================================== - -ExtrusionLightingControl::ExtrusionLightingControl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ) -: SfxToolBoxControl( nSlotId, nId, rTbx ) +OUString SAL_CALL ExtrusionLightingControl_getImplementationName() { - rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.ExtrusionLightingController" )); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -ExtrusionLightingControl::~ExtrusionLightingControl() +Sequence< OUString > SAL_CALL ExtrusionLightingControl_getSupportedServiceNames() throw( RuntimeException ) { + Sequence< OUString > aSNS( 1 ); + aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" )); + return aSNS; } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindowType ExtrusionLightingControl::GetPopupWindowType() const +Reference< XInterface > SAL_CALL SAL_CALL ExtrusionLightingControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException ) { - return SFX_POPUPWINDOW_ONCLICK; + return *new ExtrusionLightingControl( rSMgr ); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindow* ExtrusionLightingControl::CreatePopupWindow() +OUString SAL_CALL ExtrusionLightingControl::getImplementationName( ) throw (RuntimeException) { - ExtrusionLightingWindow* pWin = new ExtrusionLightingWindow( GetId(), m_xFrame, &GetToolBox() ); - pWin->StartPopupMode( &GetToolBox(), TRUE ); - pWin->StartSelection(); - SetPopupWindow( pWin ); - return pWin; + return ExtrusionLightingControl_getImplementationName(); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -void ExtrusionLightingControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* ) +Sequence< OUString > SAL_CALL ExtrusionLightingControl::getSupportedServiceNames( ) throw (RuntimeException) { - USHORT nId = GetId(); - ToolBox& rTbx = GetToolBox(); - - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); + return ExtrusionLightingControl_getSupportedServiceNames(); } // #################################################################### -SFX_IMPL_TOOLBOX_CONTROL( ExtrusionSurfaceControl, SfxBoolItem ); - -ExtrusionSurfaceWindow::ExtrusionSurfaceWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) : - - SfxPopupWindow( nId, - rFrame, - SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE )), - maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) ), - maImgSurface2( SVX_RES( IMG_MATTE ) ), - maImgSurface3( SVX_RES( IMG_PLASTIC ) ), - maImgSurface4( SVX_RES( IMG_METAL ) ), - maImgSurface1h( SVX_RES( IMG_WIRE_FRAME_H ) ), - maImgSurface2h( SVX_RES( IMG_MATTE_H ) ), - maImgSurface3h( SVX_RES( IMG_PLASTIC_H ) ), - maImgSurface4h( SVX_RES( IMG_METAL_H ) ), - mxFrame( rFrame ), - mbPopupMode( true ) +ExtrusionSurfaceWindow::ExtrusionSurfaceWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow ) +: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE )) +, mrController( rController ) +, maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) ) +, maImgSurface2( SVX_RES( IMG_MATTE ) ) +, maImgSurface3( SVX_RES( IMG_PLASTIC ) ) +, maImgSurface4( SVX_RES( IMG_METAL ) ) +, maImgSurface1h( SVX_RES( IMG_WIRE_FRAME_H ) ) +, maImgSurface2h( SVX_RES( IMG_MATTE_H ) ) +, maImgSurface3h( SVX_RES( IMG_PLASTIC_H ) ) +, maImgSurface4h( SVX_RES( IMG_METAL_H ) ) +, msExtrusionSurface( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionSurface" )) { - implInit(); -} - -ExtrusionSurfaceWindow::ExtrusionSurfaceWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ) : - - SfxPopupWindow( nId, - rFrame, - pParentWindow, - SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE )), - maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) ), - maImgSurface2( SVX_RES( IMG_MATTE ) ), - maImgSurface3( SVX_RES( IMG_PLASTIC ) ), - maImgSurface4( SVX_RES( IMG_METAL ) ), - maImgSurface1h( SVX_RES( IMG_WIRE_FRAME_H ) ), - maImgSurface2h( SVX_RES( IMG_MATTE_H ) ), - maImgSurface3h( SVX_RES( IMG_PLASTIC_H ) ), - maImgSurface4h( SVX_RES( IMG_METAL_H ) ), - mxFrame( rFrame ), - mbPopupMode( true ) -{ - implInit(); -} - -// ----------------------------------------------------------------------- - -void ExtrusionSurfaceWindow::implInit() -{ - SetHelpId( HID_POPUP_EXTRUSION_SURFACE ); - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); -// mpSurfaceForewarder = new SfxStatusForwarder( SID_EXTRUSION_SURFACE, *this ); - - mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); - mpMenu->SetHelpId( HID_MENU_EXTRUSION_SURFACE ); - mpMenu->SetSelectHdl( LINK( this, ExtrusionSurfaceWindow, SelectHdl ) ); + SetHelpId( HID_MENU_EXTRUSION_SURFACE ); + SetSelectHdl( LINK( this, ExtrusionSurfaceWindow, SelectHdl ) ); - mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 ); - mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 ); - mpMenu->appendEntry( 2, String( SVX_RES( STR_PLASTIC ) ), bHighContrast ? maImgSurface3h : maImgSurface3 ); - mpMenu->appendEntry( 3, String( SVX_RES( STR_METAL ) ), bHighContrast ? maImgSurface4h : maImgSurface4 ); + appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 ); + appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 ); + appendEntry( 2, String( SVX_RES( STR_PLASTIC ) ), bHighContrast ? maImgSurface3h : maImgSurface3 ); + appendEntry( 3, String( SVX_RES( STR_METAL ) ), bHighContrast ? maImgSurface4h : maImgSurface4 ); - SetOutputSizePixel( mpMenu->getMenuSize() ); - mpMenu->SetOutputSizePixel( GetOutputSizePixel() ); - - mpMenu->Show(); + SetOutputSizePixel( getMenuSize() ); FreeResource(); - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionSurface" ))); -// rBindings.Update( SID_EXTRUSION_SURFACE ); -} - -// ----------------------------------------------------------------------- - -SfxPopupWindow* ExtrusionSurfaceWindow::Clone() const -{ - return new ExtrusionSurfaceWindow( GetId(), mxFrame ); -} - -// ----------------------------------------------------------------------- - -ExtrusionSurfaceWindow::~ExtrusionSurfaceWindow() -{ -// delete mpSurfaceForewarder; - delete mpMenu; + AddStatusListener( msExtrusionSurface ); } // ----------------------------------------------------------------------- void ExtrusionSurfaceWindow::implSetSurface( int nSurface, bool bEnabled ) { - if( mpMenu ) +// if( mpMenu ) { int i; for( i = 0; i < 4; i++ ) { - mpMenu->checkEntry( i, (i == nSurface) && bEnabled ); - mpMenu->enableEntry( i, bEnabled ); + checkEntry( i, (i == nSurface) && bEnabled ); + enableEntry( i, bEnabled ); } } } // ----------------------------------------------------------------------- -void ExtrusionSurfaceWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void SAL_CALL ExtrusionSurfaceWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) { - switch( nSID ) + if( Event.FeatureURL.Main.equals( msExtrusionSurface ) ) { - case SID_EXTRUSION_SURFACE: + if( !Event.IsEnabled ) { - if( eState == SFX_ITEM_DISABLED ) - { - implSetSurface( 0, false ); - } - else - { - const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState ); - if( pStateItem ) - implSetSurface( pStateItem->GetValue(), true ); - } - break; + implSetSurface( 0, false ); + } + else + { + sal_Int32 nValue = 0; + if( Event.State >>= nValue ) + implSetSurface( nValue, true ); } - } -} - -// ----------------------------------------------------------------------- - -void ExtrusionSurfaceWindow::DataChanged( const DataChangedEvent& rDCEvt ) -{ - SfxPopupWindow::DataChanged( rDCEvt ); - - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) - { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - - mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 ); - mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 ); - mpMenu->appendEntry( 2, String( SVX_RES( STR_PLASTIC ) ), bHighContrast ? maImgSurface3h : maImgSurface3 ); - mpMenu->appendEntry( 3, String( SVX_RES( STR_METAL ) ), bHighContrast ? maImgSurface4h : maImgSurface4 ); } } @@ -1329,26 +916,14 @@ IMPL_LINK( ExtrusionSurfaceWindow, SelectHdl, void *, EMPTYARG ) if ( IsInPopupMode() ) EndPopupMode(); -// SfxDispatcher* pDisp = GetBindings().GetDispatcher(); - - sal_Int32 nSurface = mpMenu->getSelectedEntryId(); + sal_Int32 nSurface = getSelectedEntryId(); if( nSurface >= 0 ) { - SfxInt32Item aItem( SID_EXTRUSION_SURFACE, nSurface ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionSurface" )); - - Any a; - INetURLObject aObj( aCommand ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aItem.QueryValue( a ); - aArgs[0].Value = a; + aArgs[0].Name = msExtrusionSurface.copy(5); + aArgs[0].Value <<= (sal_Int32)nSurface; - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); -// pDisp->Execute( SID_EXTRUSION_SURFACE, SFX_CALLMODE_RECORD, &aItem, 0L , 0L ); + mrController.dispatchCommand( msExtrusionSurface, aArgs ); implSetSurface( nSurface, true ); } @@ -1356,83 +931,57 @@ IMPL_LINK( ExtrusionSurfaceWindow, SelectHdl, void *, EMPTYARG ) return 0; } -// ----------------------------------------------------------------------- +// ======================================================================== -void ExtrusionSurfaceWindow::StartSelection() +ExtrusionSurfaceControl::ExtrusionSurfaceControl( const Reference< lang::XMultiServiceFactory >& rServiceManager ) +: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionSurfaceFloater" ) ) ) { } // ----------------------------------------------------------------------- -BOOL ExtrusionSurfaceWindow::Close() +::Window* ExtrusionSurfaceControl::createPopupWindow( ::Window* pParent ) { - return SfxPopupWindow::Close(); + return new ExtrusionSurfaceWindow( *this, m_xFrame, pParent ); } // ----------------------------------------------------------------------- - -void ExtrusionSurfaceWindow::PopupModeEnd() -{ - if ( IsVisible() ) - { - mbPopupMode = FALSE; - } - SfxPopupWindow::PopupModeEnd(); -} - +// XServiceInfo // ----------------------------------------------------------------------- -void ExtrusionSurfaceWindow::GetFocus (void) +OUString SAL_CALL ExtrusionSurfaceControl_getImplementationName() { - SfxPopupWindow::GetFocus(); - // Grab the focus to the line ends value set so that it can be controlled - // with the keyboard. - if( mpMenu ) - mpMenu->GrabFocus(); + return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.ExtrusionSurfaceController" )); } -// ======================================================================== +// -------------------------------------------------------------------- -ExtrusionSurfaceControl::ExtrusionSurfaceControl( - USHORT nSlotId, USHORT nId, ToolBox &rTbx ) -: SfxToolBoxControl( nSlotId, nId, rTbx ) +Sequence< OUString > SAL_CALL ExtrusionSurfaceControl_getSupportedServiceNames() throw( RuntimeException ) { - rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); + Sequence< OUString > aSNS( 1 ); + aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" )); + return aSNS; } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -ExtrusionSurfaceControl::~ExtrusionSurfaceControl() +Reference< XInterface > SAL_CALL SAL_CALL ExtrusionSurfaceControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException ) { + return *new ExtrusionSurfaceControl( rSMgr ); } -// ----------------------------------------------------------------------- - -SfxPopupWindowType ExtrusionSurfaceControl::GetPopupWindowType() const -{ - return SFX_POPUPWINDOW_ONCLICK; -} - -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindow* ExtrusionSurfaceControl::CreatePopupWindow() +OUString SAL_CALL ExtrusionSurfaceControl::getImplementationName( ) throw (RuntimeException) { - ExtrusionSurfaceWindow* pWin = new ExtrusionSurfaceWindow( GetId(), m_xFrame, &GetToolBox() ); - pWin->StartPopupMode( &GetToolBox(), TRUE ); - pWin->StartSelection(); - SetPopupWindow( pWin ); - return pWin; + return ExtrusionSurfaceControl_getImplementationName(); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -void ExtrusionSurfaceControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* ) +Sequence< OUString > SAL_CALL ExtrusionSurfaceControl::getSupportedServiceNames( ) throw (RuntimeException) { - USHORT nId = GetId(); - ToolBox& rTbx = GetToolBox(); - - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); + return ExtrusionSurfaceControl_getSupportedServiceNames(); } //======================================================================== @@ -1498,3 +1047,5 @@ void ExtrusionColorControl::StateChanged( USHORT nSID, SfxItemState eState, cons rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); } + +} diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx new file mode 100644 index 000000000000..3dd8272b6940 --- /dev/null +++ b/svx/source/tbxctrls/extrusioncontrols.hxx @@ -0,0 +1,260 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_EXTRUSION_CONTROLS_HXX +#define _SVX_EXTRUSION_CONTROLS_HXX + +#include "svx/svxdllapi.h" + +#include <svtools/valueset.hxx> +#include <svtools/svtreebx.hxx> +#include <vcl/button.hxx> +#include <vcl/dialog.hxx> +#include <vcl/field.hxx> +#include <vcl/fixed.hxx> + +#include <svtools/toolbarmenu.hxx> +#include <svtools/popupwindowcontroller.hxx> +#include <svtools/popupmenucontrollerbase.hxx> + +class SfxBindings; +class SfxStatusForwarder; + +//======================================================================== + +namespace svx +{ +class ToolboxButtonColorUpdater; + +class ExtrusionDirectionWindow : public svtools::ToolbarMenu +{ +public: + ExtrusionDirectionWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow ); + + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +private: + svt::ToolboxController& mrController; + ValueSet* mpDirectionSet; + + Image maImgDirection[9]; + Image maImgDirectionH[9]; + + Image maImgPerspective; + Image maImgPerspectiveH; + Image maImgParallel; + Image maImgParallelH; + + const rtl::OUString msExtrusionDirection; + const rtl::OUString msExtrusionProjection; + + DECL_LINK( SelectHdl, void * ); + void FillValueSet(); + + void implSetDirection( sal_Int32 nSkew, bool bEnabled = true ); + void implSetProjection( sal_Int32 nProjection, bool bEnabled = true ); + +}; + +//======================================================================== + +class ExtrusionDirectionControl : public svt::PopupWindowController +{ +public: + ExtrusionDirectionControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + + virtual ::Window* createPopupWindow( ::Window* pParent ); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); + + using svt::PopupWindowController::createPopupWindow; +}; + +//======================================================================== + +class ExtrusionDepthWindow : public svtools::ToolbarMenu +{ +private: + svt::ToolboxController& mrController; + + Image maImgDepth0; + Image maImgDepth1; + Image maImgDepth2; + Image maImgDepth3; + Image maImgDepth4; + Image maImgDepthInfinity; + + Image maImgDepth0h; + Image maImgDepth1h; + Image maImgDepth2h; + Image maImgDepth3h; + Image maImgDepth4h; + Image maImgDepthInfinityh; + + FieldUnit meUnit; + double mfDepth; + + const rtl::OUString msExtrusionDepth; + const rtl::OUString msMetricUnit; + + DECL_LINK( SelectHdl, void * ); + + void implFillStrings( FieldUnit eUnit ); + void implSetDepth( double fDepth ); + +public: + ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow ); + + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +//======================================================================== + +class ExtrusionDepthController : public svt::PopupWindowController +{ +public: + ExtrusionDepthController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + + virtual ::Window* createPopupWindow( ::Window* pParent ); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); + + using svt::PopupWindowController::createPopupWindow; +}; + +//======================================================================== + +class ExtrusionLightingWindow : public svtools::ToolbarMenu +{ +private: + svt::ToolboxController& mrController; + ValueSet* mpLightingSet; + + Image maImgLightingOff[9]; + Image maImgLightingOn[9]; + Image maImgLightingPreview[9]; + + Image maImgLightingOffh[9]; + Image maImgLightingOnh[9]; + Image maImgLightingPreviewh[9]; + + Image maImgBright; + Image maImgNormal; + Image maImgDim; + Image maImgBrighth; + Image maImgNormalh; + Image maImgDimh; + + int mnLevel; + bool mbLevelEnabled; + int mnDirection; + bool mbDirectionEnabled; + + const rtl::OUString msExtrusionLightingDirection; + const rtl::OUString msExtrusionLightingIntensity; + + void implSetIntensity( int nLevel, bool bEnabled ); + void implSetDirection( int nDirection, bool bEnabled ); + + DECL_LINK( SelectHdl, void * ); +public: + ExtrusionLightingWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow ); + + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +//======================================================================== + +class ExtrusionLightingControl : public svt::PopupWindowController +{ +public: + ExtrusionLightingControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + + virtual ::Window* createPopupWindow( ::Window* pParent ); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); + + using svt::PopupWindowController::createPopupWindow; +}; + +//======================================================================== + +class ExtrusionSurfaceWindow : public svtools::ToolbarMenu +{ +private: + svt::ToolboxController& mrController; + + Image maImgSurface1; + Image maImgSurface2; + Image maImgSurface3; + Image maImgSurface4; + Image maImgSurface1h; + Image maImgSurface2h; + Image maImgSurface3h; + Image maImgSurface4h; + + const rtl::OUString msExtrusionSurface; + + DECL_LINK( SelectHdl, void * ); + + void implSetSurface( int nSurface, bool bEnabled ); + +public: + ExtrusionSurfaceWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window* pParentWindow ); + + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); +}; + +//======================================================================== + +class ExtrusionSurfaceControl : public svt::PopupWindowController +{ +public: + ExtrusionSurfaceControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); + + virtual ::Window* createPopupWindow( ::Window* pParent ); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); + + using svt::PopupWindowController::createPopupWindow; +}; + +//======================================================================== + +} +#endif + diff --git a/svx/source/tbxctrls/extrusioncontrols.src b/svx/source/tbxctrls/extrusioncontrols.src index 0cf4cafdc58c..084606439cc3 100644 --- a/svx/source/tbxctrls/extrusioncontrols.src +++ b/svx/source/tbxctrls/extrusioncontrols.src @@ -30,9 +30,9 @@ #define MASKCOLOR MaskColor = Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; }; -FloatingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION +DockingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION { - Border = TRUE ; + Border = FALSE ; Hide = TRUE ; SVLook = TRUE ; Sizeable = FALSE ; @@ -200,9 +200,9 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION }; }; -FloatingWindow RID_SVXFLOAT_EXTRUSION_DEPTH +DockingWindow RID_SVXFLOAT_EXTRUSION_DEPTH { - Border = TRUE ; + Border = FALSE ; Hide = TRUE ; SVLook = TRUE ; Sizeable = FALSE ; @@ -289,9 +289,10 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_DEPTH }; }; -FloatingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING + +DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING { - Border = TRUE ; + Border = FALSE ; Hide = TRUE ; SVLook = TRUE ; Sizeable = FALSE ; @@ -605,9 +606,9 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING }; }; -FloatingWindow RID_SVXFLOAT_EXTRUSION_SURFACE +DockingWindow RID_SVXFLOAT_EXTRUSION_SURFACE { - Border = TRUE ; + Border = FALSE ; Hide = TRUE ; SVLook = TRUE ; Sizeable = FALSE ; @@ -703,7 +704,7 @@ ModalDialog RID_SVX_MDLG_EXTRUSION_DEPTH MetricField MTR_DEPTH { //HelpId = HID_SD_CTL_FAVORITES ; - Border = TRUE ; + Border = FALSE ; Pos = MAP_APPFONT ( 3 , 14 ) ; Size = MAP_APPFONT ( WIDTH - 50 - 12, 12 ) ; TabStop = TRUE ; diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 1b4f89ca1e8c..1216a7863b79 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -27,40 +27,53 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" + #include <com/sun/star/text/WritingMode.hpp> -#include <sfx2/app.hxx> + +#include <vcl/toolbox.hxx> + #include <svl/itempool.hxx> -#include <svx/fmmodel.hxx> + +#include <svtools/toolbarmenu.hxx> +#include <svtools/popupwindowcontroller.hxx> +#include <svtools/popupmenucontrollerbase.hxx> + +#include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> -#include <dlgutil.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/frmdiritem.hxx> + +#include <svx/fmmodel.hxx> #include <svx/svxids.hrc> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> -#include "gallery.hxx" #include <svx/svdpage.hxx> #include <svx/svdobj.hxx> #include <svx/svdview.hxx> #include <svx/svdoutl.hxx> -#include <editeng/eeitem.hxx> -#include <editeng/frmdiritem.hxx> -#include "toolbarmenu.hxx" + +#include "gallery.hxx" +#include <dlgutil.hxx> #include "fontworkgallery.hxx" #include "fontworkgallery.hrc" #include <algorithm> -#ifndef _TOOLBOX_HXX //autogen -#include <vcl/toolbox.hxx> -#endif -#ifndef _SVX_HELPID_HRC #include "helpid.hrc" -#endif -using namespace svx; + +using ::rtl::OUString; +using ::svtools::ToolbarMenu; + +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::frame; + +namespace svx +{ const int nColCount = 4; const int nLineCount = 4; @@ -291,7 +304,7 @@ IMPL_LINK( FontWorkGalleryDialog, DoubleClickFavoriteHdl, void*, EMPTYARG ) return( 0L ); } -// ----------------------------------------------------------------------- +//------------------------------------------------------------------------ SFX_IMPL_TOOLBOX_CONTROL( FontWorkShapeTypeControl, SfxStringItem ); FontWorkShapeTypeControl::FontWorkShapeTypeControl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ) @@ -325,143 +338,104 @@ SfxPopupWindow* FontWorkShapeTypeControl::CreatePopupWindow() // ----------------------------------------------------------------------- -void FontWorkShapeTypeControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) -{ - SfxToolBoxControl::StateChanged( nSID, eState, pState ); -} - -// ----------------------------------------------------------------------- - void FontWorkShapeTypeControl::Select( BOOL ) { } -// #################################################################### +// ======================================================================== +// FontWorkAlignmentWindow +// ======================================================================== -SFX_IMPL_TOOLBOX_CONTROL( FontWorkAlignmentControl, SfxBoolItem ); - -FontWorkAlignmentWindow::FontWorkAlignmentWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) : - - SfxPopupWindow( nId, - rFrame, - SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT )), - maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) ), - maImgAlgin2( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16 ) ), - maImgAlgin3( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16 ) ), - maImgAlgin4( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16 ) ), - maImgAlgin5( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16 ) ), - maImgAlgin1h( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H ) ), - maImgAlgin2h( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16_H ) ), - maImgAlgin3h( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16_H ) ), - maImgAlgin4h( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16_H ) ), - maImgAlgin5h( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16_H ) ), - mxFrame( rFrame ), - mbPopupMode( true ) -{ - SetHelpId( HID_WIN_FONTWORK_ALIGN ); - implInit(); -} - -FontWorkAlignmentWindow::FontWorkAlignmentWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* /*pParentWindow*/ ) : - - SfxPopupWindow( nId, - rFrame, - SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT )), - maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) ), - maImgAlgin2( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16 ) ), - maImgAlgin3( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16 ) ), - maImgAlgin4( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16 ) ), - maImgAlgin5( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16 ) ), - maImgAlgin1h( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H ) ), - maImgAlgin2h( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16_H ) ), - maImgAlgin3h( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16_H ) ), - maImgAlgin4h( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16_H ) ), - maImgAlgin5h( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16_H ) ), - mxFrame( rFrame ), - mbPopupMode( true ) -{ - SetHelpId( HID_WIN_FONTWORK_ALIGN ); - implInit(); -} - -void FontWorkAlignmentWindow::implInit() +class FontWorkAlignmentWindow : public ToolbarMenu +{ +public: + FontWorkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow ); + + virtual void SAL_CALL statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); + +private: + svt::ToolboxController& mrController; + + Image maImgAlgin1; + Image maImgAlgin2; + Image maImgAlgin3; + Image maImgAlgin4; + Image maImgAlgin5; + Image maImgAlgin1h; + Image maImgAlgin2h; + Image maImgAlgin3h; + Image maImgAlgin4h; + Image maImgAlgin5h; + + const rtl::OUString msFontworkAlignment; + + DECL_LINK( SelectHdl, void * ); + + void implSetAlignment( int nAlignmentMode, bool bEnabled ); +}; + +FontWorkAlignmentWindow::FontWorkAlignmentWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow ) +: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_FONTWORK_ALIGNMENT )) +, mrController( rController ) +, maImgAlgin1( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16 ) ) +, maImgAlgin2( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16 ) ) +, maImgAlgin3( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16 ) ) +, maImgAlgin4( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16 ) ) +, maImgAlgin5( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16 ) ) +, maImgAlgin1h( SVX_RES( IMG_FONTWORK_ALIGN_LEFT_16_H ) ) +, maImgAlgin2h( SVX_RES( IMG_FONTWORK_ALIGN_CENTER_16_H ) ) +, maImgAlgin3h( SVX_RES( IMG_FONTWORK_ALIGN_RIGHT_16_H ) ) +, maImgAlgin4h( SVX_RES( IMG_FONTWORK_ALIGN_WORD_16_H ) ) +, maImgAlgin5h( SVX_RES( IMG_FONTWORK_ALIGN_STRETCH_16_H ) ) +, msFontworkAlignment( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" ) ) { - SetHelpId( HID_POPUP_FONTWORK_ALIGN ); - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); - mpMenu->SetHelpId( HID_POPUP_FONTWORK_ALIGN ); - mpMenu->SetSelectHdl( LINK( this, FontWorkAlignmentWindow, SelectHdl ) ); - - mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 ); - mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 ); - mpMenu->appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 ); - mpMenu->appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 ); - mpMenu->appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 ); + SetHelpId( HID_POPUP_FONTWORK_ALIGN ); + SetSelectHdl( LINK( this, FontWorkAlignmentWindow, SelectHdl ) ); - SetOutputSizePixel( mpMenu->getMenuSize() ); - mpMenu->SetOutputSizePixel( GetOutputSizePixel() ); + appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 ); + appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 ); + appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 ); + appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 ); + appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 ); - mpMenu->Show(); + SetOutputSizePixel( getMenuSize() ); FreeResource(); - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" ))); -} - -SfxPopupWindow* FontWorkAlignmentWindow::Clone() const -{ - return new FontWorkAlignmentWindow( GetId(), mxFrame ); -} - -// ----------------------------------------------------------------------- - -FontWorkAlignmentWindow::~FontWorkAlignmentWindow() -{ - delete mpMenu; + AddStatusListener( msFontworkAlignment ); } // ----------------------------------------------------------------------- void FontWorkAlignmentWindow::implSetAlignment( int nSurface, bool bEnabled ) { - if( mpMenu ) + int i; + for( i = 0; i < 5; i++ ) { - int i; - for( i = 0; i < 5; i++ ) - { - mpMenu->checkEntry( i, (i == nSurface) && bEnabled ); - mpMenu->enableEntry( i, bEnabled ); - } + checkEntry( i, (i == nSurface) && bEnabled ); + enableEntry( i, bEnabled ); } } // ----------------------------------------------------------------------- -void FontWorkAlignmentWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void SAL_CALL FontWorkAlignmentWindow::statusChanged( const frame::FeatureStateEvent& Event ) throw ( RuntimeException ) { - switch( nSID ) + if( Event.FeatureURL.Main.equals( msFontworkAlignment ) ) { - case SID_FONTWORK_ALIGNMENT: + if( !Event.IsEnabled ) { - if( eState == SFX_ITEM_DISABLED ) - { - implSetAlignment( 0, false ); - } - else - { - const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState ); - if( pStateItem ) - implSetAlignment( pStateItem->GetValue(), true ); - } - break; + implSetAlignment( 0, false ); + } + else + { + sal_Int32 nValue = 0; + if( Event.State >>= nValue ) + implSetAlignment( nValue, true ); } } } @@ -470,17 +444,17 @@ void FontWorkAlignmentWindow::StateChanged( USHORT nSID, SfxItemState eState, co void FontWorkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt ) { - SfxPopupWindow::DataChanged( rDCEvt ); + ToolbarMenu::DataChanged( rDCEvt ); if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 ); - mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 ); - mpMenu->appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 ); - mpMenu->appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 ); - mpMenu->appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 ); + appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 ); + appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 ); + appendEntry( 2, String( SVX_RES( STR_ALIGN_RIGHT ) ), bHighContrast ? maImgAlgin3h : maImgAlgin3 ); + appendEntry( 3, String( SVX_RES( STR_ALIGN_WORD ) ), bHighContrast ? maImgAlgin4h : maImgAlgin4 ); + appendEntry( 4, String( SVX_RES( STR_ALIGN_STRETCH ) ), bHighContrast ? maImgAlgin5h : maImgAlgin5 ); } } @@ -491,25 +465,14 @@ IMPL_LINK( FontWorkAlignmentWindow, SelectHdl, void *, EMPTYARG ) if ( IsInPopupMode() ) EndPopupMode(); -// SfxDispatcher* pDisp = GetBindings().GetDispatcher(); - - sal_Int32 nAlignment = mpMenu->getSelectedEntryId(); + sal_Int32 nAlignment = getSelectedEntryId(); if( nAlignment >= 0 ) { - SfxInt32Item aItem( SID_FONTWORK_ALIGNMENT, nAlignment ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" )); - - Any a; - INetURLObject aObj( aCommand ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aItem.QueryValue( a ); - aArgs[0].Value = a; + aArgs[0].Name = msFontworkAlignment.copy(5); + aArgs[0].Value <<= (sal_Int32)nAlignment; - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); + mrController.dispatchCommand( msFontworkAlignment, aArgs ); implSetAlignment( nAlignment, true ); } @@ -517,250 +480,191 @@ IMPL_LINK( FontWorkAlignmentWindow, SelectHdl, void *, EMPTYARG ) return 0; } -// ----------------------------------------------------------------------- +// ======================================================================== +// FontWorkAlignmentControl +// ======================================================================== -void FontWorkAlignmentWindow::StartSelection() +class FontWorkAlignmentControl : public svt::PopupWindowController { -} +public: + FontWorkAlignmentControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); -// ----------------------------------------------------------------------- + virtual ::Window* createPopupWindow( ::Window* pParent ); -BOOL FontWorkAlignmentWindow::Close() -{ - return SfxPopupWindow::Close(); -} + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); -// ----------------------------------------------------------------------- + using svt::PopupWindowController::createPopupWindow; +}; -void FontWorkAlignmentWindow::PopupModeEnd() -{ - if ( IsVisible() ) - { - mbPopupMode = FALSE; - } - SfxPopupWindow::PopupModeEnd(); -} // ----------------------------------------------------------------------- -void FontWorkAlignmentWindow::GetFocus (void) +FontWorkAlignmentControl::FontWorkAlignmentControl( const Reference< lang::XMultiServiceFactory >& rServiceManager ) +: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkAlignment" ) ) ) { - SfxPopupWindow::GetFocus(); - // Grab the focus to the line ends value set so that it can be controlled - // with the keyboard. - if( mpMenu ) - mpMenu->GrabFocus(); } -// ======================================================================== +// ----------------------------------------------------------------------- -FontWorkAlignmentControl::FontWorkAlignmentControl( - USHORT nSlotId, USHORT nId, ToolBox &rTbx ) -: SfxToolBoxControl( nSlotId, nId, rTbx ) +::Window* FontWorkAlignmentControl::createPopupWindow( ::Window* pParent ) { - rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); + return new FontWorkAlignmentWindow( *this, m_xFrame, pParent ); } // ----------------------------------------------------------------------- +// XServiceInfo +// ----------------------------------------------------------------------- -FontWorkAlignmentControl::~FontWorkAlignmentControl() +OUString SAL_CALL FontWorkAlignmentControl_getImplementationName() { + return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FontWorkAlignmentController" )); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindowType FontWorkAlignmentControl::GetPopupWindowType() const +Sequence< OUString > SAL_CALL FontWorkAlignmentControl_getSupportedServiceNames() throw( RuntimeException ) { - return SFX_POPUPWINDOW_ONCLICK; + Sequence< OUString > aSNS( 1 ); + aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" )); + return aSNS; } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindow* FontWorkAlignmentControl::CreatePopupWindow() +Reference< XInterface > SAL_CALL SAL_CALL FontWorkAlignmentControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException ) { - FontWorkAlignmentWindow* pWin = new FontWorkAlignmentWindow( GetId(), m_xFrame, &GetToolBox() ); - pWin->StartPopupMode( &GetToolBox(), TRUE ); - pWin->StartSelection(); - SetPopupWindow( pWin ); - return pWin; + return *new FontWorkAlignmentControl( rSMgr ); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -void FontWorkAlignmentControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* /*pState*/ ) +OUString SAL_CALL FontWorkAlignmentControl::getImplementationName( ) throw (RuntimeException) { - USHORT nId = GetId(); - ToolBox& rTbx = GetToolBox(); - - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); + return FontWorkAlignmentControl_getImplementationName(); } -// #################################################################### - -SFX_IMPL_TOOLBOX_CONTROL( FontWorkCharacterSpacingControl, SfxBoolItem ); +// -------------------------------------------------------------------- -FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ) : - - SfxPopupWindow( nId, - rFrame, - SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING )), - mxFrame( rFrame ), - mbPopupMode( true ) +Sequence< OUString > SAL_CALL FontWorkAlignmentControl::getSupportedServiceNames( ) throw (RuntimeException) { - SetHelpId( HID_WIN_FONTWORK_CHARSPACE ); - implInit(); + return FontWorkAlignmentControl_getSupportedServiceNames(); } -FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow( - USHORT nId, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - Window* pParentWindow ) : - SfxPopupWindow( nId, - rFrame, - pParentWindow, - SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING )), - mxFrame( rFrame ), - mbPopupMode( true ) -{ - SetHelpId( HID_WIN_FONTWORK_CHARSPACE ); - implInit(); -} +// #################################################################### -void FontWorkCharacterSpacingWindow::implInit() +class FontWorkCharacterSpacingWindow : public ToolbarMenu { - SetHelpId( HID_POPUP_FONTWORK_CHARSPACE ); +public: + FontWorkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow ); -// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); + virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); +private: + svt::ToolboxController& mrController; - mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); - mpMenu->SetHelpId( HID_POPUP_FONTWORK_CHARSPACE ); - mpMenu->SetSelectHdl( LINK( this, FontWorkCharacterSpacingWindow, SelectHdl ) ); + const rtl::OUString msFontworkCharacterSpacing; + const rtl::OUString msFontworkKernCharacterPairs; - mpMenu->appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_RADIOCHECK ); - mpMenu->appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_RADIOCHECK ); - mpMenu->appendEntry( 2, String( SVX_RES( STR_CHARS_SPACING_NORMAL ) ), MIB_RADIOCHECK ); - mpMenu->appendEntry( 3, String( SVX_RES( STR_CHARS_SPACING_LOOSE ) ), MIB_RADIOCHECK ); - mpMenu->appendEntry( 4, String( SVX_RES( STR_CHARS_SPACING_VERY_LOOSE ) ), MIB_RADIOCHECK ); - mpMenu->appendEntry( 5, String( SVX_RES( STR_CHARS_SPACING_CUSTOM ) ), MIB_RADIOCHECK ); - mpMenu->appendSeparator(); - mpMenu->appendEntry( 6, String( SVX_RES( STR_CHARS_SPACING_KERN_PAIRS ) ), MIB_CHECKABLE ); + DECL_LINK( SelectHdl, void * ); - SetOutputSizePixel( mpMenu->getMenuSize() ); - mpMenu->SetOutputSizePixel( GetOutputSizePixel() ); + void implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled ); + void implSetKernCharacterPairs( sal_Bool bKernOnOff, bool bEnabled ); - mpMenu->Show(); - - FreeResource(); +}; - AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacing" ))); -} +// ----------------------------------------------------------------------- -SfxPopupWindow* FontWorkCharacterSpacingWindow::Clone() const +FontWorkCharacterSpacingWindow::FontWorkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, Window* pParentWindow ) +: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING )) +, mrController( rController ) +, msFontworkCharacterSpacing( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacing" ) ) +, msFontworkKernCharacterPairs( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkKernCharacterPairs" ) ) { - return new FontWorkCharacterSpacingWindow( GetId(), mxFrame ); -} + SetHelpId( HID_POPUP_FONTWORK_CHARSPACE ); + SetSelectHdl( LINK( this, FontWorkCharacterSpacingWindow, SelectHdl ) ); -// ----------------------------------------------------------------------- + appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_RADIOCHECK ); + appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_RADIOCHECK ); + appendEntry( 2, String( SVX_RES( STR_CHARS_SPACING_NORMAL ) ), MIB_RADIOCHECK ); + appendEntry( 3, String( SVX_RES( STR_CHARS_SPACING_LOOSE ) ), MIB_RADIOCHECK ); + appendEntry( 4, String( SVX_RES( STR_CHARS_SPACING_VERY_LOOSE ) ), MIB_RADIOCHECK ); + appendEntry( 5, String( SVX_RES( STR_CHARS_SPACING_CUSTOM ) ), MIB_RADIOCHECK ); + appendSeparator(); + appendEntry( 6, String( SVX_RES( STR_CHARS_SPACING_KERN_PAIRS ) ), MIB_CHECKABLE ); -FontWorkCharacterSpacingWindow::~FontWorkCharacterSpacingWindow() -{ - delete mpMenu; + SetOutputSizePixel( getMenuSize() ); + + FreeResource(); + + AddStatusListener( msFontworkCharacterSpacing ); + AddStatusListener( msFontworkKernCharacterPairs ); } // ----------------------------------------------------------------------- void FontWorkCharacterSpacingWindow::implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled ) { - if( mpMenu ) + sal_Int32 i; + for ( i = 0; i < 6; i++ ) { - sal_Int32 i; - for ( i = 0; i < 6; i++ ) - { - mpMenu->checkEntry( i, sal_False ); - mpMenu->enableEntry( i, bEnabled ); - } - if ( nCharacterSpacing != -1 ) + checkEntry( i, sal_False ); + enableEntry( i, bEnabled ); + } + if ( nCharacterSpacing != -1 ) + { + sal_Int32 nEntry; + switch( nCharacterSpacing ) { - sal_Int32 nEntry; - switch( nCharacterSpacing ) - { - case 80 : nEntry = 0; break; - case 90 : nEntry = 1; break; - case 100 : nEntry = 2; break; - case 120 : nEntry = 3; break; - case 150 : nEntry = 4; break; - default : nEntry = 5; break; - } - mpMenu->checkEntry( nEntry, bEnabled ); + case 80 : nEntry = 0; break; + case 90 : nEntry = 1; break; + case 100 : nEntry = 2; break; + case 120 : nEntry = 3; break; + case 150 : nEntry = 4; break; + default : nEntry = 5; break; } + checkEntry( nEntry, bEnabled ); } } +// ----------------------------------------------------------------------- + void FontWorkCharacterSpacingWindow::implSetKernCharacterPairs( sal_Bool, bool bEnabled ) { - if( mpMenu ) - { - mpMenu->enableEntry( 6, bEnabled ); - mpMenu->checkEntry( 6, bEnabled ); - } + enableEntry( 6, bEnabled ); + checkEntry( 6, bEnabled ); } // ----------------------------------------------------------------------- -void FontWorkCharacterSpacingWindow::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void SAL_CALL FontWorkCharacterSpacingWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) { - switch( nSID ) + if( Event.FeatureURL.Main.equals( msFontworkCharacterSpacing ) ) { - case SID_FONTWORK_CHARACTER_SPACING: + if( !Event.IsEnabled ) { - if( eState == SFX_ITEM_DISABLED ) - implSetCharacterSpacing( 0, false ); - else - { - const SfxInt32Item* pStateItem = PTR_CAST( SfxInt32Item, pState ); - if( pStateItem ) - implSetCharacterSpacing( pStateItem->GetValue(), true ); - } + implSetCharacterSpacing( 0, false ); } - break; - - case SID_FONTWORK_KERN_CHARACTER_PAIRS : + else { - if( eState == SFX_ITEM_DISABLED ) - implSetKernCharacterPairs( 0, false ); - else - { - const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pState ); - if( pStateItem ) - implSetKernCharacterPairs( pStateItem->GetValue(), true ); - } + sal_Int32 nValue = 0; + if( Event.State >>= nValue ) + implSetCharacterSpacing( nValue, true ); } - break; } -} - -// ----------------------------------------------------------------------- - -void FontWorkCharacterSpacingWindow::DataChanged( const DataChangedEvent& rDCEvt ) -{ - SfxPopupWindow::DataChanged( rDCEvt ); - - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) + else if( Event.FeatureURL.Main.equals( msFontworkKernCharacterPairs ) ) { -// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - - mpMenu->appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_CHECKABLE ); - mpMenu->appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_CHECKABLE ); - mpMenu->appendEntry( 2, String( SVX_RES( STR_CHARS_SPACING_NORMAL ) ), MIB_CHECKABLE ); - mpMenu->appendEntry( 3, String( SVX_RES( STR_CHARS_SPACING_LOOSE ) ), MIB_CHECKABLE ); - mpMenu->appendEntry( 4, String( SVX_RES( STR_CHARS_SPACING_VERY_LOOSE ) ), MIB_CHECKABLE ); - mpMenu->appendEntry( 5, String( SVX_RES( STR_CHARS_SPACING_CUSTOM ) ), MIB_CHECKABLE ); - mpMenu->appendSeparator(); - mpMenu->appendEntry( 6, String( SVX_RES( STR_CHARS_SPACING_KERN_PAIRS ) ), MIB_CHECKABLE ); + if( !Event.IsEnabled ) + { + implSetKernCharacterPairs( 0, false ); + } + else + { + sal_Bool bValue = sal_False; + if( Event.State >>= bValue ) + implSetKernCharacterPairs( bValue, true ); + } } } @@ -771,7 +675,7 @@ IMPL_LINK( FontWorkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG ) if ( IsInPopupMode() ) EndPopupMode(); - sal_Int32 nSelection = mpMenu->getSelectedEntryId(); + sal_Int32 nSelection = getSelectedEntryId(); sal_Int32 nCharacterSpacing; switch( nSelection ) { @@ -784,53 +688,31 @@ IMPL_LINK( FontWorkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG ) } if ( nSelection == 5 ) // custom spacing { - SfxInt32Item aItem( SID_FONTWORK_CHARACTER_SPACING, nCharacterSpacing ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacingDialog" )); - - Any a; Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontworkCharacterSpacing" )); - aItem.QueryValue( a ); - aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); + aArgs[0].Name = msFontworkCharacterSpacing.copy(5); + aArgs[0].Value <<= (sal_Int32)nCharacterSpacing; + + mrController.dispatchCommand( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacingDialog" )), aArgs ); } else if ( nSelection == 6 ) // KernCharacterPairs { - sal_Bool bOnOff = sal_True; - SfxBoolItem aItem( SID_FONTWORK_KERN_CHARACTER_PAIRS, bOnOff ); rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkKernCharacterPairs" )); - Any a; Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontworkKernCharacterPairs" )); - aItem.QueryValue( a ); - aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); - - implSetKernCharacterPairs( bOnOff, true ); + aArgs[0].Name = msFontworkKernCharacterPairs.copy(5); + aArgs[0].Value <<= (sal_Bool) sal_True; + + mrController.dispatchCommand( msFontworkKernCharacterPairs, aArgs ); + + implSetKernCharacterPairs( sal_True, true ); } else if( nSelection >= 0 ) { - SfxInt32Item aItem( SID_FONTWORK_CHARACTER_SPACING, nCharacterSpacing ); - rtl::OUString aCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacing" )); - - Any a; - INetURLObject aObj( aCommand ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aItem.QueryValue( a ); - aArgs[0].Value = a; + aArgs[0].Name = msFontworkCharacterSpacing.copy(5); + aArgs[0].Value <<=( sal_Int32)nCharacterSpacing; - SfxToolBoxControl::Dispatch( Reference< ::com::sun::star::frame::XDispatchProvider >( - mxFrame->getController(), UNO_QUERY ), - aCommand, - aArgs ); + mrController.dispatchCommand( msFontworkCharacterSpacing, aArgs ); implSetCharacterSpacing( nCharacterSpacing, true ); } @@ -838,86 +720,79 @@ IMPL_LINK( FontWorkCharacterSpacingWindow, SelectHdl, void *, EMPTYARG ) return 0; } -// ----------------------------------------------------------------------- +// ======================================================================== +// FontWorkCharacterSpacingControl +// ======================================================================== -void FontWorkCharacterSpacingWindow::StartSelection() +class FontWorkCharacterSpacingControl : public svt::PopupWindowController { -} +public: + FontWorkCharacterSpacingControl( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); -// ----------------------------------------------------------------------- + virtual ::Window* createPopupWindow( ::Window* pParent ); -BOOL FontWorkCharacterSpacingWindow::Close() -{ - return SfxPopupWindow::Close(); -} + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); + + using svt::PopupWindowController::createPopupWindow; +}; -// ----------------------------------------------------------------------- -void FontWorkCharacterSpacingWindow::PopupModeEnd() +FontWorkCharacterSpacingControl::FontWorkCharacterSpacingControl( const Reference< lang::XMultiServiceFactory >& rServiceManager ) +: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontworkCharacterSpacingFloater" ) ) ) { - if ( IsVisible() ) - { - mbPopupMode = FALSE; - } - SfxPopupWindow::PopupModeEnd(); } // ----------------------------------------------------------------------- -void FontWorkCharacterSpacingWindow::GetFocus (void) +::Window* FontWorkCharacterSpacingControl::createPopupWindow( ::Window* pParent ) { - SfxPopupWindow::GetFocus(); - // Grab the focus to the line ends value set so that it can be controlled - // with the keyboard. - if( mpMenu ) - mpMenu->GrabFocus(); + return new FontWorkCharacterSpacingWindow( *this, m_xFrame, pParent ); } -// ======================================================================== +// ----------------------------------------------------------------------- +// XServiceInfo +// ----------------------------------------------------------------------- -FontWorkCharacterSpacingControl::FontWorkCharacterSpacingControl( - USHORT nSlotId, USHORT nId, ToolBox &rTbx ) -: SfxToolBoxControl( nSlotId, nId, rTbx ) +OUString SAL_CALL FontWorkCharacterSpacingControl_getImplementationName() { - rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FontWorkCharacterSpacingController" )); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -FontWorkCharacterSpacingControl::~FontWorkCharacterSpacingControl() +Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl_getSupportedServiceNames() throw( RuntimeException ) { + Sequence< OUString > aSNS( 1 ); + aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" )); + return aSNS; } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindowType FontWorkCharacterSpacingControl::GetPopupWindowType() const +Reference< XInterface > SAL_CALL SAL_CALL FontWorkCharacterSpacingControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException ) { - return SFX_POPUPWINDOW_ONCLICK; + return *new FontWorkCharacterSpacingControl( rSMgr ); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -SfxPopupWindow* FontWorkCharacterSpacingControl::CreatePopupWindow() +OUString SAL_CALL FontWorkCharacterSpacingControl::getImplementationName( ) throw (RuntimeException) { - FontWorkCharacterSpacingWindow* pWin = new FontWorkCharacterSpacingWindow( GetId(), m_xFrame, &GetToolBox() ); - pWin->StartPopupMode( &GetToolBox(), TRUE ); - pWin->StartSelection(); - SetPopupWindow( pWin ); - return pWin; + return FontWorkCharacterSpacingControl_getImplementationName(); } -// ----------------------------------------------------------------------- +// -------------------------------------------------------------------- -void FontWorkCharacterSpacingControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* ) +Sequence< OUString > SAL_CALL FontWorkCharacterSpacingControl::getSupportedServiceNames( ) throw (RuntimeException) { - USHORT nId = GetId(); - ToolBox& rTbx = GetToolBox(); - - rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); - rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); + return FontWorkCharacterSpacingControl_getSupportedServiceNames(); } -// ----------------------------------------------------------------------- +// ======================================================================== +// FontworkCharacterSpacingDialog +// ======================================================================== FontworkCharacterSpacingDialog::FontworkCharacterSpacingDialog( Window* pParent, sal_Int32 nScale ) : ModalDialog( pParent, SVX_RES( RID_SVX_MDLG_FONTWORK_CHARSPACING ) ), @@ -939,3 +814,5 @@ sal_Int32 FontworkCharacterSpacingDialog::getScale() const { return (sal_Int32)maMtrScale.GetValue(); } + +} diff --git a/svx/source/tbxctrls/fontworkgallery.src b/svx/source/tbxctrls/fontworkgallery.src index 88c294407860..e5f52158b4b6 100644 --- a/svx/source/tbxctrls/fontworkgallery.src +++ b/svx/source/tbxctrls/fontworkgallery.src @@ -55,7 +55,7 @@ ModalDialog RID_SVX_MDLG_FONTWORK_GALLERY Control CTL_FAVORITES { HelpId = HID_CTL_FONTWORK_FAVORITES ; - Border = TRUE ; + Border = FALSE ; Pos = MAP_APPFONT ( 3 , 14 ) ; Size = MAP_APPFONT ( WIDTH - 6, HEIGHT - RSC_CD_PUSHBUTTON_HEIGHT - @@ -92,9 +92,9 @@ ModalDialog RID_SVX_MDLG_FONTWORK_GALLERY }; }; -FloatingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT +DockingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT { - Border = TRUE ; + Border = FALSE ; Hide = TRUE ; SVLook = TRUE ; Sizeable = FALSE ; @@ -227,9 +227,9 @@ FloatingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT }; }; -FloatingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING +DockingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING { - Border = TRUE ; + Border = FALSE ; Hide = TRUE ; SVLook = TRUE ; Sizeable = FALSE ; @@ -306,7 +306,7 @@ ModalDialog RID_SVX_MDLG_FONTWORK_CHARSPACING }; MetricField MF_VALUE { - Border = TRUE ; + Border = FALSE ; Pos = MAP_APPFONT ( 6 , 17 ) ; Size = MAP_APPFONT ( 32 , 12 ) ; TabStop = TRUE ; diff --git a/svx/source/tbxctrls/makefile.mk b/svx/source/tbxctrls/makefile.mk index 47da008e87a3..73a178d97594 100644 --- a/svx/source/tbxctrls/makefile.mk +++ b/svx/source/tbxctrls/makefile.mk @@ -44,7 +44,6 @@ LIB1OBJFILES= \ $(SLO)$/fontworkgallery.obj\ $(SLO)$/extrusioncontrols.obj \ $(SLO)$/tbcontrl.obj \ - $(SLO)$/toolbarmenu.obj \ $(SLO)$/tbxcolorupdate.obj LIB2TARGET= $(SLB)$/$(TARGET).lib @@ -62,7 +61,8 @@ LIB2OBJFILES= \ $(SLO)$/verttexttbxctrl.obj \ $(SLO)$/subtoolboxcontrol.obj \ $(SLO)$/tbxcolor.obj \ - $(SLO)$/tbunocontroller.obj + $(SLO)$/tbunocontroller.obj \ + $(SLO)$/tbunosearchcontrollers.obj SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx new file mode 100644 index 000000000000..f4f03170a90f --- /dev/null +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -0,0 +1,867 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +#include "tbunosearchcontrollers.hxx" + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/frame/XLayoutManager.hpp> +#include <com/sun/star/ui/XUIElement.hpp> +#include <com/sun/star/util/URL.hpp> + +#include <toolkit/helper/vclunohelper.hxx> +#include <vcl/toolbox.hxx> +#include <vcl/svapp.hxx> +#include <vos/mutex.hxx> + +namespace svx +{ + +static const ::rtl::OUString SEARCHITEM_SEARCHSTRING = ::rtl::OUString::createFromAscii("SearchItem.SearchString"); +static const ::rtl::OUString SEARCHITEM_SEARCHBACKWARD = ::rtl::OUString::createFromAscii("SearchItem.Backward"); + +static const ::rtl::OUString COMMAND_EXECUTESEARCH = ::rtl::OUString::createFromAscii(".uno:ExecuteSearch"); +static const ::rtl::OUString COMMAND_FINDTEXT = ::rtl::OUString::createFromAscii(".uno:FindText") ; +static const ::rtl::OUString COMMAND_DOWNSEARCH = ::rtl::OUString::createFromAscii(".uno:DownSearch"); +static const ::rtl::OUString COMMAND_UPSEARCH = ::rtl::OUString::createFromAscii(".uno:UpSearch") ; +static const ::rtl::OUString COMMAND_APPENDSEARCHHISTORY = ::rtl::OUString::createFromAscii("AppendSearchHistory"); + +static const ::rtl::OUString SERVICENAME_URLTRANSFORMER = ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer"); +static const sal_Int32 REMEMBER_SIZE = 10; + +void impl_executeSearch( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr, const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Sequence< css::beans::PropertyValue >& lArgs ) +{ + css::uno::Reference< css::util::XURLTransformer > xURLTransformer( rSMgr->createInstance(SERVICENAME_URLTRANSFORMER), css::uno::UNO_QUERY ); + if ( xURLTransformer.is() ) + { + css::util::URL aURL; + aURL.Complete = COMMAND_EXECUTESEARCH; + xURLTransformer->parseStrict(aURL); + + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider(xFrame, css::uno::UNO_QUERY); + if ( xDispatchProvider.is() ) + { + css::uno::Reference< css::frame::XDispatch > xDispatch = xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 ); + if ( xDispatch.is() && aURL.Complete.getLength() > 0 ) + xDispatch->dispatch( aURL, lArgs ); + } + } +} + +FindTextFieldControl::FindTextFieldControl( Window* pParent, WinBits nStyle, + css::uno::Reference< css::frame::XFrame >& xFrame, + css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager) : + ComboBox( pParent, nStyle ), + m_xFrame(xFrame), + m_xServiceManager(xServiceManager), + m_bToClearTextField(sal_True) +{ + InitControls_Impl(); +} + +FindTextFieldControl::~FindTextFieldControl() +{ +} + +void FindTextFieldControl::InitControls_Impl() +{ + SetText( String( ::rtl::OUString::createFromAscii("Find") ) ); + SetControlForeground(COL_GRAY); + + EnableAutocomplete(TRUE, TRUE); +} + +void FindTextFieldControl::Remember_Impl(const String& rStr) +{ + USHORT nCount = GetEntryCount(); + + for (USHORT i=0; i<nCount; ++i) + { + if ( rStr == GetEntry(i)) + return; + } + + if (nCount == REMEMBER_SIZE) + RemoveEntry(REMEMBER_SIZE-1); + + InsertEntry(rStr, 0); +} + +void FindTextFieldControl::Modify() +{ + ComboBox::Modify(); + + SetControlForeground( Color( COL_BLACK ) ); +} + +long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) +{ + long nRet= ComboBox::PreNotify( rNEvt ); + + switch ( rNEvt.GetType() ) + { + case EVENT_KEYINPUT: + { + const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); + sal_Bool bCtrl = pKeyEvent->GetKeyCode().IsMod1(); + sal_Bool bAlt = pKeyEvent->GetKeyCode().IsMod2(); + sal_Bool bShift = pKeyEvent->GetKeyCode().IsShift(); + sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode(); + + if ( (bCtrl && bAlt && KEY_F == nCode) || KEY_ESCAPE == nCode ) + GrabFocusToDocument(); + + if ( KEY_RETURN == nCode ) + { + Remember_Impl(GetText()); + + ::rtl::OUString sFindText = GetText(); + css::uno::Sequence< css::beans::PropertyValue > lArgs(2); + + lArgs[0].Name = SEARCHITEM_SEARCHSTRING; + lArgs[0].Value <<= sFindText; + + lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + if (bShift) + lArgs[1].Value <<= sal_True; + else + lArgs[1].Value <<= sal_False; + + impl_executeSearch(m_xServiceManager, m_xFrame, lArgs); + } + break; + } + + case EVENT_GETFOCUS: + if ( m_bToClearTextField ) + { + SetText( String() ); + m_bToClearTextField = sal_False; + } + SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); + break; + + case EVENT_LOSEFOCUS: + if ( GetText().Len() == 0 ) + { + SetText( String( ::rtl::OUString::createFromAscii("Find") ) ); + SetControlForeground(COL_GRAY); + m_bToClearTextField = sal_True; + } + break; + } + + return nRet; +} + + +//----------------------------------------------------------------------------------------------------------- +// SearchToolbarControllersManager + +SearchToolbarControllersManager* SearchToolbarControllersManager::m_pInstance = 0; + +SearchToolbarControllersManager::SearchToolbarControllersManager() +{ +} + +SearchToolbarControllersManager::~SearchToolbarControllersManager() +{ +} + +SearchToolbarControllersManager* SearchToolbarControllersManager::createControllersManager() +{ + if (!m_pInstance) + m_pInstance = new SearchToolbarControllersManager(); + + return m_pInstance; +} + +void SearchToolbarControllersManager::registryController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& xStatusListener, const ::rtl::OUString& sCommandURL ) +{ + SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame); + if (pIt == aSearchToolbarControllersMap.end()) + { + SearchToolbarControllersVec lControllers(1); + lControllers[0].Name = sCommandURL; + lControllers[0].Value <<= xStatusListener; + aSearchToolbarControllersMap.insert(SearchToolbarControllersMap::value_type(xFrame, lControllers)); + } + else + { + sal_Int32 nSize = pIt->second.size(); + for (sal_Int32 i=0; i<nSize; ++i) + { + if (pIt->second[i].Name.equals(sCommandURL)) + return; + } + + pIt->second.resize(nSize+1); + pIt->second[nSize].Name = sCommandURL; + pIt->second[nSize].Value <<= xStatusListener; + } +} + +void SearchToolbarControllersManager::freeController( const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Reference< css::frame::XStatusListener >& /*xStatusListener*/, const ::rtl::OUString& sCommandURL ) +{ + SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame); + if (pIt != aSearchToolbarControllersMap.end()) + { + for (SearchToolbarControllersVec::iterator pItCtrl=pIt->second.begin(); pItCtrl!=pIt->second.end(); ++pItCtrl) + { + if (pItCtrl->Name.equals(sCommandURL)) + { + pIt->second.erase(pItCtrl); + break; + } + } + + if (pIt->second.empty()) + aSearchToolbarControllersMap.erase(pIt); + } +} + +css::uno::Reference< css::frame::XStatusListener > SearchToolbarControllersManager::findController( const css::uno::Reference< css::frame::XFrame >& xFrame, const ::rtl::OUString& sCommandURL ) +{ + css::uno::Reference< css::frame::XStatusListener > xStatusListener; + + SearchToolbarControllersMap::iterator pIt = aSearchToolbarControllersMap.find(xFrame); + if (pIt != aSearchToolbarControllersMap.end()) + { + for (SearchToolbarControllersVec::iterator pItCtrl =pIt->second.begin(); pItCtrl != pIt->second.end(); ++pItCtrl) + { + if (pItCtrl->Name.equals(sCommandURL)) + { + pItCtrl->Value >>= xStatusListener; + break; + } + } + } + + return xStatusListener; +} + +//----------------------------------------------------------------------------------------------------------- +// FindTextToolbarController + +FindTextToolbarController::FindTextToolbarController( const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager ) + :svt::ToolboxController( rServiceManager, + css::uno::Reference< css::frame::XFrame >(), + COMMAND_FINDTEXT ) +{ +} + +FindTextToolbarController::~FindTextToolbarController() +{ +} + +// XInterface +css::uno::Any SAL_CALL FindTextToolbarController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ) +{ + css::uno::Any a = ToolboxController::queryInterface( aType ); + if ( a.hasValue() ) + return a; + + return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) ); +} + +void SAL_CALL FindTextToolbarController::acquire() throw () +{ + ToolboxController::acquire(); +} + +void SAL_CALL FindTextToolbarController::release() throw () +{ + ToolboxController::release(); +} + +// XServiceInfo +::rtl::OUString SAL_CALL FindTextToolbarController::getImplementationName() throw( css::uno::RuntimeException ) +{ + return getImplementationName_Static(); +} + +sal_Bool SAL_CALL FindTextToolbarController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ) +{ + const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() ); + const ::rtl::OUString * pArray = aSNL.getConstArray(); + + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) + if( pArray[i] == ServiceName ) + return true; + + return false; +} + +css::uno::Sequence< ::rtl::OUString > SAL_CALL FindTextToolbarController::getSupportedServiceNames() throw( css::uno::RuntimeException ) +{ + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< ::rtl::OUString > FindTextToolbarController::getSupportedServiceNames_Static() throw() +{ + css::uno::Sequence< ::rtl::OUString > aSNS( 1 ); + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) ); + return aSNS; +} + +// XComponent +void SAL_CALL FindTextToolbarController::dispose() throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); + + svt::ToolboxController::dispose(); + delete m_pFindTextFieldControl; + m_pFindTextFieldControl = 0; +} + +// XInitialization +void SAL_CALL FindTextToolbarController::initialize( const css::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException) +{ + svt::ToolboxController::initialize(aArguments); + + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) + { + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; i<nItemCount; ++i ) + { + ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); + if ( sItemCommand.equals( COMMAND_DOWNSEARCH ) ) + m_nDownSearchId = i; + else if (sItemCommand.equals( COMMAND_UPSEARCH )) + m_nUpSearchId = i; + } + } + + SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); +} + +// XToolbarController +void SAL_CALL FindTextToolbarController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException ) +{ +} + +css::uno::Reference< css::awt::XWindow > SAL_CALL FindTextToolbarController::createItemWindow( const css::uno::Reference< css::awt::XWindow >& Parent ) throw ( css::uno::RuntimeException ) +{ + css::uno::Reference< css::awt::XWindow > xItemWindow; + + css::uno::Reference< css::awt::XWindow > xParent( Parent ); + Window* pParent = VCLUnoHelper::GetWindow( xParent ); + if ( pParent ) + { + ToolBox* pToolbar = ( ToolBox* )pParent; + m_pFindTextFieldControl = new FindTextFieldControl( pToolbar, WinBits( WB_DROPDOWN | WB_VSCROLL), m_xFrame, m_xServiceManager ); + + Size aSize(100, m_pFindTextFieldControl->GetTextHeight() + 200); + m_pFindTextFieldControl->SetSizePixel( aSize ); + m_pFindTextFieldControl->SetModifyHdl(LINK(this, FindTextToolbarController, EditModifyHdl)); + } + xItemWindow = VCLUnoHelper::GetInterface( m_pFindTextFieldControl ); + + return xItemWindow; +} + +// XStatusListener +void SAL_CALL FindTextToolbarController::statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + if ( m_bDisposed ) + return; + + ::rtl::OUString aFeatureURL = rEvent.FeatureURL.Complete; + if (aFeatureURL.equalsAscii("AppendSearchHistory")) + { + m_pFindTextFieldControl->Remember_Impl(m_pFindTextFieldControl->GetText()); + } +} + +IMPL_LINK( FindTextToolbarController, EditModifyHdl, void *, EMPTYARG ) +{ + // enable or disable item DownSearch/UpSearch of findbar + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox && m_pFindTextFieldControl ) + { + if (m_pFindTextFieldControl->GetText().Len()>0) + { + if ( !pToolBox->IsItemEnabled(m_nDownSearchId) ) + pToolBox->EnableItem(m_nDownSearchId, sal_True); + if ( !pToolBox->IsItemEnabled(m_nUpSearchId) ) + pToolBox->EnableItem(m_nUpSearchId, sal_True); + } + else + { + if ( pToolBox->IsItemEnabled(m_nDownSearchId) ) + pToolBox->EnableItem(m_nDownSearchId, sal_False); + if ( pToolBox->IsItemEnabled(m_nUpSearchId) ) + pToolBox->EnableItem(m_nUpSearchId, sal_False); + } + } + + return 0; +} + +//----------------------------------------------------------------------------------------------------------- +// class DownSearchToolboxController + +DownSearchToolboxController::DownSearchToolboxController(const css::uno::Reference< css::lang::XMultiServiceFactory >& rServiceManager ) + : svt::ToolboxController( rServiceManager, + css::uno::Reference< css::frame::XFrame >(), + COMMAND_DOWNSEARCH ) +{ +} + +DownSearchToolboxController::~DownSearchToolboxController() +{ +} + +// XInterface +css::uno::Any SAL_CALL DownSearchToolboxController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ) +{ + css::uno::Any a = ToolboxController::queryInterface( aType ); + if ( a.hasValue() ) + return a; + + return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) ); +} + +void SAL_CALL DownSearchToolboxController::acquire() throw () +{ + ToolboxController::acquire(); +} + +void SAL_CALL DownSearchToolboxController::release() throw () +{ + ToolboxController::release(); +} + +// XServiceInfo +::rtl::OUString SAL_CALL DownSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException ) +{ + return getImplementationName_Static(); +} + +sal_Bool SAL_CALL DownSearchToolboxController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ) +{ + const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() ); + const ::rtl::OUString * pArray = aSNL.getConstArray(); + + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) + if( pArray[i] == ServiceName ) + return true; + + return false; +} + +css::uno::Sequence< ::rtl::OUString > SAL_CALL DownSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException ) +{ + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< ::rtl::OUString > DownSearchToolboxController::getSupportedServiceNames_Static() throw() +{ + css::uno::Sequence< ::rtl::OUString > aSNS( 1 ); + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" )); + return aSNS; +} + +// XComponent +void SAL_CALL DownSearchToolboxController::dispose() throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); + + svt::ToolboxController::dispose(); +} + +// XInitialization +void SAL_CALL DownSearchToolboxController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ) +{ + svt::ToolboxController::initialize( aArguments ); + SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); +} + +// XToolbarController +void SAL_CALL DownSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException) +{ + if ( m_bDisposed ) + throw css::lang::DisposedException(); + + ::rtl::OUString sFindText; + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) + { + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; i<nItemCount; ++i ) + { + ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); + if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) + { + Window* pItemWin = pToolBox->GetItemWindow(i); + if (pItemWin) + sFindText = pItemWin->GetText(); + break; + } + } + } + + css::uno::Sequence< css::beans::PropertyValue > lArgs(2); + lArgs[0].Name = SEARCHITEM_SEARCHSTRING; + lArgs[0].Value <<= sFindText; + lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + lArgs[1].Value <<= sal_False; + + impl_executeSearch(m_xServiceManager, m_xFrame, lArgs); + + css::frame::FeatureStateEvent aEvent; + aEvent.FeatureURL.Complete = COMMAND_APPENDSEARCHHISTORY; + css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT); + if (xStatusListener.is()) + xStatusListener->statusChanged( aEvent ); +} + +// XStatusListener +void SAL_CALL DownSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + if ( m_bDisposed ) + return; +} + +//----------------------------------------------------------------------------------------------------------- +// class UpSearchToolboxController + +UpSearchToolboxController::UpSearchToolboxController( const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceManager ) + :svt::ToolboxController( rServiceManager, + css::uno::Reference< css::frame::XFrame >(), + COMMAND_UPSEARCH ) +{ +} + +UpSearchToolboxController::~UpSearchToolboxController() +{ +} + +// XInterface +css::uno::Any SAL_CALL UpSearchToolboxController::queryInterface( const css::uno::Type& aType ) throw ( css::uno::RuntimeException ) +{ + css::uno::Any a = ToolboxController::queryInterface( aType ); + if ( a.hasValue() ) + return a; + + return ::cppu::queryInterface( aType, static_cast< css::lang::XServiceInfo* >( this ) ); +} + +void SAL_CALL UpSearchToolboxController::acquire() throw () +{ + ToolboxController::acquire(); +} + +void SAL_CALL UpSearchToolboxController::release() throw () +{ + ToolboxController::release(); +} + +// XServiceInfo +::rtl::OUString SAL_CALL UpSearchToolboxController::getImplementationName() throw( css::uno::RuntimeException ) +{ + return getImplementationName_Static(); +} + +sal_Bool SAL_CALL UpSearchToolboxController::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ) +{ + const css::uno::Sequence< ::rtl::OUString > aSNL( getSupportedServiceNames() ); + const ::rtl::OUString * pArray = aSNL.getConstArray(); + + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) + if( pArray[i] == ServiceName ) + return true; + + return false; +} + +css::uno::Sequence< ::rtl::OUString > SAL_CALL UpSearchToolboxController::getSupportedServiceNames() throw( css::uno::RuntimeException ) +{ + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< ::rtl::OUString > UpSearchToolboxController::getSupportedServiceNames_Static() throw() +{ + css::uno::Sequence< ::rtl::OUString > aSNS( 1 ); + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) ); + return aSNS; +} + +// XComponent +void SAL_CALL UpSearchToolboxController::dispose() throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + + SearchToolbarControllersManager::createControllersManager()->freeController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); + + svt::ToolboxController::dispose(); +} + +// XInitialization +void SAL_CALL UpSearchToolboxController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ) +{ + svt::ToolboxController::initialize( aArguments ); + SearchToolbarControllersManager::createControllersManager()->registryController(m_xFrame, css::uno::Reference< css::frame::XStatusListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY), m_aCommandURL); +} + +// XToolbarController +void SAL_CALL UpSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) throw ( css::uno::RuntimeException ) +{ + if ( m_bDisposed ) + throw css::lang::DisposedException(); + + ::rtl::OUString sFindText; + Window* pWindow = VCLUnoHelper::GetWindow( getParent() ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) + { + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; i<nItemCount; ++i ) + { + ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); + if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) + { + Window* pItemWin = pToolBox->GetItemWindow(i); + if (pItemWin) + sFindText = pItemWin->GetText(); + break; + } + } + } + + css::uno::Sequence< css::beans::PropertyValue > lArgs(2); + lArgs[0].Name = SEARCHITEM_SEARCHSTRING; + lArgs[0].Value <<= sFindText; + lArgs[1].Name = SEARCHITEM_SEARCHBACKWARD; + lArgs[1].Value <<= sal_True; + + impl_executeSearch(m_xServiceManager, m_xFrame, lArgs); + + css::frame::FeatureStateEvent aEvent; + aEvent.FeatureURL.Complete = COMMAND_APPENDSEARCHHISTORY; + css::uno::Reference< css::frame::XStatusListener > xStatusListener = SearchToolbarControllersManager::createControllersManager()->findController(m_xFrame, COMMAND_FINDTEXT); + if (xStatusListener.is()) + xStatusListener->statusChanged( aEvent ); +} + +// XStatusListener +void SAL_CALL UpSearchToolboxController::statusChanged( const css::frame::FeatureStateEvent& /*rEvent*/ ) throw ( css::uno::RuntimeException ) +{ + vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + if ( m_bDisposed ) + return; +} + +//----------------------------------------------------------------------------------------------------------- +// class FindbarDispatcher + +FindbarDispatcher::FindbarDispatcher(const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory) + : m_xFactory( xFactory ) +{ +} + +FindbarDispatcher::~FindbarDispatcher() +{ + m_xFactory = NULL; + m_xFrame = NULL; +} + +// XInterface +css::uno::Any SAL_CALL FindbarDispatcher::queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException ) +{ + css::uno::Any aReturn( ::cppu::queryInterface( aType, + static_cast< css::lang::XServiceInfo* >(this), + static_cast< css::lang::XInitialization* >(this), + static_cast< css::frame::XDispatchProvider* >(this), + static_cast< css::frame::XDispatch* >(this)) ); + + if ( aReturn.hasValue() ) + return aReturn; + + return OWeakObject::queryInterface( aType ); +} + +void SAL_CALL FindbarDispatcher::acquire() throw() +{ + OWeakObject::acquire(); +} + +void SAL_CALL FindbarDispatcher::release() throw() +{ + OWeakObject::release(); +} + +// XServiceInfo +::rtl::OUString SAL_CALL FindbarDispatcher::getImplementationName() throw( css::uno::RuntimeException ) +{ + return getImplementationName_Static(); +} + +sal_Bool SAL_CALL FindbarDispatcher::supportsService( const ::rtl::OUString& ServiceName ) throw( css::uno::RuntimeException ) +{ + return ( + ServiceName.equalsAscii("com.sun.star.comp.svx.FindbarDispatcher") || + ServiceName.equalsAscii("com.sun.star.frame.ProtocolHandler") + ); +} + +css::uno::Sequence< ::rtl::OUString > SAL_CALL FindbarDispatcher::getSupportedServiceNames() throw( css::uno::RuntimeException ) +{ + return getSupportedServiceNames_Static(); +} + +css::uno::Sequence< ::rtl::OUString > FindbarDispatcher::getSupportedServiceNames_Static() throw() +{ + css::uno::Sequence< ::rtl::OUString > aSNS( 2 ); + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svx.FindbarDispatcher" )); + aSNS.getArray()[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ProtocolHandler" )); + return aSNS; +} + +// XInitialization +void SAL_CALL FindbarDispatcher::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) throw ( css::uno::Exception, css::uno::RuntimeException ) +{ + if ( aArguments.getLength() ) + aArguments[0] >>= m_xFrame; +} + +// XDispatchProvider +css::uno::Reference< css::frame::XDispatch > SAL_CALL FindbarDispatcher::queryDispatch( const css::util::URL& aURL, const ::rtl::OUString& /*sTargetFrameName*/, sal_Int32 /*nSearchFlags*/ ) throw( css::uno::RuntimeException ) +{ + css::uno::Reference< css::frame::XDispatch > xDispatch; + + if ( aURL.Protocol.equalsAscii("vnd.sun.star.findbar:") ) + xDispatch = this; + + return xDispatch; +} + +css::uno::Sequence < css::uno::Reference< css::frame::XDispatch > > SAL_CALL FindbarDispatcher::queryDispatches( const css::uno::Sequence < css::frame::DispatchDescriptor >& seqDescripts ) throw( css::uno::RuntimeException ) +{ + sal_Int32 nCount = seqDescripts.getLength(); + css::uno::Sequence < css::uno::Reference < XDispatch > > lDispatcher( nCount ); + + for( sal_Int32 i=0; i<nCount; ++i ) + lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL, seqDescripts[i].FrameName, seqDescripts[i].SearchFlags ); + + return lDispatcher; +} + +// XDispatch +void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css::uno::Sequence < css::beans::PropertyValue >& /*lArgs*/ ) throw( css::uno::RuntimeException ) +{ + //vnd.sun.star.findbar:FocusToFindbar - set cursor to the FindTextFieldControl of the findbar + if ( aURL.Path.equalsAscii("FocusToFindbar") ) + { + css::uno::Reference< css::beans::XPropertySet > xPropSet(m_xFrame, css::uno::UNO_QUERY); + if(!xPropSet.is()) + return; + + css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; + css::uno::Any aValue = xPropSet->getPropertyValue( ::rtl::OUString::createFromAscii("LayoutManager") ); + aValue >>= xLayoutManager; + if (!xLayoutManager.is()) + return; + + const ::rtl::OUString sResourceURL = ::rtl::OUString::createFromAscii("private:resource/toolbar/findbar"); + css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL); + if (!xUIElement.is()) + return; + + css::uno::Reference< css::awt::XWindow > xWindow(xUIElement->getRealInterface(), css::uno::UNO_QUERY); + Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); + ToolBox* pToolBox = (ToolBox*)pWindow; + if ( pToolBox ) + { + USHORT nItemCount = pToolBox->GetItemCount(); + for ( USHORT i=0; i<nItemCount; ++i ) + { + ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); + if ( sItemCommand.equalsAscii(".uno:FindText") ) + { + Window* pItemWin = pToolBox->GetItemWindow( i ); + if ( pItemWin ) + { + pItemWin->GrabFocus(); + return; + } + } + } + } + + } +} + +void SAL_CALL FindbarDispatcher::addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& /*xControl*/, const css::util::URL& /*aURL*/ ) throw ( css::uno::RuntimeException ) +{ +} + +void SAL_CALL FindbarDispatcher::removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& /*xControl*/, const css::util::URL& /*aURL*/ ) throw ( css::uno::RuntimeException ) +{ +} + +//----------------------------------------------------------------------------------------------------------- +// create Instance + +css::uno::Reference< css::uno::XInterface > SAL_CALL FindTextToolbarController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) +{ + return *new FindTextToolbarController( rSMgr ); +} + +css::uno::Reference< css::uno::XInterface > SAL_CALL DownSearchToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) +{ + return *new DownSearchToolboxController( rSMgr ); +} + +css::uno::Reference< css::uno::XInterface > SAL_CALL UpSearchToolboxController_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) +{ + return *new UpSearchToolboxController( rSMgr ); +} + +css::uno::Reference< css::uno::XInterface > SAL_CALL FindbarDispatcher_createInstance( + const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr ) +{ + return *new FindbarDispatcher( rSMgr ); +} + +//----------------------------------------------------------------------------------------------------------- +} diff --git a/svx/source/tbxctrls/toolbarmenu.cxx b/svx/source/tbxctrls/toolbarmenu.cxx deleted file mode 100644 index 3875e0471c7d..000000000000 --- a/svx/source/tbxctrls/toolbarmenu.cxx +++ /dev/null @@ -1,1029 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svx.hxx" -#include <vcl/menu.hxx> -#include <vcl/decoview.hxx> -#include <vcl/image.hxx> - -#include "toolbarmenu.hxx" - -const int EXTRAITEMHEIGHT = 4; -const int SEPARATOR_HEIGHT = 8; - -class ToolbarMenuEntry -{ -public: - int mnEntryId; - MenuItemBits mnBits; - Size maSize; - - bool mbHasText; - bool mbHasImage; - bool mbHasControl; - bool mbChecked; - bool mbEnabled; - - String maText; - Image maImage; - Control* mpControl; - -public: - ToolbarMenuEntry( int nEntryId, const String& rText, MenuItemBits nBits ); - ToolbarMenuEntry( int nEntryId, const Image& rImage, MenuItemBits nBits ); - ToolbarMenuEntry( int nEntryId, const Image& rImage, const String& rText, MenuItemBits nBits ); - ToolbarMenuEntry( int nEntryId, Control* pControl, MenuItemBits nBits ); - ToolbarMenuEntry( int nEntryId, const String& rText, Control* pControl, MenuItemBits nBits ); - ~ToolbarMenuEntry(); - - void init( int nEntryId, MenuItemBits nBits ); -}; - -void ToolbarMenuEntry::init( int nEntryId, MenuItemBits nBits ) -{ - mnEntryId = nEntryId; - mnBits = nBits; - - mbHasText = false; - mbHasImage = false; - mbHasControl = false; - mbChecked = false; - mbEnabled = true; - - mpControl = NULL; -} - -ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, const String& rText, MenuItemBits nBits ) -{ - init( nEntryId, nBits ); - - maText = rText; - mbHasText = true; -} - -ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, const Image& rImage, MenuItemBits nBits ) -{ - init( nEntryId, nBits ); - - maImage = rImage; - mbHasImage = true; -} - -ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, const Image& rImage, const String& rText, MenuItemBits nBits ) -{ - init( nEntryId, nBits ); - - maText = rText; - mbHasText = true; - - maImage = rImage; - mbHasImage = true; -} - -ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, Control* pControl, MenuItemBits nBits ) -{ - init( nEntryId, nBits ); - - if( pControl ) - { - mpControl = pControl; - mpControl->Show(); - } -} - -ToolbarMenuEntry::ToolbarMenuEntry( int nEntryId, const String& rText, Control* pControl, MenuItemBits nBits ) -{ - init( nEntryId, nBits ); - - maText = rText; - mbHasText = true; - - if( pControl ) - { - mpControl = pControl; - mpControl->Show(); - } -} - -ToolbarMenuEntry::~ToolbarMenuEntry() -{ - delete mpControl; -} - -ToolbarMenu::ToolbarMenu( Window* pParent, WinBits nStyle ) : - Control( pParent, nStyle ) -{ - mnCheckPos = 0; - mnImagePos = 0; - mnTextPos = 0; - - mnHighlightedEntry = -1; - mnSelectedEntry = -1; - initWindow(); -} - -ToolbarMenu::~ToolbarMenu() -{ - // delete all menu entries - const int nEntryCount = maEntryVector.size(); - int nEntry; - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - delete maEntryVector[nEntry]; - } -} - -int ToolbarMenu::getSelectedEntryId() const -{ - ToolbarMenuEntry* pEntry = implGetEntry( mnSelectedEntry ); - return pEntry ? pEntry->mnEntryId : -1; -} - -int ToolbarMenu::getHighlightedEntryId() const -{ - ToolbarMenuEntry* pEntry = implGetEntry( mnHighlightedEntry ); - return pEntry ? pEntry->mnEntryId : -1; -} - -void ToolbarMenu::checkEntry( int nEntryId, bool bChecked ) -{ - ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); - if( pEntry && pEntry->mbChecked != bChecked ) - { - pEntry->mbChecked = bChecked; - Invalidate(); - } -} - -bool ToolbarMenu::isEntryChecked( int nEntryId ) const -{ - ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); - return pEntry && pEntry->mbChecked; -} - -void ToolbarMenu::enableEntry( int nEntryId, bool bEnable ) -{ - ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); - if( pEntry && pEntry->mbEnabled != bEnable ) - { - pEntry->mbEnabled = bEnable; - if( pEntry->mpControl ) - { - pEntry->mpControl->Enable( bEnable ); - - // hack for the valueset to make it paint itself anew - pEntry->mpControl->Resize(); - } - Invalidate(); - } -} - -bool ToolbarMenu::isEntryEnabled( int nEntryId ) const -{ - ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); - return pEntry && pEntry->mbEnabled; -} - -void ToolbarMenu::setEntryText( int nEntryId, const String& rStr ) -{ - ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); - if( pEntry && pEntry->maText != rStr ) - { - pEntry->maText = rStr; - maSize = implCalcSize(); - if( IsVisible() ) - Invalidate(); - } -} - -const String& ToolbarMenu::getEntryText( int nEntryId ) const -{ - ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); - if( pEntry ) - return pEntry->maText; - else - { - static String aEmptyStr; - return aEmptyStr; - } -} - -void ToolbarMenu::setEntryImage( int nEntryId, const Image& rImage ) -{ - ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); - if( pEntry && pEntry->maImage != rImage ) - { - pEntry->maImage = rImage; - maSize = implCalcSize(); - if( IsVisible() ) - Invalidate(); - } -} - -const Image& ToolbarMenu::getEntryImage( int nEntryId ) const -{ - ToolbarMenuEntry* pEntry = implSearchEntry( nEntryId ); - if( pEntry ) - return pEntry->maImage; - else - { - static Image aEmptyImage; - return aEmptyImage; - } -} - -void ToolbarMenu::initWindow() -{ - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - - SetPointFont( rStyleSettings.GetMenuFont() ); - SetBackground( Wallpaper( rStyleSettings.GetMenuColor() ) ); - SetTextColor( rStyleSettings.GetMenuTextColor() ); - SetTextFillColor(); - SetLineColor(); - - maSize = implCalcSize(); -} - -Size ToolbarMenu::implCalcSize() -{ - const long nFontHeight = GetTextHeight(); - long nExtra = nFontHeight/4; - - Size aSz; - Size aMaxImgSz; - long nMaxTextWidth = 0; - long nMinMenuItemHeight = nFontHeight; - sal_Bool bCheckable = sal_False; - - const int nEntryCount = maEntryVector.size(); - int nEntry; - - const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - if ( rSettings.GetUseImagesInMenus() ) - { - nMinMenuItemHeight = 16; - - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - ToolbarMenuEntry* pEntry = maEntryVector[nEntry]; - if( pEntry && pEntry->mbHasImage ) - { - Size aImgSz = pEntry->maImage.GetSizePixel(); - if ( aImgSz.Height() > aMaxImgSz.Height() ) - aMaxImgSz.Height() = aImgSz.Height(); - if ( aImgSz.Height() > nMinMenuItemHeight ) - nMinMenuItemHeight = aImgSz.Height(); - break; - } - } - } - - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - ToolbarMenuEntry* pEntry = maEntryVector[nEntry]; - - if( pEntry ) - { - pEntry->maSize.Height() = 0; - pEntry->maSize.Width() = 0; - - - if ( ( pEntry->mnBits ) & ( MIB_RADIOCHECK | MIB_CHECKABLE ) ) - bCheckable = sal_True; - - // Image: - if( pEntry->mbHasImage ) - { - Size aImgSz = pEntry->maImage.GetSizePixel(); - if ( (aImgSz.Width() + 4) > aMaxImgSz.Width() ) - aMaxImgSz.Width() = aImgSz.Width() + 4; - if ( (aImgSz.Height() + 4) > aMaxImgSz.Height() ) - aMaxImgSz.Height() = aImgSz.Height() + 4; - if ( (aImgSz.Height() + 4) > pEntry->maSize.Height() ) - pEntry->maSize.Height() = aImgSz.Height() + 4; - } - } - } - - int gfxExtra = Max( nExtra, 7L ); - - mnCheckPos = nExtra; -// mnImagePos = mnCheckPos + nFontHeight/2 + gfxExtra; - mnImagePos = nExtra; - mnTextPos = mnImagePos + aMaxImgSz.Width(); - - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - ToolbarMenuEntry* pEntry = maEntryVector[nEntry]; - - if( pEntry ) - { - // Text: - if( pEntry->mbHasText ) - { - long nTextWidth = GetCtrlTextWidth( pEntry->maText ); - if ( nTextWidth > nMaxTextWidth ) - nMaxTextWidth = nTextWidth; - long nTextHeight = GetTextHeight(); - - pEntry->maSize.Height() = Max( Max( nTextHeight, pEntry->maSize.Height() ), nMinMenuItemHeight ); - } - - // Control: - if( pEntry->mpControl ) - { - long nTextWidth = pEntry->mbHasText ? GetCtrlTextWidth( pEntry->maText ) : -mnTextPos; - - Size aControlSize( pEntry->mpControl->GetOutputSizePixel() ); - - if( nTextWidth ) - nTextWidth += nExtra; - - nTextWidth += aControlSize.Width(); - - if ( nTextWidth > nMaxTextWidth ) - nMaxTextWidth = nTextWidth; - - if ( aControlSize.Height() > pEntry->maSize.Height() ) - pEntry->maSize.Height() = aControlSize.Height(); - } - - pEntry->maSize.Height() += EXTRAITEMHEIGHT; - - aSz.Height() += pEntry->maSize.Height(); - } - else - { - aSz.Height() += SEPARATOR_HEIGHT; - } - } - - if ( aMaxImgSz.Width() ) - mnTextPos += gfxExtra; - if ( bCheckable ) - mnTextPos += 16; - - - aSz.Width() = mnTextPos + nMaxTextWidth; - aSz.Width() += 2*nExtra; - - // positionate controls - int nY = 0; - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - ToolbarMenuEntry* pEntry = maEntryVector[nEntry]; - - if( pEntry ) - { - if( pEntry->mpControl ) - { - Size aControlSize( pEntry->mpControl->GetOutputSizePixel() ); - Point aControlPos( pEntry->mbHasText ? mnTextPos : ( aSz.Width() - aControlSize.Width() ) / 2, nY); - if( pEntry->mbHasText ) - aControlPos.X() += GetCtrlTextWidth( pEntry->maText ) + 4*gfxExtra; - - pEntry->mpControl->SetPosPixel( aControlPos ); - } - - nY += pEntry->maSize.Height(); - } - else - { - nY += SEPARATOR_HEIGHT; - } - } - - return aSz; -} - -void ToolbarMenu::GetFocus() -{ -/* - if( mnHighlightedEntry == -1 ) - { - implChangeHighlightEntry( 0 ); - } -*/ - Control::GetFocus(); -} - -void ToolbarMenu::LoseFocus() -{ - if( mnHighlightedEntry != -1 ) - { - implChangeHighlightEntry( -1 ); - } - Control::LoseFocus(); -} - -void ToolbarMenu::appendEntry( int nEntryId, const String& rStr, MenuItemBits nItemBits ) -{ - appendEntry( new ToolbarMenuEntry( nEntryId, rStr, nItemBits ) ); -} - -void ToolbarMenu::appendEntry( int nEntryId, const Image& rImage, MenuItemBits nItemBits ) -{ - appendEntry( new ToolbarMenuEntry( nEntryId, rImage, nItemBits ) ); -} - -void ToolbarMenu::appendEntry( int nEntryId, const String& rStr, const Image& rImage, MenuItemBits nItemBits ) -{ - appendEntry( new ToolbarMenuEntry( nEntryId, rImage, rStr, nItemBits ) ); -} - -void ToolbarMenu::appendEntry( int nEntryId, Control* pControl, MenuItemBits nItemBits ) -{ - appendEntry( new ToolbarMenuEntry( nEntryId, pControl, nItemBits ) ); -} - -void ToolbarMenu::appendEntry( int nEntryId, const String& rStr, Control* pControl, MenuItemBits nItemBits ) -{ - appendEntry( new ToolbarMenuEntry( nEntryId, rStr, pControl, nItemBits ) ); -} - -void ToolbarMenu::appendEntry( ToolbarMenuEntry* pEntry ) -{ - maEntryVector.push_back( pEntry ); - maSize = implCalcSize(); - if( IsVisible() ) - Invalidate(); -} - -void ToolbarMenu::appendSeparator() -{ - appendEntry( 0 ); -} - -void ToolbarMenu::Resize() -{ - Window::Resize(); -} - -ToolbarMenuEntry* ToolbarMenu::implGetEntry( int nEntry ) const -{ - if( (nEntry < 0) || (nEntry >= (int)maEntryVector.size() ) ) - return NULL; - - return maEntryVector[nEntry]; -} - -ToolbarMenuEntry* ToolbarMenu::implSearchEntry( int nEntryId ) const -{ - const int nEntryCount = maEntryVector.size(); - int nEntry; - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - ToolbarMenuEntry* p = maEntryVector[nEntry]; - if( p && p->mnEntryId == nEntryId ) - { - return p; - } - } - - return NULL; -} - -void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight ) -{ - Size aSz = GetOutputSizePixel(); - long nY = 0; - long nX = 0; - - const int nEntryCount = maEntryVector.size(); - int nEntry; - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - ToolbarMenuEntry* p = maEntryVector[nEntry]; - if( p ) - { - if(nEntry == nHighlightEntry) - { -// bool bRestoreLineColor = false; - Color oldLineColor; -/* - if( bHighlight && ((p->mpControl == NULL) || (p->mbHasText)) ) - { - if( p->mbEnabled ) - { - SetFillColor( GetSettings().GetStyleSettings().GetMenuHighlightColor() ); - } - else - { - SetFillColor(); - oldLineColor = GetLineColor(); - SetLineColor( GetSettings().GetStyleSettings().GetMenuHighlightColor() ); - bRestoreLineColor = true; - } - } - else -*/ - SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() ); - - Rectangle aRect( Point( nX, nY ), Size( aSz.Width(), p->maSize.Height() ) ); - if( p->mnBits & MIB_POPUPSELECT ) - { - long nFontHeight = GetTextHeight(); - aRect.Right() -= nFontHeight + nFontHeight/4; - } - DrawRect( aRect ); - implPaint( p, bHighlight ); - - if( bHighlight && ((p->mpControl == NULL) || (p->mbHasText)) ) - { - aRect.nLeft += 1; - aRect.nTop += 1; - aRect.nBottom -= 1; - aRect.nRight -= 1; - DrawSelectionBackground( aRect, true, false, TRUE, TRUE ); - } -/* - if( bRestoreLineColor ) - SetLineColor( oldLineColor ); -*/ - maHighlightHdl.Call( this ); - break; - } - - nY += p->maSize.Height(); - } - else - { - nY += SEPARATOR_HEIGHT; - } - } -} - -void ToolbarMenu::implSelectEntry( int nSelectedEntry ) -{ - mnSelectedEntry = nSelectedEntry; - - ToolbarMenuEntry* pEntry = NULL; - if( nSelectedEntry != -1 ) - pEntry = maEntryVector[ nSelectedEntry ]; - - if( pEntry ) - maSelectHdl.Call( this ); -} - -void ToolbarMenu::MouseButtonDown( const MouseEvent& rMEvt ) -{ - implHighlightEntry( rMEvt, true ); - - implSelectEntry( mnHighlightedEntry ); -} - -void ToolbarMenu::MouseButtonUp( const MouseEvent& ) -{ -} - -void ToolbarMenu::MouseMove( const MouseEvent& rMEvt ) -{ - if ( !IsVisible() ) - return; - - implHighlightEntry( rMEvt, false ); -} - -void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown ) -{ - long nY = 0; - long nMouseY = rMEvt.GetPosPixel().Y(); - Size aOutSz = GetOutputSizePixel(); - if ( ( nMouseY >= 0 ) && ( nMouseY < aOutSz.Height() ) ) - { - bool bHighlighted = FALSE; - - const int nEntryCount = maEntryVector.size(); - int nEntry; - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - ToolbarMenuEntry* pEntry = maEntryVector[nEntry]; - if( pEntry ) - { - long nOldY = nY; - nY += pEntry->maSize.Height(); - if ( ( nOldY <= nMouseY ) && ( nY > nMouseY ) ) - { - if( bMBDown ) - { - if( nEntry != mnHighlightedEntry ) - { - implChangeHighlightEntry( nEntry ); - } - } - else - { - if ( nEntry != mnHighlightedEntry ) - { - implChangeHighlightEntry( nEntry ); - } - } - bHighlighted = true; - } - } - else - { - nY += SEPARATOR_HEIGHT; - } - } - if ( !bHighlighted ) - implChangeHighlightEntry( -1 ); - } - else - { - implChangeHighlightEntry( -1 ); - } -} - -void ToolbarMenu::implChangeHighlightEntry( int nEntry ) -{ - if( mnHighlightedEntry != -1 ) - { - implHighlightEntry( mnHighlightedEntry, false ); - } - - mnHighlightedEntry = nEntry; - if( mnHighlightedEntry != -1 ) - { - implHighlightEntry( mnHighlightedEntry, true ); - } -} - -ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd ) -{ - int n = mnHighlightedEntry; - if( n == -1 ) - { - if( bUp ) - n = 0; - else - n = maEntryVector.size()-1; - } - - int nLoop = n; - - if( bHomeEnd ) - { - // absolute positioning - if( bUp ) - { - n = maEntryVector.size(); - nLoop = n-1; - } - else - { - n = -1; - nLoop = n+1; - } - } - - do - { - if( bUp ) - { - if ( n ) - n--; - else - if( mnHighlightedEntry == -1 ) - n = maEntryVector.size()-1; -// else -// break; - } - else - { - if( n < ((int)maEntryVector.size()-1) ) - n++; - else - if( mnHighlightedEntry == -1 ) - n = 0; -// else -// break; - } - - ToolbarMenuEntry* pData = maEntryVector[n]; - if( pData ) - { - implChangeHighlightEntry( n ); - return pData; - } - } while ( n != nLoop ); - - return 0; -} - -void ToolbarMenu::KeyInput( const KeyEvent& rKEvent ) -{ - USHORT nCode = rKEvent.GetKeyCode().GetCode(); - switch ( nCode ) - { - case KEY_UP: - case KEY_DOWN: - { - int nOldEntry = mnHighlightedEntry; - ToolbarMenuEntry*p = implCursorUpDown( nCode == KEY_UP, false ); - if( p && p->mpControl && !p->mbHasText ) - { - p->mpControl->GrabFocus(); - if( nOldEntry != mnHighlightedEntry ) - { - KeyCode aKeyCode( (nCode == KEY_UP) ? KEY_END : KEY_HOME ); - KeyEvent aKeyEvent( 0, aKeyCode ); - p->mpControl->KeyInput( aKeyEvent ); - } - } - } - break; - case KEY_END: - case KEY_HOME: - { - ToolbarMenuEntry* p = implCursorUpDown( nCode == KEY_END, true ); - if( p && p->mpControl && !p->mbHasText ) - { - p->mpControl->GrabFocus(); - KeyCode aKeyCode( KEY_HOME ); - KeyEvent aKeyEvent( 0, aKeyCode ); - p->mpControl->KeyInput( aKeyEvent ); - } - } - break; - case KEY_F6: - case KEY_ESCAPE: - { - // Ctrl-F6 acts like ESC here, the menu bar however will then put the focus in the document - if( nCode == KEY_F6 && !rKEvent.GetKeyCode().IsMod1() ) - break; - - implSelectEntry( -1 ); -/* - if ( !pMenu->pStartedFrom ) - { - StopExecute(); - KillActivePopup(); - } - else if ( pMenu->pStartedFrom->bIsMenuBar ) - { - // Forward... - ((MenuBarWindow*)((MenuBar*)pMenu->pStartedFrom)->ImplGetWindow())->KeyInput( rKEvent ); - } - else - { - StopExecute(); - ToolbarMenu* pFloat = ((PopupMenu*)pMenu->pStartedFrom)->ImplGetFloatingWindow(); - pFloat->GrabFocus(); - pFloat->KillActivePopup(); - } -*/ - } - break; - - case KEY_RETURN: - { - ToolbarMenuEntry* pEntry = implGetEntry( mnHighlightedEntry ); - if ( pEntry && pEntry->mbEnabled ) - { - if( pEntry->mpControl ) - { - pEntry->mpControl->GrabFocus(); - } - else - { - implSelectEntry( mnHighlightedEntry ); - } - } - // else - // StopExecute(); - } - break; - default: - { -/* - xub_Unicode nCharCode = rKEvent.GetCharCode(); - USHORT nPos; - USHORT nDuplicates = 0; - MenuItemData* pData = nCharCode ? pMenu->GetItemList()->SearchItem( nCharCode, nPos, nDuplicates, nHighlightedItem ) : NULL; - if ( pData ) - { - if ( pData->pSubMenu || nDuplicates > 1 ) - { - implChangeHighlightEntry( nPos ); - HighlightChanged( 0 ); - } - else - { - nHighlightedItem = nPos; - EndExecute(); - } - } - else - { - // Bei ungueltigen Tasten Beepen, aber nicht bei HELP und F-Tasten - if ( !rKEvent.GetKeyCode().IsControlMod() && ( nCode != KEY_HELP ) && ( rKEvent.GetKeyCode().GetGroup() != KEYGROUP_FKEYS ) ) - Sound::Beep(); - FloatingWindow::KeyInput( rKEvent ); - } - */ - } - } -} - -void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted ) -{ - const long nFontHeight = GetTextHeight(); - const long nExtra = nFontHeight/4; - - DecorationView aDecoView( this ); - const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - - const Size aOutSz( GetOutputSizePixel() ); -// const long nMaxY = aOutSz.Height(); - - Point aTopLeft, aTmpPos; - - const int nEntryCount = maEntryVector.size(); - int nEntry; - for( nEntry = 0; nEntry < nEntryCount; nEntry++ ) - { - ToolbarMenuEntry* pEntry = maEntryVector[nEntry]; - Point aPos( aTopLeft ); - - USHORT nTextStyle = 0; - USHORT nSymbolStyle = 0; - USHORT nImageStyle = 0; - if( pEntry && !pEntry->mbEnabled ) - { - nTextStyle |= TEXT_DRAW_DISABLE; - nSymbolStyle |= SYMBOL_DRAW_DISABLE; - nImageStyle |= IMAGE_DRAW_DISABLE; - } - - // Separator - if( pEntry == NULL ) - { - if( pThisOnly == NULL ) - { - aTmpPos.Y() = aPos.Y() + ((SEPARATOR_HEIGHT-2)/2); - aTmpPos.X() = aPos.X() + 2; - - SetLineColor( rSettings.GetShadowColor() ); - DrawLine( aTmpPos, Point( aOutSz.Width() - 3, aTmpPos.Y() ) ); - aTmpPos.Y()++; - SetLineColor( rSettings.GetLightColor() ); - DrawLine( aTmpPos, Point( aOutSz.Width() - 3, aTmpPos.Y() ) ); - SetLineColor(); - } - - aTopLeft.Y() += SEPARATOR_HEIGHT; - } - else - { - if( !pThisOnly || ( pEntry == pThisOnly ) ) - { - if( pThisOnly && bHighlighted ) - SetTextColor( rSettings.GetMenuHighlightTextColor() ); - - long nTextOffsetY = ((pEntry->maSize.Height()-nFontHeight)/2); - - // Image - if( pEntry->mbHasImage ) - { - aTmpPos.X() = aPos.X() + mnImagePos; - aTmpPos.Y() = aPos.Y(); - aTmpPos.Y() += (pEntry->maSize.Height()-pEntry->maImage.GetSizePixel().Height())/2; - DrawImage( aTmpPos, pEntry->maImage, nImageStyle ); - } - // Text: - if( pEntry->mbHasText ) - { - aTmpPos.X() = aPos.X() + mnTextPos; - aTmpPos.Y() = aPos.Y(); - aTmpPos.Y() += nTextOffsetY; - USHORT nStyle = nTextStyle|TEXT_DRAW_MNEMONIC; - - DrawCtrlText( aTmpPos, pEntry->maText, 0, pEntry->maText.Len(), nStyle ); - } - // CheckMark - if( pEntry->mbChecked ) - { - if( pEntry->mbHasImage ) - { - aTmpPos.X() = aPos.X() + mnImagePos; - aTmpPos.Y() = aPos.Y(); - aTmpPos.Y() += (pEntry->maSize.Height()-pEntry->maImage.GetSizePixel().Height())/2; - - Rectangle aRect( aTmpPos, pEntry->maImage.GetSizePixel() ); - aRect.nLeft -= 2; - aRect.nTop -= 2; - aRect.nRight += 2; - aRect.nBottom += 2; - DrawSelectionBackground( aRect, false, true, TRUE, TRUE ); - } - else - { - Rectangle aRect; - SymbolType eSymbol; - aTmpPos.Y() = aPos.Y(); - aTmpPos.Y() += nExtra/2; - aTmpPos.Y() += pEntry->maSize.Height() / 2; - if ( pEntry->mnBits & MIB_RADIOCHECK ) - { - aTmpPos.X() = aPos.X() + mnCheckPos; - eSymbol = SYMBOL_RADIOCHECKMARK; - aTmpPos.Y() -= nFontHeight/4; - aRect = Rectangle( aTmpPos, Size( nFontHeight/2, nFontHeight/2 ) ); - } - else - { - aTmpPos.X() = aPos.X() + mnCheckPos; - eSymbol = SYMBOL_CHECKMARK; - aTmpPos.Y() -= nFontHeight/4; - aRect = Rectangle( aTmpPos, Size( (nFontHeight*25)/40, nFontHeight/2 ) ); - } - aDecoView.DrawSymbol( aRect, eSymbol, GetTextColor(), nSymbolStyle ); - } - } - - if( pThisOnly && bHighlighted ) - SetTextColor( rSettings.GetMenuTextColor() ); - } - - aTopLeft.Y() += pEntry->maSize.Height(); - } - } -} - -void ToolbarMenu::Paint( const Rectangle& ) -{ - implPaint(); - - if( mnHighlightedEntry != -1 ) - implHighlightEntry( mnHighlightedEntry, true ); -} - -void ToolbarMenu::RequestHelp( const HelpEvent& rHEvt ) -{ - Window::RequestHelp( rHEvt ); -} - -void ToolbarMenu::StateChanged( StateChangedType nType ) -{ - Control::StateChanged( nType ); - - if ( ( nType == STATE_CHANGE_CONTROLFOREGROUND ) || ( nType == STATE_CHANGE_CONTROLBACKGROUND ) ) - { - initWindow(); - Invalidate(); - } -} - -void ToolbarMenu::DataChanged( const DataChangedEvent& rDCEvt ) -{ - Control::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || - (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || - ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) - { - initWindow(); - Invalidate(); - } -} - -void ToolbarMenu::Command( const CommandEvent& rCEvt ) -{ - if ( rCEvt.GetCommand() == COMMAND_WHEEL ) - { - const CommandWheelData* pData = rCEvt.GetWheelData(); - if( !pData->GetModifier() && ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) ) - { - implCursorUpDown( pData->GetDelta() > 0L, false ); - } - } -} diff --git a/svx/source/tbxctrls/toolbarmenu.hxx b/svx/source/tbxctrls/toolbarmenu.hxx deleted file mode 100644 index 30f56c92b943..000000000000 --- a/svx/source/tbxctrls/toolbarmenu.hxx +++ /dev/null @@ -1,90 +0,0 @@ -#include <vcl/ctrl.hxx> - -#include <vector> - -class ToolbarMenuEntry; -typedef std::vector< ToolbarMenuEntry * > ToolbarMenuEntryVector; - -class ToolbarMenu : public Control -{ -private: - ToolbarMenuEntryVector maEntryVector; - - int mnCheckPos; - int mnImagePos; - int mnTextPos; - - int mnHighlightedEntry; - int mnSelectedEntry; - - Size maSize; - - Link maHighlightHdl; - Link maSelectHdl; - - void StateChanged( StateChangedType nType ); - void DataChanged( const DataChangedEvent& rDCEvt ); - - void initWindow(); - - Size implCalcSize(); - - void appendEntry( ToolbarMenuEntry* pEntry ); - - void implPaint( ToolbarMenuEntry* pThisOnly = NULL, bool bHighlight = false ); - - void implHighlightEntry( int nHighlightEntry, bool bHighlight ); - void implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown ); - - void implChangeHighlightEntry( int nEntry ); - void implSelectEntry( int nSelectedEntry ); - - ToolbarMenuEntry* implCursorUpDown( bool bUp, bool bHomeEnd ); - ToolbarMenuEntry* implGetEntry( int nEntry ) const; - ToolbarMenuEntry* implSearchEntry( int nEntryId ) const; - -public: - ToolbarMenu( Window* pParent, WinBits nStyle ); - ~ToolbarMenu(); - - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void MouseButtonUp( const MouseEvent& rMEvt ); - virtual void KeyInput( const KeyEvent& rKEvent ); - virtual void Command( const CommandEvent& rCEvt ); - virtual void Paint( const Rectangle& rRect ); - virtual void RequestHelp( const HelpEvent& rHEvt ); - virtual void Resize(); - virtual void GetFocus(); - virtual void LoseFocus(); - - void appendEntry( int nEntryId, const String& rStr, MenuItemBits nItemBits = 0 ); - void appendEntry( int nEntryId, const Image& rImage, MenuItemBits nItemBits = 0 ); - void appendEntry( int nEntryId, const String& rStr, const Image& rImage, MenuItemBits nItemBits = 0 ); - void appendEntry( int nEntryId, Control* pControl, MenuItemBits nItemBits = 0 ); - void appendEntry( int nEntryId, const String& rStr, Control* pControl, MenuItemBits nItemBits = 0 ); - void appendSeparator(); - - void checkEntry( int nEntryId, bool bCheck = true ); - bool isEntryChecked( int nEntryId ) const; - - void enableEntry( int nEntryId, bool bEnable = true ); - bool isEntryEnabled( int nEntryId ) const; - - void setEntryText( int nEntryId, const String& rStr ); - const String& getEntryText( int nEntryId ) const; - - void setEntryImage( int nEntryId, const Image& rImage ); - const Image& getEntryImage( int nEntryId ) const; - - const Size& getMenuSize() const { return maSize; } - - void SetHighlightHdl( const Link& rLink ) { maHighlightHdl = rLink; } - const Link& GetHighlightHdl() const { return maHighlightHdl; } - - void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } - const Link& GetSelectHdl() const { return maSelectHdl; } - - int getSelectedEntryId() const; - int getHighlightedEntryId() const; -}; diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx index daf1f23d4442..3005289268b9 100644 --- a/svx/source/toolbars/extrusionbar.cxx +++ b/svx/source/toolbars/extrusionbar.cxx @@ -53,7 +53,8 @@ #include "chrtitem.hxx" #include <svx/extrusionbar.hxx> -#include "extrusioncontrols.hxx" +#include "extrusiondepthdialog.hxx" + using namespace ::svx; using namespace ::rtl; diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 5dd4814c6ab5..bf7a848d71c6 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -39,6 +39,7 @@ #include "recoveryui.hxx" #include "xmlgrhlp.hxx" #include "tbunocontroller.hxx" +#include "tbunosearchcontrollers.hxx" using namespace ::com::sun::star; using namespace ::rtl; @@ -233,9 +234,7 @@ uno::Reference< uno::XInterface > SAL_CALL create_EnhancedCustomShapeEngine( con // export this service // -#ifndef SVX_LIGHT #include "UnoGraphicExporter.hxx" -#endif #include "unogalthemeprovider.hxx" #include <com/sun/star/registry/XRegistryKey.hpp> #include "sal/types.h" @@ -244,6 +243,15 @@ uno::Reference< uno::XInterface > SAL_CALL create_EnhancedCustomShapeEngine( con #include "uno/lbnames.h" #include <svx/sdr/primitive2d/primitiveFactory2d.hxx> +/* +namespace svx +{ +extern OUString SAL_CALL ExtrusionDepthController_getImplementationName(); +extern uno::Reference< uno::XInterface > SAL_CALL ExtrusionDepthController_createInstance(const uno::Reference< lang::XMultiServiceFactory > &) throw( uno::RuntimeException ); +extern uno::Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( uno::RuntimeException ); +} +*/ + extern "C" { @@ -279,10 +287,14 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( writeInfo( pKey, SvxUnoColorTable::getImplementationName_Static(), SvxUnoColorTable::getSupportedServiceNames_Static() ); writeInfo( pKey, EnhancedCustomShapeEngine_getImplementationName(), EnhancedCustomShapeEngine_getSupportedServiceNames() ); writeInfo( pKey, svx::RecoveryUI::st_getImplementationName(), svx::RecoveryUI::st_getSupportedServiceNames() ); -#ifndef SVX_LIGHT writeInfo( pKey, svx::GraphicExporter_getImplementationName(), svx::GraphicExporter_getSupportedServiceNames() ); -#endif writeInfo( pKey, svx::FontHeightToolBoxControl::getImplementationName_Static(), svx::FontHeightToolBoxControl::getSupportedServiceNames_Static() ); + + writeInfo( pKey, svx::FindTextToolbarController::getImplementationName_Static(), svx::FindTextToolbarController::getSupportedServiceNames_Static() ); + writeInfo( pKey, svx::DownSearchToolboxController::getImplementationName_Static(), svx::DownSearchToolboxController::getSupportedServiceNames_Static() ); + writeInfo( pKey, svx::UpSearchToolboxController::getImplementationName_Static(), svx::UpSearchToolboxController::getSupportedServiceNames_Static() ); + writeInfo( pKey, svx::FindbarDispatcher::getImplementationName_Static(), svx::FindbarDispatcher::getSupportedServiceNames_Static() ); + writeInfo( pKey, ::unogallery::GalleryThemeProvider_getImplementationName(),::unogallery::GalleryThemeProvider_getSupportedServiceNames() ); // XPrimitiveFactory2D @@ -292,6 +304,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( writeInfo( pKey, ::svx::SvXMLGraphicImportHelper_getImplementationName(),::svx::SvXMLGraphicImportHelper_getSupportedServiceNames() ); writeInfo( pKey, ::svx::SvXMLGraphicExportHelper_getImplementationName(),::svx::SvXMLGraphicExportHelper_getSupportedServiceNames() ); +// writeInfo( pKey, ::svx::ExtrusionDepthController_getImplementationName(),::svx::ExtrusionDepthController_getSupportedServiceNames() ); } catch (registry::InvalidRegistryException &) { @@ -338,7 +351,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( svx::RecoveryUI::st_createInstance, svx::RecoveryUI::st_getSupportedServiceNames() ); } -#ifndef SVX_LIGHT else if( svx::GraphicExporter_getImplementationName().equalsAscii( pImplName ) ) { xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), @@ -346,7 +358,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( svx::GraphicExporter_createInstance, svx::GraphicExporter_getSupportedServiceNames() ); } -#endif else if ( svx::FontHeightToolBoxControl::getImplementationName_Static().equalsAscii( pImplName ) ) { xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), @@ -354,6 +365,34 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( svx::FontHeightToolBoxControl_createInstance, svx::FontHeightToolBoxControl::getSupportedServiceNames_Static() ); } + else if ( svx::FindTextToolbarController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::FindTextToolbarController::getImplementationName_Static(), + svx::FindTextToolbarController_createInstance, + svx::FindTextToolbarController::getSupportedServiceNames_Static() ); + } + else if ( svx::DownSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::DownSearchToolboxController::getImplementationName_Static(), + svx::DownSearchToolboxController_createInstance, + svx::DownSearchToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::UpSearchToolboxController::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::UpSearchToolboxController::getImplementationName_Static(), + svx::UpSearchToolboxController_createInstance, + svx::UpSearchToolboxController::getSupportedServiceNames_Static() ); + } + else if ( svx::FindbarDispatcher::getImplementationName_Static().equalsAscii( pImplName ) ) + { + xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + svx::FindbarDispatcher::getImplementationName_Static(), + svx::FindbarDispatcher_createInstance, + svx::FindbarDispatcher::getSupportedServiceNames_Static() ); + } else if( ::unogallery::GalleryThemeProvider_getImplementationName().equalsAscii( pImplName ) ) { xFactory = ::cppu::createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), @@ -385,7 +424,16 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( ::svx::SvXMLGraphicExportHelper_createInstance, ::svx::SvXMLGraphicExportHelper_getSupportedServiceNames() ); } - +/* + else if( ::svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) ) + { + xFactory = ::cppu::createSingleFactory( + reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ), + ::svx::ExtrusionDepthController_getImplementationName(), + ::svx::ExtrusionDepthController_createInstance, + ::svx::ExtrusionDepthController_getSupportedServiceNames() ); + } +*/ if( xFactory.is()) { xFactory->acquire(); diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 9fea6a6fda5d..9d5e1695c5cb 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -654,11 +654,17 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, if( nTempType == UHASHMAP_NOTFOUND ) { - if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape")) ) + if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape")) || + aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TableShape")) ) { rInventor = SdrInventor; rType = OBJ_TABLE; } + else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.MediaShape" )) ) + { + rInventor = SdrInventor; + rType = OBJ_MEDIA; + } } else if(nTempType & E3D_INVENTOR_FLAG) { diff --git a/svx/uiconfig/accelerator/default.xml b/svx/uiconfig/accelerator/default.xml deleted file mode 100644 index dafd9e022f12..000000000000 --- a/svx/uiconfig/accelerator/default.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink"> - <accel:item accel:code="KEY_S" accel:shift="true" accel:mod1="true" xlink:href=".uno:SaveAs"/> - <accel:item accel:code="KEY_Y" accel:shift="true" accel:mod1="true" xlink:href=".uno:Repeat"/> -</accel:acceleratorlist> diff --git a/svx/uiconfig/accelerator/en-US/default.xml b/svx/uiconfig/accelerator/en-US/default.xml deleted file mode 100644 index 67a6e9127c8a..000000000000 --- a/svx/uiconfig/accelerator/en-US/default.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink"> - <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/> - <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/> - <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/> - <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/> - <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/> - <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/> - <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/> - <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/> - <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/> - <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/> - <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/> - <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/> - <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/> - <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/> - <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/> - <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/> - <accel:item accel:code="KEY_F11" accel:mod2="true" xlink:href=".uno:MacroDialog"/> -</accel:acceleratorlist> diff --git a/svx/uiconfig/accelerator/es/default.xml b/svx/uiconfig/accelerator/es/default.xml deleted file mode 100644 index 71ba6212d275..000000000000 --- a/svx/uiconfig/accelerator/es/default.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink"> - <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/> - <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/> - <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:Open"/> - <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/> - <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/> - <accel:item accel:code="KEY_G" accel:mod1="true" xlink:href=".uno:Save"/> - <accel:item accel:code="KEY_U" accel:mod1="true" xlink:href=".uno:AddDirect"/> - <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/> - <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/> - <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/> - <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/> - <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/> - <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/> - <accel:item accel:code="KEY_E" accel:mod1="true" xlink:href=".uno:SelectAll"/> - <accel:item accel:code="KEY_B" accel:mod1="true" xlink:href=".uno:SearchDialog"/> - <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/> - <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/> - <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/> - <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/> - <accel:item accel:code="KEY_F11" accel:mod2="true" xlink:href=".uno:MacroDialog"/> -</accel:acceleratorlist> diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk index 0006fa2ff5fe..050decc8d4f5 100644 --- a/svx/util/makefile.mk +++ b/svx/util/makefile.mk @@ -45,6 +45,10 @@ SHL1TARGET= svxcore$(DLLPOSTFIX) SHL1IMPLIB= isvxcore SHL1USE_EXPORTS=name +SHL1OBJS= \ + $(SLO)$/coreservices.obj + + SHL1LIBS= \ $(SLB)$/animation.lib \ $(SLB)$/attribute.lib \ diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx index 32d556b31626..baee57ad75dc 100644 --- a/svx/workben/msview/msview.cxx +++ b/svx/workben/msview/msview.cxx @@ -34,7 +34,7 @@ #include <boost/shared_ptr.hpp> #include <sot/storage.hxx> #ifndef _SVTOOLS_HRC -#include <svl/svtools.hrc> +#include <svtools/svtools.hrc> #endif #include <sal/main.h> diff --git a/ucb/prj/build.lst b/ucb/prj/build.lst index a4d7ef6b4f6b..dad79213047e 100644 --- a/ucb/prj/build.lst +++ b/ucb/prj/build.lst @@ -1,4 +1,4 @@ -uc ucb : cppuhelper CURL:curl OPENSSL:openssl NEON:neon LIBXML2:libxml2 offapi sal salhelper ucbhelper udkapi comphelper NULL +uc ucb : cppuhelper CURL:curl OPENSSL:openssl NEON:neon LIBXML2:libxml2 offapi sal salhelper ucbhelper udkapi comphelper tools NULL uc ucb usr1 - all uc_mkout NULL uc ucb\inc nmake - all uc_inc NULL uc ucb\source\regexp nmake - all uc_regexp uc_inc NULL @@ -14,4 +14,5 @@ uc ucb\source\ucp\webdav nmake - all uc_webdav uc_inc NULL uc ucb\source\ucp\package nmake - all uc_package uc_inc NULL uc ucb\source\ucp\tdoc nmake - all uc_tdoc uc_inc NULL uc ucb\source\ucp\expand nmake - all uc_expand uc_inc NULL +uc ucb\source\ucp\ext nmake - all uc_ext uc_inc NULL uc ucb\qa\unoapi nmake - all uc_qa_unoapi NULL diff --git a/ucb/source/ucp/ext/makefile.mk b/ucb/source/ucp/ext/makefile.mk new file mode 100644 index 000000000000..23c30b3bda5b --- /dev/null +++ b/ucb/source/ucp/ext/makefile.mk @@ -0,0 +1,65 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.4 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ = ..$/..$/.. +PRJNAME = ucb +TARGET = ucpext.uno +ENABLE_EXCEPTIONS = TRUE + +.INCLUDE : settings.mk +DLLPRE = + +SLOFILES= \ + $(SLO)$/ucpext_provider.obj \ + $(SLO)$/ucpext_content.obj \ + $(SLO)$/ucpext_services.obj \ + $(SLO)$/ucpext_resultset.obj \ + $(SLO)$/ucpext_datasupplier.obj + +SHL1STDLIBS = \ + $(UCBHELPERLIB) \ + $(COMPHELPERLIB) \ + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(SALLIB) \ + $(SALHELPERLIB) + +SHL1VERSIONMAP = $(SOLARENV)/src/component.map +SHL1TARGET = $(TARGET) + +SHL1DEPN = +SHL1IMPLIB = i$(TARGET) +SHL1LIBS = $(SLB)$/$(TARGET).lib +SHL1DEF = $(MISC)$/$(SHL1TARGET).def + +DEF1NAME = $(SHL1TARGET) + +.INCLUDE : target.mk diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx new file mode 100644 index 000000000000..7b7ada742840 --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -0,0 +1,672 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#include "precompiled_ucb.hxx" + +#include "ucpext_content.hxx" + +#include "ucpext_content.hxx" +#include "ucpext_provider.hxx" +#include "ucpext_resultset.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/beans/PropertyAttribute.hpp> +#include <com/sun/star/beans/XPropertyAccess.hpp> +#include <com/sun/star/lang/IllegalAccessException.hpp> +#include <com/sun/star/sdbc/XRow.hpp> +#include <com/sun/star/ucb/XCommandInfo.hpp> +#include <com/sun/star/ucb/XPersistentPropertySet.hpp> +#include <com/sun/star/io/XOutputStream.hpp> +#include <com/sun/star/io/XActiveDataSink.hpp> +#include <com/sun/star/ucb/OpenCommandArgument2.hpp> +#include <com/sun/star/ucb/OpenMode.hpp> +#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp> +#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp> +#include <com/sun/star/ucb/OpenCommandArgument2.hpp> +#include <com/sun/star/ucb/OpenMode.hpp> +#include <com/sun/star/ucb/XDynamicResultSet.hpp> +#include <com/sun/star/lang/IllegalAccessException.hpp> +#include <com/sun/star/deployment/XPackageInformationProvider.hpp> +/** === end UNO includes === **/ + +#include <ucbhelper/contentidentifier.hxx> +#include <ucbhelper/propertyvalueset.hxx> +#include <ucbhelper/cancelcommandexecution.hxx> +#include <ucbhelper/content.hxx> +#include <tools/diagnose_ex.h> +#include <comphelper/string.hxx> +#include <comphelper/componentcontext.hxx> +#include <rtl/ustrbuf.hxx> +#include <rtl/uri.hxx> + +#include <algorithm> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::ucb::XContentIdentifier; + using ::com::sun::star::ucb::IllegalIdentifierException; + using ::com::sun::star::ucb::XContent; + using ::com::sun::star::ucb::XCommandEnvironment; + using ::com::sun::star::ucb::Command; + using ::com::sun::star::ucb::CommandAbortedException; + using ::com::sun::star::beans::Property; + using ::com::sun::star::lang::IllegalArgumentException; + using ::com::sun::star::beans::PropertyValue; + using ::com::sun::star::ucb::OpenCommandArgument2; + using ::com::sun::star::ucb::XDynamicResultSet; + using ::com::sun::star::ucb::UnsupportedOpenModeException; + using ::com::sun::star::io::XOutputStream; + using ::com::sun::star::io::XActiveDataSink; + using ::com::sun::star::io::XInputStream; + using ::com::sun::star::ucb::UnsupportedDataSinkException; + using ::com::sun::star::ucb::UnsupportedCommandException; + using ::com::sun::star::sdbc::XRow; + using ::com::sun::star::beans::XPropertySet; + using ::com::sun::star::beans::PropertyChangeEvent; + using ::com::sun::star::lang::IllegalAccessException; + using ::com::sun::star::ucb::CommandInfo; + using ::com::sun::star::deployment::XPackageInformationProvider; + /** === end UNO using === **/ + namespace OpenMode = ::com::sun::star::ucb::OpenMode; + namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute; + + //================================================================================================================== + //= helper + //================================================================================================================== + namespace + { + //-------------------------------------------------------------------------------------------------------------- + ::rtl::OUString lcl_compose( const ::rtl::OUString& i_rBaseURL, const ::rtl::OUString& i_rRelativeURL ) + { + ENSURE_OR_RETURN( i_rBaseURL.getLength(), "illegal base URL", i_rRelativeURL ); + + ::rtl::OUStringBuffer aComposer( i_rBaseURL ); + if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' ) + aComposer.append( sal_Unicode( '/' ) ); + aComposer.append( i_rRelativeURL ); + return aComposer.makeStringAndClear(); + } + + //-------------------------------------------------------------------------------------------------------------- + struct SelectPropertyName : public ::std::unary_function< Property, ::rtl::OUString > + { + const ::rtl::OUString& operator()( const Property& i_rProperty ) const + { + return i_rProperty.Name; + } + }; + } + + //================================================================================================================== + //= Content + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + Content::Content( const Reference< XMultiServiceFactory >& i_rORB, ::ucbhelper::ContentProviderImplHelper* i_pProvider, + const Reference< XContentIdentifier >& i_rIdentifier ) + :Content_Base( i_rORB, i_pProvider, i_rIdentifier ) + ,m_eExtContentType( E_UNKNOWN ) + ,m_aIsFolder() + ,m_aContentType() + ,m_sExtensionId() + ,m_sPathIntoExtension() + { + const ::rtl::OUString sURL( getIdentifier()->getContentIdentifier() ); + if ( denotesRootContent( sURL ) ) + { + m_eExtContentType = E_ROOT; + } + else + { + const ::rtl::OUString sRelativeURL( sURL.copy( ContentProvider::getRootURL().getLength() ) ); + const sal_Int32 nSepPos = sRelativeURL.indexOf( '/' ); + if ( ( nSepPos == -1 ) || ( nSepPos == sRelativeURL.getLength() - 1 ) ) + { + m_eExtContentType = E_EXTENSION_ROOT; + } + else + { + m_eExtContentType = E_EXTENSION_CONTENT; + } + } + + if ( m_eExtContentType != E_ROOT ) + { + const ::rtl::OUString sRootURL = ContentProvider::getRootURL(); + m_sExtensionId = sURL.copy( sRootURL.getLength() ); + + const sal_Int32 nNextSep = m_sExtensionId.indexOf( '/' ); + if ( nNextSep > -1 ) + { + m_sPathIntoExtension = m_sExtensionId.copy( nNextSep + 1 ); + m_sExtensionId = m_sExtensionId.copy( 0, nNextSep ); + } + m_sExtensionId = Content::decodeIdentifier( m_sExtensionId ); + } + } + + //------------------------------------------------------------------------------------------------------------------ + Content::~Content() + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL Content::getImplementationName() throw( RuntimeException ) + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.ucp.ext.Content" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL Content::getSupportedServiceNames() throw( RuntimeException ) + { + Sequence< ::rtl::OUString > aServiceNames(2); + aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.Content" ) ); + aServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ExtensionContent" ) ); + return aServiceNames; + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL Content::getContentType() throw( RuntimeException ) + { + impl_determineContentType(); + return *m_aContentType; + } + + //------------------------------------------------------------------------------------------------------------------ + Any SAL_CALL Content::execute( const Command& aCommand, sal_Int32 /* CommandId */, const Reference< XCommandEnvironment >& i_rEvironment ) + throw( Exception, CommandAbortedException, RuntimeException ) + { + Any aRet; + + if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertyValues" ) ) ) + { + Sequence< Property > Properties; + if ( !( aCommand.Argument >>= Properties ) ) + { + ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( + ::rtl::OUString(), *this, -1 ) ), + i_rEvironment ); + // unreachable + } + + aRet <<= getPropertyValues( Properties, i_rEvironment ); + } + else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "setPropertyValues" ) ) ) + { + Sequence< PropertyValue > aProperties; + if ( !( aCommand.Argument >>= aProperties ) ) + { + ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( + ::rtl::OUString(), *this, -1 ) ), + i_rEvironment ); + // unreachable + } + + if ( !aProperties.getLength() ) + { + ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( + ::rtl::OUString(), *this, -1 ) ), + i_rEvironment ); + // unreachable + } + + aRet <<= setPropertyValues( aProperties, i_rEvironment ); + } + else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertySetInfo" ) ) ) + { + // implemented by base class. + aRet <<= getPropertySetInfo( i_rEvironment ); + } + else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getCommandInfo" ) ) ) + { + // implemented by base class. + aRet <<= getCommandInfo( i_rEvironment ); + } + else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "open" ) ) ) + { + OpenCommandArgument2 aOpenCommand; + if ( !( aCommand.Argument >>= aOpenCommand ) ) + { + ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( + ::rtl::OUString(), *this, -1 ) ), + i_rEvironment ); + // unreachable + } + + sal_Bool bOpenFolder = + ( ( aOpenCommand.Mode == OpenMode::ALL ) || + ( aOpenCommand.Mode == OpenMode::FOLDERS ) || + ( aOpenCommand.Mode == OpenMode::DOCUMENTS ) ); + + + if ( bOpenFolder && impl_isFolder() ) + { + Reference< XDynamicResultSet > xSet = new ResultSet( + m_xSMgr, this, aOpenCommand, i_rEvironment ); + aRet <<= xSet; + } + + if ( aOpenCommand.Sink.is() ) + { + const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() ); + ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment ); + aRet = aRequestedContent.executeCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), makeAny( aOpenCommand ) ); + } + } + + else + { + ::ucbhelper::cancelCommandExecution( makeAny( UnsupportedCommandException( + ::rtl::OUString(), *this ) ), + i_rEvironment ); + // unreachable + } + + return aRet; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL Content::abort( sal_Int32 ) throw( RuntimeException ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString Content::encodeIdentifier( const ::rtl::OUString& i_rIdentifier ) + { + return ::rtl::Uri::encode( i_rIdentifier, rtl_UriCharClassRegName, rtl_UriEncodeIgnoreEscapes, + RTL_TEXTENCODING_UTF8 ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString Content::decodeIdentifier( const ::rtl::OUString& i_rIdentifier ) + { + return ::rtl::Uri::decode( i_rIdentifier, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); + } + + //------------------------------------------------------------------------------------------------------------------ + bool Content::denotesRootContent( const ::rtl::OUString& i_rContentIdentifier ) + { + const ::rtl::OUString sRootURL( ContentProvider::getRootURL() ); + if ( i_rContentIdentifier == sRootURL ) + return true; + + // the root URL contains only two trailing /, but we also recognize 3 of them as denoting the root URL + if ( i_rContentIdentifier.match( sRootURL ) + && ( i_rContentIdentifier.getLength() == sRootURL.getLength() + 1 ) + && ( i_rContentIdentifier[ i_rContentIdentifier.getLength() - 1 ] == '/' ) + ) + return true; + + return false; + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString Content::getParentURL() + { + const ::rtl::OUString sRootURL( ContentProvider::getRootURL() ); + + switch ( m_eExtContentType ) + { + case E_ROOT: + // don't have a parent + return sRootURL; + + case E_EXTENSION_ROOT: + // our parent is the root itself + return sRootURL; + + case E_EXTENSION_CONTENT: + { + const ::rtl::OUString sURL = m_xIdentifier->getContentIdentifier(); + + // cut the root URL + ENSURE_OR_BREAK( sURL.match( sRootURL, 0 ), "illegal URL structure - no root" ); + ::rtl::OUString sRelativeURL( sURL.copy( sRootURL.getLength() ) ); + + // cut the extension ID + const ::rtl::OUString sSeparatedExtensionId( encodeIdentifier( m_sExtensionId ) + ::rtl::OUString( sal_Unicode( '/' ) ) ); + ENSURE_OR_BREAK( sRelativeURL.match( sSeparatedExtensionId ), "illegal URL structure - no extension ID" ); + sRelativeURL = sRelativeURL.copy( sSeparatedExtensionId.getLength() ); + + // cut the final slash (if any) + ENSURE_OR_BREAK( sRelativeURL.getLength(), "illegal URL structure - ExtensionContent should have a level below the extension ID" ); + if ( sRelativeURL.getStr()[ sRelativeURL.getLength() - 1 ] == '/' ) + sRelativeURL = sRelativeURL.copy( 0, sRelativeURL.getLength() - 1 ); + + // remove the last segment + const sal_Int32 nLastSep = sRelativeURL.lastIndexOf( '/' ); + sRelativeURL = sRelativeURL.copy( 0, nLastSep != -1 ? nLastSep : 0 ); + + ::rtl::OUStringBuffer aComposer; + aComposer.append( sRootURL ); + aComposer.append( sSeparatedExtensionId ); + aComposer.append( sRelativeURL ); + return aComposer.makeStringAndClear(); + } + + default: + OSL_ENSURE( false, "Content::getParentURL: unhandled case!" ); + break; + } + return ::rtl::OUString(); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XRow > Content::getArtificialNodePropertyValues( const Reference< XMultiServiceFactory >& i_rORB, + const Sequence< Property >& i_rProperties, const ::rtl::OUString& i_rTitle ) + { + // note: empty sequence means "get values of all supported properties". + ::rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( i_rORB ); + + const sal_Int32 nCount = i_rProperties.getLength(); + if ( nCount ) + { + Reference< XPropertySet > xAdditionalPropSet; + + const Property* pProps = i_rProperties.getConstArray(); + for ( sal_Int32 n = 0; n < nCount; ++n ) + { + const Property& rProp = pProps[ n ]; + + // Process Core properties. + if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) ) + { + xRow->appendString ( rProp, ContentProvider::getArtificialNodeContentType() ); + } + else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + { + xRow->appendString ( rProp, i_rTitle ); + } + else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) + { + xRow->appendBoolean( rProp, sal_False ); + } + else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) ) + { + xRow->appendBoolean( rProp, sal_True ); + } + else + { + // append empty entry. + xRow->appendVoid( rProp ); + } + } + } + else + { + // Append all Core Properties. + xRow->appendString ( Property( ::rtl::OUString::createFromAscii( "ContentType" ), + -1, + getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), + PropertyAttribute::BOUND | PropertyAttribute::READONLY ), + ContentProvider::getArtificialNodeContentType() ); + xRow->appendString ( Property( ::rtl::OUString::createFromAscii( "Title" ), + -1, + getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), + PropertyAttribute::BOUND | PropertyAttribute::READONLY ), + i_rTitle ); + xRow->appendBoolean( Property( ::rtl::OUString::createFromAscii( "IsDocument" ), + -1, + getCppuBooleanType(), + PropertyAttribute::BOUND | PropertyAttribute::READONLY ), + sal_False ); + xRow->appendBoolean( Property( ::rtl::OUString::createFromAscii( "IsFolder" ), + -1, + getCppuBooleanType(), + PropertyAttribute::BOUND | PropertyAttribute::READONLY ), + sal_True ); + } + + return Reference< XRow >( xRow.get() ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString Content::getPhysicalURL() const + { + ENSURE_OR_RETURN( m_eExtContentType != E_ROOT, "illegal call", ::rtl::OUString() ); + + // create an ucb::XContent for the physical file within the deployed extension + const ::comphelper::ComponentContext aContext( m_xSMgr ); + const Reference< XPackageInformationProvider > xPackageInfo( + aContext.getSingleton( "com.sun.star.deployment.PackageInformationProvider" ), UNO_QUERY_THROW ); + const ::rtl::OUString sPackageLocation( xPackageInfo->getPackageLocation( m_sExtensionId ) ); + + if ( m_sPathIntoExtension.getLength() == 0 ) + return sPackageLocation; + return lcl_compose( sPackageLocation, m_sPathIntoExtension ); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XRow > Content::getPropertyValues( const Sequence< Property >& i_rProperties, const Reference< XCommandEnvironment >& i_rEnv ) + { + ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex ); + + switch ( m_eExtContentType ) + { + case E_ROOT: + return getArtificialNodePropertyValues( m_xSMgr, i_rProperties, ContentProvider::getRootURL() ); + case E_EXTENSION_ROOT: + return getArtificialNodePropertyValues( m_xSMgr, i_rProperties, m_sExtensionId ); + case E_EXTENSION_CONTENT: + { + const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() ); + ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv ); + + // translate the property request + Sequence< ::rtl::OUString > aPropertyNames( i_rProperties.getLength() ); + ::std::transform( + i_rProperties.getConstArray(), + i_rProperties.getConstArray() + i_rProperties.getLength(), + aPropertyNames.getArray(), + SelectPropertyName() + ); + const Sequence< Any > aPropertyValues = aRequestedContent.getPropertyValues( aPropertyNames ); + const ::rtl::Reference< ::ucbhelper::PropertyValueSet > xValueRow = new ::ucbhelper::PropertyValueSet( m_xSMgr ); + sal_Int32 i=0; + for ( const Any* value = aPropertyValues.getConstArray(); + value != aPropertyValues.getConstArray() + aPropertyValues.getLength(); + ++value, ++i + ) + { + xValueRow->appendObject( aPropertyNames[i], *value ); + } + return xValueRow.get(); + } + + default: + OSL_ENSURE( false, "Content::getPropertyValues: unhandled case!" ); + break; + } + + OSL_ENSURE( false, "Content::getPropertyValues: unreachable!" ); + return NULL; + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< Any > Content::setPropertyValues( const Sequence< PropertyValue >& i_rValues, const Reference< XCommandEnvironment >& /* xEnv */) + { + ::osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex ); + + Sequence< Any > aRet( i_rValues.getLength() ); + Sequence< PropertyChangeEvent > aChanges( i_rValues.getLength() ); + + PropertyChangeEvent aEvent; + aEvent.Source = static_cast< cppu::OWeakObject * >( this ); + aEvent.Further = sal_False; + aEvent.PropertyHandle = -1; + + const PropertyValue* pValues = i_rValues.getConstArray(); + const sal_Int32 nCount = i_rValues.getLength(); + + for ( sal_Int32 n = 0; n < nCount; ++n, ++pValues ) + { + // all our properties are read-only ... + aRet[ n ] <<= IllegalAccessException( ::rtl::OUString::createFromAscii( "property is read-only." ), *this ); + } + + return aRet; + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< CommandInfo > Content::getCommands( const Reference< XCommandEnvironment > & /*xEnv*/ ) + { + sal_uInt32 nCommandCount = 5; + static const CommandInfo aCommandInfoTable[] = + { + /////////////////////////////////////////////////////////////// + // Mandatory commands + /////////////////////////////////////////////////////////////// + CommandInfo( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ), + -1, + getCppuVoidType() + ), + CommandInfo( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ), + -1, + getCppuVoidType() + ), + CommandInfo( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ), + -1, + getCppuType( + static_cast< Sequence< Property > * >( 0 ) ) + ), + CommandInfo( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ), + -1, + getCppuType( + static_cast< Sequence< PropertyValue > * >( 0 ) ) + ) + /////////////////////////////////////////////////////////////// + // Optional standard commands + /////////////////////////////////////////////////////////////// + , CommandInfo( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), + -1, + getCppuType( static_cast< OpenCommandArgument2 * >( 0 ) ) + ) + }; + + return Sequence< CommandInfo >( aCommandInfoTable, nCommandCount ); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< Property > Content::getProperties( const Reference< XCommandEnvironment > & /*xEnv*/ ) + { + static Property aProperties[] = + { + Property( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ), + -1, + getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), + PropertyAttribute::BOUND | PropertyAttribute::READONLY + ), + Property( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ), + -1, + getCppuBooleanType(), + PropertyAttribute::BOUND | PropertyAttribute::READONLY + ), + Property( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), + -1, + getCppuBooleanType(), + PropertyAttribute::BOUND | PropertyAttribute::READONLY + ), + Property( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + -1, + getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), + PropertyAttribute::BOUND | PropertyAttribute::READONLY + ) + }; + return Sequence< Property >( aProperties, sizeof( aProperties ) / sizeof( aProperties[0] ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + bool Content::impl_isFolder() + { + if ( !!m_aIsFolder ) + return *m_aIsFolder; + + bool bIsFolder = false; + try + { + Sequence< Property > aProps(1); + aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ); + Reference< XRow > xRow( getPropertyValues( aProps, NULL ), UNO_SET_THROW ); + bIsFolder = xRow->getBoolean(1); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + m_aIsFolder.reset( bIsFolder ); + return *m_aIsFolder; + } + + //------------------------------------------------------------------------------------------------------------------ + void Content::impl_determineContentType() + { + if ( !!m_aContentType ) + return; + + m_aContentType.reset( ContentProvider::getArtificialNodeContentType() ); + if ( m_eExtContentType == E_EXTENSION_CONTENT ) + { + try + { + Sequence< Property > aProps(1); + aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ); + Reference< XRow > xRow( getPropertyValues( aProps, NULL ), UNO_SET_THROW ); + m_aContentType.reset( xRow->getString(1) ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + } + +//...................................................................................................................... +} } } // namespace ucp::ext +//...................................................................................................................... diff --git a/ucb/source/ucp/ext/ucpext_content.hxx b/ucb/source/ucp/ext/ucpext_content.hxx new file mode 100644 index 000000000000..36380d8a7d68 --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_content.hxx @@ -0,0 +1,154 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef UCB_UCPEXT_CONTENT_HXX +#define UCB_UCPEXT_CONTENT_HXX + +/** === begin UNO includes === **/ +#include <com/sun/star/sdbc/XRow.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +/** === end UNO includes === **/ + +#include <rtl/ref.hxx> +#include <ucbhelper/contenthelper.hxx> + +#include <list> +#include <boost/optional.hpp> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + //================================================================================================================== + //= ExtensionContentType + //================================================================================================================== + enum ExtensionContentType + { + E_ROOT, + E_EXTENSION_ROOT, + E_EXTENSION_CONTENT, + + E_UNKNOWN + }; + + //================================================================================================================== + //= ContentProvider + //================================================================================================================== + typedef ::ucbhelper::ContentImplHelper Content_Base; + class Content : public Content_Base + { + public: + Content( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr, + ::ucbhelper::ContentProviderImplHelper* pProvider, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier >& Identifier + ); + + static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow > + getArtificialNodePropertyValues( + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr, + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties, + const ::rtl::OUString& rTitle + ); + + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow > + getPropertyValues( + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xEnv + ); + + static ::rtl::OUString + encodeIdentifier( const ::rtl::OUString& i_rIdentifier ); + static ::rtl::OUString + decodeIdentifier( const ::rtl::OUString& i_rIdentifier ); + + virtual ::rtl::OUString getParentURL(); + + ExtensionContentType getExtensionContentType() const { return m_eExtContentType; } + + /** retrieves the URL of the underlying physical content. Not to be called when getExtensionContentType() + returns E_ROOT. + */ + ::rtl::OUString getPhysicalURL() const; + + protected: + virtual ~Content(); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); + + // XContent + virtual rtl::OUString SAL_CALL getContentType() throw( com::sun::star::uno::RuntimeException ); + + // XCommandProcessor + virtual com::sun::star::uno::Any SAL_CALL + execute( + const com::sun::star::ucb::Command& aCommand, + sal_Int32 CommandId, + const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& Environment + ) + throw ( ::com::sun::star::uno::Exception + , ::com::sun::star::ucb::CommandAbortedException + , ::com::sun::star::uno::RuntimeException + ); + + virtual void SAL_CALL + abort( + sal_Int32 CommandId + ) + throw ( ::com::sun::star::uno::RuntimeException + ); + + private: + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > getProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& i_rEnv ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::ucb::CommandInfo > getCommands( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& i_rEnv ); + + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > + setPropertyValues( + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rValues, + const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xEnv + ); + + static bool denotesRootContent( const ::rtl::OUString& i_rContentIdentifier ); + + bool impl_isFolder(); + void impl_determineContentType(); + + private: + ExtensionContentType m_eExtContentType; + ::boost::optional< bool > m_aIsFolder; + ::boost::optional< ::rtl::OUString > m_aContentType; + ::rtl::OUString m_sExtensionId; + ::rtl::OUString m_sPathIntoExtension; + }; + +//...................................................................................................................... +} } } // namespace ucb::ucp::ext +//...................................................................................................................... + +#endif // UCB_UCPEXT_CONTENT_HXX diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx new file mode 100644 index 000000000000..a3a9cc6876ff --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx @@ -0,0 +1,375 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#include "precompiled_ucb.hxx" + +#include "ucpext_datasupplier.hxx" +#include "ucpext_content.hxx" +#include "ucpext_provider.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/deployment/XPackageInformationProvider.hpp> +/** === end UNO includes === **/ + +#include <ucbhelper/contentidentifier.hxx> +#include <comphelper/componentcontext.hxx> +#include <ucbhelper/providerhelper.hxx> +#include <ucbhelper/content.hxx> +#include <ucbhelper/propertyvalueset.hxx> +#include <tools/diagnose_ex.h> +#include <rtl/ustrbuf.hxx> + +#include <vector> +#include <boost/shared_ptr.hpp> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::ucb::XContent; + using ::com::sun::star::ucb::XContentIdentifier; + using ::com::sun::star::sdbc::XRow; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::ucb::IllegalIdentifierException; + using ::com::sun::star::ucb::ResultSetException; + using ::com::sun::star::deployment::XPackageInformationProvider; + using ::com::sun::star::beans::Property; + using ::com::sun::star::sdbc::XResultSet; + using ::com::sun::star::sdbc::XRow; + using ::com::sun::star::ucb::XCommandEnvironment; + /** === end UNO using === **/ + //================================================================================================================== + //= ResultListEntry + //================================================================================================================== + struct ResultListEntry + { + ::rtl::OUString sId; + Reference< XContentIdentifier > xId; + ::rtl::Reference< Content > pContent; + Reference< XRow > xRow; + }; + + typedef ::std::vector< ResultListEntry > ResultList; + + //================================================================================================================== + //= DataSupplier_Impl + //================================================================================================================== + struct DataSupplier_Impl + { + ::osl::Mutex m_aMutex; + ResultList m_aResults; + ::rtl::Reference< Content > m_xContent; + Reference< XMultiServiceFactory > m_xSMgr; + sal_Int32 m_nOpenMode; + + DataSupplier_Impl( const Reference< XMultiServiceFactory >& i_rORB, const ::rtl::Reference< Content >& i_rContent, + const sal_Int32 i_nOpenMode ) + :m_xContent( i_rContent ) + ,m_xSMgr( i_rORB ) + ,m_nOpenMode( i_nOpenMode ) + { + } + ~DataSupplier_Impl(); + }; + + //------------------------------------------------------------------------------------------------------------------ + DataSupplier_Impl::~DataSupplier_Impl() + { + } + + //================================================================================================================== + //= helper + //================================================================================================================== + namespace + { + ::rtl::OUString lcl_compose( const ::rtl::OUString& i_rBaseURL, const ::rtl::OUString& i_rRelativeURL ) + { + ENSURE_OR_RETURN( i_rBaseURL.getLength(), "illegal base URL", i_rRelativeURL ); + + ::rtl::OUStringBuffer aComposer( i_rBaseURL ); + if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' ) + aComposer.append( sal_Unicode( '/' ) ); + aComposer.append( i_rRelativeURL ); + return aComposer.makeStringAndClear(); + } + } + + + //================================================================================================================== + //= DataSupplier + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& i_rORB, + const ::rtl::Reference< Content >& i_rContent, + const sal_Int32 i_nOpenMode ) + :m_pImpl( new DataSupplier_Impl( i_rORB, i_rContent, i_nOpenMode ) ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + void DataSupplier::fetchData() + { + try + { + const ::comphelper::ComponentContext aContext( m_pImpl->m_xSMgr ); + const Reference< XPackageInformationProvider > xPackageInfo( + aContext.getSingleton( "com.sun.star.deployment.PackageInformationProvider" ), UNO_QUERY_THROW ); + + const ::rtl::OUString sContentIdentifier( m_pImpl->m_xContent->getIdentifier()->getContentIdentifier() ); + + switch ( m_pImpl->m_xContent->getExtensionContentType() ) + { + case E_ROOT: + { + Sequence< Sequence< ::rtl::OUString > > aExtensionInfo( xPackageInfo->getExtensionList() ); + for ( const Sequence< ::rtl::OUString >* pExtInfo = aExtensionInfo.getConstArray(); + pExtInfo != aExtensionInfo.getConstArray() + aExtensionInfo.getLength(); + ++pExtInfo + ) + { + ENSURE_OR_CONTINUE( pExtInfo->getLength() > 0, "illegal extension info" ); + + const ::rtl::OUString& rLocalId = (*pExtInfo)[0]; + ResultListEntry aEntry; + aEntry.sId = ContentProvider::getRootURL() + Content::encodeIdentifier( rLocalId ) + ::rtl::OUString( sal_Unicode( '/' ) ); + m_pImpl->m_aResults.push_back( aEntry ); + } + } + break; + case E_EXTENSION_ROOT: + case E_EXTENSION_CONTENT: + { + const ::rtl::OUString sPackageLocation( m_pImpl->m_xContent->getPhysicalURL() ); + ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment() ); + + // obtain the properties which our result set is set up for from the wrapped content + Sequence< ::rtl::OUString > aPropertyNames(1); + aPropertyNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ); + + const Reference< XResultSet > xFolderContent( aWrappedContent.createCursor( aPropertyNames ), UNO_SET_THROW ); + const Reference< XRow > xContentRow( xFolderContent, UNO_QUERY_THROW ); + while ( xFolderContent->next() ) + { + ResultListEntry aEntry; + aEntry.sId = lcl_compose( sContentIdentifier, xContentRow->getString( 1 ) ); + m_pImpl->m_aResults.push_back( aEntry ); + } + } + break; + default: + OSL_ENSURE( false, "DataSupplier::fetchData: unimplemented content type!" ); + break; + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //------------------------------------------------------------------------------------------------------------------ + DataSupplier::~DataSupplier() + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 i_nIndex ) + { + ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); + + if ( i_nIndex < m_pImpl->m_aResults.size() ) + { + const ::rtl::OUString sId = m_pImpl->m_aResults[ i_nIndex ].sId; + if ( sId.getLength() ) + return sId; + } + + OSL_ENSURE( false, "DataSupplier::queryContentIdentifierString: illegal index, or illegal result entry id!" ); + return ::rtl::OUString(); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XContentIdentifier > DataSupplier::queryContentIdentifier( sal_uInt32 i_nIndex ) + { + ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); + + if ( i_nIndex < m_pImpl->m_aResults.size() ) + { + Reference< XContentIdentifier > xId( m_pImpl->m_aResults[ i_nIndex ].xId ); + if ( xId.is() ) + return xId; + } + + ::rtl::OUString sId = queryContentIdentifierString( i_nIndex ); + if ( sId.getLength() ) + { + Reference< XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( sId ); + m_pImpl->m_aResults[ i_nIndex ].xId = xId; + return xId; + } + + return Reference< XContentIdentifier >(); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XContent > DataSupplier::queryContent( sal_uInt32 i_nIndex ) + { + ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); + ENSURE_OR_RETURN( i_nIndex < m_pImpl->m_aResults.size(), "illegal index!", NULL ); + + + ::rtl::Reference< Content > pContent( m_pImpl->m_aResults[ i_nIndex ].pContent ); + if ( pContent.is() ) + return pContent.get(); + + Reference< XContentIdentifier > xId( queryContentIdentifier( i_nIndex ) ); + if ( xId.is() ) + { + try + { + Reference< XContent > xContent( m_pImpl->m_xContent->getProvider()->queryContent( xId ) ); + pContent.set( dynamic_cast< Content* >( xContent.get() ) ); + OSL_ENSURE( pContent.is() || !xContent.is(), "DataSupplier::queryContent: invalid content implementation!" ); + m_pImpl->m_aResults[ i_nIndex ].pContent = pContent; + return pContent.get(); + + } + catch ( const IllegalIdentifierException& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + return Reference< XContent >(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool DataSupplier::getResult( sal_uInt32 i_nIndex ) + { + ::osl::ClearableGuard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); + + if ( m_pImpl->m_aResults.size() > i_nIndex ) + // result already present. + return sal_True; + + return sal_False; + } + + //------------------------------------------------------------------------------------------------------------------ + sal_uInt32 DataSupplier::totalCount() + { + ::osl::ClearableGuard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); + return m_pImpl->m_aResults.size(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_uInt32 DataSupplier::currentCount() + { + return m_pImpl->m_aResults.size(); + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool DataSupplier::isCountFinal() + { + return sal_True; + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XRow > DataSupplier::queryPropertyValues( sal_uInt32 i_nIndex ) + { + ::osl::MutexGuard aGuard( m_pImpl->m_aMutex ); + ENSURE_OR_RETURN( i_nIndex < m_pImpl->m_aResults.size(), "DataSupplier::queryPropertyValues: illegal index!", NULL ); + + Reference< XRow > xRow = m_pImpl->m_aResults[ i_nIndex ].xRow; + if ( xRow.is() ) + return xRow; + + ENSURE_OR_RETURN( queryContent( i_nIndex ).is(), "could not retrieve the content", NULL ); + + switch ( m_pImpl->m_xContent->getExtensionContentType() ) + { + case E_ROOT: + { + const ::rtl::OUString& rId( m_pImpl->m_aResults[ i_nIndex ].sId ); + const ::rtl::OUString sRootURL( ContentProvider::getRootURL() ); + ::rtl::OUString sTitle = Content::decodeIdentifier( rId.copy( sRootURL.getLength() ) ); + if ( ( sTitle.getLength() > 0 ) && ( sTitle[ sTitle.getLength() - 1 ] == '/' ) ) + sTitle = sTitle.copy( 0, sTitle.getLength() - 1 ); + xRow = Content::getArtificialNodePropertyValues( m_pImpl->m_xSMgr, getResultSet()->getProperties(), sTitle ); + } + break; + + case E_EXTENSION_ROOT: + case E_EXTENSION_CONTENT: + { + xRow = m_pImpl->m_aResults[ i_nIndex ].pContent->getPropertyValues( + getResultSet()->getProperties(), getResultSet()->getEnvironment() ); + } + break; + default: + OSL_ENSURE( false, "DataSupplier::queryPropertyValues: unhandled case!" ); + break; + } + + m_pImpl->m_aResults[ i_nIndex ].xRow = xRow; + return xRow; + } + + //------------------------------------------------------------------------------------------------------------------ + void DataSupplier::releasePropertyValues( sal_uInt32 i_nIndex ) + { + ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); + + if ( i_nIndex < m_pImpl->m_aResults.size() ) + m_pImpl->m_aResults[ i_nIndex ].xRow.clear(); + } + + //------------------------------------------------------------------------------------------------------------------ + void DataSupplier::close() + { + } + + //------------------------------------------------------------------------------------------------------------------ + void DataSupplier::validate() throw( ResultSetException ) + { + } + +//...................................................................................................................... +} } } // namespace ucp::ext +//...................................................................................................................... diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.hxx b/ucb/source/ucp/ext/ucpext_datasupplier.hxx new file mode 100644 index 000000000000..526491cd678b --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_datasupplier.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef UCB_UCPEXT_DATA_SUPPLIER_HXX +#define UCB_UCPEXT_DATA_SUPPLIER_HXX + +#include <rtl/ref.hxx> +#include <ucbhelper/resultset.hxx> + +#include <boost/scoped_ptr.hpp> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + struct DataSupplier_Impl; + class Content; + + //================================================================================================================== + //= DataSupplier + //================================================================================================================== + typedef ::ucbhelper::ResultSetDataSupplier DataSupplier_Base; + class DataSupplier : public ::ucbhelper::ResultSetDataSupplier + { + public: + DataSupplier( + const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& i_rORB, + const rtl::Reference< Content >& rContent, + const sal_Int32 nOpenMode + ); + + void fetchData(); + + protected: + virtual ~DataSupplier(); + + virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex ); + virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > queryContentIdentifier( sal_uInt32 nIndex ); + virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent > queryContent( sal_uInt32 nIndex ); + + virtual sal_Bool getResult( sal_uInt32 nIndex ); + + virtual sal_uInt32 totalCount(); + virtual sal_uInt32 currentCount(); + virtual sal_Bool isCountFinal(); + + virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > queryPropertyValues( sal_uInt32 nIndex ); + virtual void releasePropertyValues( sal_uInt32 nIndex ); + + virtual void close(); + + virtual void validate() throw( com::sun::star::ucb::ResultSetException ); + + private: + ::boost::scoped_ptr< DataSupplier_Impl > m_pImpl; + }; + +//...................................................................................................................... +} } } // namespace ucp::ext +//...................................................................................................................... + +#endif // UCB_UCPEXT_DATA_SUPPLIER_HXX diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx new file mode 100644 index 000000000000..0fbad1d8cf17 --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_provider.cxx @@ -0,0 +1,208 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#include "precompiled_ucb.hxx" + +#include "ucpext_provider.hxx" +#include "ucpext_content.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +#include <ucbhelper/contentidentifier.hxx> +#include <osl/diagnose.h> +#include <osl/mutex.hxx> +#include <comphelper/componentcontext.hxx> +#include <rtl/ustrbuf.hxx> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::ucb::XContentIdentifier; + using ::com::sun::star::ucb::IllegalIdentifierException; + using ::com::sun::star::ucb::XContent; + using ::com::sun::star::uno::XComponentContext; + /** === end UNO using === **/ + + //================================================================================================================== + //= ContentProvider + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + ContentProvider::ContentProvider( const Reference< XMultiServiceFactory >& i_rServiceManager ) + :ContentProvider_Base( i_rServiceManager ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + ContentProvider::~ContentProvider() + { + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL ContentProvider::getImplementationName_static() throw (RuntimeException) + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.ucp.ext.ContentProvider" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL ContentProvider::getImplementationName() throw (RuntimeException) + { + return getImplementationName_static(); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL ContentProvider::getSupportedServiceNames_static( ) throw (RuntimeException) + { + Sequence< ::rtl::OUString > aServiceNames(2); + aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ContentProvider" ) ); + aServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ExtensionContentProvider" ) ); + return aServiceNames; + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL ContentProvider::getSupportedServiceNames( ) throw (RuntimeException) + { + return getSupportedServiceNames_static(); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XInterface > ContentProvider::Create( const Reference< XComponentContext >& i_rContext ) + { + const ::comphelper::ComponentContext aContext( i_rContext ); + return *( new ContentProvider( aContext.getLegacyServiceFactory() ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString ContentProvider::getRootURL() + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.extension://" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString ContentProvider::getArtificialNodeContentType() + { + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.extension-content" ) ); + } + + //------------------------------------------------------------------------------------------------------------------ + namespace + { + void lcl_ensureAndTransfer( ::rtl::OUString& io_rIdentifierFragment, ::rtl::OUStringBuffer& o_rNormalization, const sal_Unicode i_nLeadingChar ) + { + if ( ( io_rIdentifierFragment.getLength() == 0 ) || ( io_rIdentifierFragment[0] != i_nLeadingChar ) ) + throw IllegalIdentifierException(); + io_rIdentifierFragment = io_rIdentifierFragment.copy( 1 ); + o_rNormalization.append( i_nLeadingChar ); + } + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XContent > SAL_CALL ContentProvider::queryContent( const Reference< XContentIdentifier >& i_rIdentifier ) + throw( IllegalIdentifierException, RuntimeException ) + { + // Check URL scheme... + const ::rtl::OUString sScheme( rtl::OUString::createFromAscii( "vnd.sun.star.extension" ) ); + if ( !i_rIdentifier->getContentProviderScheme().equalsIgnoreAsciiCase( sScheme ) ) + throw IllegalIdentifierException(); + + // normalize the identifier + const ::rtl::OUString sIdentifier( i_rIdentifier->getContentIdentifier() ); + + // the scheme needs to be lower-case + ::rtl::OUStringBuffer aComposer; + aComposer.append( sIdentifier.copy( 0, sScheme.getLength() ).toAsciiLowerCase() ); + + // one : is required after the scheme + ::rtl::OUString sRemaining( sIdentifier.copy( sScheme.getLength() ) ); + lcl_ensureAndTransfer( sRemaining, aComposer, ':' ); + + // and at least one / + lcl_ensureAndTransfer( sRemaining, aComposer, '/' ); + + // the normalized form requires one additional /, but we also accept identifiers which don't have it + if ( sRemaining.getLength() == 0 ) + { + // the root content is a special case, it requires /// + aComposer.appendAscii( "//" ); + } + else + { + if ( sRemaining[0] != '/' ) + { + aComposer.append( sal_Unicode( '/' ) ); + aComposer.append( sRemaining ); + } + else + { + lcl_ensureAndTransfer( sRemaining, aComposer, '/' ); + // by now, we moved "vnd.sun.star.extension://" from the URL to aComposer + if ( sRemaining.getLength() == 0 ) + { + // again, it's the root content, but one / is missing + aComposer.append( sal_Unicode( '/' ) ); + } + else + { + aComposer.append( sRemaining ); + } + } + } + const Reference< XContentIdentifier > xNormalizedIdentifier( new ::ucbhelper::ContentIdentifier( m_xSMgr, aComposer.makeStringAndClear() ) ); + + ::osl::MutexGuard aGuard( m_aMutex ); + + // check if a content with given id already exists... + Reference< XContent > xContent( queryExistingContent( xNormalizedIdentifier ).get() ); + if ( xContent.is() ) + return xContent; + + // create a new content + xContent = new Content( m_xSMgr, this, xNormalizedIdentifier ); + if ( !xContent->getIdentifier().is() ) + throw IllegalIdentifierException(); + + registerNewContent( xContent ); + return xContent; + } + +//...................................................................................................................... +} } } // namespace ucb::ucp::ext +//...................................................................................................................... diff --git a/ucb/source/ucp/ext/ucpext_provider.hxx b/ucb/source/ucp/ext/ucpext_provider.hxx new file mode 100644 index 000000000000..1f41fdd0f084 --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_provider.hxx @@ -0,0 +1,68 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef UCB_UCPEXT_CONTENT_PROVIDER_HXX +#define UCB_UCPEXT_CONTENT_PROVIDER_HXX + +#include <ucbhelper/providerhelper.hxx> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + //================================================================================================================== + //= ContentProvider + //================================================================================================================== + typedef ::ucbhelper::ContentProviderImplHelper ContentProvider_Base; + class ContentProvider : public ContentProvider_Base + { + public: + ContentProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_rServiceManager ); + virtual ~ContentProvider(); + + // XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); + + // XServiceInfo - static versions + static ::rtl::OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static() throw (::com::sun::star::uno::RuntimeException); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ); + + // XContentProvider + virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > SAL_CALL queryContent( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier >& Identifier ) throw (::com::sun::star::ucb::IllegalIdentifierException, ::com::sun::star::uno::RuntimeException); + + public: + static ::rtl::OUString getRootURL(); + static ::rtl::OUString getArtificialNodeContentType(); + }; + +//...................................................................................................................... +} } } // namespace ucb::ucp::ext +//...................................................................................................................... + +#endif // UCB_UCPEXT_CONTENT_PROVIDER_HXX diff --git a/ucb/source/ucp/ext/ucpext_resultset.cxx b/ucb/source/ucp/ext/ucpext_resultset.cxx new file mode 100644 index 000000000000..d8a2eb8e9914 --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_resultset.cxx @@ -0,0 +1,99 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#include "precompiled_ucb.hxx" + +#include "ucpext_resultset.hxx" +#include "ucpext_content.hxx" +#include "ucpext_datasupplier.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +#include <ucbhelper/resultset.hxx> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::ucb::XContentIdentifier; + using ::com::sun::star::ucb::OpenCommandArgument2; + using ::com::sun::star::ucb::XCommandEnvironment; + /** === end UNO using === **/ + + //================================================================================================================== + //= ResultSet + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + ResultSet::ResultSet( const Reference< XMultiServiceFactory >& i_rORB, const ::rtl::Reference< Content >& i_rContent, + const OpenCommandArgument2& i_rCommand, const Reference< XCommandEnvironment >& i_rEnv ) + :ResultSetImplHelper( i_rORB, i_rCommand ) + ,m_xEnvironment( i_rEnv ) + ,m_xContent( i_rContent ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + void ResultSet::initStatic() + { + ::rtl::Reference< DataSupplier > pDataSupplier( new DataSupplier( + m_xSMgr, + m_xContent, + m_aCommand.Mode + ) ); + m_xResultSet1 = new ::ucbhelper::ResultSet( + m_xSMgr, + m_aCommand.Properties, + pDataSupplier.get(), + m_xEnvironment + ); + pDataSupplier->fetchData(); + } + + //------------------------------------------------------------------------------------------------------------------ + void ResultSet::initDynamic() + { + initStatic(); + m_xResultSet2 = m_xResultSet1; + } + +//...................................................................................................................... +} } } // namespace ucp::ext +//...................................................................................................................... diff --git a/ucb/source/ucp/ext/ucpext_resultset.hxx b/ucb/source/ucp/ext/ucpext_resultset.hxx new file mode 100644 index 000000000000..2924197a0fdc --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_resultset.hxx @@ -0,0 +1,66 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef UCB_UCPEXT_RESULT_SET_HXX +#define UCB_UCPEXT_RESULT_SET_HXX + +#include <rtl/ref.hxx> +#include <ucbhelper/resultsethelper.hxx> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + class Content; + + //================================================================================================================== + //= ResultSet + //================================================================================================================== + class ResultSet : public ::ucbhelper::ResultSetImplHelper + { + public: + ResultSet( + const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& i_rORB, + const rtl::Reference< Content >& i_rContent, + const com::sun::star::ucb::OpenCommandArgument2& i_rCommand, + const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& i_rEnv + ); + + private: + ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > m_xEnvironment; + ::rtl::Reference< Content > m_xContent; + + private: + virtual void initStatic(); + virtual void initDynamic(); + }; + +//...................................................................................................................... +} } } // namespace ucp::ext +//...................................................................................................................... + +#endif // UCB_UCPEXT_RESULT_SET_HXX diff --git a/ucb/source/ucp/ext/ucpext_services.cxx b/ucb/source/ucp/ext/ucpext_services.cxx new file mode 100644 index 000000000000..8daa33f5cf8c --- /dev/null +++ b/ucb/source/ucp/ext/ucpext_services.cxx @@ -0,0 +1,93 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#include "precompiled_ucb.hxx" + +#include "ucpext_provider.hxx" + +/** === begin UNO includes === **/ +/** === end UNO includes === **/ + +#include <cppuhelper/implementationentry.hxx> + +//...................................................................................................................... +namespace ucb { namespace ucp { namespace ext +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::lang::XSingleComponentFactory; + /** === end UNO using === **/ + + //================================================================================================================== + //= descriptors for the services implemented in this component + //================================================================================================================== + static struct ::cppu::ImplementationEntry s_aServiceEntries[] = + { + { + ContentProvider::Create, + ContentProvider::getImplementationName_static, + ContentProvider::getSupportedServiceNames_static, + ::cppu::createOneInstanceComponentFactory, NULL, 0 + }, + { 0, 0, 0, 0, 0, 0 } + }; + +//...................................................................................................................... +} } } // namespace ucb::ucp::ext +//...................................................................................................................... + +extern "C" +{ + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) + { + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; + } + + //------------------------------------------------------------------------------------------------------------------ + sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey ) + { + return ::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, ::ucb::ucp::ext::s_aServiceEntries ); + } + + //------------------------------------------------------------------------------------------------------------------ + void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) + { + return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::ucb::ucp::ext::s_aServiceEntries ); + } +} diff --git a/ucb/source/ucp/webdav/DAVAuthListener.hxx b/ucb/source/ucp/webdav/DAVAuthListener.hxx index c092f9fd311f..71bed1c0a14d 100644 --- a/ucb/source/ucp/webdav/DAVAuthListener.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListener.hxx @@ -30,9 +30,7 @@ #include <salhelper/simplereferenceobject.hxx> #include <rtl/ustring.hxx> -#ifndef _COM_SUN_STAR_UCB_XREFERENCE_HPP_ #include <com/sun/star/uno/XReference.hpp> -#endif #include <com/sun/star/ucb/XCommandEnvironment.hpp> namespace webdav_ucp @@ -46,7 +44,6 @@ class DAVAuthListener : public salhelper::SimpleReferenceObject const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ) = 0; }; diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index 3d03cc63952b..c0c9968613af 100644 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx @@ -61,7 +61,6 @@ namespace webdav_ucp const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ); private: diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 4ffc8dd88cf5..872d45405735 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -57,7 +57,6 @@ int DAVAuthListener_Impl::authenticate( const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ) { if ( m_xEnv.is() ) @@ -79,7 +78,8 @@ int DAVAuthListener_Impl::authenticate( = new ucbhelper::SimpleAuthenticationRequest( m_aURL, inHostName, inRealm, inoutUserName, outPassWord, ::rtl::OUString(), - bAllowPersistentStoring, bCanUseSystemCredentials ); + true /*bAllowPersistentStoring*/, + bCanUseSystemCredentials ); xIH->handle( xRequest.get() ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 8fc1730ba018..254fae546940 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -60,7 +60,6 @@ #include <com/sun/star/security/CertificateContainerStatus.hpp> #include <com/sun/star/security/CertificateContainer.hpp> #include <com/sun/star/security/XCertificateContainer.hpp> -#include <com/sun/star/task/XMasterPasswordHandling.hpp> #include <com/sun/star/ucb/Lock.hpp> #include <com/sun/star/xml/crypto/XSEInitializer.hpp> @@ -330,31 +329,11 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, ( ne_strcasecmp( inAuthProtocol, "Negotiate" ) == 0 ) ); #endif - // #i97003# (tkr): Ask XMasterPasswordHandling if we should store the - // credentials persistently and give this information to the auth listener - uno::Reference< task::XMasterPasswordHandling > xMasterPasswordHandling; - try - { - xMasterPasswordHandling = - uno::Reference< task::XMasterPasswordHandling >( - theSession->getMSF()->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.task.PasswordContainer" ) ), - uno::UNO_QUERY ); - } - catch ( uno::Exception const & ) - { - } - int theRetVal = pListener->authenticate( rtl::OUString::createFromAscii( inRealm ), theSession->getHostName(), theUserName, thePassWord, - xMasterPasswordHandling.is() - ? xMasterPasswordHandling-> - isPersistentStoringAllowed() - : sal_False, bCanUseSystemCreds); rtl::OString aUser( diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index f31397f1ef92..4183b852735e 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -67,10 +67,9 @@ executeLoginDialog( { vos::OGuard aGuard(Application::GetSolarMutex()); - bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) - != 0; - bool bSavePassword = rInfo.GetIsPersistentPassword() - || rInfo.GetIsSavePassword(); + bool bAccount + = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0; + bool bSavePassword = rInfo.GetCanRememberPassword(); bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials(); sal_uInt16 nFlags = 0; @@ -109,12 +108,13 @@ executeLoginDialog( if (bSavePassword) { - xDialog-> - SetSavePasswordText(ResId(rInfo.GetIsPersistentPassword() ? - RID_SAVE_PASSWORD : - RID_KEEP_PASSWORD, - *xManager.get())); - xDialog->SetSavePassword(rInfo.GetIsSavePassword()); + xDialog->SetSavePasswordText( + ResId(rInfo.GetIsRememberPersistent() + ? RID_SAVE_PASSWORD + : RID_KEEP_PASSWORD, + *xManager.get())); + + xDialog->SetSavePassword(rInfo.GetIsRememberPassword()); } if ( bCanUseSysCreds ) @@ -126,7 +126,7 @@ executeLoginDialog( rInfo.SetUserName(xDialog->GetName()); rInfo.SetPassword(xDialog->GetPassword()); rInfo.SetAccount(xDialog->GetAccount()); - rInfo.SetSavePassword(xDialog->IsSavePassword()); + rInfo.SetIsRememberPassword(xDialog->IsSavePassword()); if ( bCanUseSysCreds ) rInfo.SetIsUseSystemCredentials( xDialog->IsUseSystemCredentials() ); @@ -139,6 +139,60 @@ executeLoginDialog( } } +void getRememberModes( + uno::Sequence< ucb::RememberAuthentication > const & rRememberModes, + ucb::RememberAuthentication & rPreferredMode, + ucb::RememberAuthentication & rAlternateMode ) +{ + sal_Int32 nCount = rRememberModes.getLength(); + OSL_ENSURE( (nCount > 0) && (nCount < 4), + "ucb::RememberAuthentication sequence size mismatch!" ); + if ( nCount == 1 ) + { + rPreferredMode = rAlternateMode = rRememberModes[ 0 ]; + return; + } + else + { + //bool bHasRememberModeNo = false; + bool bHasRememberModeSession = false; + bool bHasRememberModePersistent = false; + + for (sal_Int32 i = 0; i < nCount; ++i) + { + switch ( rRememberModes[i] ) + { + case ucb::RememberAuthentication_NO: + //bHasRememberModeNo = true; + break; + case ucb::RememberAuthentication_SESSION: + bHasRememberModeSession = true; + break; + case ucb::RememberAuthentication_PERSISTENT: + bHasRememberModePersistent = true; + break; + default: + OSL_TRACE( "Unsupported RememberAuthentication value" ); + break; + } + } + + if (bHasRememberModePersistent) + { + rPreferredMode = ucb::RememberAuthentication_PERSISTENT; + if (bHasRememberModeSession) + rAlternateMode = ucb::RememberAuthentication_SESSION; + else + rAlternateMode = ucb::RememberAuthentication_NO; + } + else + { + rPreferredMode = ucb::RememberAuthentication_SESSION; + rAlternateMode = ucb::RememberAuthentication_NO; + } + } +} + void handleAuthenticationRequest_( Window * pParent, @@ -161,7 +215,7 @@ handleAuthenticationRequest_( xSupplyAuthentication2.set(xSupplyAuthentication, uno::UNO_QUERY); ////////////////////////// - // First, try to obatin credentials from password container service. + // First, try to obtain credentials from password container service. uui::PasswordContainerHelper aPwContainerHelper(xServiceFactory); if (aPwContainerHelper.handleAuthenticationRequest(rRequest, xSupplyAuthentication, @@ -174,26 +228,20 @@ handleAuthenticationRequest_( ////////////////////////// // Second, try to obtain credentials from user via password dialog. - bool bRemember; - bool bRememberPersistent; + ucb::RememberAuthentication eDefaultRememberMode + = ucb::RememberAuthentication_SESSION; + ucb::RememberAuthentication ePreferredRememberMode + = eDefaultRememberMode; + ucb::RememberAuthentication eAlternateRememberMode + = ucb::RememberAuthentication_NO; + if (xSupplyAuthentication.is()) { - ucb::RememberAuthentication eDefault; - uno::Sequence< ucb::RememberAuthentication > - aModes(xSupplyAuthentication->getRememberPasswordModes(eDefault)); - bRemember = eDefault != ucb::RememberAuthentication_NO; - bRememberPersistent = false; - for (sal_Int32 i = 0; i < aModes.getLength(); ++i) - if (aModes[i] == ucb::RememberAuthentication_PERSISTENT) - { - bRememberPersistent = true; - break; - } - } - else - { - bRemember = false; - bRememberPersistent = false; + getRememberModes( + xSupplyAuthentication->getRememberPasswordModes( + eDefaultRememberMode), + ePreferredRememberMode, + eAlternateRememberMode); } sal_Bool bCanUseSystemCredentials; @@ -220,8 +268,14 @@ handleAuthenticationRequest_( if (rRequest.HasPassword) aInfo.SetPassword(rRequest.Password); aInfo.SetErrorText(rRequest.Diagnostic); - aInfo.SetPersistentPassword(bRememberPersistent); - aInfo.SetSavePassword(bRemember); + + aInfo.SetCanRememberPassword( + ePreferredRememberMode != eAlternateRememberMode); + aInfo.SetIsRememberPassword( + eDefaultRememberMode != ucb::RememberAuthentication_NO); + aInfo.SetIsRememberPersistent( + ePreferredRememberMode == ucb::RememberAuthentication_PERSISTENT); + aInfo.SetCanUseSystemCredentials(bCanUseSystemCredentials); aInfo.SetIsUseSystemCredentials( bDefaultUseSystemCredentials ); aInfo.SetModifyAccount(rRequest.HasAccount @@ -242,13 +296,24 @@ handleAuthenticationRequest_( xSupplyAuthentication->setUserName(aInfo.GetUserName()); if (xSupplyAuthentication->canSetPassword()) xSupplyAuthentication->setPassword(aInfo.GetPassword()); - xSupplyAuthentication-> - setRememberPassword( - aInfo.GetIsSavePassword() ? - bRememberPersistent ? - ucb::RememberAuthentication_PERSISTENT : - ucb::RememberAuthentication_SESSION : - ucb::RememberAuthentication_NO); + + if (ePreferredRememberMode != eAlternateRememberMode) + { + // user had te choice. + if (aInfo.GetIsRememberPassword()) + xSupplyAuthentication->setRememberPassword( + ePreferredRememberMode); + else + xSupplyAuthentication->setRememberPassword( + eAlternateRememberMode); + } + else + { + // user had no choice. + xSupplyAuthentication->setRememberPassword( + ePreferredRememberMode); + } + if (rRequest.HasRealm) { if (xSupplyAuthentication->canSetRealm()) @@ -267,38 +332,76 @@ handleAuthenticationRequest_( ////////////////////////// // Third, store credentials in password container. - if ( aInfo.GetIsUseSystemCredentials() ) - { - if (aInfo.GetIsSavePassword()) - { - aPwContainerHelper.addRecord( - rURL.getLength() ? rURL : rRequest.ServerName, - rtl::OUString(), // empty u/p -> sys creds - uno::Sequence< rtl::OUString >(), - xIH, - bRememberPersistent); - } - } - // Empty user name can not be valid: - else if (aInfo.GetUserName().Len() != 0) - { - if (aInfo.GetIsSavePassword()) - { - uno::Sequence< rtl::OUString > - aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2); - aPassList[0] = aInfo.GetPassword(); - if (aInfo.GetAccount().Len() != 0) - aPassList[1] = aInfo.GetAccount(); - - aPwContainerHelper.addRecord( - rURL.getLength() ? rURL : rRequest.ServerName, - aInfo.GetUserName(), - aPassList, - xIH, - bRememberPersistent); - } - } - break; + if ( aInfo.GetIsUseSystemCredentials() ) + { + if (aInfo.GetIsRememberPassword()) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + rtl::OUString(), // empty u/p -> sys creds + uno::Sequence< rtl::OUString >(), + xIH, + ePreferredRememberMode + == ucb::RememberAuthentication_PERSISTENT)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + else if (eAlternateRememberMode + == ucb::RememberAuthentication_SESSION) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + rtl::OUString(), // empty u/p -> sys creds + uno::Sequence< rtl::OUString >(), + xIH, + false /* SESSION */)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + } + // Empty user name can not be valid: + else if (aInfo.GetUserName().Len() != 0) + { + uno::Sequence< rtl::OUString > + aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2); + aPassList[0] = aInfo.GetPassword(); + if (aInfo.GetAccount().Len() != 0) + aPassList[1] = aInfo.GetAccount(); + + if (aInfo.GetIsRememberPassword()) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + aInfo.GetUserName(), + aPassList, + xIH, + ePreferredRememberMode + == ucb::RememberAuthentication_PERSISTENT)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + else if (eAlternateRememberMode + == ucb::RememberAuthentication_SESSION) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + aInfo.GetUserName(), + aPassList, + xIH, + false /* SESSION */)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + } + break; case ERRCODE_BUTTON_RETRY: if (xRetry.is()) diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index d37376abdd00..3176171c4865 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -37,7 +37,7 @@ #include "com/sun/star/task/XInteractionRetry.hpp" #include "tools/errinf.hxx" // ErrorHandler, ErrorContext, ... -#include "svl/svtools.hrc" // RID_ERRHDL +#include "svtools/svtools.hrc" // RID_ERRHDL #include "ids.hrc" #include "getcontinuations.hxx" diff --git a/uui/source/loginerr.hxx b/uui/source/loginerr.hxx index c8cbba96564b..39e5b81caf85 100644 --- a/uui/source/loginerr.hxx +++ b/uui/source/loginerr.hxx @@ -32,12 +32,13 @@ //========================================================================= -#define LOGINERROR_FLAG_SET_SAVE_PASSWORD 1 -#define LOGINERROR_FLAG_MODIFY_ACCOUNT 2 -#define LOGINERROR_FLAG_MODIFY_USER_NAME 4 -#define LOGINERROR_FLAG_PERSISTENT_PASSWORD 8 -#define LOGINERROR_FLAG_CAN_USE_SYSCREDS 16 -#define LOGINERROR_FLAG_IS_USE_SYSCREDS 32 +#define LOGINERROR_FLAG_MODIFY_ACCOUNT 1 +#define LOGINERROR_FLAG_MODIFY_USER_NAME 2 +#define LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD 4 +#define LOGINERROR_FLAG_IS_REMEMBER_PASSWORD 8 +#define LOGINERROR_FLAG_CAN_USE_SYSCREDS 16 +#define LOGINERROR_FLAG_IS_USE_SYSCREDS 32 +#define LOGINERROR_FLAG_REMEMBER_PERSISTENT 64 class LoginErrorInfo { @@ -56,27 +57,30 @@ public: LoginErrorInfo() : _nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ), _nRet( ERRCODE_BUTTON_CANCEL ) - { - } + {} const String& GetTitle() const { return _aTitle; } - const String& GetServer() const { return _aServer; } + const String& GetServer() const { return _aServer; } const String& GetAccount() const { return _aAccount; } const String& GetUserName() const { return _aUserName; } const String& GetPassword() const { return _aPassword; } const String& GetPath() const { return _aPath; } const String& GetErrorText() const { return _aErrorText; } - BOOL GetIsPersistentPassword() const - { return ( _nFlags & LOGINERROR_FLAG_PERSISTENT_PASSWORD ); } - BOOL GetIsSavePassword() const - { return ( _nFlags & LOGINERROR_FLAG_SET_SAVE_PASSWORD ); } + + BOOL GetCanRememberPassword() const + { return ( _nFlags & LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD ); } + BOOL GetIsRememberPersistent() const + { return ( _nFlags & LOGINERROR_FLAG_REMEMBER_PERSISTENT ); } + BOOL GetIsRememberPassword() const + { return ( _nFlags & LOGINERROR_FLAG_IS_REMEMBER_PASSWORD ); } + BOOL GetCanUseSystemCredentials() const { return ( _nFlags & LOGINERROR_FLAG_CAN_USE_SYSCREDS ); } BOOL GetIsUseSystemCredentials() const { return ( _nFlags & LOGINERROR_FLAG_IS_USE_SYSCREDS ) == LOGINERROR_FLAG_IS_USE_SYSCREDS; } - BYTE GetFlags() const { return _nFlags; } - USHORT GetResult() const { return _nRet; } + BYTE GetFlags() const { return _nFlags; } + USHORT GetResult() const { return _nRet; } void SetTitle( const String& aTitle ) { _aTitle = aTitle; } @@ -94,8 +98,11 @@ public: { _aErrorText = aErrorText; } void SetFlags( BYTE nFlags ) { _nFlags = nFlags; } - inline void SetSavePassword( BOOL bSet ); - inline void SetPersistentPassword( BOOL bSet ); + + inline void SetCanRememberPassword( BOOL bSet ); + inline void SetIsRememberPassword( BOOL bSet ); + inline void SetIsRememberPersistent( BOOL bSet ); + inline void SetCanUseSystemCredentials( BOOL bSet ); inline void SetIsUseSystemCredentials( BOOL bSet ); inline void SetModifyAccount( BOOL bSet ); @@ -104,20 +111,28 @@ public: { _nRet = nRet; } }; -inline void LoginErrorInfo::SetSavePassword( BOOL bSet ) +inline void LoginErrorInfo::SetCanRememberPassword( BOOL bSet ) +{ + if ( bSet ) + _nFlags |= LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD; + else + _nFlags &= ~LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD; +} + +inline void LoginErrorInfo::SetIsRememberPassword( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_SET_SAVE_PASSWORD; + _nFlags |= LOGINERROR_FLAG_IS_REMEMBER_PASSWORD; else - _nFlags &= ~LOGINERROR_FLAG_SET_SAVE_PASSWORD; + _nFlags &= ~LOGINERROR_FLAG_IS_REMEMBER_PASSWORD; } -inline void LoginErrorInfo::SetPersistentPassword( BOOL bSet ) +inline void LoginErrorInfo::SetIsRememberPersistent( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_PERSISTENT_PASSWORD; + _nFlags |= LOGINERROR_FLAG_REMEMBER_PERSISTENT; else - _nFlags &= ~LOGINERROR_FLAG_PERSISTENT_PASSWORD; + _nFlags &= ~LOGINERROR_FLAG_REMEMBER_PERSISTENT; } inline void LoginErrorInfo::SetCanUseSystemCredentials( BOOL bSet ) diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index 26d22b320d8a..0a056289c29d 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -30,6 +30,7 @@ #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/task/NoMasterException.hpp" #include "com/sun/star/task/XInteractionHandler.hpp" +#include "com/sun/star/task/XMasterPasswordHandling.hpp" #include "com/sun/star/task/XPasswordContainer.hpp" #include "com/sun/star/task/XUrlContainer.hpp" #include "com/sun/star/ucb/AuthenticationRequest.hpp" @@ -271,10 +272,20 @@ bool PasswordContainerHelper::addRecord( return false; if ( bPersist ) + { + uno::Reference< task::XMasterPasswordHandling > xMPH( + m_xPasswordContainer, uno::UNO_QUERY_THROW ); + + // If persistent storing of passwords is not yet + // allowed, enable it. + if ( !xMPH->isPersistentStoringAllowed() ) + xMPH->allowPersistentStoring( sal_True ); + m_xPasswordContainer->addPersistent( rURL, rUsername, rPasswords, xIH ); + } else m_xPasswordContainer->add( rURL, rUsername, @@ -429,7 +440,7 @@ PasswordContainerInteractionHandler::handle( // @@@ FIXME: this not able to // handle master pw request! // master pw request is never - // solvabe without UI! + // solvable without UI! this ) ) { // successfully handled diff --git a/xmlhelp/prj/d.lst b/xmlhelp/prj/d.lst index 5f208e51c20f..1cfa107f73b9 100644 --- a/xmlhelp/prj/d.lst +++ b/xmlhelp/prj/d.lst @@ -4,6 +4,4 @@ ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.* ..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.* ..\util\ucpchelp.xml %_DEST%\xml%_EXT%\ucpchelp.xml -..\inc\xmlhelp\compilehelp.hxx %_DEST%\inc%_EXT%\xmlhelp\compilehelp.hxx -..\inc\xmlhelp\helplinkerdllapi.h %_DEST%\inc%_EXT%\xmlhelp\helplinkerdllapi.h -..\%__SRC%\lib\ihelplinker.lib %_DEST%\lib%_EXT%\ihelplinker.lib
\ No newline at end of file +..\%__SRC%\lib\ihelplinker.lib %_DEST%\lib%_EXT%\ihelplinker.lib diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx index d6227754a5f2..49a471a31729 100644 --- a/xmloff/inc/SchXMLExport.hxx +++ b/xmloff/inc/SchXMLExport.hxx @@ -81,7 +81,7 @@ public: void SetProgress( sal_Int32 nPercentage ); - UniReference< XMLPropertySetMapper > GetPropertySetMapper() const { return maExportHelper.GetPropertySetMapper(); } + UniReference< XMLPropertySetMapper > GetPropertySetMapper() const; // XServiceInfo ( : SvXMLExport ) virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 858371a1805b..7168b2b811a8 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -69,6 +69,8 @@ enum SchXMLChartElemTokenMap enum SchXMLPlotAreaElemTokenMap { + XML_TOK_PA_COORDINATE_REGION_EXT, + XML_TOK_PA_COORDINATE_REGION, XML_TOK_PA_AXIS, XML_TOK_PA_SERIES, XML_TOK_PA_WALL, diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx index 49c484a1ab17..e7891b36ef17 100644 --- a/xmloff/inc/xmlnmspe.hxx +++ b/xmloff/inc/xmlnmspe.hxx @@ -87,8 +87,9 @@ const sal_uInt16 XML_NAMESPACE_##prefix##_EXT_IDX = key; XML_NAMESPACE_EXT( OFFICE, 37U ) XML_NAMESPACE_EXT( TABLE, 38U ) +XML_NAMESPACE_EXT( CHART, 39U ) -#define _XML_OLD_NAMESPACE_BASE 39U +#define _XML_OLD_NAMESPACE_BASE 40U // namespaces used in the technical preview (SO 5.2) XML_OLD_NAMESPACE( FO, 0U ) diff --git a/xmloff/inc/xmloff/SchXMLExportHelper.hxx b/xmloff/inc/xmloff/SchXMLExportHelper.hxx index 64f579a7c252..bf60d44d63fd 100644 --- a/xmloff/inc/xmloff/SchXMLExportHelper.hxx +++ b/xmloff/inc/xmloff/SchXMLExportHelper.hxx @@ -40,41 +40,9 @@ #include <queue> #include <vector> -namespace com { namespace sun { namespace star { - namespace chart { - class XDiagram; - class XChartDocument; - struct ChartSeriesAddress; - } - namespace chart2 { - class XDiagram; - class XChartDocument; - class XDataSeries; - namespace data - { - class XDataProvider; - class XDataSequence; - } - } - namespace drawing { - class XShape; - class XShapes; - } - namespace task { - class XStatusIndicator; - } - namespace frame { - class XModel; - } - namespace xml { - namespace sax { - class XAttributeList; -}}}}} - class SvXMLAutoStylePoolP; -class XMLChartExportPropertyMapper; class SvXMLExport; -class XMLPropertyHandlerFactory; +class SchXMLExportHelper_Impl; /** With this class you can export a <chart:chart> element containing its data as <table:table> element or without internal table. In @@ -84,153 +52,22 @@ class XMLPropertyHandlerFactory; class XMLOFF_DLLPUBLIC SchXMLExportHelper : public UniRefBase { public: - // first: data sequence for label, second: data sequence for values. - typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >, - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tLabelValuesDataPair; - typedef ::std::vector< tLabelValuesDataPair > tDataSequenceCont; - -private: - SvXMLExport& mrExport; - SvXMLAutoStylePoolP& mrAutoStylePool; - UniReference< XMLPropertyHandlerFactory > mxPropertyHandlerFactory; - UniReference< XMLPropertySetMapper > mxPropertySetMapper; - UniReference< XMLChartExportPropertyMapper > mxExpPropMapper; - - rtl::OUString msTableName; - rtl::OUStringBuffer msStringBuffer; - rtl::OUString msString; - - // members filled by InitRangeSegmentationProperties (retrieved from DataProvider) - sal_Bool mbHasSeriesLabels; - sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false - sal_Bool mbRowSourceColumns; - rtl::OUString msChartAddress; - rtl::OUString msTableNumberList; - ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping; - - rtl::OUString msCLSID; - - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes; - - tDataSequenceCont m_aDataSequencesToExport; - rtl::OUString maCategoriesRange; - - /** first parseDocument: collect autostyles and store names in this queue - second parseDocument: export content and use names from this queue - */ - ::std::queue< ::rtl::OUString > maAutoStyleNameQueue; - SAL_DLLPRIVATE void CollectAutoStyle( - const std::vector< XMLPropertyState >& aStates ); - SAL_DLLPRIVATE void AddAutoStyleAttribute( - const std::vector< XMLPropertyState >& aStates ); - - SAL_DLLPRIVATE SvXMLAutoStylePoolP& GetAutoStylePoolP() - { return mrAutoStylePool; } - - /// if bExportContent is false the auto-styles are collected - SAL_DLLPRIVATE void parseDocument( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument >& rChartDoc, - sal_Bool bExportContent, - sal_Bool bIncludeTable = sal_False ); - SAL_DLLPRIVATE void exportTable(); - SAL_DLLPRIVATE void exportPlotArea( - com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram, - com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > xNewDiagram, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent, - sal_Bool bIncludeTable ); - SAL_DLLPRIVATE void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram, - const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, - sal_Bool bExportContent ); - - SAL_DLLPRIVATE void exportSeries( - const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent, - sal_Bool bHasTwoYAxes ); - SAL_DLLPRIVATE void exportCandleStickSeries( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq, - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > & xDiagram, - sal_Bool bJapaneseCandleSticks, - sal_Bool bExportContent ); - SAL_DLLPRIVATE void exportDataPoints( - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & xSeriesProperties, - sal_Int32 nSeriesLength, - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > & xDiagram, - sal_Bool bExportContent ); - SAL_DLLPRIVATE void exportRegressionCurve( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDataSeries > & xSeries, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & xSeriesProp, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent ); - - /// add svg position as attribute for current element - SAL_DLLPRIVATE void addPosition( const ::com::sun::star::awt::Point & rPosition ); - SAL_DLLPRIVATE void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); - /// add svg size as attribute for current element - SAL_DLLPRIVATE void addSize( const ::com::sun::star::awt::Size & rSize ); - SAL_DLLPRIVATE void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); - /// fills the member msString with the appropriate String (i.e. "A3") - SAL_DLLPRIVATE void getCellAddress( sal_Int32 nCol, sal_Int32 nRow ); - /// exports a string as a paragraph element - SAL_DLLPRIVATE void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false ); - SAL_DLLPRIVATE void exportErrorBarRanges(); - - SAL_DLLPRIVATE SchXMLExportHelper(SchXMLExportHelper &); // not defined - SAL_DLLPRIVATE void operator =(SchXMLExportHelper &); // not defined - -public: SchXMLExportHelper( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ); virtual ~SchXMLExportHelper(); - // auto-styles - /// parse chart and collect all auto-styles used in current pool - void collectAutoStyles( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument > rChartDoc ); - /// write the styles collected into the current pool as <style:style> elements - void exportAutoStyles(); - - /** export the <chart:chart> element corresponding to rChartDoc - if bIncludeTable is true, the chart data is exported as <table:table> - element (inside the chart element). - - Otherwise the external references stored in the chart document are used - for writing the corresponding attributes at series - - All attributes contained in xAttrList are written at the chart element, - which ist the outer element of a chart. So these attributes can easily - be parsed again by the container - */ - void exportChart( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument > rChartDoc, - sal_Bool bIncludeTable ); - /// returns the string corresponding to the current FileFormat CLSID for Chart const rtl::OUString& getChartCLSID(); - UniReference< XMLPropertySetMapper > GetPropertySetMapper() const { return mxPropertySetMapper; } - - void SetChartRangeAddress( const ::rtl::OUString& rAddress ) - { msChartAddress = rAddress; } - void SetTableNumberList( const ::rtl::OUString& rList ) - { msTableNumberList = rList; } - - void InitRangeSegmentationProperties( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument > & xChartDoc ); +private: + SchXMLExportHelper(); // not defined + SchXMLExportHelper(SchXMLExportHelper &); // not defined + void operator =(SchXMLExportHelper &); // not defined - ::com::sun::star::awt::Size getPageSize( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument > & xChartDoc ) const; +private: + SchXMLExportHelper_Impl* m_pImpl; + friend class SchXMLExport; }; #endif // _XMLOFF_SCH_XMLEXPORTHELPER_HXX_ diff --git a/xmloff/inc/xmloff/shapeexport.hxx b/xmloff/inc/xmloff/shapeexport.hxx index 1b30658ef89c..b12f93f0b8b2 100644 --- a/xmloff/inc/xmloff/shapeexport.hxx +++ b/xmloff/inc/xmloff/shapeexport.hxx @@ -111,7 +111,8 @@ enum XmlShapeType XmlShapeTypePresPageShape, // "com.sun.star.presentation.PageShape" XmlShapeTypePresOLE2Shape, // "com.sun.star.presentation.OLE2Shape" XmlShapeTypePresChartShape, // "com.sun.star.presentation.ChartShape" - XmlShapeTypePresSheetShape, // "com.sun.star.presentation.OLE2Shape" + XmlShapeTypePresSheetShape, // "com.sun.star.presentation.CalcShape" + XmlShapeTypePresTableShape, // "com.sun.star.presentation.TableShape" XmlShapeTypePresOrgChartShape, // "com.sun.star.presentation.OrgChartShape" XmlShapeTypePresNotesShape, // "com.sun.star.presentation.NotesShape" XmlShapeTypeHandoutShape, // "com.sun.star.presentation.HandoutShape" @@ -121,8 +122,9 @@ enum XmlShapeType XmlShapeTypePresSlideNumberShape, // "com.sun.star.presentation.SlideNumberShape" XmlShapeTypePresDateTimeShape, // "com.sun.star.presentation.DateTimeShape" - XmlShapeTypeDrawCustomShape, // "com.sun.star.draw.CustomShape" - XmlShapeTypeDrawMediaShape, // "com.sun.star.draw.MediaShape" + XmlShapeTypeDrawCustomShape, // "com.sun.star.drawing.CustomShape" + XmlShapeTypeDrawMediaShape, // "com.sun.star.drawing.MediaShape" + XmlShapeTypePresMediaShape, // "com.sun.star.presentation.MediaShape" XmlShapeTypeDrawTableShape, // "com.sun.star.drawing.TableShape" diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 82dc69e59ee3..06b057a3e91d 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3095,6 +3095,11 @@ namespace xmloff { namespace token { XML_ENDS_WITH, XML_DOES_NOT_END_WITH, + //chart + XML_NP_CHART_EXT, + XML_N_CHART_EXT, + XML_COORDINATE_REGION, + XML_TOKEN_END }; diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index aa61a2449680..c73533f4e4e8 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -1,26 +1,26 @@ --o xmloff.Chart.XMLContentExporter --o xmloff.Chart.XMLContentImporter --o xmloff.Chart.XMLExporter --o xmloff.Chart.XMLImporter --o xmloff.Chart.XMLStylesExporter --o xmloff.Chart.XMLStylesImporter +#111102# -o xmloff.Chart.XMLContentExporter +#111102# -o xmloff.Chart.XMLContentImporter +#111102# -o xmloff.Chart.XMLExporter +#111102# -o xmloff.Chart.XMLImporter +#111102# -o xmloff.Chart.XMLStylesExporter +#111102# -o xmloff.Chart.XMLStylesImporter -o xmloff.Draw.XMLContentExporter -o xmloff.Draw.XMLContentImporter -o xmloff.Draw.XMLExporter -o xmloff.Draw.XMLImporter -o xmloff.Draw.XMLMetaExporter --o xmloff.Draw.XMLMetaImporter --o xmloff.Draw.XMLSettingsExporter --o xmloff.Draw.XMLSettingsImporter +#i111200 -o xmloff.Draw.XMLMetaImporter +#i111287 -o xmloff.Draw.XMLSettingsExporter +#i111287 -o xmloff.Draw.XMLSettingsImporter #i87695 -o xmloff.Draw.XMLStylesExporter -o xmloff.Draw.XMLStylesImporter --o xmloff.Impress.XMLContentExporter +#i111224 -o xmloff.Impress.XMLContentExporter -o xmloff.Impress.XMLContentImporter -o xmloff.Impress.XMLExporter --o xmloff.Impress.XMLImporter +#i111111# -o xmloff.Impress.XMLImporter -o xmloff.Impress.XMLMetaExporter -o xmloff.Impress.XMLMetaImporter --o xmloff.Impress.XMLSettingsExporter --o xmloff.Impress.XMLSettingsImporter +#i111287 -o xmloff.Impress.XMLSettingsExporter +#i111287 -o xmloff.Impress.XMLSettingsImporter #i87695 -o xmloff.Impress.XMLStylesExporter -o xmloff.Impress.XMLStylesImporter diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index ccc400305044..c4abc4172959 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -76,6 +76,7 @@ #include <com/sun/star/chart/X3DDisplay.hpp> #include <com/sun/star/chart/XStatisticDisplay.hpp> #include <com/sun/star/chart/XSecondAxisTitleSupplier.hpp> +#include <com/sun/star/chart/XDiagramPositioning.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XDiagram.hpp> @@ -116,6 +117,161 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; using ::std::vector; +// ======================================== +// class SchXMLExportHelper_Impl +// ======================================== + +class SchXMLExportHelper_Impl +{ +public: + // first: data sequence for label, second: data sequence for values. + typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >, + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tLabelValuesDataPair; + typedef ::std::vector< tLabelValuesDataPair > tDataSequenceCont; + +public: + SchXMLExportHelper_Impl( SvXMLExport& rExport, + SvXMLAutoStylePoolP& rASPool ); + + virtual ~SchXMLExportHelper_Impl(); + + // auto-styles + /// parse chart and collect all auto-styles used in current pool + void collectAutoStyles( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument > rChartDoc ); + + /// write the styles collected into the current pool as <style:style> elements + void exportAutoStyles(); + + /** export the <chart:chart> element corresponding to rChartDoc + if bIncludeTable is true, the chart data is exported as <table:table> + element (inside the chart element). + + Otherwise the external references stored in the chart document are used + for writing the corresponding attributes at series + + All attributes contained in xAttrList are written at the chart element, + which ist the outer element of a chart. So these attributes can easily + be parsed again by the container + */ + void exportChart( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument > rChartDoc, + sal_Bool bIncludeTable ); + + UniReference< XMLPropertySetMapper > GetPropertySetMapper() const; + + void SetChartRangeAddress( const ::rtl::OUString& rAddress ) + { msChartAddress = rAddress; } + void SetTableNumberList( const ::rtl::OUString& rList ) + { msTableNumberList = rList; } + + void InitRangeSegmentationProperties( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartDocument > & xChartDoc ); + + ::com::sun::star::awt::Size getPageSize( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartDocument > & xChartDoc ) const; + + /** first parseDocument: collect autostyles and store names in this queue + second parseDocument: export content and use names from this queue + */ + ::std::queue< ::rtl::OUString > maAutoStyleNameQueue; + void CollectAutoStyle( + const std::vector< XMLPropertyState >& aStates ); + void AddAutoStyleAttribute( + const std::vector< XMLPropertyState >& aStates ); + + SvXMLAutoStylePoolP& GetAutoStylePoolP() + { return mrAutoStylePool; } + + /// if bExportContent is false the auto-styles are collected + void parseDocument( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument >& rChartDoc, + sal_Bool bExportContent, + sal_Bool bIncludeTable = sal_False ); + void exportTable(); + void exportPlotArea( + com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram, + com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > xNewDiagram, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent, + sal_Bool bIncludeTable ); + void exportCoordinateRegion( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram ); + void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram, + const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, + sal_Bool bExportContent ); + + void exportSeries( + const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent, + sal_Bool bHasTwoYAxes ); + void exportCandleStickSeries( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDiagram > & xDiagram, + sal_Bool bJapaneseCandleSticks, + sal_Bool bExportContent ); + void exportDataPoints( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & xSeriesProperties, + sal_Int32 nSeriesLength, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDiagram > & xDiagram, + sal_Bool bExportContent ); + void exportRegressionCurve( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeries > & xSeries, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & xSeriesProp, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent ); + + /// add svg position as attribute for current element + void addPosition( const ::com::sun::star::awt::Point & rPosition ); + void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); + /// add svg size as attribute for current element + void addSize( const ::com::sun::star::awt::Size & rSize ); + void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); + /// fills the member msString with the appropriate String (i.e. "A3") + void getCellAddress( sal_Int32 nCol, sal_Int32 nRow ); + /// exports a string as a paragraph element + void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false ); + void exportErrorBarRanges(); + + SchXMLExportHelper_Impl(SchXMLExportHelper_Impl &); // not defined + void operator =(SchXMLExportHelper_Impl &); // not defined + +public: + SvXMLExport& mrExport; + SvXMLAutoStylePoolP& mrAutoStylePool; + UniReference< XMLPropertyHandlerFactory > mxPropertyHandlerFactory; + UniReference< XMLPropertySetMapper > mxPropertySetMapper; + UniReference< XMLChartExportPropertyMapper > mxExpPropMapper; + + rtl::OUString msTableName; + rtl::OUStringBuffer msStringBuffer; + rtl::OUString msString; + + // members filled by InitRangeSegmentationProperties (retrieved from DataProvider) + sal_Bool mbHasSeriesLabels; + sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false + sal_Bool mbRowSourceColumns; + rtl::OUString msChartAddress; + rtl::OUString msTableNumberList; + ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping; + + rtl::OUString msCLSID; + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes; + + tDataSequenceCont m_aDataSequencesToExport; + rtl::OUString maCategoriesRange; +}; + namespace { Reference< uno::XComponentContext > lcl_getComponentContext() @@ -354,7 +510,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole( const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aSeqCnt, const OUString & rRole, const Reference< chart2::XChartDocument > & xDoc, - SchXMLExportHelper::tDataSequenceCont & rOutSequencesToExport ) + SchXMLExportHelper_Impl::tDataSequenceCont & rOutSequencesToExport ) { tLabelAndValueRange aResult; @@ -371,7 +527,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole( aResult.second = lcl_ConvertRange( xValueSeq->getSourceRangeRepresentation(), xDoc ); if( xLabelSeq.is() || xValueSeq.is()) - rOutSequencesToExport.push_back( SchXMLExportHelper::tLabelValuesDataPair( xLabelSeq, xValueSeq )); + rOutSequencesToExport.push_back( SchXMLExportHelper_Impl::tLabelValuesDataPair( xLabelSeq, xValueSeq )); } return aResult; @@ -453,10 +609,10 @@ OUString lcl_getLabelString( const Reference< chart2::data::XDataSequence > & xL } sal_Int32 lcl_getMaxSequenceLength( - const SchXMLExportHelper::tDataSequenceCont & rContainer ) + const SchXMLExportHelper_Impl::tDataSequenceCont & rContainer ) { sal_Int32 nResult = 0; - for( SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( rContainer.begin()); + for( SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aIt( rContainer.begin()); aIt != rContainer.end(); ++aIt ) { if( aIt->second.is()) @@ -571,7 +727,7 @@ template< class T > }; -typedef ::std::map< sal_Int32, SchXMLExportHelper::tLabelValuesDataPair > +typedef ::std::map< sal_Int32, SchXMLExportHelper_Impl::tLabelValuesDataPair > lcl_DataSequenceMap; struct lcl_SequenceToMapElement : @@ -594,7 +750,7 @@ struct lcl_SequenceToMapElement : }; void lcl_ReorderInternalSequencesAccordingToTheirRangeName( - SchXMLExportHelper::tDataSequenceCont & rInOutSequences ) + SchXMLExportHelper_Impl::tDataSequenceCont & rInOutSequences ) { lcl_DataSequenceMap aIndexSequenceMap; ::std::transform( rInOutSequences.begin(), rInOutSequences.end(), @@ -611,7 +767,7 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName( // fill empty columns for( ; nIndex < aIt->first; ++nIndex ) rInOutSequences.push_back( - SchXMLExportHelper::tDataSequenceCont::value_type( 0, 0 )); + SchXMLExportHelper_Impl::tDataSequenceCont::value_type( 0, 0 )); OSL_ASSERT( nIndex == aIt->first ); rInOutSequences.push_back( aIt->second ); } @@ -619,7 +775,7 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName( lcl_TableData lcl_getDataForLocalTable( - const SchXMLExportHelper::tDataSequenceCont & aSequencesToExport, + const SchXMLExportHelper_Impl::tDataSequenceCont & aSequencesToExport, const Reference< chart::XComplexDescriptionAccess >& xComplexDescriptionAccess, const OUString& rCategoriesRange, bool bSeriesFromColumns, @@ -641,10 +797,10 @@ lcl_TableData lcl_getDataForLocalTable( aResult.aComplexRowDescriptions = xComplexDescriptionAccess->getComplexRowDescriptions(); } - SchXMLExportHelper::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); - SchXMLExportHelper::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); - SchXMLExportHelper::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); - SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin ); + SchXMLExportHelper_Impl::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aIt( aBegin ); size_t nMaxSequenceLength( lcl_getMaxSequenceLength( aSequencesToExport )); size_t nCategoriesLength( aSimpleCategories.getLength() ); @@ -832,7 +988,53 @@ struct SchXMLDataPointStruct // class SchXMLExportHelper // ======================================== -SchXMLExportHelper::SchXMLExportHelper( +SchXMLExportHelper::SchXMLExportHelper( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ) + : m_pImpl( new SchXMLExportHelper_Impl( rExport, rASPool ) ) +{ +} + +SchXMLExportHelper::~SchXMLExportHelper() +{ + delete m_pImpl; +} + +const OUString& SchXMLExportHelper::getChartCLSID() +{ + return m_pImpl->msCLSID; +} + +UniReference< XMLPropertySetMapper > SchXMLExportHelper_Impl::GetPropertySetMapper() const +{ + return mxPropertySetMapper; +} + +void SchXMLExportHelper_Impl::exportAutoStyles() +{ + if( mxExpPropMapper.is()) + { + //ToDo: when embedded in calc/writer this is not necessary because the + // numberformatter is shared between both documents + mrExport.exportAutoDataStyles(); + + // export chart auto styles + mrAutoStylePool.exportXML( + XML_STYLE_FAMILY_SCH_CHART_ID + , mrExport.GetDocHandler(), + mrExport.GetMM100UnitConverter(), + mrExport.GetNamespaceMap() + ); + + // export auto styles for additional shapes + mrExport.GetShapeExport()->exportAutoStyles(); + // and for text in additional shapes + mrExport.GetTextParagraphExport()->exportTextAutoStyles(); + } +} + +// private methods +// --------------- + +SchXMLExportHelper_Impl::SchXMLExportHelper_Impl( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ) : mrExport( rExport ), @@ -901,56 +1103,22 @@ SchXMLExportHelper::SchXMLExportHelper( String( 'T' )); } -SchXMLExportHelper::~SchXMLExportHelper() {} - -const OUString& SchXMLExportHelper::getChartCLSID() -{ - return msCLSID; -} - -void SchXMLExportHelper::exportAutoStyles() +SchXMLExportHelper_Impl::~SchXMLExportHelper_Impl() { - if( mxExpPropMapper.is()) - { - //ToDo: when embedded in calc/writer this is not necessary because the - // numberformatter is shared between both documents - mrExport.exportAutoDataStyles(); - - // export chart auto styles - mrAutoStylePool.exportXML( - XML_STYLE_FAMILY_SCH_CHART_ID - , mrExport.GetDocHandler(), - mrExport.GetMM100UnitConverter(), - mrExport.GetNamespaceMap() - ); - - // export auto styles for additional shapes - mrExport.GetShapeExport()->exportAutoStyles(); - // and for text in additional shapes - mrExport.GetTextParagraphExport()->exportTextAutoStyles(); - } } -void SchXMLExportHelper::collectAutoStyles( Reference< chart::XChartDocument > rChartDoc ) +void SchXMLExportHelper_Impl::collectAutoStyles( Reference< chart::XChartDocument > rChartDoc ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "bm", "::SchXMLExportHelper::collectAutoStyles" ); - parseDocument( rChartDoc, sal_False ); } -void SchXMLExportHelper::exportChart( Reference< chart::XChartDocument > rChartDoc, +void SchXMLExportHelper_Impl::exportChart( Reference< chart::XChartDocument > rChartDoc, sal_Bool bIncludeTable ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "bm", "::SchXMLExportHelper::exportChart" ); - parseDocument( rChartDoc, sal_True, bIncludeTable ); DBG_ASSERT( maAutoStyleNameQueue.empty(), "There are still remaining autostyle names in the queue" ); } - -// private methods -// --------------- - ::rtl::OUString lcl_GetStringFromNumberSequence( const ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping, bool bRemoveOneFromEachIndex /*should be true if having categories*/ ) { const sal_Int32* pArray = rSequenceMapping.getConstArray(); @@ -975,7 +1143,7 @@ void SchXMLExportHelper::exportChart( Reference< chart::XChartDocument > rChartD } /// if bExportContent is false the auto-styles are collected -void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rChartDoc, +void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& rChartDoc, sal_Bool bExportContent, sal_Bool bIncludeTable ) { @@ -1425,7 +1593,7 @@ void lcl_exportComplexLabel( const Sequence< OUString >& rComplexLabel, SvXMLExp } } -void SchXMLExportHelper::exportTable() +void SchXMLExportHelper_Impl::exportTable() { // table element // ------------- @@ -1602,7 +1770,7 @@ void SchXMLExportHelper::exportTable() OSL_ASSERT( bHasOwnData || (aRowDescriptions_RangeIter == aRowDescriptions_RangeEnd) ); } -void SchXMLExportHelper::exportPlotArea( +void SchXMLExportHelper_Impl::exportPlotArea( Reference< chart::XDiagram > xDiagram, Reference< chart2::XDiagram > xNewDiagram, const awt::Size & rPageSize, @@ -1762,9 +1930,12 @@ void SchXMLExportHelper::exportPlotArea( } } - // element + // plot-area element pElPlotArea = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_PLOT_AREA, sal_True, sal_True ); + //inner position rectangle element + exportCoordinateRegion( xDiagram ); + // light sources (inside plot area element) if( bIs3DChart && rShapeExport.is()) @@ -1925,7 +2096,27 @@ void SchXMLExportHelper::exportPlotArea( delete pElPlotArea; } -void SchXMLExportHelper::exportAxes( +void SchXMLExportHelper_Impl::exportCoordinateRegion( const uno::Reference< chart::XDiagram >& xDiagram ) +{ + const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); + if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + return; + if( nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST )//export only if extensions are enabled //#i100778# todo: change this dependent on fileformat evolution + return; + + Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY ); + DBG_ASSERT( xDiaPos.is(), "Invalid xDiaPos as parameter" ); + if( !xDiaPos.is() ) + return; + + awt::Rectangle aRect( xDiaPos->calculateDiagramPositionExcludingAxes() ); + addPosition( awt::Point(aRect.X,aRect.Y) ); + addSize( awt::Size(aRect.Width,aRect.Height) ); + + SvXMLElementExport aCoordinateRegion( mrExport, XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, sal_True, sal_True );//#i100778# todo: change to chart namespace in future - dependent on fileformat +} + +void SchXMLExportHelper_Impl::exportAxes( const Reference< chart::XDiagram > & xDiagram, const Reference< chart2::XDiagram > & xNewDiagram, sal_Bool bExportContent ) @@ -2527,7 +2718,7 @@ void SchXMLExportHelper::exportAxes( } } -void SchXMLExportHelper::exportSeries( +void SchXMLExportHelper_Impl::exportSeries( const Reference< chart2::XDiagram > & xNewDiagram, const awt::Size & rPageSize, sal_Bool bExportContent, @@ -2896,7 +3087,7 @@ void SchXMLExportHelper::exportSeries( } } -void SchXMLExportHelper::exportRegressionCurve( +void SchXMLExportHelper_Impl::exportRegressionCurve( const Reference< chart2::XDataSeries > & xSeries, const Reference< beans::XPropertySet > & xSeriesProp, const awt::Size & rPageSize, @@ -3003,7 +3194,7 @@ void SchXMLExportHelper::exportRegressionCurve( } } -void SchXMLExportHelper::exportCandleStickSeries( +void SchXMLExportHelper_Impl::exportCandleStickSeries( const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, const Reference< chart2::XDiagram > & xDiagram, sal_Bool bJapaneseCandleSticks, @@ -3121,7 +3312,7 @@ void SchXMLExportHelper::exportCandleStickSeries( } } -void SchXMLExportHelper::exportDataPoints( +void SchXMLExportHelper_Impl::exportDataPoints( const uno::Reference< beans::XPropertySet > & xSeriesProperties, sal_Int32 nSeriesLength, const uno::Reference< chart2::XDiagram > & xDiagram, @@ -3369,7 +3560,7 @@ void SchXMLExportHelper::exportDataPoints( } -void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) +void SchXMLExportHelper_Impl::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) { msStringBuffer.append( (sal_Unicode)'.' ); if( nCol < 26 ) @@ -3389,7 +3580,7 @@ void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) msStringBuffer.append( nRow + (sal_Int32)1 ); } -void SchXMLExportHelper::addPosition( const awt::Point & rPosition ) +void SchXMLExportHelper_Impl::addPosition( const awt::Point & rPosition ) { mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rPosition.X ); msString = msStringBuffer.makeStringAndClear(); @@ -3400,13 +3591,13 @@ void SchXMLExportHelper::addPosition( const awt::Point & rPosition ) mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_Y, msString ); } -void SchXMLExportHelper::addPosition( Reference< drawing::XShape > xShape ) +void SchXMLExportHelper_Impl::addPosition( Reference< drawing::XShape > xShape ) { if( xShape.is()) addPosition( xShape->getPosition()); } -void SchXMLExportHelper::addSize( const awt::Size & rSize ) +void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize ) { mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Width ); msString = msStringBuffer.makeStringAndClear(); @@ -3417,13 +3608,13 @@ void SchXMLExportHelper::addSize( const awt::Size & rSize ) mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, msString ); } -void SchXMLExportHelper::addSize( Reference< drawing::XShape > xShape ) +void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape ) { if( xShape.is()) addSize( xShape->getSize() ); } -awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const +awt::Size SchXMLExportHelper_Impl::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const { awt::Size aSize( 8000, 7000 ); uno::Reference< embed::XVisualObject > xVisualObject( xChartDoc, uno::UNO_QUERY ); @@ -3434,13 +3625,13 @@ awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocume return aSize; } -void SchXMLExportHelper::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates ) +void SchXMLExportHelper_Impl::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates ) { if( !aStates.empty() ) maAutoStyleNameQueue.push( GetAutoStylePoolP().Add( XML_STYLE_FAMILY_SCH_CHART_ID, aStates )); } -void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertyState >& aStates ) +void SchXMLExportHelper_Impl::AddAutoStyleAttribute( const std::vector< XMLPropertyState >& aStates ) { if( !aStates.empty() ) { @@ -3451,7 +3642,7 @@ void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertySt } } -void SchXMLExportHelper::exportText( const OUString& rText, bool bConvertTabsLFs ) +void SchXMLExportHelper_Impl::exportText( const OUString& rText, bool bConvertTabsLFs ) { SchXMLTools::exportText( mrExport, rText, bConvertTabsLFs ); } @@ -3468,6 +3659,8 @@ SchXMLExport::SchXMLExport( maAutoStylePool( *this ), maExportHelper( *this, maAutoStylePool ) { + if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + _GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); } @@ -3484,7 +3677,7 @@ SchXMLExport::~SchXMLExport() sal_uInt32 SchXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) { Reference< chart2::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY ); - maExportHelper.InitRangeSegmentationProperties( xChartDoc ); + maExportHelper.m_pImpl->InitRangeSegmentationProperties( xChartDoc ); return SvXMLExport::exportDoc( eClass ); } @@ -3507,8 +3700,8 @@ void SchXMLExport::_ExportAutoStyles() Reference< chart::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY ); if( xChartDoc.is()) { - maExportHelper.collectAutoStyles( xChartDoc ); - maExportHelper.exportAutoStyles(); + maExportHelper.m_pImpl->collectAutoStyles( xChartDoc ); + maExportHelper.m_pImpl->exportAutoStyles(); } else { @@ -3557,13 +3750,13 @@ void SchXMLExport::_ExportContent() aAny = xProp->getPropertyValue( OUString::createFromAscii( "ChartRangeAddress" )); aAny >>= sChartAddress; - maExportHelper.SetChartRangeAddress( sChartAddress ); + maExportHelper.m_pImpl->SetChartRangeAddress( sChartAddress ); OUString sTableNumberList; aAny = xProp->getPropertyValue( OUString::createFromAscii( "TableNumberList" )); aAny >>= sTableNumberList; - maExportHelper.SetTableNumberList( sTableNumberList ); + maExportHelper.m_pImpl->SetTableNumberList( sTableNumberList ); // do not include own table if there are external addresses bIncludeTable = (sChartAddress.getLength() == 0); @@ -3576,7 +3769,7 @@ void SchXMLExport::_ExportContent() } } } - maExportHelper.exportChart( xChartDoc, bIncludeTable ); + maExportHelper.m_pImpl->exportChart( xChartDoc, bIncludeTable ); } else { @@ -3591,7 +3784,12 @@ void SchXMLExport::SetProgress( sal_Int32 nPercentage ) mxStatusIndicator->setValue( nPercentage ); } -void SchXMLExportHelper::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc ) +UniReference< XMLPropertySetMapper > SchXMLExport::GetPropertySetMapper() const +{ + return maExportHelper.m_pImpl->GetPropertySetMapper(); +} + +void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc ) { if( xChartDoc.is()) try diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 6afbaecb551c..587070202c9c 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -281,6 +281,8 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap() { static __FAR_DATA SvXMLTokenMapEntry aPlotAreaElemTokenMap[] = { + { XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION_EXT }, + { XML_NAMESPACE_CHART, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION }, { XML_NAMESPACE_CHART, XML_AXIS, XML_TOK_PA_AXIS }, { XML_NAMESPACE_CHART, XML_SERIES, XML_TOK_PA_SERIES }, { XML_NAMESPACE_CHART, XML_WALL, XML_TOK_PA_WALL }, @@ -657,6 +659,7 @@ SchXMLImport::SchXMLImport( SvXMLImport( xServiceFactory, nImportFlags ) { GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); + GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); mbIsGraphicLoadOnDemandSupported = false; } @@ -670,6 +673,7 @@ SchXMLImport::SchXMLImport( : SvXMLImport( xServiceFactory, xModel, rGrfContainer ) { GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); + GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); // get status indicator (if requested) if( bShowProgress ) diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index ec5c4b2130c1..61dab1fb52cb 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -61,6 +61,7 @@ #include <com/sun/star/chart/ChartDataRowSource.hpp> #include <com/sun/star/chart/X3DDisplay.hpp> #include <com/sun/star/chart/XStatisticDisplay.hpp> +#include <com/sun/star/chart/XDiagramPositioning.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> @@ -199,8 +200,8 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext( mnSeries( 0 ), m_aGlobalSeriesImportInfo( rAllRangeAddressesAvailable ), maSceneImportHelper( rImport ), - mbHasSize(false), - mbHasPosition(false), + m_aOuterPositioning( rImport ), + m_aInnerPositioning( rImport ), mbPercentStacked(false), m_bAxisPositionAttributeImported(false), m_rXLinkHRefAttributeToIndicateDataProvider(rXLinkHRefAttributeToIndicateDataProvider), @@ -296,15 +297,6 @@ SchXMLPlotAreaContext::~SchXMLPlotAreaContext() void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - uno::Any aTransMatrixAny; - - // initialize size and position - uno::Reference< drawing::XShape > xDiaShape( mxDiagram, uno::UNO_QUERY ); - bool bHasSizeWidth = false; - bool bHasSizeHeight = false; - bool bHasPositionX = false; - bool bHasPositionY = false; - // parse attributes sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetPlotAreaAttrTokenMap(); @@ -320,20 +312,10 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri switch( rAttrTokenMap.Get( nPrefix, aLocalName )) { case XML_TOK_PA_X: - GetImport().GetMM100UnitConverter().convertMeasure( maPosition.X, aValue ); - bHasPositionX = true; - break; case XML_TOK_PA_Y: - GetImport().GetMM100UnitConverter().convertMeasure( maPosition.Y, aValue ); - bHasPositionY = true; - break; case XML_TOK_PA_WIDTH: - GetImport().GetMM100UnitConverter().convertMeasure( maSize.Width, aValue ); - bHasSizeWidth = true; - break; case XML_TOK_PA_HEIGHT: - GetImport().GetMM100UnitConverter().convertMeasure( maSize.Height, aValue ); - bHasSizeHeight = true; + m_aOuterPositioning.readPositioningAttribute( nPrefix, aLocalName, aValue ); break; case XML_TOK_PA_STYLE_NAME: msAutoStyleName = aValue; @@ -369,9 +351,6 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri } } - mbHasSize = bHasSizeWidth && bHasSizeHeight; - mbHasPosition = bHasPositionX && bHasPositionY; - if( ! mxNewDoc.is()) { uno::Reference< beans::XPropertySet > xDocProp( mrImportHelper.GetChartDocument(), uno::UNO_QUERY ); @@ -426,14 +405,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lines")), pPropStyleContext, pStylesCtxt ); //handle automatic position and size - bool bAutoSize = false; - bool bAutoPosition = false; - SchXMLTools::getPropertyFromContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= bAutoSize; - SchXMLTools::getPropertyFromContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= bAutoPosition; - mbHasSize = mbHasSize && !bAutoSize; - mbHasPosition = mbHasPosition && !bAutoPosition; + m_aOuterPositioning.readAutomaticPositioningProperties( pPropStyleContext, pStylesCtxt ); //correct default starting angle for old 3D pies if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_0( GetImport().GetModel() ) ) @@ -548,6 +520,13 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( switch( rTokenMap.Get( nPrefix, rLocalName )) { + case XML_TOK_PA_COORDINATE_REGION_EXT: + case XML_TOK_PA_COORDINATE_REGION: + { + pContext = new SchXMLCoordinateRegionContext( GetImport(), nPrefix, rLocalName, m_aInnerPositioning ); + } + break; + case XML_TOK_PA_AXIS: { bool bAddMissingXAxisForNetCharts = false; @@ -711,13 +690,22 @@ void SchXMLPlotAreaContext::EndElement() } // set changed size and position after properties (esp. 3d) - uno::Reference< drawing::XShape > xDiaShape( mxDiagram, uno::UNO_QUERY ); - if( xDiaShape.is()) + + uno::Reference< chart::XDiagramPositioning > xDiaPos( mxDiagram, uno::UNO_QUERY ); + if( xDiaPos.is()) { - if( mbHasSize ) - xDiaShape->setSize( maSize ); - if( mbHasPosition ) - xDiaShape->setPosition( maPosition ); + if( !m_aOuterPositioning.isAutomatic() ) + { + if( m_aInnerPositioning.hasPosSize() ) + xDiaPos->setDiagramPositionExcludingAxes( m_aInnerPositioning.getRectangle() ); + else if( m_aOuterPositioning.hasPosSize() ) + { + if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_3( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size + xDiaPos->setDiagramPositionIncludingAxesAndAxisTitles( m_aOuterPositioning.getRectangle() ); + else + xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); + } + } } CorrectAxisPositions(); @@ -1681,6 +1669,134 @@ void SchXMLCategoriesContext::StartElement( const uno::Reference< xml::sax::XAtt // ======================================== +SchXMLPositonAttributesHelper::SchXMLPositonAttributesHelper( SvXMLImport& rImporter ) + : m_rImport( rImporter ) + , m_aPosition(0,0) + , m_aSize(0,0) + , m_bHasSizeWidth( false ) + , m_bHasSizeHeight( false ) + , m_bHasPositionX( false ) + , m_bHasPositionY( false ) + , m_bAutoSize( false ) + , m_bAutoPosition( false ) +{ +} + +SchXMLPositonAttributesHelper::~SchXMLPositonAttributesHelper() +{ +} + +bool SchXMLPositonAttributesHelper::hasSize() const +{ + return m_bHasSizeWidth && m_bHasSizeHeight; +} +bool SchXMLPositonAttributesHelper::hasPosition() const +{ + return m_bHasPositionX && m_bHasPositionY; +} +bool SchXMLPositonAttributesHelper::hasPosSize() const +{ + return hasPosition() && hasSize(); +} +bool SchXMLPositonAttributesHelper::isAutomatic() const +{ + return m_bAutoSize || m_bAutoPosition; +} +awt::Point SchXMLPositonAttributesHelper::getPosition() const +{ + return m_aPosition; +} +awt::Size SchXMLPositonAttributesHelper::getSize() const +{ + return m_aSize; +} +awt::Rectangle SchXMLPositonAttributesHelper::getRectangle() const +{ + return awt::Rectangle( m_aPosition.X, m_aPosition.Y, m_aSize.Width, m_aSize.Height ); +} + +bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ) +{ + //returns true if the attribute was proccessed + bool bReturn = true; + + if( XML_NAMESPACE_SVG == nPrefix ) + { + if( IsXMLToken( rLocalName, XML_X ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aPosition.X, rValue ); + m_bHasPositionX = true; + } + else if( IsXMLToken( rLocalName, XML_Y ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aPosition.Y, rValue ); + m_bHasPositionY = true; + } + else if( IsXMLToken( rLocalName, XML_WIDTH ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aSize.Width, rValue ); + m_bHasSizeWidth = true; + } + else if( IsXMLToken( rLocalName, XML_HEIGHT ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aSize.Height, rValue ); + m_bHasSizeHeight = true; + } + else + bReturn = false; + } + else + bReturn = false; + + return bReturn; +} + + +void SchXMLPositonAttributesHelper::readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ) +{ + if( pPropStyleContext && pStylesCtxt ) + { + //handle automatic position and size + SchXMLTools::getPropertyFromContext( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= m_bAutoSize; + SchXMLTools::getPropertyFromContext( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= m_bAutoPosition; + } +} + +// ======================================== + +SchXMLCoordinateRegionContext::SchXMLCoordinateRegionContext( + SvXMLImport& rImport + , sal_uInt16 nPrefix + , const rtl::OUString& rLocalName + , SchXMLPositonAttributesHelper& rPositioning ) + : SvXMLImportContext( rImport, nPrefix, rLocalName ) + , m_rPositioning( rPositioning ) +{ +} + +SchXMLCoordinateRegionContext::~SchXMLCoordinateRegionContext() +{ +} + +void SchXMLCoordinateRegionContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) +{ + // parse attributes + sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; + + for( sal_Int16 i = 0; i < nAttrCount; i++ ) + { + rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); + rtl::OUString aLocalName; + rtl::OUString aValue = xAttrList->getValueByIndex( i ); + USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + m_rPositioning.readPositioningAttribute( nPrefix, aLocalName, aValue ); + } +} + +// ======================================== + SchXMLWallFloorContext::SchXMLWallFloorContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index 56aa3e78c814..1f0de466dcb1 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -66,6 +66,43 @@ private: SchXML3DSceneAttributesHelper(); }; +// ---------------------------------------- + +class SchXMLPositonAttributesHelper +{ +public: + SchXMLPositonAttributesHelper( SvXMLImport& rImporter ); + ~SchXMLPositonAttributesHelper(); + + bool readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); + void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); + + bool hasPosSize() const; + bool isAutomatic() const; + ::com::sun::star::awt::Rectangle getRectangle() const; + + +private: + bool hasSize() const; + bool hasPosition() const; + ::com::sun::star::awt::Size getSize() const; + ::com::sun::star::awt::Point getPosition() const; + + SvXMLImport& m_rImport; + + ::com::sun::star::awt::Point m_aPosition; + ::com::sun::star::awt::Size m_aSize; + + bool m_bHasSizeWidth; + bool m_bHasSizeHeight; + bool m_bHasPositionX; + bool m_bHasPositionY; + sal_Bool m_bAutoSize; + sal_Bool m_bAutoPosition; +}; + +// ---------------------------------------- + class SchXMLPlotAreaContext : public SvXMLImportContext { public: @@ -110,10 +147,8 @@ private: GlobalSeriesImportInfo m_aGlobalSeriesImportInfo; SchXML3DSceneAttributesHelper maSceneImportHelper; - ::com::sun::star::awt::Size maSize; - ::com::sun::star::awt::Point maPosition; - bool mbHasSize; - bool mbHasPosition; + SchXMLPositonAttributesHelper m_aOuterPositioning;//including axes and axes titles + SchXMLPositonAttributesHelper m_aInnerPositioning;//excluding axes and axes titles bool mbPercentStacked; bool m_bAxisPositionAttributeImported; ::rtl::OUString msAutoStyleName; @@ -216,6 +251,23 @@ public: // ---------------------------------------- +class SchXMLCoordinateRegionContext : public SvXMLImportContext +{ +public: + SchXMLCoordinateRegionContext( + SvXMLImport& rImport + , sal_uInt16 nPrefix + , const rtl::OUString& rLocalName + , SchXMLPositonAttributesHelper& rPositioning ); + virtual ~SchXMLCoordinateRegionContext(); + virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); + +private: + SchXMLPositonAttributesHelper& m_rPositioning; +}; + +// ---------------------------------------- + class SchXMLWallFloorContext : public SvXMLImportContext { public: diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index 32fe36197a32..582e5aead326 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -757,6 +757,29 @@ void setBuildIDAtImportInfo( uno::Reference< frame::XModel > xModel, Reference< SvXMLMetaDocumentContext::setBuildId( aGenerator, xImportInfo ); } +bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const uno::Reference< frame::XModel >& xChartModel ) +{ + bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan3_0( xChartModel ); + if( !bResult ) + { + ::rtl::OUString aGenerator( lcl_getGeneratorFromModel(xChartModel) ); + if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/3") ) ) != -1 ) + { + if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/300m") ) ) != -1 ) + { + sal_Int32 nBuilId = lcl_getBuildIDFromGenerator( lcl_getGeneratorFromModel(xChartModel) ); + if( nBuilId>0 && nBuilId<9491 ) //9491 is build id of dev300m76 + bResult= true; + } + else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/310m") ) ) != -1 ) + bResult= true; + else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/320m") ) ) != -1 ) + bResult= true; + } + } + return bResult; +} + bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const uno::Reference< frame::XModel >& xChartModel ) { bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan2_3( xChartModel ); diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx index 0b77d8e6d38a..bcc39ae3d114 100644 --- a/xmloff/source/chart/SchXMLTools.hxx +++ b/xmloff/source/chart/SchXMLTools.hxx @@ -54,6 +54,7 @@ namespace SchXMLTools bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); bool isDocumentGeneratedWithOpenOfficeOlderThan2_4( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); + bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); void setBuildIDAtImportInfo( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel , ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xImportInfo ); diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 9b2fb9eea891..2af9966bc351 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3096,6 +3096,10 @@ namespace xmloff { namespace token { TOKEN( "ends-with", XML_ENDS_WITH ), TOKEN( "does-not-end-with", XML_DOES_NOT_END_WITH ), + TOKEN( "chartooo", XML_NP_CHART_EXT ), + TOKEN( "http://openoffice.org/2010/chart", XML_N_CHART_EXT ), + TOKEN( "coordinate-region", XML_COORDINATE_REGION ), + #if OSL_DEBUG_LEVEL > 0 { 0, NULL, NULL, XML_TOKEN_END } #else diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index c4f398524a2f..20c7879416cf 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -471,6 +471,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap mrExport.getInterfaceToIdentifierMapper().registerReference( xConnection ); break; } + case XmlShapeTypePresTableShape: case XmlShapeTypeDrawTableShape: { try @@ -797,6 +798,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape break; } + case XmlShapeTypePresTableShape: case XmlShapeTypeDrawTableShape: { ImpExportTableShape( xShape, aShapeInfo.meShapeType, nFeatures, pRefPoint ); @@ -866,6 +868,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape break; } + case XmlShapeTypePresMediaShape: case XmlShapeTypeDrawMediaShape: { ImpExportMediaShape( xShape, aShapeInfo.meShapeType, nFeatures, pRefPoint ); @@ -1125,7 +1128,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x // get info about presentation shape uno::Reference <beans::XPropertySet> xPropSet(xShape, uno::UNO_QUERY); - if(xPropSet.is()) + if(xPropSet.is()) try { rtl::OUString sCLSID; if(xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID"))) >>= sCLSID) @@ -1137,16 +1140,22 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x } } } + catch( uno::Exception& ) + { + DBG_ERROR( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" ); + } } else if(aType.EqualsAscii("Chart", 26, 5)) { eShapeType = XmlShapeTypePresChartShape; } else if(aType.EqualsAscii("OrgChart", 26, 8)) { eShapeType = XmlShapeTypePresOrgChartShape; } - else if(aType.EqualsAscii("TableShape", 26, 10)) { eShapeType = XmlShapeTypePresSheetShape; } + else if(aType.EqualsAscii("CalcShape", 26, 9)) { eShapeType = XmlShapeTypePresSheetShape; } + else if(aType.EqualsAscii("TableShape", 26, 10)) { eShapeType = XmlShapeTypePresTableShape; } else if(aType.EqualsAscii("Notes", 26, 5)) { eShapeType = XmlShapeTypePresNotesShape; } else if(aType.EqualsAscii("HandoutShape", 26, 12)) { eShapeType = XmlShapeTypeHandoutShape; } else if(aType.EqualsAscii("HeaderShape", 26, 11)) { eShapeType = XmlShapeTypePresHeaderShape; } else if(aType.EqualsAscii("FooterShape", 26, 11)) { eShapeType = XmlShapeTypePresFooterShape; } else if(aType.EqualsAscii("SlideNumberShape", 26, 16)) { eShapeType = XmlShapeTypePresSlideNumberShape; } else if(aType.EqualsAscii("DateTimeShape", 26, 13)) { eShapeType = XmlShapeTypePresDateTimeShape; } + else if(aType.EqualsAscii("MediaShape", 26, 10)) { eShapeType = XmlShapeTypePresMediaShape; } } } } diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index fb1d15f57350..d13b5e24e2db 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -31,7 +31,6 @@ #include <com/sun/star/text/XText.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/drawing/CircleKind.hpp> #include <com/sun/star/drawing/ConnectorType.hpp> #include <com/sun/star/drawing/XControlShape.hpp> @@ -1247,27 +1246,6 @@ void XMLShapeExport::ImpExportChartShape( SvXMLAttributeList* pAttrList ) { ImpExportOLE2Shape( xShape, eShapeType, nFeatures, pRefPoint, pAttrList ); -/* - // Transformation - ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); - - uno::Reference< chart::XChartDocument > xChartDoc; - if( !bIsEmptyPresObj ) - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) ) >>= xChartDoc; - - if( xChartDoc.is() ) - { - // export chart data if the flag is not set (default) - sal_Bool bExportOwnData = ( nFeatures & SEF_EXPORT_NO_CHART_DATA ) == 0; - mrExport.GetChartExport()->exportChart( xChartDoc, bExportOwnData ); - } - else - { - // write chart object (fake for now, replace later) - SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_CHART, XML_CHART, sal_True, sal_True); - } - } -*/ } ////////////////////////////////////////////////////////////////////////////// @@ -1996,7 +1974,7 @@ void XMLShapeExport::ImpExportPluginShape( void XMLShapeExport::ImpExportMediaShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) + XmlShapeType eShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2004,6 +1982,9 @@ void XMLShapeExport::ImpExportMediaShape( // Transformation ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); + if(eShapeType == XmlShapeTypePresMediaShape) + ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_OBJECT) ); + sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, sal_True ); diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index 710d343ba42c..3f52fcd50084 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -1095,7 +1095,7 @@ void XMLShapeExport::ImpExportCustomShape( } } -void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType /*eShapeType*/, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint ) +void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint ) { uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); uno::Reference< container::XNamed > xNamed(xShape, uno::UNO_QUERY); @@ -1109,8 +1109,8 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape sal_Bool bIsEmptyPresObj = sal_False; // presentation settings -// if(eShapeType == XmlShapeTypePresTableShape) -// bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) ); + if(eShapeType == XmlShapeTypePresTableShape) + bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) ); const bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); const bool bExportEmbedded(0 != (mrExport.getExportFlags() & EXPORT_EMBEDDED)); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index dc362136a3fe..f1bf683b57e9 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -2565,7 +2565,7 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen } else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_TABLE ) ) { - pService = "com.sun.star.presentation.TableShape"; + pService = "com.sun.star.presentation.CalcShape"; } else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OBJECT ) ) { @@ -2922,8 +2922,21 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen const char* pService; + sal_Bool bIsPresShape = sal_False; + if( mbMedia ) + { pService = "com.sun.star.drawing.MediaShape"; + + bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported(); + if( bIsPresShape ) + { + if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OBJECT ) ) + { + pService = "com.sun.star.presentation.MediaShape"; + } + } + } else pService = "com.sun.star.drawing.PluginShape"; @@ -2933,6 +2946,23 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen { SetLayer(); + if(bIsPresShape) + { + uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY ); + if(xProps.is()) + { + uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); + if( xPropsInfo.is() ) + { + if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ))) + xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), ::cppu::bool2any( sal_False ) ); + + if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent") ))) + xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent") ), ::cppu::bool2any( sal_False ) ); + } + } + } + // set pos, size, shear and rotate SetTransformation(); GetImport().GetShapeImport()->finishShape( mxShape, mxAttrList, mxShapes ); @@ -3556,8 +3586,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc { const char* pService = "com.sun.star.drawing.TableShape"; - sal_Bool bIsPresShape = sal_False; //maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported(); -/* + sal_Bool bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported(); if( bIsPresShape ) { if( IsXMLToken( maPresentationClass, XML_PRESENTATION_TABLE ) ) @@ -3565,7 +3594,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc pService = "com.sun.star.presentation.TableShape"; } } -*/ + AddShape( pService ); if( mxShape.is() ) diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index eacd5bb735ef..115b06c4c2ad 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -691,7 +691,7 @@ namespace xmloff if (m_nIncludeCommon & CCA_TARGET_LOCATION) { - exportTargetLocationAttribute(); + exportTargetLocationAttribute(false); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking m_nIncludeCommon = m_nIncludeCommon & ~CCA_TARGET_LOCATION; @@ -2034,10 +2034,7 @@ namespace xmloff OAttributeMetaData::getFormAttributeName(eStringPropertyIds[i]), aStringPropertyNames[i]); - // Since as per ODF 1.2, xlink:href and xlink:type need to exist either both or none, - // we need to write xlink:type, too, even if it carries no information. - // #i111035# / 2010-04-141/ frank.schoenheit@sun.com - AddAttributeASCII( XML_NAMESPACE_XLINK, "type", "simple" ); + // #i112082# xlink:type is added as part of exportTargetLocationAttribute // now export the data source name or databaselocation or connection resource ::rtl::OUString sPropValue; @@ -2138,7 +2135,7 @@ namespace xmloff // the target frame exportTargetFrameAttribute(); // the target URL - exportTargetLocationAttribute(); + exportTargetLocationAttribute(true); // #i110911# add type attribute (for form, but not for control) // master fields exportStringSequenceAttribute( diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 1586c9a7a439..2a485566cf9d 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -420,7 +420,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty) + void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType) { DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString ); @@ -433,6 +433,10 @@ namespace xmloff ,OAttributeMetaData::getCommonControlAttributeName(_nProperty) , sTargetLocation); + // #i110911# add xlink:type="simple" if required + if (_bAddType) + AddAttribute(XML_NAMESPACE_XLINK, token::XML_TYPE, token::XML_SIMPLE); + exportedProperty(_sPropertyName); } //--------------------------------------------------------------------- diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 5e1f683e339d..ab17912e4df4 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -69,7 +69,7 @@ namespace xmloff StringSet m_aRemainingProps; // see examinePersistence - void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty); + void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType); protected: IFormsExportContext& m_rContext; @@ -230,8 +230,10 @@ namespace xmloff <p>The value of this attribute is extracted from the TargetURL property of the object given.</p> <p>The property needs a special handling because the URL's need to be made relative</p> + + <p>If _bAddType is set, an additional xlink:type="simple" attribute is also added.</p> */ - inline void exportTargetLocationAttribute() { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION); } + inline void exportTargetLocationAttribute(bool _bAddType) { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION,_bAddType); } /** add the form:image attribute to the export context. @@ -239,7 +241,7 @@ namespace xmloff <p>The property needs a special handling because the URL's need to be made relative</p> */ - inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA); } + inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA,false); } /** flag the style properties as 'already exported' diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 597798f01ce7..45fa2f5b4744 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -363,7 +363,7 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl implPushBackPropertyValue( aNewValue ); } #if OSL_DEBUG_LEVEL > 0 - else + else if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form> { ::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" ); sMessage += ::rtl::OString( " Attribute name: " ); diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index 3515dcf96010..1c44db963944 100644 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.cxx @@ -116,7 +116,7 @@ namespace xmloff void OValuePropertiesMetaData::getValueLimitPropertyNames(sal_Int16 _nFormComponentType, sal_Char const * & _rpMinValuePropertyName, sal_Char const * & _rpMaxValuePropertyName) { - _rpMinValuePropertyName = _rpMinValuePropertyName = NULL; + _rpMinValuePropertyName = _rpMaxValuePropertyName = NULL; switch (_nFormComponentType) { case FormComponentType::DATEFIELD: diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx index 724b6b0d2337..e04467d1e491 100644 --- a/xmloff/source/script/XMLScriptExportHandler.cxx +++ b/xmloff/source/script/XMLScriptExportHandler.cxx @@ -75,6 +75,9 @@ void XMLScriptExportHandler::Export( OUString sTmp; rValues[i].Value >>= sTmp; rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sTmp); + + // #i110911# xlink:type="simple" is required + rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE); } // else: disregard } diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index 7affab134134..ad3a1f96752f 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -353,6 +353,8 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) // get the current row Reference< XCellRange > xCellRange( xIndexAccess->getByIndex(rowIndex), UNO_QUERY_THROW ); + OUString sDefaultCellStyle; + // table:style-name if( pTableInfo.get() ) { @@ -360,11 +362,11 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) const OUString sStyleName( pTableInfo->maRowStyleMap[xKey] ); if( sStyleName.getLength() ) mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName ); - } - const OUString sDefaultCellStyle( pTableInfo->maDefaultRowCellStyles[rowIndex] ); - if( sDefaultCellStyle.getLength() ) - mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle ); + sDefaultCellStyle = pTableInfo->maDefaultRowCellStyles[rowIndex]; + if( sDefaultCellStyle.getLength() ) + mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle ); + } // write row element SvXMLElementExport tableRowElement( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True ); diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 0a0437426a3c..7cf96abea2e2 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -917,7 +917,7 @@ void XMLSectionExport::ExportBaseIndexSource( void XMLSectionExport::ExportBaseIndexBody( SectionTypeEnum - #ifdef DBG_UTIL + #if OSL_DEBUG_LEVEL > 0 eType #endif , |