charmapacc.cxx (4d7c9de0) charmapacc.cxx (3ea0c3d5)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 152 unchanged lines hidden (view full) ---

161 if ( pParent )
162 xRet = pParent->GetAccessible();
163
164 return xRet;
165}
166// -----------------------------------------------------------------------------
167::com::sun::star::awt::Rectangle SAL_CALL SvxShowCharSetVirtualAcc::implGetBounds( ) throw (RuntimeException)
168{
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 152 unchanged lines hidden (view full) ---

161 if ( pParent )
162 xRet = pParent->GetAccessible();
163
164 return xRet;
165}
166// -----------------------------------------------------------------------------
167::com::sun::star::awt::Rectangle SAL_CALL SvxShowCharSetVirtualAcc::implGetBounds( ) throw (RuntimeException)
168{
169/* const Point aOutPos( mpParent->GetPosPixel() );
170 Size aOutSize( mpParent->GetOutputSizePixel() );
171 if ( mpParent->getScrollBar()->IsVisible() )
172 {
173 const Size aScrollBar = mpParent->getScrollBar()->GetOutputSizePixel();
174 aOutSize.Width() -= aScrollBar.Width();
175 aOutSize.Height() -= aScrollBar.Height();
176 }
177
178 awt::Rectangle aRet;
179
180 aRet.X = aOutPos.X();
181 aRet.Y = aOutPos.Y();
182 aRet.Width = aOutSize.Width();
183 aRet.Height = aOutSize.Height();
184
185 return aRet;
186*/
187 ::com::sun::star::awt::Rectangle aBounds ( 0, 0, 0, 0 );
188 Window* pWindow = mpParent;
189 if ( pWindow )
190 {
191 Rectangle aRect = pWindow->GetWindowExtentsRelative( NULL );
192 aBounds = AWTRectangle( aRect );
193 Window* pParent = pWindow->GetAccessibleParentWindow();
194 if ( pParent )

--- 511 unchanged lines hidden (view full) ---

706 return mpParent->m_pParent;
707}
708
709// -----------------------------------------------------------------------------
710
711sal_Int16 SAL_CALL SvxShowCharSetItemAcc::getAccessibleRole()
712 throw (uno::RuntimeException)
713{
169 ::com::sun::star::awt::Rectangle aBounds ( 0, 0, 0, 0 );
170 Window* pWindow = mpParent;
171 if ( pWindow )
172 {
173 Rectangle aRect = pWindow->GetWindowExtentsRelative( NULL );
174 aBounds = AWTRectangle( aRect );
175 Window* pParent = pWindow->GetAccessibleParentWindow();
176 if ( pParent )

--- 511 unchanged lines hidden (view full) ---

688 return mpParent->m_pParent;
689}
690
691// -----------------------------------------------------------------------------
692
693sal_Int16 SAL_CALL SvxShowCharSetItemAcc::getAccessibleRole()
694 throw (uno::RuntimeException)
695{
714 //return accessibility::AccessibleRole::LABEL;
715 return accessibility::AccessibleRole::TABLE_CELL;
716}
717
718// -----------------------------------------------------------------------------
719
720::rtl::OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription()
721 throw (uno::RuntimeException)
722{
723 OExternalLockGuard aGuard( this );
724 ensureAlive();
725 String sDescription = SVX_RESSTR( RID_SVXSTR_CHARACTER_CODE );
726
727 sal_Unicode c = mpParent->maText.GetChar(0);
728 char buf[16] = "0x0000";
729 sal_Unicode c_Shifted = c;
696 return accessibility::AccessibleRole::TABLE_CELL;
697}
698
699// -----------------------------------------------------------------------------
700
701::rtl::OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription()
702 throw (uno::RuntimeException)
703{
704 OExternalLockGuard aGuard( this );
705 ensureAlive();
706 String sDescription = SVX_RESSTR( RID_SVXSTR_CHARACTER_CODE );
707
708 sal_Unicode c = mpParent->maText.GetChar(0);
709 char buf[16] = "0x0000";
710 sal_Unicode c_Shifted = c;
730/*
731 for( int i = 0; i < 4; ++i )
732 {
733 char h = (char)(c_Shifted & 0x0F);
734 buf[5-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
735 c_Shifted >>= 4;
736 }
737*/
738 int tmp_len = 4;
739 if(c_Shifted>0xFFFF) tmp_len = 8;
740 for( int i = 0; i < tmp_len; ++i )
741 {
742 char h = c_Shifted & 0x0F;
711 int tmp_len = 4;
712 if(c_Shifted>0xFFFF) tmp_len = 8;
713 for( int i = 0; i < tmp_len; ++i )
714 {
715 char h = c_Shifted & 0x0F;
743 //buf[9-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
744 buf[tmp_len+1-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
745 c_Shifted >>= 4;
746 }
747 if( c < 256 )
748 snprintf( buf+6, 10, " (%d)", c );
749 sDescription.AppendAscii(" ");
750 sDescription.AppendAscii(buf);
751

--- 173 unchanged lines hidden ---
716 buf[tmp_len+1-i] = (h > 9) ? (h - 10 + 'A') : (h + '0');
717 c_Shifted >>= 4;
718 }
719 if( c < 256 )
720 snprintf( buf+6, 10, " (%d)", c );
721 sDescription.AppendAscii(" ");
722 sDescription.AppendAscii(buf);
723

--- 173 unchanged lines hidden ---