summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2010-05-20 13:11:17 +0100
committerCaolán McNamara <cmc@openoffice.org>2010-05-20 13:11:17 +0100
commit38e2055d0d65c9464a74c3e688290fac0829a2d8 (patch)
treeca9c5cb9aa169232569eb1997dedbb54f286ed58 /framework
parentdefd78c476f1dc496bfa98c1701740a957803270 (diff)
parent2f4bff8415b28e36346872157104eb71322a743a (diff)
cmcfixes75: merge with DEV300 m78
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/classes/xmlnamespaces.hxx65
-rw-r--r--framework/inc/framework.hrc25
-rw-r--r--framework/inc/xml/toolboxlayoutdocumenthandler.hxx59
-rw-r--r--framework/source/services/backingwindow.cxx38
-rw-r--r--framework/source/services/backingwindow.hxx1
-rw-r--r--framework/source/services/fwk_services.src92
-rw-r--r--framework/source/uielement/rootitemcontainer.cxx1
-rw-r--r--framework/source/xml/makefile.mk1
-rw-r--r--framework/source/xml/toolboxconfiguration.cxx1
-rw-r--r--framework/source/xml/toolboxlayoutdocumenthandler.cxx58
-rw-r--r--framework/util/makefile.mk1
11 files changed, 99 insertions, 243 deletions
diff --git a/framework/inc/classes/xmlnamespaces.hxx b/framework/inc/classes/xmlnamespaces.hxx
deleted file mode 100644
index 60a3de4b68ba..000000000000
--- 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 e49192aa7c33..eea91edeaa07 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/xml/toolboxlayoutdocumenthandler.hxx b/framework/inc/xml/toolboxlayoutdocumenthandler.hxx
deleted file mode 100644
index 71a7843a0a9e..000000000000
--- 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/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index 21c62fd89a54..e4d37d1fe059 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] )
@@ -733,6 +736,9 @@ void BackingWindow::Resize()
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() ) );
nYPos += nBDelta - nDiff;
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index 76a12a48b816..c4d4c9b0b76b 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -121,6 +121,7 @@ namespace framework
sal_Int32 mnLayoutStyle;
svt::AcceleratorExecute* mpAccExec;
long mnBtnPos;
+ long mnBtnTop;
static const int nItemId_Extensions = 1;
static const int nItemId_Reg = 2;
diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
index 7e2ee3253e71..7ad8b4c3cede 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/rootitemcontainer.cxx b/framework/source/uielement/rootitemcontainer.cxx
index e67b734730e5..8c81f31f2394 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/xml/makefile.mk b/framework/source/xml/makefile.mk
index dd40af0cbe05..a4f18a555ab3 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/toolboxconfiguration.cxx b/framework/source/xml/toolboxconfiguration.cxx
index 9cd1f25c3df5..9d1c91aa6849 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 645750dc3f51..000000000000
--- 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 65edaff42d35..b1b7c691d29f 100644
--- a/framework/util/makefile.mk
+++ b/framework/util/makefile.mk
@@ -79,7 +79,6 @@ LIB2OBJFILES= \
$(SLO)$/statusbardocumenthandler.obj \
$(SLO)$/toolboxconfiguration.obj \
$(SLO)$/toolboxdocumenthandler.obj \
- $(SLO)$/toolboxlayoutdocumenthandler.obj \
$(SLO)$/imagesconfiguration.obj \
$(SLO)$/imagesdocumenthandler.obj \
$(SLO)$/xmlnamespaces.obj \