summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-10-01 06:46:01 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-10-01 06:46:01 +0000
commit53560c06d957d0b62a8ac65dcfa53152aafaac81 (patch)
treed359fb799ff77f5b5f2b38cb52021bd3526c1214
parent81cfeaf812196f200016908caa757cb0b5be0377 (diff)
CWS-TOOLING: integrate CWS os117
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc5
-rw-r--r--sfx2/sdi/sfx.sdi23
-rw-r--r--sfx2/sdi/viwslots.sdi4
-rw-r--r--sfx2/source/view/viewsh.cxx66
-rw-r--r--svx/source/dialog/chardlg.cxx8
5 files changed, 96 insertions, 10 deletions
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 06147ff074..81725a5baf 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: sfxsids.hrc,v $
- * $Revision: 1.12 $
+ * $Revision: 1.12.58.1 $
*
* This file is part of OpenOffice.org.
*
@@ -529,7 +529,8 @@
#define SID_PRINT_SELECTEDSHEET (SID_SFX_START + 1712)
#define SID_OPTIONS_PAGEURL (SID_SFX_START + 1713)
#define SID_MORE_DICTIONARIES (SID_SFX_START + 1714)
-#define SID_SFX_free_START (SID_SFX_START + 1715)
+#define SID_ACTIVATE_STYLE_APPLY (SID_SFX_START + 1715)
+#define SID_SFX_free_START (SID_SFX_START + 1716)
#define SID_SFX_free_END (SID_SFX_START + 3999)
#define SID_OPEN_NEW_VIEW (SID_SFX_START + 520)
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 324bd0a554..ffa77116e7 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -8425,4 +8425,27 @@ SfxVoidItem MoreDictionaries SID_MORE_DICTIONARIES
ToolBoxConfig = TRUE,
GroupId = GID_OPTIONS;
]
+//--------------------------------------------------------------------------
+SfxVoidItem ActivateStyleApply SID_ACTIVATE_STYLE_APPLY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TEMPLATE;
+]
diff --git a/sfx2/sdi/viwslots.sdi b/sfx2/sdi/viwslots.sdi
index 21e8a7a40c..5d44a359ac 100644
--- a/sfx2/sdi/viwslots.sdi
+++ b/sfx2/sdi/viwslots.sdi
@@ -67,6 +67,10 @@ interface View
ExecMethod = ExecMisc_Impl ;
StateMethod = GetState_Impl ;
]
+ SID_ACTIVATE_STYLE_APPLY
+ [
+ ExecMethod = ExecMisc_Impl ;
+ ]
SID_PLUGINS_ACTIVE // ole(no) api(play/rec)
[
ExecMethod = ExecMisc_Impl ;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 0b67b5911b..a83e4e8a40 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: viewsh.cxx,v $
- * $Revision: 1.82 $
+ * $Revision: 1.82.98.2 $
*
* This file is part of OpenOffice.org.
*
@@ -33,9 +33,8 @@
#include <svtools/stritem.hxx>
#include <svtools/eitem.hxx>
#include <svtools/whiter.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
+#include <vcl/toolbox.hxx>
#include <svtools/intitem.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
@@ -64,9 +63,8 @@
#include <framework/actiontriggerhelper.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <toolkit/unohlp.hxx>
-#ifndef GCC
-#endif
#include <sfx2/app.hxx>
#include "view.hrc"
@@ -319,7 +317,65 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
rReq.Ignore();
break;
}
+ case SID_ACTIVATE_STYLE_APPLY:
+ {
+ com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
+ GetViewFrame()->GetFrame()->GetFrameInterface(),
+ com::sun::star::uno::UNO_QUERY);
+ Reference< com::sun::star::beans::XPropertySet > xPropSet( xFrame, UNO_QUERY );
+ Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
+ if ( xPropSet.is() )
+ {
+ try
+ {
+ Any aValue = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )));
+ aValue >>= xLayoutManager;
+ if ( xLayoutManager.is() )
+ {
+ rtl::OUString aTextResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/textobjectbar" ));
+ uno::Reference< ui::XUIElement > xElement = xLayoutManager->getElement( aTextResString );
+ if(!xElement.is())
+ {
+ rtl::OUString aFrameResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/frameobjectbar" ));
+ xElement = xLayoutManager->getElement( aFrameResString );
+ }
+ if(!xElement.is())
+ {
+ rtl::OUString aOleResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/oleobjectbar" ));
+ xElement = xLayoutManager->getElement( aOleResString );
+ }
+ if(xElement.is())
+ {
+ uno::Reference< awt::XWindow > xWin( xElement->getRealInterface(), uno::UNO_QUERY_THROW );
+ Window* pWin = VCLUnoHelper::GetWindow( xWin );
+ ToolBox* pTextToolbox = dynamic_cast< ToolBox* >( pWin );
+ if( pTextToolbox )
+ {
+ USHORT nItemCount = pTextToolbox->GetItemCount();
+ for( USHORT nItem = 0; nItem < nItemCount; ++nItem )
+ {
+ USHORT nItemId = pTextToolbox->GetItemId( nItem );
+ const XubString& rCommand = pTextToolbox->GetItemCommand( nItemId );
+ if( rCommand.EqualsAscii( ".uno:StyleApply" ) )
+ {
+ Window* pItemWin = pTextToolbox->GetItemWindow( nItemId );
+ if( pItemWin )
+ pItemWin->GrabFocus();
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+ rReq.Done();
+ }
+ break;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_MAIL_SENDDOCASMS:
diff --git a/svx/source/dialog/chardlg.cxx b/svx/source/dialog/chardlg.cxx
index 811ecac912..9344e50946 100644
--- a/svx/source/dialog/chardlg.cxx
+++ b/svx/source/dialog/chardlg.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chardlg.cxx,v $
- * $Revision: 1.102 $
+ * $Revision: 1.102.88.2 $
*
* This file is part of OpenOffice.org.
*
@@ -330,7 +330,8 @@ void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet )
SvxCaseMap eCaseMap = ( SvxCaseMap ) rItem.GetValue();
rFont.SetCaseMap( eCaseMap );
rCJKFont.SetCaseMap( eCaseMap );
- rCTLFont.SetCaseMap( eCaseMap );
+ // #i78474# small caps do not exist in CTL fonts
+ rCTLFont.SetCaseMap( eCaseMap == SVX_CASEMAP_KAPITAELCHEN ? SVX_CASEMAP_NOT_MAPPED : eCaseMap );
}
// Outline
@@ -1965,7 +1966,8 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
{
rFont.SetCaseMap( (SvxCaseMap)nCapsPos );
rCJKFont.SetCaseMap( (SvxCaseMap)nCapsPos );
- rCTLFont.SetCaseMap( (SvxCaseMap)nCapsPos );
+ // #i78474# small caps do not exist in CTL fonts
+ rCTLFont.SetCaseMap( static_cast<SvxCaseMap>( nCapsPos == SVX_CASEMAP_KAPITAELCHEN ? SVX_CASEMAP_NOT_MAPPED : (SvxCaseMap)nCapsPos) );
}
BOOL bWordLine = m_aIndividualWordsBtn.IsChecked();