summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/classes/xmlnamespaces.hxx65
-rw-r--r--framework/inc/framework.hrc25
-rw-r--r--framework/inc/properties.h8
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx2
-rw-r--r--framework/inc/uielement/uicommanddescription.hxx2
-rw-r--r--framework/inc/xml/toolboxlayoutdocumenthandler.hxx59
-rwxr-xr-xframework/qa/unoapi/knownissues.xcl3
-rw-r--r--framework/source/services/backingwindow.cxx38
-rw-r--r--framework/source/services/backingwindow.hxx3
-rw-r--r--framework/source/services/fwk_services.src92
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx10
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx21
-rw-r--r--framework/source/uielement/menubarmanager.cxx11
-rw-r--r--framework/source/uielement/rootitemcontainer.cxx1
-rw-r--r--framework/source/uielement/toolbarmanager.cxx98
-rw-r--r--framework/source/uielement/uicommanddescription.cxx4
-rw-r--r--framework/source/xml/makefile.mk1
-rw-r--r--framework/source/xml/menudocumenthandler.cxx14
-rw-r--r--framework/source/xml/toolboxconfiguration.cxx1
-rw-r--r--framework/source/xml/toolboxlayoutdocumenthandler.cxx58
-rw-r--r--framework/util/makefile.mk1
21 files changed, 220 insertions, 297 deletions
diff --git a/framework/inc/classes/xmlnamespaces.hxx b/framework/inc/classes/xmlnamespaces.hxx
deleted file mode 100644
index 23ca22cf93..0000000000
--- a/framework/inc/classes/xmlnamespaces.hxx
+++ /dev/null
@@ -1,65 +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_CLASSES_XMLNAMESPACES_HXX_
-#define __FRAMEWORK_CLASSES_XMLNAMESPACES_HXX_
-
-#include <com/sun/star/xml/sax/SAXException.hpp>
-
-#include <map>
-
-namespace framework
-{
-
-class XMLNamespaces
-{
- public:
- XMLNamespaces();
- XMLNamespaces( const XMLNamespaces& );
- virtual ~XMLNamespaces();
-
- void addNamespace( const ::rtl::OUString& aName, const ::rtl::OUString& aValue )
- throw( ::com::sun::star::xml::sax::SAXException );
-
- ::rtl::OUString applyNSToAttributeName( const ::rtl::OUString& ) const
- throw( ::com::sun::star::xml::sax::SAXException );
- ::rtl::OUString applyNSToElementName( const ::rtl::OUString& ) const
- throw( ::com::sun::star::xml::sax::SAXException );
-
- private:
- typedef ::std::map< ::rtl::OUString, ::rtl::OUString > NamespaceMap;
-
- ::rtl::OUString getNamespaceValue( const ::rtl::OUString& aNamespace ) const
- throw( ::com::sun::star::xml::sax::SAXException );
-
- ::rtl::OUString m_aDefaultNamespace;
- NamespaceMap m_aNamespaceMap;
-};
-
-}
-
-#endif // __FRAMEWORK_XMLNAMESPACES_HXX_
diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc
index bea7dede55..b1abc91cab 100644
--- a/framework/inc/framework.hrc
+++ b/framework/inc/framework.hrc
@@ -51,19 +51,10 @@
#define STR_BACKING_CREATE 3
#define STR_BACKING_TEMPLATE 4
#define STR_BACKING_FILE 5
-#define BMP_BACKING_WRITER 6
-#define BMP_BACKING_CALC 7
-#define BMP_BACKING_IMPRESS 8
-#define BMP_BACKING_DRAW 9
-#define BMP_BACKING_DATABASE 10
-#define BMP_BACKING_FORMULA 11
-#define BMP_BACKING_OPENFILE 12
-#define BMP_BACKING_OPENTEMPLATE 13
-#define STR_BACKING_EXTHELP 15
-#define STR_BACKING_REGHELP 17
-#define STR_BACKING_INFOHELP 19
-#define STR_BACKING_TPLREP 21
-#define BMP_BACKING_FOLDER 22
+#define STR_BACKING_EXTHELP 6
+#define STR_BACKING_REGHELP 7
+#define STR_BACKING_INFOHELP 8
+#define STR_BACKING_TPLREP 9
#define RES_BACKING_IMAGES (DLG_BACKING+1)
#define RES_BACKING_IMAGES_HC (DLG_BACKING+2)
@@ -77,6 +68,14 @@
#define BMP_BACKING_REG 7
#define BMP_BACKING_INFO 8
#define BMP_BACKING_TPLREP 9
+#define BMP_BACKING_WRITER 10
+#define BMP_BACKING_CALC 11
+#define BMP_BACKING_IMPRESS 12
+#define BMP_BACKING_DRAW 13
+#define BMP_BACKING_DATABASE 14
+#define BMP_BACKING_FORMULA 15
+#define BMP_BACKING_OPENFILE 16
+#define BMP_BACKING_OPENTEMPLATE 17
// Ids of TabWindow
#define WIN_TABWINDOW (RID_FWK_DIALOG_START+101)
diff --git a/framework/inc/properties.h b/framework/inc/properties.h
index f4cf65a7cf..84d7370af6 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/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index aa30175d35..a4485da237 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -181,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();
diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx
index cdb883b995..c0f3d5d48a 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/xml/toolboxlayoutdocumenthandler.hxx b/framework/inc/xml/toolboxlayoutdocumenthandler.hxx
deleted file mode 100644
index ff4c668ede..0000000000
--- a/framework/inc/xml/toolboxlayoutdocumenthandler.hxx
+++ /dev/null
@@ -1,59 +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_XML_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_
-#define __FRAMEWORK_XML_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_
-
-#include <xml/toolboxconfiguration.hxx>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-
-#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#endif
-
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
-#include <threadhelp/threadhelpbase.hxx>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/weak.hxx>
-
-#include <hash_map>
-#include <stdtypes.h>
-
-//_________________________________________________________________________________________________________________
-// namespace
-//_________________________________________________________________________________________________________________
-
-namespace framework{
-
-} // namespace framework
-
-#endif
diff --git a/framework/qa/unoapi/knownissues.xcl b/framework/qa/unoapi/knownissues.xcl
index f939efcca4..40f1965de6 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/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index e9938aecf0..fb28da5774 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -133,7 +133,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
mbInitControls( false ),
mnLayoutStyle( 0 ),
mpAccExec( NULL ),
- mnBtnPos( 120 )
+ mnBtnPos( 120 ),
+ mnBtnTop( 150 )
{
mnColumnWidth[0] = mnColumnWidth[1] = 0;
mnTextColumnWidth[0] = mnTextColumnWidth[1] = 0;
@@ -163,16 +164,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
{
}
- // get icon images from vcl resource and set them on the appropriate buttons
- loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton );
- loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton );
- loadImage( FwkResId( BMP_BACKING_IMPRESS ), maImpressButton );
- loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton );
- loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton );
- loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton );
- loadImage( FwkResId( BMP_BACKING_FOLDER ), maOpenButton );
- loadImage( FwkResId( BMP_BACKING_FOLDER ), maTemplateButton );
-
String aExtHelpText( FwkResId( STR_BACKING_EXTHELP ) );
String aRegHelpText( FwkResId( STR_BACKING_REGHELP ) );
String aInfoHelpText( FwkResId( STR_BACKING_INFOHELP ) );
@@ -187,10 +178,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
SetStyle( GetStyle() | WB_DIALOGCONTROL );
- // add some breathing space for the images
- maButtonImageSize.Width() += 12;
- maButtonImageSize.Height() += 12;
-
// force tab cycling in toolbox
maToolbox.SetStyle( maToolbox.GetStyle() | WB_FORCETABCYCLE );
@@ -236,6 +223,11 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
// init background
initBackground();
+
+ // add some breathing space for the images
+ maButtonImageSize.Width() += 12;
+ maButtonImageSize.Height() += 12;
+
}
@@ -324,6 +316,17 @@ void BackingWindow::initBackground()
else
mnBtnPos = maBackgroundLeft.GetSizePixel().Width() + 40;
}
+
+ // get icon images from fwk resource and set them on the appropriate buttons
+ loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton );
+ loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton );
+ loadImage( FwkResId( BMP_BACKING_IMPRESS ), maImpressButton );
+ loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton );
+ loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton );
+ loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton );
+ loadImage( FwkResId( BMP_BACKING_OPENFILE ), maOpenButton );
+ loadImage( FwkResId( BMP_BACKING_OPENTEMPLATE ), maTemplateButton );
+
}
void BackingWindow::initControls()
@@ -550,7 +553,7 @@ void BackingWindow::layoutButton(
long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() );
- nTextWidth += maButtonImageSize.Width();
+ nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on the safe side
if( nColumn >= 0 && nColumn < static_cast<int>(sizeof(mnColumnWidth)/sizeof(mnColumnWidth[0])) )
{
if( nTextWidth > mnColumnWidth[nColumn] )
@@ -732,6 +735,9 @@ void BackingWindow::Resize()
nYPos += nPDelta - nDiff;
nYPos += nWDelta/2 - nDiff;
+
+ if( mnLayoutStyle != 1 )
+ nYPos = maControlRect.Top() + mnBtnTop;
maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index 45fe60f67f..e1ad2ca457 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -121,7 +121,8 @@ namespace framework
sal_Int32 mnLayoutStyle;
svt::AcceleratorExecute* mpAccExec;
long mnBtnPos;
-
+ long mnBtnTop;
+
static const int nItemId_Extensions = 1;
static const int nItemId_Reg = 2;
static const int nItemId_Info = 3;
diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
index 7329b381c1..fbc83db937 100644
--- a/framework/source/services/fwk_services.src
+++ b/framework/source/services/fwk_services.src
@@ -53,34 +53,6 @@ Window DLG_BACKING
{
Text [ en-US ] = "~Open a document...";
};
- Bitmap BMP_BACKING_WRITER
- {
- File = "odt_32.png";
- };
- Bitmap BMP_BACKING_CALC
- {
- File = "ods_32.png";
- };
- Bitmap BMP_BACKING_IMPRESS
- {
- File = "odp_32.png";
- };
- Bitmap BMP_BACKING_DRAW
- {
- File = "odg_32.png";
- };
- Bitmap BMP_BACKING_DATABASE
- {
- File = "odb_32.png";
- };
- Bitmap BMP_BACKING_FORMULA
- {
- File = "odf_32.png";
- };
- Bitmap BMP_BACKING_FOLDER
- {
- File = "folder_32.png";
- };
String STR_BACKING_EXTHELP
{
Text [ en-US ] = "Add new features to %PRODUCTNAME";
@@ -137,6 +109,38 @@ Resource RES_BACKING_IMAGES
{
File = "addtemplate_32.png";
};
+ Bitmap BMP_BACKING_WRITER
+ {
+ File = "odt_32.png";
+ };
+ Bitmap BMP_BACKING_CALC
+ {
+ File = "ods_32.png";
+ };
+ Bitmap BMP_BACKING_IMPRESS
+ {
+ File = "odp_32.png";
+ };
+ Bitmap BMP_BACKING_DRAW
+ {
+ File = "odg_32.png";
+ };
+ Bitmap BMP_BACKING_DATABASE
+ {
+ File = "odb_32.png";
+ };
+ Bitmap BMP_BACKING_FORMULA
+ {
+ File = "odf_32.png";
+ };
+ Bitmap BMP_BACKING_OPENFILE
+ {
+ File = "folder_32.png";
+ };
+ Bitmap BMP_BACKING_OPENTEMPLATE
+ {
+ File = "templates_32.png";
+ };
};
Resource RES_BACKING_IMAGES_HC
@@ -177,6 +181,38 @@ Resource RES_BACKING_IMAGES_HC
{
File = "template_hc.png";
};
+ Bitmap BMP_BACKING_WRITER
+ {
+ File = "odt_32_hc.png";
+ };
+ Bitmap BMP_BACKING_CALC
+ {
+ File = "ods_32_hc.png";
+ };
+ Bitmap BMP_BACKING_IMPRESS
+ {
+ File = "odp_32_hc.png";
+ };
+ Bitmap BMP_BACKING_DRAW
+ {
+ File = "odg_32_hc.png";
+ };
+ Bitmap BMP_BACKING_DATABASE
+ {
+ File = "odb_32_hc.png";
+ };
+ Bitmap BMP_BACKING_FORMULA
+ {
+ File = "odf_32_hc.png";
+ };
+ Bitmap BMP_BACKING_OPENFILE
+ {
+ File = "folder_32_hc.png";
+ };
+ Bitmap BMP_BACKING_OPENTEMPLATE
+ {
+ File = "templates_32_hc.png";
+ };
};
Window WIN_TABWINDOW
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index 5b35b8dcff..521cacf1c6 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -345,6 +345,9 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
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 ) )&&
@@ -352,12 +355,13 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
it->first.getLength())
{
++nItemId;
- pPopupMenu->InsertItem( nItemId,it->first);
+ pPopupMenu->InsertItem( nItemId,it->first,nItemBits );
LangTable[nItemId] = it->first;
if(it->first == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu )
{
//make a sign for the current language
pPopupMenu->CheckItem(nItemId,TRUE);
+ bNothingSelected = false;
}
aCmd=aCmd_Language;
aCmd+=(String)it->first;
@@ -367,7 +371,9 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
//7--none
nItemId++;
- pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )) );
+ pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )), nItemBits );
+ if (bNothingSelected && !bMultipleLanguages)
+ pPopupMenu->CheckItem(nItemId,TRUE);
aCmd=aCmd_Language;
aCmd+=String::CreateFromAscii("LANGUAGE_NONE");
pPopupMenu->SetItemCommand(nItemId,aCmd);
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index 85def9b632..7c086f2d4a 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -272,6 +272,9 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R
}
}
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 )
{
@@ -281,22 +284,26 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R
{
//nItemId = xPopupMenu->getItemCount()+1;
nItemId++;
- xPopupMenu->insertItem( nItemId, *it, css::awt::MenuItemStyle::RADIOCHECK, nItemId );
+ xPopupMenu->insertItem( nItemId, *it, nMenuItemStyle, nItemId );
LangTable[nItemId]=*it;
if( *it == m_aCurLang )
{
//make a sign for the current language
xPopupMenu->checkItem( nItemId, TRUE );
+ bNothingSelected = false;
}
}
}
//7--none
nItemId++;
- xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, 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 )), css::awt::MenuItemStyle::RADIOCHECK, 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 )
{
@@ -305,22 +312,22 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R
*it != ::rtl::OUString::createFromAscii( "" ))
{
nItemId++;
- subPopupMenu->insertItem( nItemId, *it, css::awt::MenuItemStyle::RADIOCHECK, nItemId );
+ subPopupMenu->insertItem( nItemId, *it, 0, nItemId );
LangTable[nItemId]=*it;
}
}
//7--none
nItemId++;
- subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId );
+ subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), 0, nItemId );
//More
nItemId++;
- subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId );
+ subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId );
nItemId++;
xPopupMenu->insertSeparator(nItemId);
nItemId++;
- xPopupMenu->insertItem( nItemId, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, 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
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 4f3ba2917e..b76ab6f697 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -548,11 +548,14 @@ throw ( RuntimeException )
if ( Event.State >>= bCheckmark )
{
- // Checkmark
+ // Checkmark or RadioButton
m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE );
m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark );
- m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId,
- m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ) | MIB_CHECKABLE );
+
+ MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId );
+ //If not already designated RadioButton set as CheckMark
+ if (!(nBits & MIB_RADIOCHECK))
+ m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, nBits | MIB_CHECKABLE );
}
else if ( Event.State >>= aItemText )
{
@@ -1805,6 +1808,8 @@ void MenuBarManager::FillMenu(
nBits |= MIB_ICON;
if ( nStyle & ::com::sun::star::ui::ItemStyle::TEXT )
nBits |= MIB_TEXT;
+ if ( nStyle & ::com::sun::star::ui::ItemStyle::RADIO_CHECK )
+ nBits |= MIB_RADIOCHECK;
pMenu->SetItemBits( nId, nBits );
}
if ( xIndexContainer.is() )
diff --git a/framework/source/uielement/rootitemcontainer.cxx b/framework/source/uielement/rootitemcontainer.cxx
index c0d79b6f8b..eeeb621613 100644
--- a/framework/source/uielement/rootitemcontainer.cxx
+++ b/framework/source/uielement/rootitemcontainer.cxx
@@ -127,7 +127,6 @@ RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceCo
Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY );
if ( xPropSet.is() )
{
- rtl::OUString aUIName;
xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= m_aUIName;
}
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index d5151d383c..a804d9270b 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -117,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
{
@@ -812,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;
-
- // Retrieve popup menu labels
- if ( !m_bModuleIdentified )
+ Sequence< PropertyValue > aPropSeq;
+
+ // 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 );
@@ -830,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()
@@ -978,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 ] ));
@@ -1561,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;
}
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 51aff86787..a6fedb6624 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/source/xml/makefile.mk b/framework/source/xml/makefile.mk
index dd40af0cbe..a4f18a555a 100644
--- a/framework/source/xml/makefile.mk
+++ b/framework/source/xml/makefile.mk
@@ -47,7 +47,6 @@ SLOFILES= \
$(SLO)$/statusbardocumenthandler.obj \
$(SLO)$/toolboxconfiguration.obj \
$(SLO)$/toolboxdocumenthandler.obj \
- $(SLO)$/toolboxlayoutdocumenthandler.obj \
$(SLO)$/saxnamespacefilter.obj \
$(SLO)$/xmlnamespaces.obj \
$(SLO)$/acceleratorconfigurationreader.obj \
diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx
index 958d663379..054fbb1460 100644
--- a/framework/source/xml/menudocumenthandler.cxx
+++ b/framework/source/xml/menudocumenthandler.cxx
@@ -94,6 +94,7 @@
#define ATTRIBUTE_ITEMSTYLE_TEXT "text"
#define ATTRIBUTE_ITEMSTYLE_IMAGE "image"
+#define ATTRIBUTE_ITEMSTYLE_RADIO "radio"
// Property names of a menu/menu item ItemDescriptor
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
@@ -134,6 +135,7 @@ struct MenuStyleItem
MenuStyleItem MenuItemStyles[ ] = {
{ ::com::sun::star::ui::ItemStyle::ICON, ATTRIBUTE_ITEMSTYLE_IMAGE },
{ ::com::sun::star::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT },
+ { ::com::sun::star::ui::ItemStyle::RADIO_CHECK, ATTRIBUTE_ITEMSTYLE_RADIO }
};
@@ -437,8 +439,10 @@ throw( SAXException, RuntimeException )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
- if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK;
}
}
while ( nIndex >= 0 );
@@ -670,8 +674,10 @@ throw( SAXException, RuntimeException )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
- if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK;
}
}
while ( nIndex >= 0 );
@@ -725,8 +731,10 @@ throw( SAXException, RuntimeException )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
- if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK;
}
}
while ( nIndex >= 0 );
diff --git a/framework/source/xml/toolboxconfiguration.cxx b/framework/source/xml/toolboxconfiguration.cxx
index 6ef6d36b94..4ed368af21 100644
--- a/framework/source/xml/toolboxconfiguration.cxx
+++ b/framework/source/xml/toolboxconfiguration.cxx
@@ -30,7 +30,6 @@
#include "precompiled_framework.hxx"
#include <xml/toolboxconfiguration.hxx>
#include <xml/toolboxdocumenthandler.hxx>
-#include <xml/toolboxlayoutdocumenthandler.hxx>
#include <xml/saxnamespacefilter.hxx>
#include <services.h>
diff --git a/framework/source/xml/toolboxlayoutdocumenthandler.cxx b/framework/source/xml/toolboxlayoutdocumenthandler.cxx
deleted file mode 100644
index 039eaffad2..0000000000
--- a/framework/source/xml/toolboxlayoutdocumenthandler.cxx
+++ /dev/null
@@ -1,58 +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 <stdio.h>
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
-#include <threadhelp/resetableguard.hxx>
-#include <xml/toolboxlayoutdocumenthandler.hxx>
-#include <macros/debug.hxx>
-#include <xml/toolboxconfigurationdefines.hxx>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-
-#ifndef __COM_SUN_STAR_XML_SAX_XEXTENDEDDOCUMENTHANDLER_HPP_
-#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
-#endif
-
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
-#include <vcl/svapp.hxx>
-#include <vcl/toolbox.hxx>
-
-//_________________________________________________________________________________________________________________
-// namespace
-//_________________________________________________________________________________________________________________
diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk
index 08c1924f79..55cb3c0aea 100644
--- a/framework/util/makefile.mk
+++ b/framework/util/makefile.mk
@@ -78,7 +78,6 @@ LIB2OBJFILES= \
$(SLO)$/statusbardocumenthandler.obj \
$(SLO)$/toolboxconfiguration.obj \
$(SLO)$/toolboxdocumenthandler.obj \
- $(SLO)$/toolboxlayoutdocumenthandler.obj \
$(SLO)$/imagesconfiguration.obj \
$(SLO)$/imagesdocumenthandler.obj \
$(SLO)$/xmlnamespaces.obj \