Commits

Anonymous committed d868ac5

contextmenu1: #i116171 Adapt code to handle SID_ATTR_CHAR_FONTLIST

Comments (0)

Files changed (3)

sc/source/ui/docshell/docsh4.cxx

 /*************************************************************************
  *
  * 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
 #include "scitems.hxx"
 #include <sfx2/fcontnr.hxx>
 #include <editeng/eeitem.hxx>
+#include <editeng/flstitem.hxx>
 #include <sfx2/objface.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/bindings.hxx>
                 if (pList)
                     pList->RenameCellStyle( aOldName,aNewName );
             }
-        } 
+        }
     }
 
 	//	alles andere geht ueber Slots...
                 // an odd number of pages, print an empty page between copies, so the first page of
                 // the second copy isn't printed on the back of the last page of the first copy.
                 // (same as in Writer ViewShell::Prt)
-                
+
                 // FIXME: needs to be adapted to XRenderable interface
                 #if 0
                 pPrinter->StartPage();
                 }
                 break;
 
+            case SID_ATTR_CHAR_FONTLIST:
+                {
+                    if ( pImpl->pFontList )
+                    {
+                        rSet.Put( SvxFontListItem( pImpl->pFontList, SID_ATTR_CHAR_FONTLIST ) );
+                    }
+                    else
+                        rSet.DisableItem( nWhich );
+                }
+                break;
+
             default:
                 {
                 }
 		}
 	}
 
-    // Address in DDE function must be always parsed as CONV_OOO so that it 
+    // Address in DDE function must be always parsed as CONV_OOO so that it
     // would always work regardless of current address convension.  We do this
     // because the address item in a DDE entry is *not* normalized when saved
     // into ODF.

sd/sdi/_docsh.sdi

 /*************************************************************************
  *
  * 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
 		ExecMethod = Execute;
 		StateMethod = GetState;
 	]
+
+    SID_ATTR_CHAR_FONTLIST
+    [
+        StateMethod = GetState;
+    ]
 }
 

sd/source/ui/docshell/docshell.cxx

 /*************************************************************************
  *
  * 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
 			}
 			break;
 
+            case SID_ATTR_CHAR_FONTLIST:
+            {
+                if ( mpFontList )
+                {
+                    rSet.Put( SvxFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST ) );
+                }
+                else
+                    rSet.DisableItem( nWhich );
+            }
+            break;
+
 			default:
 			break;
 		}
 		}
 		pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false);
 	}
-	
+
 	SfxUndoManager* pUndoManager = GetUndoManager();
     if(pUndoManager && pUndoManager->GetUndoActionCount())
         pUndoManager->Clear();